((NodeInstanceContainer) getNodeInstanceContainer()).setState( ProcessInstance.STATE_COMPLETED );
@Override public void nodeInstanceCompleted(org.jbpm.workflow.instance.NodeInstance nodeInstance, String outType) { if (nodeInstance instanceof EndNodeInstance) { if (getCompositeNode().isKeepActive()) { StartNode startNode = getCompositeNode().findStartNode(); triggerCompleted(true); if (startNode.isInterrupting()) { String faultName = getProcessInstance().getOutcome()==null?"":getProcessInstance().getOutcome(); if (startNode.getMetaData("FaultCode") != null) { faultName = (String) startNode.getMetaData("FaultCode"); } if (getNodeInstanceContainer() instanceof ProcessInstance) { ((ProcessInstance) getProcessInstance()).setState(ProcessInstance.STATE_ABORTED, faultName); } else { ((NodeInstanceContainer) getNodeInstanceContainer()).setState( ProcessInstance.STATE_ABORTED); } } } } else { throw new IllegalArgumentException( "Completing a node instance that has no outgoing connection not supported."); } }
((NodeInstanceContainer) getNodeInstanceContainer()).setState( ProcessInstance.STATE_COMPLETED );
@Override public void nodeInstanceCompleted(org.jbpm.workflow.instance.NodeInstance nodeInstance, String outType) { if (nodeInstance instanceof EndNodeInstance) { if (getCompositeNode().isKeepActive()) { StartNode startNode = getCompositeNode().findStartNode(); triggerCompleted(true); if (startNode.isInterrupting()) { String faultName = getProcessInstance().getOutcome()==null?"":getProcessInstance().getOutcome(); if (startNode.getMetaData("FaultCode") != null) { faultName = (String) startNode.getMetaData("FaultCode"); } if (getNodeInstanceContainer() instanceof ProcessInstance) { ((ProcessInstance) getProcessInstance()).setState(ProcessInstance.STATE_ABORTED, faultName); } else { ((NodeInstanceContainer) getNodeInstanceContainer()).setState( ProcessInstance.STATE_ABORTED); } } } } else { throw new IllegalArgumentException( "Completing a node instance that has no outgoing connection not supported."); } }