Versions Compared

Key

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

...

In most cases, automation scripts should take action by assigning value to $WorkItem.SelectedAction property after the work is done. 

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

Script
Content of automation script.

...

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

...

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

Evaluation
You can configure the evaluation schedule to initiate workflow instances and take action periodically. If the module script does not take action, the workflow instance is reverted. So, make sure to take an action at the end of the task.

...

Deadline
If you assign a deadline to a task, the workflow instance waits until the deadline date and takes deadline action automatically to continue.

Evaluation
You can configure the evaluation schedule to periodically check conditions and whether to continue or not.

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