Forum Discussion
sameburn
OneStream Employee
12 days agoHi 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.Name
You 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
Related Content
- 3 years ago
- 2 years ago
- 2 years ago