Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

If the default set of the workflow activities does not suit your needs, you can create a custom activity with the specific logic via the SimpleOne agent interface.

Tip

Role required: admin, wf_admin.

To create a new activity, complete the following steps:

  1. Create a table that stores the settings of the newly created activity.
  2. Create an activity type that stores the parameters and has the functionality of the created activity.
  3. Create activity exit types that specify the exit condition for the activity.
  4. Configure the activity form view that is displayed in the Workflow Editor.

Create a table 
Anchor
create a table for new activity
create a table for new activity


In fact, every activity stores its settings in a child table of the Workflow Activity (wf_activity) table.

To create this child table, complete the steps below:

  1. Navigate to System Definition → All Tables.
  2. Click New and fill in the fields. 
  3. In the Parent field, select the Workflow Activity (wf_activity) table.
  4. Click Save or Save and exit to apply the changes.

See the Create Tables article to learn more.

Create an activity type
Anchor
create an activity type for new activity
create an activity type for new activity


An activity type is an entity intended to classify the newly created or updated activities. Use it to define properties and behavior for an activity. 

To create an activity type, complete the steps below:

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

Activity type form fields

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

Select this checkbox to activate this activity type.

Note

If you clear this checkbox, then you will not be able to use this activity type when creating or modifying activities.


DescriptionNAdd a brief description of the activity type.
ScriptNSpecify a script that implements the activity logic. Use SimpleOne Server-Side API there.
ImageN

Attach an image to be displayed in the workflow editor for this activity.

Info

It is recommended to use SVG files with a height and width of 24 px. Other image formats are also supported.


Activity Type Categorytype categoryN

Specify a category for the activity.

Activity TabletableN

Specify the previously created table for this activity type.

When to RunrunN

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

  • On Changechange – starts when the specified field in the form is changed.
  • Immediately – starts when the workflow reaches the activity.

Create an activity type exit 
Anchor
create an activity exits for new activity
create an activity exits for new activity


To create an activity type exit, complete the steps below:

  1. Navigate to Workflow → Activity Type Exits.
  2. Click New and fill in the fields.
  3. Select the activity type for which you create the exit in the Activity Type field.
  4. Click Save or Save and exit to apply the changes.

Workflow activity type exit form fields

FieldMandatoryDescription
NameNSpecify the activity type exit name.
Activity TypetypeN

Specify the activity type to which this exit is related.

Exit ConditionconditionN

Specify a script that defines the condition to be met to exit the activity. The script returns the true or false value.

Code Block
languagejs
themeEclipse
titleExample
activity.result == 'complete'


DescriptionNAdd a description of the activity type exit.
OrderNSpecify the order of the exit. If the activity type has multiple exits, they are arranged in the activity block in ascending order depending on the value of this field.

Configure the activity form layout 
Anchor
configure the form layout for new activity
configure the form layout for new activity


Warning

It is not recommended to change the form layout for the "out-of-the-box" activities. This may cause problems when adding these activities to a workflow.

To configure the activity form view displayed in the Workflow Editor, perform the following steps:

  1. Open the record of the table you have created for the new activity.
  2. Copy the value from the Name field and paste it in the URL address after the /record/ line (see the example below). 

    Section


  3. In the hamburger menu , navigate to Configure → Form → Layout.
  4. In the Form view and section area, click Add new under the View name field.
  5. In the window that appeared, enter "Workflow" in the View name field.
  6. Click Create to apply the changes.
  7. Configure the set of fields to display on the activity form.
  8. Click Save to apply the changes.
Tip

In case you need to see the activity record often, create a menu item:

  1. Open the record of the table you have created for the new activity.
  2. Copy the value from the Name field and paste it in the URL address after the /record/ line (see the example above).

  3. Copy the URL address.
  4. Navigate to System Definition → Menu Items.
  5. Click New and fill in the fields.
  6. In the Link type tab, fill in the Table and Link Type fields with any values.
  7. In the Link type tab, click the icon  and paste the URL.
  8. Click Save or Save and exit to apply the changes.

See the Panels and Navigation article to learn more about menu items and categories.

Image Modified


Table of Contents
absoluteUrltrue
classfixedPosition
printablefalse

...