if I get it right, the intended logic is designed like this:
* job1
* Case When: return code == 0 then job2
* Case When: return code == 1 then job3
* Case Else: prompt
* job4
Find attached the example of a workflow implementing the above flow (consider adjusting Agent assignments to jobs). For details how to use the example see JS7 - How to upload .json examples (kb.sos-berlin.com)
Consider the following hints:
job1 is configured to ignore return codes (exit codes), see attached screenshot. The job is always considered being completed successfully in order to trigger subsequent jobs.
job2 and job3 are triggered if the related Case When Instruction evaluates the condition of job1's exit code successfully, using predicates such as $returnCode == 0.
a promt is triggered from the Case Else Instruction for exit codes other than 0 and 1.
job4 is executed if the order passes one of the Case When Instructions.
Alright, i forget to slide this toolbar to sedd what was available >_<
manage to do what i wanted.
but case-when should be align side by side, instead of following, would be easier to visually understand, dk if the visual alignment can be changed for this
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi
Is it possible in JS7 to make 2 path in case or returne code from a job ?
to explain
Job1
job 4, only launch if job 2 or job 3 are CR 0, or prompt confirmed.
Last edit: Chico 2026-03-18
Hi Chico,
if I get it right, the intended logic is designed like this:
Find attached the example of a workflow implementing the above flow (consider adjusting Agent assignments to jobs). For details how to use the example see JS7 - How to upload .json examples (kb.sos-berlin.com)
Consider the following hints:
$returnCode == 0.For releases before 2.8.2, the Case Instruction cannot be used. In this situtation you can use nested If Instructions.
Last edit: Andreas 2026-03-18
Alright, i forget to slide this toolbar to sedd what was available >_<
manage to do what i wanted.
but case-when should be align side by side, instead of following, would be easier to visually understand, dk if the visual alignment can be changed for this