Want to report on Workflow Profile Workflow Name (a property on the WF profile step setup)
I'm looking for a way to report on our workflow profile set up - specifically want to be able to pull the workflow profile (the forms step added to the WF) and the associated "Workflow Name" (which is an awful name for this). Workflow Name refers to the tasks on the step:
The point is to make sure certain steps are all set up the same way with the same step tasks but I can't determine the best way to do this right now.
Looks like the WorkflowProfileAttributes table may possibly show me but I don't know where I can find a listing of what the AttributeIndex equates to on the actual WF set up (design doc shows zero results when searching either of those terms). Any direction or guidance would be very much appreciated!!
Hi NicoleBruno
This is how to retrieve Workflow Name property..
' Derive WorkflowInfo Dim wfinfo As WorkflowInfo = BRApi.Workflow.Status.GetWorkflowStatus(si, si.WorkflowClusterPk, True) ' Get WorkflowName e.g. Import, Validate, Load Dim wfName As String = wfinfo.NameYou can also retrieve a Dictionary of Workflow attributes by index from WorkflowProfileInfo object
' Create stringbuilder Dim sb As New Text.StringBuilder ' Declare WorkflowProfileInfo Dim wfInfo As WorkflowProfileInfo = BRApi.Workflow.Metadata.GetProfile(si, si.WorkflowClusterPk) ' Get Dictionary of WorkflowProfileAttributeIndexes (for default scenario type) Dim objDict As Dictionary(Of Integer, String) = SharedConstants.WorkflowProfileAttributeIndexes.GetAttributes(wfInfo.Type) sb.AppendLine(String.Join(Environment.NewLine, objDict.Select(Function(kvp) String.Format("Key ➡ {0}, Value ➡ {1}, AttributeValue ➡ {2}", kvp.Key, kvp.Value, wfInfo.GetAttributeValueForDefaultScenarioType(kvp.Key))))) ' Log Result ➡ Throw Error Throw New XFException(sb.ToString())Hope this helps
Sam