public void triggerCompleted() { ((org.jbpm.workflow.instance.NodeInstanceContainer)getNodeInstanceContainer()).setCurrentLevel(getLevel()); triggerCompleted(org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE, true); } }
public StartNode getStartNode() { return (StartNode) getNode(); }
public void signalEvent(String type, Object event) { String variableName = (String) getStartNode().getMetaData("TriggerMapping"); if (variableName != null) { VariableScopeInstance variableScopeInstance = (VariableScopeInstance) resolveContextInstance(VariableScope.VARIABLE_SCOPE, variableName); if (variableScopeInstance == null) { throw new IllegalArgumentException( "Could not find variable for start node: " + variableName); } EventTransformer transformer = getStartNode().getEventTransformer(); if (transformer != null) { event = transformer.transformEvent(event); } variableScopeInstance.setVariable(variableName, event); } triggerCompleted(); }
public void internalTrigger(final NodeInstance from, String type) { if (type != null) { throw new IllegalArgumentException( "A StartNode does not accept incoming connections!"); } if (from != null) { throw new IllegalArgumentException( "A StartNode can only be triggered by the process itself!"); } triggerCompleted(); }
@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); }
public void internalTrigger(final NodeInstance from, String type) { if (type != null) { throw new IllegalArgumentException( "A StartNode does not accept incoming connections!"); } if (from != null) { throw new IllegalArgumentException( "A StartNode can only be triggered by the process itself!"); } triggerCompleted(); }
@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); }
public void triggerCompleted() { ((org.jbpm.workflow.instance.NodeInstanceContainer)getNodeInstanceContainer()).setCurrentLevel(getLevel()); triggerCompleted(org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE, true); } }
public void signalEvent(String type, Object event) { String variableName = (String) getStartNode().getMetaData("TriggerMapping"); if (variableName != null) { VariableScopeInstance variableScopeInstance = (VariableScopeInstance) resolveContextInstance(VariableScope.VARIABLE_SCOPE, variableName); if (variableScopeInstance == null) { throw new IllegalArgumentException( "Could not find variable for start node: " + variableName); } EventTransformer transformer = getStartNode().getEventTransformer(); if (transformer != null) { event = transformer.transformEvent(event); } variableScopeInstance.setVariable(variableName, event); } triggerCompleted(); }
public StartNode getStartNode() { return (StartNode) getNode(); }