KieRuntime kruntime = getKieRuntimeForSubprocess();
public void cancel() { WorkItem workItem = getWorkItem(); if (workItem != null && workItem.getState() != WorkItem.COMPLETED && workItem.getState() != WorkItem.ABORTED) { try { ((WorkItemManager) ((ProcessInstance) getProcessInstance()) .getKnowledgeRuntime().getWorkItemManager()).internalAbortWorkItem(workItemId); } catch (WorkItemHandlerNotFoundException wihnfe) { getProcessInstance().setState(ProcessInstance.STATE_ABORTED); throw wihnfe; } } if (exceptionHandlingProcessInstanceId > -1) { ProcessInstance processInstance = null; KieRuntime kruntime = getKieRuntimeForSubprocess(); processInstance = (ProcessInstance) kruntime.getProcessInstance(exceptionHandlingProcessInstanceId); if (processInstance != null) { processInstance.setState(ProcessInstance.STATE_ABORTED); } } super.cancel(); }
KieRuntime kruntime = getKieRuntimeForSubprocess();
public void cancel() { WorkItem workItem = getWorkItem(); if (workItem != null && workItem.getState() != WorkItem.COMPLETED && workItem.getState() != WorkItem.ABORTED) { try { ((WorkItemManager) ((ProcessInstance) getProcessInstance()) .getKnowledgeRuntime().getWorkItemManager()).internalAbortWorkItem(workItemId); } catch (WorkItemHandlerNotFoundException wihnfe) { getProcessInstance().setState(ProcessInstance.STATE_ABORTED); throw wihnfe; } } if (exceptionHandlingProcessInstanceId > -1) { ProcessInstance processInstance = null; KieRuntime kruntime = getKieRuntimeForSubprocess(); processInstance = (ProcessInstance) kruntime.getProcessInstance(exceptionHandlingProcessInstanceId); if (processInstance != null) { processInstance.setState(ProcessInstance.STATE_ABORTED); } } super.cancel(); }