ActionFormat - eaclark/Meander GitHub Wiki

Introduction

Actions are used to capture state changing events. These can be events that are local (i.e., tied to a specific node) or global (i.e., applying to the flow as a whole).

Actions have a counter associated with them that gets bumped for each action. The current value of this counter is used to construct the default label for the action.

Details

Consider the following capture of a portion of a source file,

Images/action-src.png

This results in the following output,

Images/action-out.png

Local Actions

The first two actions are local to the Bob node. This means that they will be centered on that node line.

Where the first two actions differ is the second action has a width value in the destination node portion of the tuple. The width value is used to specify how wide to draw the action text rectangle relative to how wide a node is on the page. So a two indicates to give the action a width of two nodes.

If no width value is specified, then a default value of one is assumed.

Note that tying the action width to a node width means that it varies based on the number of nodes present in a flow. The more nodes there are, the narrower the 'node width' is, and the narrower the action width will be.

Global Actions

Now consider the second pair of actions. These actions differ from the first pair in that they have no node in the source node portion of the tuple.

These actions will be centered horizontally on the page rather than on a specific node line. The width of a global action is determined in the same manner as the width of a local action.

Default Style