As an instance administrator, you may need to create your own workflow activity endowed with the specific logic when the default activities set does not fit your needs. You can do this via SimpleOne administrative interface.
Role required: admin, wf_admin.
To create a new activity, you need to complete several steps:
- Create a table storing settings for the newly created activity.
- Create an activity type that will store parameters and bear the functionality of your newly created activity.
- Create activity exit types that will specify the exit condition from this activity.
Creating a table
In fact, every activity stores its settings in a child table of the Workflow Activity (wf_activity) table.
To create this table, please complete the steps below:
- Navigate to Workflow → Activities.
- Enter the hamburger menu at the top left of the page.
- Enter the Configure menu and select the Table item.
- On the page opened, scroll down to the Related Lists area and click on the Table tab.
- Click New and fill in the fields. For more information about the table attributes, please refer to the Table Attributes article.
- Click Save or Save and Exit to apply changes.
Field | Mandatory | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Title | Y | The activity title. When filling in this field, the Name field is populated automatically with a corresponding name. | ||||||||||||
Name | Y | The activity name. This field is populated automatically with a name corresponding to the Title field.
| ||||||||||||
Parent | N | Choose the table named Workflow Activity (wf_activity). | ||||||||||||
Is Extendable | N | If an activity has this property set to true, it can be a parent for another activity. | ||||||||||||
Add Menu Item | N | Select this checkbox to create a new menu category in the Navigation menu. If the checkbox is set to true, the Menu Item tab will appear in the Related Lists area. | ||||||||||||
Menu Item tab | ||||||||||||||
Menu Category | Y | Specify a menu category to which the menu item should be related. | ||||||||||||
Menu Item | N | The name of the new menu item. | ||||||||||||
New | N | Select this checkbox if you want to create a new category item. Then the following fields will appear:
For more information about menu categories and category items, please refer to the Navigation article. |
Creating an activity type
Activity type is an entity intended for the categorization of the newly created or updated activities. It allows defining properties and behavior for an activity.
To create an activity type, please complete the steps below:
- Navigate to Workflow → Activity Type.
- Create New and fill in the fields.
- Click Save or Save and Exit to apply changes.
Activity type form fields
Field | Mandatory | Description |
---|---|---|
Name | N | Specify the activity type name (for example, "Begin"). |
Active | N | Select this checkbox to activate or deactivate this activity type. If you unselect this checkbox, then you'll not be able to use this activity type when creating or modifying activities. |
Description | N | Specify the activity type description. |
Script | N | In this field, you can specify a JavaScript scenario implementing the activity logic. You are free to use SimpleOne Server-Side API there. |
Image | N | Specify the favicon that will be displayed in the workflow editor for this activity. |
Activity Type Category | N | Specify a category for the activity creating. |
Activity Table | N | This is a reference field where you can specify a table for this activity type created before. |
When to Run | N | A condition that should be met to run the activity type. Available options:
|
Updated by | Y | The name of the user who has updated this record. The field is populated automatically. |
Created by | Y | The name of the user who initiated the creation of this record. The field is populated automatically. |
Create an activity type exit
To create an activity type exit, please complete the steps below:
- Navigate to Workflow → Activity Type Exits.
- Click New, and fill in the fields.
- Click Save or Save and Exit to apply changes.
The easier way to create activity type exits is described below:
- Navigate to Workflow → Activity Types.
- Click on the activity type name for which you need to create an exit.
- In the Workflow Activity Type Exit related list, click New and fill in the fields.
- Click Save or Save and Exit to apply changes.
Activity type exit form fields
Field | Mandatory | Description |
---|---|---|
Name | N | Activity type exit name. |
Activity Type | N | Activity type to which this exit is related. |
Exit Condition | N | Specify a trigger condition that must be met to exit the activity. |
Description | N | Activity type exit description. |
Order | N | Specify the exit order on the activity block. The order is defined in ascending order, and exits are displayed on the activity block from the upside-down depending on their order. |