Forum Discussion
NicoleBruno
7 months agoValued Contributor
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 i...
- 7 months ago
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
MarcusH
7 months agoValued Contributor
I had the same problem - I wanted to check the Workflow Profile was set up consistently not just for the steps but also for IC Matching, security groups etc. I looked at writing a BR to extract the information but I found that it was quite complex when the information I wanted was already in an XML. So I wrote a macro in Excel vba to read the Workflow Profile xml file.
If you give me an email address I will send it to you. It comes with absolutely no guarantees or promises.
- JK126 months agoNew Contributor II
MarcusH , any chance you can share this Macro? [email protected]
Related Content
- 1 year ago
- 3 years ago
- 2 years ago
- 2 years ago