Script: JavaScript
This reference describes the Script: JavaScript task.
The JavaScript task is a function that reads an input, the Data Payload, and generates logic in standard JavaScript syntax.
For example:
exports.step = function myFunction(input) {
var executionDate = input["Workflow"]["ExecutionDate"];
return {executionDate};
};
Take the input parameter and assign the Workflow ExecutionDate key to the variable executionDate . Returning the executionDate adds it to the Data Payload for use by the next step in the Workflow.
The maximum execution time to process this task is limited to 20 seconds.
Concurrency Mode: Controls whether Workflow processes tasks in a single or multi-threaded manner for this task type. Select Sequential to single-thread, or Parallel to allow multi-threaded processing.
If you select Parallel, the Max Concurrency setting controls the maximum number of threads for this task type that can be utilized. You can specify a value from 1 up to the allowed maximum for this task type. A value of 1 behaves the same as Sequential processing.