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

Support for custom argument value resolvers for JITL jobs

    XMLWordPrintable

Details

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

    Description

      Current Situation

      • The JS7 Job API supports the following prefix-based syntax for automatic resolution of argument values:
        • base64:<base64 encoded value>
        • enc:<encrypted values>
      • Automatic resolution supports:
        • The "flat" argument types (like a String). Resolution of the values ​​of the Map or List types is not supported.
        • Only values ​​of arguments/variables whose names are declared in the corresponding JS7 Job JobArgument class are resolved.

      Desired Behavior

      • The JS7 Job Java API should provide a public interface for implementing/registering the custom argument value resolvers.
      • Support for resolving values ​​of types Map or List should be added.
      • Value resolution of all arguments/variables available in a Job.

      Maintaner Notes

      Test Instructions

      1. Test standard JS7 Job API resolvers (base64, enc):
        • Notes:
          • Any JITL/Custom JS7 (including script engine) Job can be used for testing.
          • The standard/example resolvers throw an exception (Job fails) if any argument cannot be resolved.
        • Use different argument/variable types – STRING, LIST, MAP, etc.
      2. Test custom resolvers
        • Use jobapi-register-examples-resolver.zip
          • This zip file contains the following jars
            • jobapi-register-examples-2-resolver.jar
              • contains the example resolvers ExampleUpperCaseResolver and ExampleAbsolutePathResolver – prefix see above
            • jobapi-register-examples-1002-resolver.jar
              • contains the example resolvers and 1000 resolvers with the prefixes from p1: to p1000:
              • converts values ​​to uppercase and adds the resolver class name and prefix,e.g.:
                • val_001 is resolved to VAL_0001(GeneratedValueResolver0001-p1
        • Perform stress tests using e.g. 100,300,1000 arguments and standard/custom resolvers
          • Note: use the reals JITL/Custom Jobs or com.sos.jitl.jobs.examples.EmptyJob
        • Write your own resolver and repeat the tests
      3. Test a "failed" case
        • For example using the standard resolvers enc: or example ExampleAbsolutePathResolver (apath: ) to check whether an exception is thrown and this exception provides all information about the cause and the affected entry.
          • Especially if any entry of a List or Map variable cannot be resolved

      Attachments

        Activity

          People

            re Robert Ehrlich
            re Robert Ehrlich
            Uwe Risse Uwe Risse
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: