Source:
<code>private void triggerCatchStartEventSubProcess(final SEventTriggerType triggerType, final Long processDefinitionId, final Long targetSFlowNodeDefinitionId, final OperationsWithContext operations, final long subProcessId, final long parentProcessInstanceId, final Long rootProcessInstanceId, final Boolean isInterrupting) throws SBonitaException { final SProcessDefinition processDefinition = processDefinitionService.getProcessDefinition(processDefinitionId); final SFlowNodeDefinition sFlowNodeDefinition = processDefinition.getProcessContainer().getFlowNode(subProcessId); final SFlowNodeInstance subProcflowNodeInstance = bpmInstancesCreator.createFlowNodeInstance(processDefinitionId, rootProcessInstanceId, parentProcessInstanceId, SFlowElementsContainerType.PROCESS, sFlowNodeDefinition, rootProcessInstanceId, parentProcessInstanceId, false, 0, SStateCategory.NORMAL, -1); final SProcessInstance parentProcessInstance = processInstanceService.getProcessInstance(parentProcessInstanceId); if (triggerType.equals(SEventTriggerType.ERROR)) { final TransactionContainedProcessInstanceInterruptor interruptor = new TransactionContainedProcessInstanceInterruptor( processInstanceService, eventInstanceService, containerRegistry, logger); interruptor.interruptProcessInstance(parentProcessInstanceId, SStateCategory.ABORTING, -1, subProcflowNodeInstance.getId()); } else if (isInterrupting) { final TransactionalProcessInstanceInterruptor interruptor = new TransactionalProcessInstanceInterruptor(processInstanceService, eventInstanceService, processExecutor, logger); interruptor.interruptProcessInstance(parentProcessInstanceId, SStateCategory.ABORTING, -1, subProcflowNodeInstance.getId()); } try { processExecutor.start(processDefinitionId, targetSFlowNodeDefinitionId, 0, 0, operations.getContext(), operations.getOperations(), null, null, subProcflowNodeInstance.getId(), subProcessId, null); } catch (ContractViolationException e) { <START> throw new SProcessInstanceCreationException("Process contracts are not allowed on Event sub process"); <END> } unregisterEventSubProcess(processDefinition, parentProcessInstance); }</code><technical_language>Do do that? happen builders do add in definition , exception a server exception a client exception</technical_language>

Target:
private void triggerCatchStartEventSubProcess(final SEventTriggerType triggerType, final Long processDefinitionId, final Long targetSFlowNodeDefinitionId, final OperationsWithContext operations, final long subProcessId, final long parentProcessInstanceId, final Long rootProcessInstanceId, final Boolean isInterrupting) throws SBonitaException { final SProcessDefinition processDefinition = processDefinitionService.getProcessDefinition(processDefinitionId); final SFlowNodeDefinition sFlowNodeDefinition = processDefinition.getProcessContainer().getFlowNode(subProcessId); final SFlowNodeInstance subProcflowNodeInstance = bpmInstancesCreator.createFlowNodeInstance(processDefinitionId, rootProcessInstanceId, parentProcessInstanceId, SFlowElementsContainerType.PROCESS, sFlowNodeDefinition, rootProcessInstanceId, parentProcessInstanceId, false, 0, SStateCategory.NORMAL, -1); final SProcessInstance parentProcessInstance = processInstanceService.getProcessInstance(parentProcessInstanceId); if (triggerType.equals(SEventTriggerType.ERROR)) { final TransactionContainedProcessInstanceInterruptor interruptor = new TransactionContainedProcessInstanceInterruptor( processInstanceService, eventInstanceService, containerRegistry, logger); interruptor.interruptProcessInstance(parentProcessInstanceId, SStateCategory.ABORTING, -1, subProcflowNodeInstance.getId()); } else if (isInterrupting) { final TransactionalProcessInstanceInterruptor interruptor = new TransactionalProcessInstanceInterruptor(processInstanceService, eventInstanceService, processExecutor, logger); interruptor.interruptProcessInstance(parentProcessInstanceId, SStateCategory.ABORTING, -1, subProcflowNodeInstance.getId()); } processExecutor.start(processDefinitionId, targetSFlowNodeDefinitionId, 0, 0, operations.getContext(), operations.getOperations(), null, null, subProcflowNodeInstance.getId(), subProcessId, null); unregisterEventSubProcess(processDefinition, parentProcessInstance); }