Skip to main content
January 30, 2023
Solved

can we test if Workflow Channel is locked in a BR before taking requested action?

  • January 30, 2023
  • 1 reply
  • 0 views

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?

Best answer by ckattookaran

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)

1 reply

January 30, 2023

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)
jzacharAuthor
January 30, 2023

I need to test the status of the workflow channel, not the Workflow itself.  I have a WF channel that when locked should NOT allow the BR attached to the 'Load' button to run.  When I click 'Complete' I get the below error (which is correct).  But when I click the 'Load' button the BR attached executes.  I need to test the status of the channel to see if it is locked prior to continuing with the BR

jzachar_0-1675105436428.png