Versions Compared

Key

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

...

Consider that a call to the variable function will fail if the variable is unknown and no default value is specified.

Example:

Expression
variable( "my_var", job=my_job )
JSON"\"variable( \\\"my_var\\\", job=my_job )\""
CommentThe value of the variable my_var is returned as available with the job my_job in a workflow. If the variable is unknown then the function fails.
Expression
variable( "my_var", label=my_label, default="some value" )
JSON"\"variable( \\\"my_var\\\", label=my_label, default=\\\"some value\\\" )\""
CommentThe value of the variable my_var is returned as available with the job identified by the label my_label in a workflow. If the variable is unknown then the default value some value is returned.

Built-in Variables

Built-in variables are available at the following scopes:

...

  • now( format='yyyy-MM-dd hh:mm:ss', timezone='Europe/Berlin' )
    • The job start date. This date can be formatted using Java date qualifiers. Optionally a time zone can be specified, by default the UTC time zone is used.
    • Example:

      Expression
      now( format='yyyy-MM-dd' )
      JSON"\"now( format='yyyy-MM-dd' )\""
      Sample Value2021-05-03
      Expression
      now( format='yyyy-MM-dd hh:mm:ss' )
      JSON"\"now( format='yyyy-MM-dd hh:mm:ss' )\""
      Sample Value2021-05-03 07:30:42
      Expression
      now( format='yyyy-MM-dd  hh:mm:ss', timezone="UTC" )
      JSON"\"now( format='yyyy-MM-dd hh:mm:ss', timezone=\\\"Europe/Berlin\\\" )\""
      Sample Value2021-05-03 09:30:42
  • scheduledOrEmpty( format='yyyy-MM-dd hh:mm:ss', timezone='Europe/Berlin' )
    • The date for which an orders is scheduled.
    • The date formatting options are the same as with the now() function.

Further Resources