Animation

The Reactive Blocks SDK includes an animation feature that can show how the token flows through activity nodes and edges. You can control the animation by executing one activity step at a time. This feature is very useful to help you understand the behavior of a building block and also to find potential problems.

Enter Animation Mode

You can start the animation feature by choosing action Animate from the context menu.

</a>

Controlling Animation

Below is a figure showing how animating a block looks like.

  • The current state of the building block is shown below the title (e.g., active in the figure above). Note that if the block is of type system, its state is not shown.
  • The current state of each inner block is also shown similarly (e.g., in the figure above the block Send Email is currently in state sending).
  • The activity step that will be taken is shown by highlighting the nodes and edges with yellow background.

A window titled Animation (1) is opened displaying keys that can be used to control animation.

  • Down arrow is used to execute the activity step that is highlighted.
  • Up arrow is used to undo a step.
  • Left (←) and right (–>) arrows are used to switch between alternative executable steps (2).
  • Key i is used to restart animation.

The Animation window also shows issues with the activity step or state, if any.

More Details

We can also find out which transition is taken by every block in a chosen activity step. For example, in the figure above, let us find out the transition taken by the inner block Send Email in the highlighted activity step.

Just open the block contract by selecting Show Contract from the context menu of block Send Email (see the figure below). You will get window (1) displaying the contract with transition /ok highlighted.

Note that in any activity step, each inner block can participate by maximal one transition.

Exit Animation Mode

To exit the animation, close the window called “Animation”.

Tips

  • The Animation and contract diagram windows can be moved around.
  • You may need to solve some errors (usually related to construction) before you can animate a building block.