Workflow is a tool that allows you to configure complex processes in the system. The Workflow Editor visually displays processes as a set of boxes and arrows representing transitions, conditions, and stages. Set the sequence of stages and steps to create the necessary logic by using various types of activities: utilities, conditions, approvals, subflow, and timer.
Workflow is a logical sequence of activities describing a process. It consists of the following parts:
The workflow starts when the conditions specified in the parameters are met. Usually, the starting conditions are the insertion of a record, update of a field, or a field with a certain value. For example, the Incident table has a workflow that is executed each time a new record is created.
After the start event, the workflow executes activities one after the other according to the defined transitions. Typically, activities have more than one transition – the path they take depends on the activity outcome.
Within an activity, the workflow performs the following steps:
There are two workflow states:
When you start working on your workflow (whether a new or existing one), it is in the Checked Out state. Other users cannot edit this workflow with you because it is already checked out. Also, the workflow is inactive when it is checked out; the workflow needs to be published to enable it.
To enable editing a published workflow, perform the following steps:
When the workflow configuration is completed, and the process is ready to run, you need to change the workflow state to Published. Users are not able to edit the workflow, until it returns to the Checked out state.
To publish a workflow, perform the following steps:
A workflow starts when a user who created it meets the specified conditions. It starts even if the workflow is not published yet and is not available to other users. The workflow is executed for the process owner with the unpublished changes. For other users, the latest published workflow version is executed. |
When you create or update a workflow, a new record is created in the Workflow Version (wf_workflow_version) table. The process is as follows:
You create a new workflow (version 1). A new record is created in the Workflow Version (wf_workflow_version) table. It has the Checked Out checkbox selected and the Published checkbox cleared.
The execution of workflows is reflected in the table of Workflow Context (wf_context) table. To view the list of active contexts, navigate to Workflow → Active Contexts. To view the list of all contexts, navigate to Workflow → All Contexts.
By viewing the contexts in the Workflow Context (wf_context) table, you can get more information about the execution of workflow blocks. The context form displays the following fields:
Field | Description |
---|---|
Name | The name of the workflow. |
Workflow Version | The related record of the workflow version. |
Table | The table the workflow is used on. |
Related Record | The reference to the target record. |
Scratchpad | The contents of the scratchpad object used in the workflow scripting. |
State | The current state of the context. |
Due | The context deadline. |
Started at | Start date and time. |
Ended at | End date and time. |
Started by | The initiator of the context. |
The context form also contains the Workflow Executing Activity related list. The order in which the context activities are executed is specified in the Execution order column.
You can view a graphical representation of the workflow execution context. To do this, open the record form for which the context is created and click Show workflow:
The following window appears:
|