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:

  1. Create a table storing settings for the newly created activity.
  2. Create an activity type that will store parameters and bear the functionality of your newly created activity.
  3. 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:

  1. Navigate to Workflow → Activities.
  2. Enter the hamburger menu at the top left of the page.
  3. Enter the Configure menu and select the Table item.
  4. On the page opened, scroll down to the Related Lists area and click on the Table tab.
  5. Click New and fill in the fields. For more information about the table attributes, please refer to the Table Attributes article.
  6. Click Save or Save and Exit to apply changes.
FieldMandatoryDescription
TitleYThe activity title. When filling in this field, the Name field is populated automatically with a corresponding name.
NameY

The activity name. This field is populated automatically with a name corresponding to the Title field.

FieldValue
TitleRun Script
Namewf_activity_run_script


ParentNChoose the table named Workflow Activity (wf_activity).
Is ExtendableNIf an activity has this property set to true, it can be a parent for another activity.
Add Menu ItemNSelect 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 CategoryYSpecify a menu category to which the menu item should be related.
Menu ItemNThe name of the new menu item.
NewN

Select this checkbox if you want to create a new category item. Then the following fields will appear:

FieldMandatoryDescription
New CategoryYDisplayed category title.
OrderYCategory order in the interface (categories are arranged in ascending order).
Menu ItemNThe name of the new menu item.

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:

  1. Navigate to Workflow → Activity Type.
  2. Create New and fill in the fields.
  3. Click Save or Save and Exit to apply changes.

Activity type form fields

FieldMandatoryDescription
NameNSpecify the activity type name (for example, "Begin").
ActiveN

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.


DescriptionNSpecify the activity type description.
ScriptNIn this field, you can specify a JavaScript scenario implementing the activity logic. You are free to use SimpleOne Server-Side API there.
ImageNSpecify the favicon that will be displayed in the workflow editor for this activity.
Activity Type CategoryNSpecify a category for the activity creating.
Activity TableNThis is a reference field where you can specify a table for this activity type created before.
When to RunN

A condition that should be met to run the activity type. Available options:

  • On Change - it starts when the specified field in the form is changed.
  • Immediately.
Updated byYThe name of the user who has updated this record. The field is populated automatically.
Created byYThe 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:

  1. Navigate to Workflow → Activity Type Exits.
  2. Click New, and fill in the fields.
  3. Click Save or Save and Exit to apply changes.

The easier way to create activity type exits is described below:

  1. Navigate to Workflow → Activity Types.
  2. Click on the activity type name for which you need to create an exit.
  3. In the Workflow Activity Type Exit related list, click New and fill in the fields.
  4. Click Save or Save and Exit to apply changes.


Activity type exit form fields

FieldMandatoryDescription
NameNActivity type exit name.
Activity TypeNActivity type to which this exit is related.
Exit ConditionNSpecify a trigger condition that must be met to exit the activity.
DescriptionNActivity type exit description.
OrderNSpecify 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.