Skip to main content

Inline

Inline tasks enable the execution of essential logic during workflow runtime by evaluating a JavaScript expression using an evaluator like GraalJS.

Definitions

   {
"name": "inline",
"taskReferenceName": "inline_ref",
"type": "INLINE",
"inputParameters": {
"expression": "(function () {\n return $.value1 + $.value2;\n})();",
"evaluatorType": "graaljs",
"value1": 1,
"value2": 2
}
}

Input Parameters

AttributeDescription
expressionSpecifies the JavaScript expression to be evaluated by the GraalJS evaluator.
evaluatorTypeSupports GraalJS evaluator.
Script paramsProvide the parameters for evaluating the script. Any properties can be accessed as $.value for the expression to evaluate.

Output Parameters

AttributeDescription
resultReturns the results of the evaluated script.

Examples



  1. Add task type Inline.
  2. Write the inline ECMAScript.

Adding wait task

info

The JSON definition provides a concise string representation of the script. In contrast, the UI representation typically includes formatted indentation and line breaks for better user readability.