Tallis Training

Dataflow: State Triggers

State triggers can be used to construct a dataflow: a dynamic process in which tasks do not necessarily follow one another, but rather monitor the state and the data changes in the process-description and become active in response to these changes.

The graphical view of a dataflow network holds no information as to the ordering of the tasks. The scheduling is manifested in the expressions populating the state triggers.

State Triggers

State Triggers: Creating a task that runs only after something else happens

A state trigger is an expression that has to be met before the task can be executed. The task remains dormant until the expression becomes true.

Like preconditions, state triggers can be combined with scheduling constraints to create complex flow patterns.

A task’s state trigger is checked at the point where a task is being considered for enactment, that is, when its scheduling constraints are met. If at that point the state trigger is true, the task becomes active. Otherwise, it remains dormant and continues to monitor the expression. Once the expression becomes true, the task is activated.

Example: The Control blood pressure action should only be executed if and when the expression blood_pressure = HIGH becomes true.

Browse through a process-description sample:

  • Cold And Flu Guide
  • Although mostly a workflow process, the Recommend Vaccine action is separated from the workflow: it has a state trigger which monitors the age of the patient and is only activated for patients over 65 years of age.
  • If you have installed the Tallis Toolset, you can find this sample in the World > Samples folder in the ACL Web Repository.
  • Run this sample file
  • Click here for a detailed description of this sample.

Note: the main difference between a state trigger and a precondition is that if a precondition is found to be false the task gets discarded, whereas if a state trigger is found to be false the task remains dormant and waits for it to become true.

See Also

Top | «Prev | Next»

Last update: