Details
-
Fix
-
Status: Released (View Workflow)
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
Current Situation
- If the JS7 API Job throws an exception and sets Outcome variables before the exception or in finally block, they will be ignored.
- Example:
public class MyJS7Job extends Job<MyJS7JobArguments> { @Override public void processOrder(OrderProcessStep<MyJS7JobArguments> step) throws Exception { try{ ... step.getOutcome().putVariable("my_variable","my_variable_value"); ... throw new Exception("my exception"); } catch (Throwable e) { throw e; } finally { step.getOutcome().putVariable("my_finally_variable","my_finally_variable_value"); } } }
- The both variables my_variable and my_finally_variable are not set as Outcome variables and are not available for the subsequent jobs.
- Example:
Desired Behaviour
A defined Outcome variable should be set regardless of whether Job run is successful or not.