SQL code and JavaScript code sql-code-and-javascript-code

SQL code sql-code

An SQL code activity executes an SQL script. The script is a JST template.

  • Script

    The central area of the editor contains the script to be executed. This script is a JST template and can therefore be configured according to the workflow context.

  • Processing errors

    Refer to Processing errors.

JavaScript code and Advanced JavaScript code javascript-code

JavaScript code and Advanced JavaScript code activities execute a JavaScript script in the context of a workflow. For more on scripting, refer to these sections:

Execution delay exec-delay

Starting 20.2 release, an execution delay has been added to the JavaScript code and Advanced JavaScript code activities. By default, the execution phase cannot exceed 1 hour. After this delay, the process will be aborted with an error message and the activity execution will fail.

You can change this delay in the Stop execution after field available in these activities.

To ignore this limit, you need to set the value to 0.

JavaScript code js-code-desc

  • Script: The central area of the editor contains the script to be executed.

  • Process errors: Refer to Processing errors.

Advanced JavaScript code adv-js-code-desc

  • First call: The first zone of the editor contains the script to execute during the first call.
  • Next calls: The second zone of the editor contains the script to execute during the next calls.
  • Transitions: You can define several activity output transitions.
  • Schedule: The Schedule tab lets you schedule when to trigger the activity.

Advanced JavaScript is a persistent task and is periodically recalled if it has not been marked as completed. To terminate the task and prevent future recalls, you must use the task.setCompleted() method in the Next calls section:

task.postEvent(task.transitionByName("ok")); // to transition to Ok branch
task.setCompleted();

return 0;
recommendation-more-help
601d79c3-e613-4db3-889a-ae959cd9e3e1