Uploaded image for project: 'JITL - JS7 Integration Templates'
  1. JITL - JS7 Integration Templates
  2. JITL-763

Java Job API supports delayed substitution using %{argument_name} syntax

    XMLWordPrintable

Details

    • Feature
    • Status: Released (View Workflow)
    • Minor
    • Resolution: Fixed
    • 2.0.0
    • 2.8.3
    • None

    Description

      Current Situation

      • JS7 supports variable substitution using the syntax:
        $variable_name
        ${variable_name}
        • These variables can be used as placeholders during job configuration and are resolved by the JS7 engine at runtime.
      • Job API provides a Resolver interface to post-process (after JS7 engine execution) argument values and set resolved results.

      Desired Behaviour

      • Introduce a Job API specific placeholder syntax:
        %{argument_name}
      • This allows JobArguments to reference other JobArguments within the same configuration map.
        • Example:
          uri = enc:<some value>
          request = {"endpoint": "%{uri}"}
          
          • After resolution:
            request = {"endpoint": "<decrypted uri>"}

      Maintainer Note

      • Supported features:
        • Multiple usage: the same reference can be used multiple times within the same or different argument values.
          b = %{a}_some_value_%{a}
        • Nested references: a reference can point to another reference, forming chains until a final concrete value is resolved.
          a = %{b}
          b = %{c}
          c = js7
          
          • Result:
            a = js7
      • The resolver throws a JobArgumentException in the following cases:
        • Cyclic reference: arguments reference each other in a loop, e.g.
          a = %{b} 
          b = %{a}
        • Self reference: an argument references itself directly, e.g.
          a = %{a}
        • Unknown reference: a referenced argument does not exist

      Attachments

        Issue Links

          Activity

            People

              re Robert Ehrlich
              re Robert Ehrlich
              Rajrani Upadhyay Rajrani Upadhyay
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: