Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Description

Resolves to the JSON output data of the task instance specified by the siblingName, corresponding to the evaluated JsonPath expression.

The sibling task instance must be within the same workflow and the Execution User of the task instance that is resolving the function must have Read permission for the sibling task instance.

  • If the output record cannot be found, the function will remain unresolved.

  • If the output record is found but the path expression does not yield a result, the function will resolve to the default value.

Syntax

${_outputJsonPathFromTask('siblingName', 'outputType', 'pathExpression'[, 'defaultValue', prettyPrint])}

Parameters

  • siblingName
    Required; Name of a sibling task instance.
  • outputType
    Required; Type of output to resolve: STDOUT, STDERR, FILE, EXTENSION, or JOBLOG.
  • PathExpression
    Required; JsonPath expression. https://github.com/json-path/Jsonpath
  • defaultValue
    Optional; Default value to return if the result is not found. Default is empty ('').
  • prettyPrint
    Optional; Specification (true or false) for whether or not JSON output will be pretty printed (indented). Default is false.

Example

JSON
[
  {
    "message" : "Hello",
    "code" : 10
  },
  {
    "message" : "World!",
    "code" : 20
  }
]

Function
${_outputJsonPathAsArrayFromTask('Sibling_With_JSON_Output', 'STDOUT', '$[*].message')}

Result
["Hello","World!"]


Anchor
Task Instance Output Path
Task Instance Output Path
Task Instance Output Path

Description

Returns a token representing the path to a temporary file containing the specified task instance output data.

Syntax

${_outputPath('outputType'[, 'fileExtension'])}

Parameters

  • outputType
    Required; Type of output to create a temporary file for: STDOUT, STDERR, FILE, EXTENSION, JOBLOG, WEBSERVICE, SQL, STOREDPROC.
  • fileExtension
    Optional; The extension to use for the temporary file. Can be a maximum of 10 characters.
    • For SQL and STOREDPROC outputType, the result set is translated to comma-separated values (csv), or tab-separated values (tsv), and, therefore, only csv (default) and tsv are supported file extensions.
    • For any other outputType, the default file extension is txt.

Example

Code Block
languagetext
linenumberstrue
application.exe -file ${_outputPath('STDOUT')}
> application.exe -file $(ops_output_path_1638302212442528629FTPBE4AJQV2FT_stdout_txt)
Code Block
languagetext
linenumberstrue
application.exe -file ${_outputPath('SQL')}
> application.exe -file $(ops_output_path_1639503212294078671DNPMULGSEVMHT_sql_csv)
Code Block
languagetext
linenumberstrue
application.exe -file ${_outputPath('SQL', 'tsv')}
> application.exe -file $(ops_output_path_1639503212294078671DNPMULGSEVMHT_sql_tsv)
Code Block
languagetext
linenumberstrue
application.exe -file ${_outputPath('EXTENSION', 'json')}
> application.exe -file $(ops_output_path_1639503212294187671OAI9SM79CNC2V_extension_json)





Anchor
Script Functions
Script Functions
Script Functions

...