System.err.println("Could not find process " + processId);
System.err.println("Aborting process");
((ProcessInstance) getProcessInstance()).setState(ProcessInstance.STATE_ABORTED);
throw new RuntimeDroolsException("Could not find process " + processId);
} else {
ProcessInstance processInstance = ( ProcessInstance )
((ProcessInstance) getProcessInstance()).getKnowledgeRuntime()
.startProcess(processId, parameters);
this.processInstanceId = processInstance.getId();
((ProcessInstanceImpl) processInstance).setMetaData("ParentProcessInstanceId", processInstance.getId());
if (!getSubProcessNode().isWaitForCompletion()) {
triggerCompleted();
} else if (processInstance.getState() == ProcessInstance.STATE_COMPLETED) {
handleOutMappings(processInstance);
triggerCompleted();
} else {
addProcessListener();
}