HOW TO SET A DOCUMENT STATUS?

HOW TO SET A DOCUMENT STATUS?


Subscribe to ProcessStatusChanged event in WorkflowRuntime.

This 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 GetLocalizedStateName method:

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

Following this, set the status value in your database.