Action Step

The action step can have any number of scripts associated with it. Each of these scripts is called an action. There are various kinds of actions. The different kinds of actions execute at different times in the step’s lifecycle. During the lifecycle of the step, many actions can run, but only one action is ever allowed to run at a time.

The scripts configured in the action step have access to the chart's scope, as well as a special scope that is private to the step. This scope, called "step scope" is initialized when the step starts and destroyed when the step stops, but retained while the step is running. This is a good place for timer actions to store intermediate results.

On Start

This action runs when the step is started. These actions always run to completion before flow can move beyond the step, and before any other scripts on the action step will run.

On Stop

When flow is ready to move beyond the step, it is told to stop. The step will then wait for any currently executing action, for example, On Start or Timer actions, to finish. Then it will execute its On Stop action, if configured. Only after these actions complete will the chart be allowed to move on.

Timer

Timer actions run every so often while the action step is running. The timer actions only start running after the On Start action finishes (if there is one). In addition to the timer action's script, it must have a rate, specified in milliseconds. This is the amount of time to wait between running the timer action's script. The clock starts after the On Start action finishes.

It is important to realize that, unlike On Start and On Stop scripts, a timer action can not run at all for an action step. If the step is ready to stop before the timer is ready, it will never run.

Error Handler

This action will run only if any of the other actions throw an unexpected error. This provides a chance for chart designers to do their own error handling, and gracefully recover from an error. If this script throws an error, the chart will abort, see Chart Concepts for more information.

Next ...