Add JavaScript Functions to an Integration with a JavaScript Action

You can add JavaScript functions to the integration.

Create a JavaScript Action

Note:

Note the following restrictions when using the JavaScript action:

  • The JavaScript action has a timeout threshold of 15 seconds. Any JavaScript function that processes for more than 15 seconds fails with a timeout error.

  • JavaScript functions are not allowed to make outbound calls to external services. Any outbound calls are blocked and ultimately fail.

  • Network, disk access, or thread access functions are not supported.

  1. Add a Javascript action to an integration in either of the following ways:

    • On the side of the canvas, click Actions Integration actions icon and drag the Javascript action to the appropriate location.
    • Click Add icon at the location where you want to add the Javascript action, then select Javascript.
  2. Click Edit Edit icon under Configure Javascript to enter a name and optional description for the JavaScript action.

  3. Click the Function button.

    The Functions List appears.

  4. Select a function.

    The function and Sources tree are displayed. Function details are shown, including the input and output parameters.


    The Input Sources (which is selected) and Functions tabs are shown. Below is the Sources tree and a search icon. To the right is the Configure Javascript panel, which includes a name field, description field, Function section (add is the selected function), Input Parameters section, and a Replace button.

  5. Click the first input parameter to open a Value field.


    The Input Parameters section shows a parameter, a Value field, and another parameter.

  6. Drag a value from the Sources tree.


    The Input Sources (which is selected) and Functions tabs are shown. Below is the Sources tree and a search icon. To the right is the Configure Javascript panel, which includes a name field, description field, Function section (add is the selected function), Input Parameters section, and a Replace button. The Input Parameters section includes a parameter, a Value field with two icons, and a second parameter.

  7. Perform the same steps to add a value for the second input parameter.
  8. Click Save.

Track the Status of a Javascript Action During Runtime

During runtime, you can track the status of the JavaScript action on the Instances page through the tracking diagram and activity stream for an activated integration. This is only possible if there is a tracking instance.

  1. In the navigation pane, click Observability, then Instances.
  2. Click the business identifier value of the integration to track.
  3. The integration (including any JavaScript actions) is displayed. Any JavaScript action failures are identified by red.
    Details about processing status (including any JavaScript actions) are displayed, including any failures.