Automation Module

Automation module-typed tasks are used to execute scripts on the process. A script may contain various operations like updating the database or data model.

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
$Xml.SetValue('CustomerCount', $Xml.EvaluateNumber('CustomerCount') + 1); if ( $Xml.EvaluateNumber('CustomerCount') < 10 ) { $WorkItem.SelectedAction = 'Continue'; } else { $WorkItem.SelectedAction = 'Completed'; }

Start Point

Automation module type tasks can be set as a starting point to initiate workflow instances in an automated way.

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.

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

Join State

If the module is not set as a starting point and no action is taken in the script, then the workflow switches to join state to pause workflow instance at automation task and waits for indefinitely.

Workflow instance may continue with any of the following scenarios;

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.





Copyright © 2010 - 2023 Emakin. All rights reserved.