@Override public void signalEvent(String type, Object event) { if (getNodeInstanceContainer().getNodeInstances().contains(this) || type.startsWith("Error-") || type.equals("timerTriggered") ) { // start it only if it was not already started - meaning there are node instances if (this.getNodeInstances().isEmpty()) { StartNode startNode = getCompositeNode().findStartNode(); if (resolveVariables(((EventSubProcessNode) getEventBasedNode()).getEvents()).contains(type) || type.equals("timerTriggered")) { NodeInstance nodeInstance = getNodeInstance(startNode); ((StartNodeInstance) nodeInstance).signalEvent(type, event); } } } super.signalEvent(type, event); }
if (nodeParent instanceof EventSubProcessNode) { boolean compensationEventSubProcess = false; List<Trigger> startTriggers = ((EventSubProcessNode) nodeParent).findStartNode().getTriggers(); CESP_CHECK: for (Trigger trigger : startTriggers) { if (trigger instanceof EventTrigger) {
if( nodeParent instanceof EventSubProcessNode ) { boolean compensationEventSubProcess = false; List<Trigger> startTriggers = ((EventSubProcessNode) nodeParent).findStartNode().getTriggers(); CESP_CHECK: for( Trigger trigger : startTriggers ) { if( trigger instanceof EventTrigger ) {
@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."); } }
@Override public void signalEvent(String type, Object event) { if (getNodeInstanceContainer().getNodeInstances().contains(this) || type.startsWith("Error-") || type.equals("timerTriggered") ) { // start it only if it was not already started - meaning there are node instances if (this.getNodeInstances().isEmpty()) { StartNode startNode = getCompositeNode().findStartNode(); if (resolveVariables(((EventSubProcessNode) getEventBasedNode()).getEvents()).contains(type) || type.equals("timerTriggered")) { NodeInstance nodeInstance = getNodeInstance(startNode); ((StartNodeInstance) nodeInstance).signalEvent(type, event); } } } super.signalEvent(type, event); }
if( nodeParent instanceof EventSubProcessNode ) { boolean compensationEventSubProcess = false; List<Trigger> startTriggers = ((EventSubProcessNode) nodeParent).findStartNode().getTriggers(); CESP_CHECK: for( Trigger trigger : startTriggers ) { if( trigger instanceof EventTrigger ) {
if (nodeParent instanceof EventSubProcessNode) { boolean compensationEventSubProcess = false; List<Trigger> startTriggers = ((EventSubProcessNode) nodeParent).findStartNode().getTriggers(); CESP_CHECK: for (Trigger trigger : startTriggers) { if (trigger instanceof EventTrigger) {
@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."); } }