private void cancelProcessInstance ( ProcessInstance pProcessInst ) throws Exception { edao . cancelTransitionInstances ( pProcessInst . getId ( ) , "ProcessInstance has been cancelled." , null ) ; edao . setProcessInstanceStatus ( pProcessInst . getId ( ) , WorkStatus . STATUS_CANCELLED ) ; edao . removeEventWaitForProcessInstance ( pProcessInst . getId ( ) ) ; this . cancelTasksOfProcessInstance ( pProcessInst ) ; }
Cancels a single process instance . It cancels all active transition instances all event wait instances and sets the process instance into canceled status .