Forum Discussion
Great find! However, the function asks for workflowChannelKey ... How can I generate that parameter for the suggested function:
BRApi.Workflow.Locking.LockWorkflowUnitDescendants(si, si.WorkflowClusterPk, WorkflowProfileTypes.AllProfiles, workflowChannelKey)
Hi Oscar,
You could leave empty to lock all channels, or specify an individual Workflow Channel, see examples below.
Dim wfChannelId As Guid = guid.Empty
' Dim wfChannelId As Guid = WorkflowChannel.NoDataLock.UniqueID
' Dim wfChannelId As Guid = WorkflowChannel.AllChannelInput.UniqueID
' Dim wfChannelId As Guid = WorkflowChannel.Standard.UniqueID
Then use:
BRapi.Workflow.Locking.LockWorkflowUnitDescendants(si, si.WorkflowClusterPk, WorkflowProfileTypes.AllProfiles, wfChannelId)
- AHarding2 years agoNew Contributor II
Hi Lee
Any ideas on how to get .LockWorkflowUnitDescendants with a non standard channel (i.e. added by the customer)? The logic seems to allow express use of 'NoDataLock', 'AllChannelInput' and 'Standard', but for custom WF Channels, can't seem to identify how to get the UniqueId info.
BrAlex
- OS_Pizza2 years agoContributor III
AHarding @lee Were you able to complete using non standard channel ? Same challenge here.
Dim wfChannelId As Guid = WorkflowChannel.<Custom channelname>
- AHarding2 years agoNew Contributor II
OS_Pizza I gave up on this in the end, as found a simple, inbuilt, way the WF tool would do what I was after.
I did not realise that you could lock/unlock all WF Steps under some parent with specific WF Channel Key in one go, but it can be done easily (just in case you were unaware as I was, it is per the image below):
Sorry to have no answer for your question!
BrAlex
Related Content
- 8 months ago
- 3 years ago