Add a Code Action

You use a Code action to add JavaScript code to an action chain.

To use a Code action:

  1. Add the action in one of three ways, depending on your preference and where you want it added:
    • Drag the action from the Actions palette onto the canvas, dropping the action either at the bottom edge of the action it is to follow, or at the top edge of the action it is to precede.
    • Double-click the action in the Actions palette to add it to an empty canvas or to the end of an action chain.
    • On the canvas, select the action that the new action is to follow, then double-click the new action in the Actions palette.
  2. Using the Properties pane, write your JavaScript code. In this example, the data for a new employee is passed to an action chain through input parameters, and a new object with the data is returned: