The Workflow supports a set of activities of various types to configure a process that fits your needs.
See the Workflow Editor article to familiarize yourself with the functionality.
Available activities:
To define variables in your activities via the agent interface if necessary, complete the steps below:
See the Creating a new activity article to learn more. |
|
The activities included in this category execute scripts, change and update records.
The Run Script activity executes the defined script.
Activity fields
Field | Mandatory | Description |
---|---|---|
Name | N | Activity name. A good practice is to make the name descriptive for clarity. |
Run Script | N | Specify the script to execute. |
Description | N | Type a brief description of the activity. |
This activity type causes the update of the current target record after execution. The activity logic is defined by the Immediately value in the When to Run field within the Workflow Activity Type (wf_activity_type) table. Also, the Immediately option and the related activity behavior allows to avoid the update of records within Run Script scripts, as follows:
It will be done automatically. |
The Join activity combines several activity exit transitions, so that they turn into one transition. This activity is useful for synchronizing several activities, so that the next activity does not start until the previous ones are finished.
In the example below, the Join activity waits for the results of processing of the If, Subflow, and Wait activities. If all three transitions from these activities lead to the Join activity, the path of the Complete exit is taken (to the activity named Insert). If one of the activities bypasses the Join activity (in this case, it is the No exit of the If activity), then the Incomplete exit is taken.
Never join multiple exits from an activity to a single Join activity, otherwise, the Join activity works incorrectly and never selects the Complete transition. In the example below, both exits from the If activity lead to the Join activity. Even though the condition of the If activity is met, the Join activity selects the Incomplete exit as the No exit from the If activity is inactive. |
How to use the Join activity
Activity fields
Field | Mandatory | Description |
---|---|---|
Name | N | Activity name. A good practice is to make the name descriptive for clarity. |
Description | N | Type a brief description for the activity. |
Activity exits
Result | Description |
---|---|
Complete | This exit is taken when all joined activities have finished running and proceeded to this activity. |
Incomplete | This exit is taken when all joined activities have finished running, but at least one of them has not proceeded to this activity, that is, another path was taken bypassing the Join activity. Example: In this case, the If activity bypassed the Join activity; therefore, the Incomplete exit was taken. |
The Set Values activity sets specific values to the current record. These values determine the activity behavior when the workflow freezes or ends.
This activity type causes the update of the current target record after execution. The activity logic is defined by the Immediately value in the When to Run field within the Workflow Activity Type (wf_activity_type) table. |
Activity fields
Field | Mandatory | Description |
---|---|---|
Name | N | Activity name. A good practice is to make the name descriptive for clarity. |
Description | N | Type a brief description of the activity. |
Table | Y | A table to be affected by this activity. This field is populated automatically. |
Set Values | N | Select the field whose value you want to change when the workflow freezes or ends, and define the new value. Click the leftmost field to open the drop-down list of available fields. Click the rightmost field to open the drop-down list or enter the value (depending on the type of the selected field). |
The Record Generator activity creates records in any table extending from the Task table.
If both the Wait For Condition Complete and Advanced checkboxes are selected, then they both must be evaluated for this activity to proceed with the transition. |
Make sure that all mandatory fields are populated when using this activity; otherwise, the workflow will break its execution. |
Activity fields
Field | Mandatory | Description | ||
---|---|---|---|---|
Name | N | Activity name. A good practice is to make the name descriptive for clarity. | ||
Description | N | Type a brief description of the activity. | ||
Task Type | Y | Select the task type. You can make a selection from the corresponding task table. Click the magnifier icon | ||
Task Values from | N | The source of values for a task to be created. Available options:
| ||
Set Values | N | Specify an existing template related to the selected task table.
| ||
Task Template | Y | Specify an existing template related to the selected task table.
| ||
Wait for Condition Complete | N | Select this checkbox to display Completion Conditions. When selected, the conditions are mandatory for completing the task. | ||
Completion Conditions | Y | Specify conditions for the created task. The process will not proceed to the next activity until the task meets all conditions.
| ||
Advanced | N | Select this checkbox to specify a script to execute. When you select this checkbox, the Script text field appears. | ||
Script | N | Set values for the task in this script. Use the variable 'new_task' when setting additional values. This field is displayed when the Advanced checkbox is selected.
For example:
|
The Create Event activity establishes an event from the Event Register (sys_event_register) table in a queue. Later, this event can execute specific scripts or send notifications. When the Create Event action runs, a new event record is created in the Event (sys_event) table.
See the Events article to learn more.
Activity fields
Field | Mandatory | Description | |
---|---|---|---|
Name | N | Activity name. A good practice is to make the name descriptive for clarity. | |
Event | Y | Choose the event instance on the basis of which the activity will create events. All the event instances (or event registers) are listed in the Event Registers (sys_event_register) table. Click the magnifier icon | |
Param 1 ... Param 5 | N | Specify the event parameter. If this parameter is a string value, it must be enclosed in quotes.
| |
Description | N | Type a brief description of the activity. |
The activities included in this category set conditions to continue the processing and define further transition of the workflow. The transition taken depends on the conditions set and the activity outcome.
The Wait Condition activity pauses the workflow until the defined conditions are met. The activity checks if the record meets the conditions after every record update.
Activity fields
Field | Mandatory | Description | |
---|---|---|---|
Name | N | Activity name. A good practice is to make the name descriptive for clarity. | |
Description | N | Type a brief description of the activity. | |
Table | N | A table to be affected by this activity. This field is populated automatically. | |
Condition | Y | Define conditions mandatory for proceeding with the Yes transition. | |
Advanced | N | Select this checkbox to specify a script to execute. When you select this checkbox, the Script field appears. | |
Script | N | This field appears when the Advanced checkbox is selected. If specified, the workflow is paused at this activity until this script returns true. The result of the script execution will be added with the AND operator to the results of the Condition specified.
|
If both Condition and Script are specified, then both of them must execute successfully to transition to the next activity. The workflow will stay paused until the Condition is met and the Script returns true. |
This activity checks a condition to determine if a Yes or No transition should be taken.
If both the Condition and Advanced checkboxes are selected, then they both must be evaluated for this activity to choose the Yes transition; otherwise, the No transition is chosen. |
Activity fields
Field | Mandatory | Description | |
---|---|---|---|
Name | N | Activity name. A good practice is to make the name descriptive for clarity. | |
Description | N | Type a brief description of the activity. | |
Table | Y | A table to be affected by this activity. This field is populated automatically. | |
Condition | Y | A condition to meet in order to proceed with the Yes transition.
| |
Advanced | N | Select this checkbox to specify a script to execute. When selected, the Script field appears. | |
Script | N | This field is displayed when the Advanced checkbox is selected. If the script is executed, the result of the script will be added with the AND operator to the results of the Condition specified. To proceed with the Yes transition, the script should return the true value.
|
The Switch activity manages transitions by checking the field values against the defined case values (one or more). This activity works like the switch statement.
The activity checks against conditions specified in the Column field or in manually defined exits and, based on the outcome, selects the next transition.
Activity fields
Field | Mandatory | Description | ||
---|---|---|---|---|
Table | N | A table to be affected by this activity. This field is populated automatically. | ||
Name | N | Activity name. A good practice is to make the name descriptive for clarity. | ||
Type | Y | Select the source of exit options for this activity. The workflow will perform check values against these conditions. Available options:
| ||
Column | Y | Specify a column containing options for the condition. These options will become exits of the activity. Click the magnifier icon
In the example below, the Switch activity takes options from the Type field.
|
To create additional exits, perform the following steps:
Field | Mandatory | Description |
---|---|---|
Name | N | |
Table | N | A table to be affected by this activity. This field is populated automatically. |
Activity | Y | The activity to which this exit is related. This field is populated automatically. |
Description | N | Type a brief description of the activity exit. |
Condition | Y | Define conditions mandatory for proceeding with this specified transition. |
Advanced | N | Select this checkbox to specify a script to execute. When selected, the Script field appears. |
Script | Y | This field appears when the Advanced checkbox is selected. If specified, the workflow is paused at this activity until this script returns true. |
If both Condition and Script are specified, then both of them must execute successfully to transition to the next activity. The workflow will stay paused until the Condition is met and the Script returns true. |
In case of the Switch activity, every exit can be configured with individual scripts. So the Advanced checkbox appears only when the activity has more than one exit. The checkbox appears only on exit forms. |
The User Approval activity configures the approval processing: it creates approvals, sets approval rules and conditions.
The Subflow activity performs another workflow. This activity is useful for complex workflows that include other processes.
The Subflow activity performs an existing workflow as part of the current workflow.
Activity fields
Field | Mandatory | Description |
---|---|---|
Name | N | Activity name. A good practice is to make the name descriptive for clarity. |
Workflow | Y | The published workflow to be performed by the activity. Click the magnifier icon |
Description | N | Type a brief description for the activity. |
When a Subflow block is started, a workflow context is created for the current record. Until the context is finished, another Subflow block with the same workflow cannot be started, since at any given time only one workflow context can exist for the current record.
For example, a Subflow block referring to the "Request 2nd phase" workflow is configured in the main workflow. After the main workflow starts, the "Request 2nd phase" subflow is started. The subflow execution context is paused. If another attempt to launch the "Request 2nd phase" subflow is made within the main workflow, the subflow is created in the canceled state.
The Timer activity pauses the workflow. This activity is useful when the process requires waiting for a certain period.
The Timer activity defines a period of time during which the current workflow does not run. It follows the logic below:
Activity fields
Field | Mandatory | Description | |
---|---|---|---|
Name | N | Activity name. A good practice is to make the name descriptive for clarity. | |
Description | N | Type a brief description of the activity. | |
Timer, based on | Y | The way the timer duration is calculated. Available options:
| |
Duration | Y | Specify the duration of time to wait in days, hours, minutes and seconds to wait before proceeding to the next activity.
| |
Script | Y | Specify the script implementing the duration calculation logic. Here, you can use the SimpleOne API methods.
| |
Schedule tab | |||
Timezone, based on | N | Specify a timezone source for this activity. Available options:
| |
Timezone | Y | Select a timezone from the list. Click the magnifier icon
| |
Schedule, based on | N | Specify a schedule source for this activity. Available options:
| |
Schedule | Y | Select a schedule from the list. Click the magnifier icon
|