You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 15 Next »

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. So, 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 table child for 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 list 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.

When filling in the Name and Title field, it is recommended to keep them synchronized semantically, like this:

FieldValue
Namewf_activity_run_script
TitleRun Script

When naming your activity, please keep in mind the following naming rule: your activity system name should be added after the wf_activity constant. In the example above, it looks like 'wf_activity_run_script'

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, fill in the fields, and click Save.

Activity type form fields

FieldDescription
NameSpecify the activity type name (for example, "Begin").
DescriptionSpecify the activity type description.
Active

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.

ScriptIn this field, you can specify a JS-script implementing the logic of the activity. You are free to use SimpleOne Server-Side API there.
ImageSpecify the favicon that will be displayed in the workflow editor for this activity.
Activity type categorySpecify a category for the activity creating.
Activity tableThis is a reference field where you can specify a table for this activity type created before.

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;
  4. Fill in the fields and click Save.


Activity type exit form fields

FieldDescription
NameActivity type exit name.
DescriptionActivity type exit description.
Exit conditionSpecify a trigger condition that must be met to exit the activity.
OrderSpecify 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.
  • No labels