I need to create and execute/suspend sub process according to a specified priority in the request.
@Override
public void execute(DelegateExecution execution) throws Exception {
for (each element in Process_List) {
ProcessInstance processInstance = runtimeService
.startProcessInstanceByKey(sub_process, variables);
}
For all process started by the script above, there is no "parent_id" or "super_exec" affected in table "act_ru_execution" while for all process created by "Call Activity" or "Sub process" the fields "parent_id" and "superexec" are filled in that table. I am actually facing 2 issues:- When the parent process is deleted, all child continue running.- The parent process don't wait to the end of child processOther solution is how can I create and instanciate in java programmatically "Call Activity" or "Sub process" ?Because all child process created in "Call Activity" and "Sub process" are dependant to their parent process. If the parent is deleted, all child process are deleted.Is there anything to do in the script above to put a relation or link betweeen parent and child?