Versions Compared

Key

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

Automation module typed tasks are used to execute scripts on process. Script may contain vary operations like updating database or data model.Automation type tasks can be set as start point of workflow to start from other processes and hidden to users.

In most cases automation script should take action by assign value to $WorkItem.SelectedAction property after is work is done. 

In addition to common properties you can also configure the following properties for an automation task;

...

Code Block
titleExample automation script
$Xml.SetValue('CustomerCount', $Xml.EvaluateNumber('CustomerCount') + 1);
if ( $Xml.EvaluateNumber('CustomerCount') < 10 ) {
  $WorkItem.SelectedAction = 'Continue';
} else {
  $WorkItem.SelectedAction = 'Completed';
}

Start Point

Module type tasks can be set as start point to initiate workflow instances as automated way.

You can initiate from module tasks with any of following scenarios;

Evaluation
You can configure the evaluation schedule to periodically initiate workflow instances and take action. If module script does not take action, workflow instance is reverted.

Scripting Initiate
You may call the WorkItem.Initiate method to initiate from other processes.

Join State

If no action taken workflow switches to join state to pause workflow instance at automation task and waits for indefinitely.

Workflow instance may continue with any of following scenarios;

Deadline
If you assigned a deadline on task, workflow instance waits until deadline date occur and takes deadline action automatically to continue.

Evaluation
You can configure the evaluation schedule to periodically check condition to continue or not.

Process Work Item
You may call the WorkItem.ProcessWorkItem method on other workflow instances to force module to continue.