Forum Discussion
ChrisR1ch
8 months agoNew Contributor III
I'm having a problem getting a list of all workflow profiles, to be able to loop through and pull Access Group and Maintenance Group. Can you give me or direct me to a snippet of code that will return that list.
jayaleck
3 days agoNew Contributor II
Not sure if you were able to get your list, found this thread looking for something else... But here's something I did to loop through profiles and lock them,
Dim wfClusterPk = BRAPi.Workflow.General.GetWorkflowUnitClusterPk(si,wfName,ScenarioForStatus, WFTimeForStatus)
Dim profileInfos As List(Of WorkflowProfileInfo) = BRApi.Workflow.Metadata.GetRelatives(si, BRAPI.Workflow.General.GetWorkflowUnitClusterPk _
(si,wfName,ScenarioForStatus, WFTimeForStatus),WorkflowProfileRelativeTypes.Descendants,WorkflowProfileTypes.AllProfiles)
For Each profileInfo In profileInfos
'Brapi.ErrorLog.LogMessage(si,$"profileInfo - {profileInfo}")
BRApi.Workflow.Locking.LockWorkflowUnit(si, wfClusterPk)
BRapi.Workflow.Locking.LockWorkflowUnitDescendants(si, wfClusterPk, WorkflowProfileTypes.AllProfiles, wfChannelId)
Next
Related Content
- 2 months ago
- 2 years ago
- 2 years ago