The OneStream Community is temporarily frozen until June 29th due to the ongoing maintenance. Please read the blog post here to learn more.
Forum Discussion
jzachar
3 years agoNew Contributor
can we test if Workflow Channel is locked in a BR before taking requested action?
I need to test if a workflow channel is locked in a BR before performing the BR actions. Can I test if the channel is locked? How?
- 3 years ago
You can get the status of a workflow.
Dim wfClusterPk As WorkflowUnitClusterPk = BRAPi.Workflow.General.GetWorkflowUnitClusterPk(si, "Workflow name", "ScenarioNAme", "timeName") 'Complete the IMPORT-VALIDATE-LOAD-PROCESS Workflow Steps 'Get the Workflow info so that we can determine which steps can be executed. Dim wfInfo As WorkflowInfo = BRApi.Workflow.Status.GetWorkflowStatus(si, wfClusterPk, True)
ckattookaran
3 years agoValued Contributor
You can get the status of a workflow.
Dim wfClusterPk As WorkflowUnitClusterPk = BRAPi.Workflow.General.GetWorkflowUnitClusterPk(si, "Workflow name", "ScenarioNAme", "timeName")
'Complete the IMPORT-VALIDATE-LOAD-PROCESS Workflow Steps
'Get the Workflow info so that we can determine which steps can be executed.
Dim wfInfo As WorkflowInfo = BRApi.Workflow.Status.GetWorkflowStatus(si, wfClusterPk, True)jzachar
3 years agoNew Contributor
Thank you (code used below)
'Check If WF channel locked/unlocked
Dim wfStatus As WorkflowInfo = BRApi.Workflow.Status.GetWorkflowStatus(si, si.WorkflowClusterPk, True)
If wfStatus IsNot Nothing Then
If wfStatus.Locked Then
' Channel locked
else
' channel unlocked\
end if
End if
Related Content
- 1 year ago
- 2 years ago
- 2 years ago