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

Compare with Current View Page History

« Previous Version 44 Next »

Workflow supports a set of activities of various types to configure the process fitting your needs.

To define variables in your activities via the administrative interface if necessary, please complete the steps below:

  1. Navigate to Workflow → Activities.
  2. Open the activity record you need to edit or click New to create a new activity.
  3. Fill in the fields and click Save.

Basic activities


Begin activity


This activity, along with the End activity, is initial and appears when a new workflow is created. It is a logical start of every workflow.

End activity


This activity, along with the Begin activity, is initial and appears when a new workflow is created. It is a logical conclusion of every workflow. 

Utilities


Run Script activity


The Run Script activity executes the defined script.

Activity fields

FieldMandatoryDescription
NameNActivity name. A good practice is to make the name descriptive for clarity.
Run ScriptNThe script to execute.
DescriptionNType a brief description of the activity.

Join activity


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 previous ones are finished.

In the example below, the Join activity waits for If, Subflow, and Wait activities to complete processing. 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 bypassed the Join activity (in this case, it is No exit of the If activity), then the Incomplete exit is taken.

How to use the Join activity

  1. In the left side menu, open the Utilities tab and drag-and-drop Join activity.
  2. Connect the exits of the activities you need to join to the Join activity.
  3. Then create transitions from the Join activity exits (Complete and Incomplete) to the next activities.

Activity fields

FieldMandatoryDescription
NameNActivity name. A good practice is to make the name descriptive for clarity.
DescriptionNType a brief description for the activity.

Activity exits

ResultDescription
Complete

This exit is taken when all joined activities were completed and proceeded to this join activity.

Incomplete

This exit is taken when all joined activities were completed, but at least one of them did not proceed to this join activity, i.e., 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.

Set Values activity


The Set Values activity sets certain values on the current record. These values determine the activity behavior when the workflow freezes or ends.


Activity fields

FieldMandatoryDescription
NameNActivity name. A good practice is to make the name descriptive for clarity.
DescriptionNType a brief description of the activity.
TableY

A table to be affected by this activity. This field is populated automatically.

Set ValuesN

Select the field the value of which you want to change when the workflow freezes or ends and define the new value.

Click on the leftmost field to see the drop-down list of available fields. Click on the rightmost  field to see the drop-down list or enter the value (depending on the type of the selected field).

Record Generator activity


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.

Activity fields

FieldMandatoryDescription
NameNActivity name. A good practice is to make the name descriptive for clarity.
DescriptionNType a brief description of the activity.
Task TypeY

Select the task type. You can make a selection from the corresponding task table. Click the magnifier icon  to see the list or start typing the table name in the field.

Task Values from

N

The source of values for a task to be created. Available options:

  • Values – values that you specify in the appropriate choice list.
  • Template – an existing template related to the selected task table.
Set ValuesN

Specify an existing template related to the selected task table.

This fiels appears when the Task Values from field value is equal Values.

Task TemplateY

Specify an existing template related to the selected task table.

This fiels appears when the Task Values from field value is equal Template.

Wait for Condition CompleteN

Select this checkbox to display Completion Conditions. When selected, the task will not be completed until all conditions are met.

Completion ConditionsY

Specify the conditions to be met before continuing the operation.

The field is displayed when the Wait for Condition Complete is 'true'.

AdvancedNSelect this checkbox to specify a script to be performed. When you select this checkbox, the Script text field appears.
ScriptN

Set values for the task in this script. Use the variable 'new_task' when setting additional values.

A script runs after the task values are set (defined in the Task Template or Set Values fields).

For example:
new_task.short_description = current.short_description;

This field is displayed when the Advanced is 'true'.


Create Event activity


The Create Event activity establishes an event from the Event Register (sys_event_register) table in a queue. Later this event can execute certain scripts. When the Create Event action is executed, a new event record is created in the Event (sys_event) table. In parallel, the event processor handles the event within the period specified in the system properties.


Activity fields

FieldMandatoryDescription
NameNActivity name. A good practice is to make the name descriptive for clarity.
EventY

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  to see the list or start typing the event name in the field.

Parameter  1N

Specify the first event parameter. If this parameter is a string value, then it must be put in quotation marks (" ").

To check if the script requires a parameter, perform the following steps:

  1. Select the event you need in the Event field.
  2. Click on the event and select Open Record.
  3. Scroll down to the Related Lists area, select the Event Script Action tab.
  4. Open the available record if there is one.
  5. Look through the script to find 'param' text.
    • If there is, for example, 'event.param_1' line, specify the relevant parameter in the Parameter 1 field.
    • If there is no such text, you do not need to specify the Parameter 1 field.
Parameter  2N

Specify the second event parameter. If this parameter is a string value, then it must be put in quotation marks (" ").

To check if the script requires a parameter, perform the following steps:

  1. Select the event you need in the Event field.
  2. Click on the event and select Open Record.
  3. Scroll down to the Related Lists area, select the Event Script Action tab.
  4. Open the available record if there is one.
  5. Look through the script to find 'param' text.
    • If there is, for example, 'event.param_2' line, specify the relevant parameter in the Parameter 2 field.
    • If there is no such text, you do not need to specify the Parameter 2 field.
DescriptionNType a brief description of the activity.


Conditions


Wait Condition activity


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

FieldMandatoryDescription
NameNActivity name. A good practice is to make the name descriptive for clarity.
DescriptionNType a brief description of the activity.
TableNA table to be affected by this activity. This field is populated automatically.
ConditionYThe workflow is paused at this activity until the record meets the defined conditions.
AdvancedNSelect this checkbox to specify a script to evaluate. When you select this checkbox, a text box appears where you can enter the script.
ScriptN

If specified, the workflow is paused at this activity until this script sets the answer variable to true.

This field appears when the Advanced is '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'.

If activity


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

FieldMandatoryDescription
NameNActivity name. A good practice is to make the name descriptive for clarity.
DescriptionNThe activity description.
TableYA table to be affected by this activity. This field is populated automatically.
ConditionYA condition to meet in order to proceed with the Yes transition.
AdvancedNSelect this checkbox to specify a script to evaluate.
ScriptN

Enter a script to evaluate in this field.

This field is displayed when the Advanced is 'true'.


Switch activity


The Switch activity manages transitions checking the field values against the defined case values (one or more). This activity is performed like the switch statement in Java.

The activity checks against conditions specified in the Column field or in manually defined exits and, basing on the outcome, selects the next transition.


Activity fields

FieldMandatoryDescription
Workflow VersionYThe workflow version to which this activity is related. By default, it is populated with the current workflow name.
TableNA table to be affected by this activity. This table should contain columns for which you need to set new values. By default, it is populated with the name of the table for which this workflow is created.
NameNActivity name. A good practice is to make the name descriptive for clarity.
TypeY

Select the source of exits options for this activity. The workflow will perform check values against these conditions. Available options:

  • Field – the exits are equal to the options of the field specified in the Column field.
  • Customcreate the set of exits with the conditions you need.
ColumnY

Specify a column containing options for the condition. These options will become exits of the activity. Click the magnifier icon  to see the list or start typing the column name in the field.

This field appears when Field option is selected in the Type field.

In the example below, the Switch activity takes options from the Type field.


You can change conditions of the exits or add new conditions by editing them.



Fields specific for activity exits 

NameNThe option name. If the Type field is equal to Field, the name is taken from the Column. If the Type field is equal to Custom, specify the name you like.
TableNA table to be affected by this activity. This field is populated automatically.
ActivityYThe activity to which this exit is related. This field is populated automatically.
DescriptionNType a brief description of the activity exit.
ConditionYConditions to be met in order to proceed with this specified transition.
AdvancedN

Select this checkbox to specify a script to be performed. When selected, the Script text field appears.

ScriptY

In there, you can specify the exit script.

This field appears when the Advanced is '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.

Approvals


User Approval activity


This activity creates user approvals when executed, one or more, depending on the parameters specified. For full information please refer to the User approval article.

Error rendering macro 'excerpt-include'

No link could be created for 'User approval'.


Subflows


Subflow activity


The Subflow activity performs an existing workflow as part of the current workflow.


Activity fields

FieldMandatoryDescription
NameNActivity name. A good practice is to make the name descriptive for clarity.
WorkflowN

The published workflow to be prformed by the activity. Click the magnifier icon  to see the list or start typing the workflow name in the field.

DescriptionNType a brief description for the activity.


Timers


Timer activity


The Timer activity defines a period of time during which the current workflow does not run.


Activity fields

FieldMandatoryDescription
NameNActivity name. A good practice is to make the name descriptive for clarity.
DescriptionNType a brief description for the activity.
Timer, based onY

The way the timer duration is calculated. Available options:

  • A User Specified Duration –  specify the duration of time to wait before proceeding to the next activity.
  • Script – specify a script for duration calculation.
DurationY

Specify the duration of time to wait in days, hours, minutes and seconds to wait before proceeding to the next activity.

This field appears when the A User Specified Duration option is selected in the Timer, based on field.

ScriptY

Evaluate a script implementing duration calculation logic. For develop, use native JS extended with SimpleOne API methods if needed.

This field appears when the Script option is selected in the Timer, based on field.

Schedule tab
Timezone, based onN

Specify a timezone source for this activity. Available options:

  • (No Time Zone)
  • A Specific Time Zone.
TimezoneY

Select a timezone from the list. Clik the magnifier icon  to see the list or start typing the schedule name in the field.

This field appears when the Timezone, based on option is A Specific Time Zone.

Schedule, based onN

Specify a schedule source for this activity. Available options:

  • (No Schedule)
  • A Specific Schedule.
ScheduleY

Select a schedule from the list. Click the magnifier icon  to see the list or start typing the schedule name in the field.

This field appears when the Timezone, based on option is A Specific Time Zone.

  • No labels