Getting the Workflow Profile Text2 ( or 3 or 4 ) attribute value using BRApi ( Not Text1 )
Hi all,
I am baffled as to why I am unable to retrieve the Text2 ( or 3 or 4 ) attribute value in a workflow profile. I use the following code to get the Text1 value :
Dim wfClusterPK As WorkflowUnitClusterPk = si.WorkflowClusterPk
Dim wfScenarioTypeID As Integer = BRApi.Workflow.General.GetScenarioTypeId(si, wfClusterPK)
Dim sVarStep2 As String =BRApi.Workflow.Metadata.GetParent(si,args.SubstVarSourceInfo.WorkflowUnitInfo.ProfileName).GetAttributeValue(wfScenarioTypeID, 18000)
However, if I substitute 20000, 22000 or 24000 as the attribute it will not apply this in the business rule. I have checked the database tables and the values are there with those attribute values and the scenarioTypeId is set to 0 for Actual.
Here is the database filter, so the value are there, but why even I hard code the scenariotype as 0 will it not retrieve these values for me. At present, am only just trying to get them to show in the error log.
I am running the cubeview from the workflow profile, previously I found when trying to pull in Text1 that it would give intermittent results if I ran from the cubeview builder rather than from calling the cubeview whilst in a WFProfile.
Any thoughts please ?
Regards
You have this code:
Dim sVarStep2 As String =BRApi.Workflow.Metadata.GetParent(si,args.SubstVarSourceInfo.WorkflowUnitInfo.ProfileName).GetAttributeValue(wfScenarioTypeID, 18000)
Instead of 18000 you use SharedConstants.WorkflowProfileAttributeIndexes.Text2
Dim sVarStep2 As String =BRApi.Workflow.Metadata.GetParent(si,args.SubstVarSourceInfo.WorkflowUnitInfo.ProfileName).GetAttributeValue(wfScenarioTypeID, SharedConstants.WorkflowProfileAttributeIndexes.Text2)