Versions Compared

Key

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

...

  • 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.

Example: Passing Arguments


Code Block
languagejs
titleExample for implementation of JS7Job with JavaScript
linenumberstrue
class JS7Job extends js7.Job {

	processOrder(js7Step) {
      	// do some stuff to calculate return values
        var someString = 'some string';
        var someNumber = 42;
        var 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 );
     }
}

...