I can't seem to wrap my brain around this for some reason.
OOB in the Incident workflow is a ruleset called FCB.im.incident.closure that is on the transition to the Closure phase.
It correctly checks and gives appropriate msg if there are any opened tasks. I also have the script setting the status back to "Work in Progress" and the Phase to "Investigation". But how can I force it to skip the Review phase and co back to the Investigation phase. At this point it is actually executing the Review phase and then going back to the Investigation phase. It does correctly reset the status to Work in Progress but the phase is Recovery and not Investigation
Basically, I want to check and if there are opened tasks, I don't want the Review phase to execute.
returnCode = 1;
record.problem_status="Work In Progress";
message=system.functions.scmsg (112, "im", [record.number]);