Uploaded image for project: 'JITL - JobScheduler Integrated Template Library'
  1. JITL - JobScheduler Integrated Template Library
  2. JITL-665

Add substitution to arguments of JITL Jobs

    XMLWordPrintable

Details

    • Feature
    • Status: Dismissed (View Workflow)
    • Major
    • Resolution: Won't Do
    • 2.0.0
    • 2.2.0
    • None

    Description

      Feature

      • Basics
        • JITL jobs include arguments that for example reference a path to a hibernate configuration file, a credential store etc. It should be possible to specify such paths from JS7 variables and from environment variables that are substituted by the JITL Job implementation.
        • Generally any arguments for JITL Jobs of type string should support substitution.
      • Sources of JS7 Variables
        • Apply any available sources including workflow variables, node arguments, arguments to jobs and order variables.
        • Apply variables from assigned job resources.
      • Syntax
        • JS7 Variables and environment variables are specified with arguments using the following syntax:
          • ${HOME}/hibernate.cfg.xml, ${JS7_AGENT_CONFIG_DIR}/hibernate.cfg.xml
          • This implies that use of the syntax $HOME/hibernate.cfg.xml is not subject to substitution.
        • The syntax is the same for use with Unix and Windows operating systems.
      • Substitution
        • First substitute JS7 Variables: substitution is case-sensitive
        • Next substitute environment variables: substitution is case sensitive. If no matching environment variable is found then the ${variable} expression evaluates to zero length. No errors are raised for missing environment variables.
      • Quoting
        • The expression ${variable} can be quoted using \${variable} to prevent substitution.

      Maintainer Notes

      • This issue has been added for documentation purposes only.
      • The implementation is available from existing features:
        • the assignment to the argument of a JITL job or Shell job in fact is an expression that can include
          • a single quoted string that prevents further substitution:
            'hello $ world'
          • a double quoted string that offers substitution of built-in variables:
            "Order ID: $jsOrderId"
          • a reference to an existing built-in variable:
            $js7OrderId
          • a static reference to an existing job resource and variable provided by the job resource:
            jobResourceVariable( 'name-of-job-resource', 'variable' )
          • a dynamic reference to an existing job resource variable: for example to read from the name of a job resource that is decided on at run-time like this:
            jobResourceVariable( 'database' ++ $countryCode, 'url' )
          • a quoted $ as e.g. in a password string:
            "the password is: sec\$ret"
          • a reference to an environment variable by use of the env() function, e.g. to $HOME/scripts:
            env( 'HOME', '') ++ "/scripts"

      See below links to the documentation

      Attachments

        Issue Links

          Activity

            People

              re Robert Ehrlich
              ap Andreas Püschel
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: