Passing Arguments
JS7 - GraalVM Python Jobs are based on Oracle® GraalVM and can pass arguments to subsequent jobs and instructions in a workflow:
- Consider that JS7 - Order Variables and variables declared with the workflow or JS7 - Job Resources are constants. They cannot be modified and they cannot be passed, they are available to any jobs.
- Jobs can add variables and can modify variables added by predecessor jobs.
FEATURE AVAILABILITY STARTING FROM RELEASE 2.8.2
Example for implementation of JS7Job with GraalVM Python
class JS7Job(js7.Job):
def processOrder(self, js7Step):
# do some stuff to calculate return values
someString = "some string"
someNumber = 42
someBoolean = True
# pass return values to subsequent jobs
js7Step.getOutcome().putVariable("some_var_string", someString)
js7Step.getOutcome().putVariable("some_var_number", someNumber)
js7Step.getOutcome().putVariable("some_var_boolean", someBoolean)
Explanation:
- The
getOutcome().putVariable()method specifies the name and value of the variable to be passed. - The name of the variable can be freely chosen within the scope of JS7 - Object Naming Rules.
- Variable names are case-sensitive.
Resources
Overview
Content Tools