AnsweredAssumed Answered

Sub-Process Migration Solution

Question asked by wjeong on Oct 28, 2014
Latest reply on Oct 30, 2014 by martin.grofcik
Does anybody have a good solution for migrating sub processes when updating the process definition?

I have a sub process defined with a simple "Start -> TaskInsideSubProcess -> End".  After I modify another task somewhere else in the definition, I deploy the file and use the SetProcessDefinitionVersionCmd to update all process instances.  The migration seemly works (no exception are thrown) but once that "TaskInsideSubProcess" is completed, the next task outside the sub process is not created.

My migration code is get all process instances:
    processEngine.getRuntimeService().createProcessInstanceQuery()
        .processDefinitionKey(definitionKey)
        .active()
        .list();

and iterate to migrate via:
    CommandExecutor commandExecutor = processEngineConfig.getJobExecutor().getCommandExecutor();
    commandExecutor.execute(new SetProcessDefinitionVersionCmd(processInstanceId, processDefinitionVersion));


Any input is appreciated.

Outcomes