How to set document status

Subscribe to ProcessStatusChanged event in WorkflowRuntime. The following event is called when the process status is changed. To get the name of the status use:

e.ProcessInstance.CurrentState

To get the name of the status in your locale use the GetLocalizedStateName method:

var nextState = WorkflowInit.Runtime.GetLocalizedStateName(e.ProcessId, e.ProcessInstance.CurrentState);

Following this, set the status value in your database.

Top