Changing workflow state

Always back up your database before editing workflow tables.

You can change the stage of a record in workflow by editing the WorkFlowInstance table.

When an entity record is created in a workflow, the workflow ID on the record maps to an instance ID in the WorkFlowInstance table. The WorkFlowInstance table is linked to the WorkFlowState table and determines the current state and associated rules for the record.

To change the record in the WorkFlowInstance table to another state, do the following.

  1. Look in the Workflow table to find the workflow ID.
  2. Run a select from the WorkFlowInstance table for the relevant entity workflow. This returns the state ID for each stage of the workflow.
  3. Update the state ID of the WorkFlowInstance record to be the new state. For example, if the instance ID is 5224 and the state ID for the new state is 62, run the following:
    Copy
    UPDATE workflowinstance SET WkIn_CurrentStateId = 62 WHERE WkIn_instanceId = 5224
  4. Refresh the UI to display the changes.
You can change workflow state using an ASP page. For more information, see ASP page that changes workflow state.