Running processes and activities

This article provides information about running processes and activities.

Starting a process

The process begins once a message is received that matches any receive activity with no incoming links (for example, control elements or input with a value being an activity name) and not nested in a 'while' construct.

Starting and disabling activities

All activities with no incoming links that are not nested in a 'while' construct are activated when the process starts.

For the rest of the activities, the system waits for the incoming link of each activity to be evaluated. The status of links using the control element is set with an OR. Status of links due to <input value="name of activity"/> is set with an AND. The two statuses (control and data) are then set with an AND. If the result is true, the activity is enabled and it runs. If it is false, the activity is disabled and all the outgoing link values are set to false. The activity runs if the following criteria are met:

  • All incoming links have been traversed
  • AT LEAST ONE explicit control link has a true value
  • ALL data-control links have a true value

This condition, on the status of incoming links, is known as the join condition. Setting different behavior on this condition that joins the link status is considered an advanced requirement, and is enabled using an external mechanism.

Running an activity

When an activity, activity A, activates it performs the work prescribed in it. For examlpe, an invoke calls a service and an assign copies data. It then completes. If an error is thrown while it is running, then it is disabled and all its non-error links get the value false. All its error links fire according to their transitionCondition(default true).

Navigation continues based on activities that have incoming links from an activity, activity A, that has just completed or disabled. The conditions on these links are evaluated upon the completion of the control activity. The end of the activity is propagated, going down the paths from the activity that ended to any activity further along that have a dependency on it and have a join condition of true. This is known as dead-path-elimination (DPE) and insures that no activity ever waits indefinitely due to a dependence on an upstream activity that has been disabled.

Activities in a <while>

The while activity is treated like any other activity for the purpose of incoming and outgoing links. Upon encountering and activating a while construct, the activities contained in the while that have no incoming links and are not nested in another while construct are activated. Once all activities in the while have been completed or disabled, its condition is evaluated again. If the condition is true, the starter activities of the while are activated again. If the condition is false, the while completes, and navigation continues following the while construct's outgoing links. Note that no link may cross the boundary of a while.

Completing the process

The process completes once all of its activities have either completed or been disabled.

Version 1.0.0.3.25591