How to change stage inside case map?
I have a case map project with 3 stages, each having one process. It should be possible to jump from first process to last stage.
Inside scirpt I call
ivy.case.getBusinessCase().setStageId(stageIdStr)
But get error:
IllegalStateException: Only business cases with no active sub cases can be finished
Could not handle case map event 'STAGE_CHANGED' for business case '4'
Because I am inside the process my case is still active. What would be the API call to set it to "not active" ? When is a business case finished? When exiting process, a stage or the case map?
Thanks a lot, best regards.
AdamSolution: as Pointed out in the answer, this error can be ignored and only triggers when after changing stage all processes are finished.