Skip to main content
Expert
Jul 20, 2023 2:55 PM UTC

Confirmation Entities or Calculation Entities from Import using Extender ?

Hi - I am trying to get the confirmation entities from all of my Import Channel under my WF Profile. using extender BR but I am not able to find an instance to call the function. Any help would be appreciated ?

 

I was able to get the Confirmed entitles at the WF Profile Level and the below is the code.

 

 

Dim A As String = String.Empty
Dim wfClusterPk As WorkflowUnitClusterPk = BRApi.Workflow.General.GetWorkflowUnitClusterPk(si,"Total_Corporate","Actual","2023M1")
Dim objList As List(Of BaseNameIntPairInfo) = BRApi.Workflow.Metadata.GetProfileConfirmationEntities(si,wfClusterPk)

For Each cent As BaseNameIntPairInfo In objList
	
	A = cent.Name
	brapi.ErrorLog.LogMessage(si,A)
Next

 

6 replies

MikeG
Contributor
Jul 20, 2023 3:36 PM UTC

Hi Krishna  Make sure you got this selected in your Workflow Calculation Definition

MikeG_0-1689867296929.png

The use the Snippet Editor for the syntax.

MikeG_1-1689867356446.png

 

Hope this helps.

KrishnaAuthor
Expert
Jul 20, 2023 3:43 PM UTC

Thanks Mike. I am using extender rule and there is no api. It should be Brapi. Btw the Confirmation entities are checked.

MikeG
Contributor
Jul 20, 2023 3:49 PM UTC

OK, not sure why you want to do that.  Did you find this Dashboard Extender - Snippet, there are code helpers to run a Confirmation and to get the ConfirmInstanceInfo.

MikeG_0-1689868152046.png

Good luck, if you provide more information on the end game I'm interested to know what you are trying to solve.

Hope this helps,

 

KrishnaAuthor
Expert
Jul 20, 2023 3:55 PM UTC

Thanks for your quick response. I will research more. I have created a Formeventhandler and each form has its own entity and I am trying to read the confirmation entity and pass it to verify a cell amount. Make it dynamic vs Hard coding the entities.

MikeG
Contributor
Jul 20, 2023 3:58 PM UTC

If there is one and only Entity for each Form task, consider entering that 1 Entity as the |WFText1| property, on that Scenario Type on the Workflow Forms task.  Easy to grab by way of code in the EventHandler.

KrishnaAuthor
Expert
Jul 20, 2023 7:43 PM UTC

Thanks for the suggestion. Below is the code

Dim A As String = String.Empty
Dim B As String = String.Empty
Dim C As String = String.Empty

For Each wpf As WorkFlowProfileInfo In objList
   B = (wpf.Name.Split(".")(1)).Trim
   'brapi.ErrorLog.LogMessage(si,B)
  ' C= B.Split(wpf.Name,"." (1))
If wpf.Name.StartsWith("USA") Then

'brapi.ErrorLog.LogMessage(si,wpf.Name.Length)
A = wpf.GetAttributeValue(ScenarioTypeId.Actual,sharedconstants.WorkflowProfileAttributeIndexes.Text1)
If a.Length > 1 Then
brapi.ErrorLog.LogMessage(si, "WFName---" & wpf.Name & "---TextValue---" & A)
End If
End If

Next