Getting WF Profile Status in BR and using it in Cube View

LuciaPank
New Contributor

Hello,

is there a BR function where I can get a Workflow Status (example "Pre-Process Completed, Locked")? When I am using brapi.Workflow.Status.GetWorkflowStatus I only get UniqueId and Name.

I want to use the status in a Cube View to display for users.

Thank you!

1 ACCEPTED SOLUTION

FredLucas
Contributor III

Hi @LuciaPank ,

I'm not sure what you mean by only getting the UniqueId and Name.

Assuming you want to show the status of the selected WF step, you could try something like this:

Dim wfInfo As WorkflowInfo = BRApi.Workflow.Status.GetWorkflowStatus(si, si.WorkflowClusterPk)
Dim wfStepStatus As WorkflowStatusTypes = wfInfo.CurrentStep.Status
brapi.ErrorLog.LogMessage(si,$"Current Step Status: {wfStepStatus.ToString}")

 

View solution in original post

2 REPLIES 2

FredLucas
Contributor III

Hi @LuciaPank ,

I'm not sure what you mean by only getting the UniqueId and Name.

Assuming you want to show the status of the selected WF step, you could try something like this:

Dim wfInfo As WorkflowInfo = BRApi.Workflow.Status.GetWorkflowStatus(si, si.WorkflowClusterPk)
Dim wfStepStatus As WorkflowStatusTypes = wfInfo.CurrentStep.Status
brapi.ErrorLog.LogMessage(si,$"Current Step Status: {wfStepStatus.ToString}")

 

Thank you very much, this works.