((CompositeContextNodeInstance) nodeInstance).getTimerInstances(); if (timerInstances != null) { stream.writeInt(timerInstances.size()); stream.writeInt(0); VariableScopeInstance variableScopeInstance = (VariableScopeInstance) compositeNodeInstance.getContextInstance(VariableScope.VARIABLE_SCOPE); if (variableScopeInstance == null) { stream.writeInt(0); List<NodeInstance> nodeInstances = new ArrayList<NodeInstance>(compositeNodeInstance.getNodeInstances()); Collections.sort(nodeInstances, new Comparator<NodeInstance>() { compositeNodeInstance.getContextInstances(ExclusiveGroup.EXCLUSIVE_GROUP); if (exclusiveGroupInstances == null) { stream.writeInt(0);
nodeInstance = new CompositeContextNodeInstance(); nbTimerInstances = stream.readInt(); if (nbTimerInstances > 0) { timerInstances.add(stream.readLong()); ((CompositeContextNodeInstance) nodeInstance).internalSetTimerInstances(timerInstances); timerInstances.add(stream.readLong()); ((CompositeContextNodeInstance) nodeInstance).internalSetTimerInstances(timerInstances); timerInstances.add(stream.readLong()); ((CompositeContextNodeInstance) nodeInstance).internalSetTimerInstances(timerInstances);
public void addEventListeners() { super.addEventListeners(); addActivationListener(); }
public ContextInstance getContextInstance(String contextId) { ContextInstance contextInstance = this.contextInstances.get(contextId); if (contextInstance != null) { return contextInstance; } Context context = getCompositeContextNode().getDefaultContext(contextId); if (context != null) { contextInstance = getContextInstance(context); return contextInstance; } return null; }
public void setContextInstanceContainer(ContextInstanceContainer contextInstanceContainer) { super.setContextInstanceContainer(contextInstanceContainer); for (Variable variable : getVariableScope().getVariables()) { if (variable.getValue() != null) { setVariable(variable.getName(), variable.getValue()); } } if (contextInstanceContainer instanceof CompositeContextNodeInstance) { this.variableIdPrefix = ((Node) ((CompositeContextNodeInstance) contextInstanceContainer).getNode()).getUniqueId(); this.variableInstanceIdPrefix = ((CompositeContextNodeInstance) contextInstanceContainer).getUniqueId(); } }
Context variableScope = ((org.jbpm.process.core.Process) ((org.jbpm.process.instance.ProcessInstance) processInstance).getProcess()).getDefaultContext( VariableScope.VARIABLE_SCOPE ); VariableScopeInstance variableScopeInstance = (VariableScopeInstance) ((CompositeContextNodeInstance) nodeInstance).getContextInstance( variableScope ); for ( JBPMMessages.Variable _variable : _node.getContent().getComposite().getVariableList() ) { try { ((CompositeContextNodeInstance) nodeInstance).getIterationLevels().put(_level.getId(), _level.getLevel()); ((CompositeContextNodeInstance) nodeInstance).addContextInstance( ExclusiveGroup.EXCLUSIVE_GROUP, exclusiveGroupInstance ); for ( Long nodeInstanceId : _excl.getGroupNodeInstanceIdList() ) { NodeInstance groupNodeInstance = ((org.jbpm.workflow.instance.NodeInstanceContainer)processInstance).getNodeInstance( nodeInstanceId, true );
assertTrue(child instanceof CompositeContextNodeInstance); assertEquals(2, ((CompositeContextNodeInstance) child) .getNodeInstances().size());
@Override public ContextInstance getContextInstance(String contextId) { ContextInstance contextInstance = super.getContextInstance(contextId); if (contextInstance == null) { contextInstance = resolveContextInstance(contextId, TEMP_OUTPUT_VAR); setContextInstance(contextId, contextInstance); } return contextInstance; }
protected CompositeContextNode getCompositeContextNode() { return (CompositeContextNode) getNode(); }
public ContextContainer getContextContainer() { return getCompositeContextNode(); }
return super.getNodeInstance(node);
Context variableScope = ((org.jbpm.process.core.Process) ((org.jbpm.process.instance.ProcessInstance) processInstance).getProcess()).getDefaultContext( VariableScope.VARIABLE_SCOPE ); VariableScopeInstance variableScopeInstance = (VariableScopeInstance) ((CompositeContextNodeInstance) nodeInstance).getContextInstance( variableScope ); for ( JBPMMessages.Variable _variable : _node.getContent().getComposite().getVariableList() ) { try { ((CompositeContextNodeInstance) nodeInstance).getIterationLevels().put(_level.getId(), _level.getLevel()); ((CompositeContextNodeInstance) nodeInstance).addContextInstance( ExclusiveGroup.EXCLUSIVE_GROUP, exclusiveGroupInstance ); for ( Long nodeInstanceId : _excl.getGroupNodeInstanceIdList() ) { NodeInstance groupNodeInstance = ((org.jbpm.workflow.instance.NodeInstanceContainer)processInstance).getNodeInstance( nodeInstanceId, true );
public ContextInstance getContextInstance(String contextId) { ContextInstance contextInstance = this.contextInstances.get(contextId); if (contextInstance != null) { return contextInstance; } Context context = getCompositeContextNode().getDefaultContext(contextId); if (context != null) { contextInstance = getContextInstance(context); return contextInstance; } return null; }
public void setContextInstanceContainer(ContextInstanceContainer contextInstanceContainer) { super.setContextInstanceContainer(contextInstanceContainer); for (Variable variable : getVariableScope().getVariables()) { if (variable.getValue() != null) { setVariable(variable.getName(), variable.getValue()); } } if (contextInstanceContainer instanceof CompositeContextNodeInstance) { this.variableIdPrefix = ((Node) ((CompositeContextNodeInstance) contextInstanceContainer).getNode()).getUniqueId(); this.variableInstanceIdPrefix = ((CompositeContextNodeInstance) contextInstanceContainer).getUniqueId(); } }
assertTrue(child instanceof CompositeContextNodeInstance); assertEquals(2, ((CompositeContextNodeInstance) child) .getNodeInstances().size());
Context variableScope = ((org.jbpm.process.core.Process) ((org.jbpm.process.instance.ProcessInstance) processInstance).getProcess()).getDefaultContext(VariableScope.VARIABLE_SCOPE); VariableScopeInstance variableScopeInstance = (VariableScopeInstance) ((CompositeContextNodeInstance) nodeInstance).getContextInstance(variableScope); for (int i = 0; i < nbVariables; i++) { String name = stream.readUTF();
protected CompositeContextNode getCompositeContextNode() { return (CompositeContextNode) getNode(); }
public ContextContainer getContextContainer() { return getCompositeContextNode(); }
return super.getNodeInstance(node);
((CompositeContextNodeInstance) nodeInstance).getTimerInstances(); if ( timerInstances != null ) { for ( Long id : timerInstances ) { VariableScopeInstance variableScopeInstance = (VariableScopeInstance) compositeNodeInstance.getContextInstance( VariableScope.VARIABLE_SCOPE ); if ( variableScopeInstance != null ) { List<Map.Entry<String, Object>> variables = new ArrayList<Map.Entry<String, Object>>( variableScopeInstance.getVariables().entrySet() ); List<Map.Entry<String, Integer>> iterationlevels = new ArrayList<Map.Entry<String, Integer>>( compositeNodeInstance.getIterationLevels().entrySet() ); Collections.sort( iterationlevels, new Comparator<Map.Entry<String, Integer>>() { List<NodeInstance> nodeInstances = new ArrayList<NodeInstance>( compositeNodeInstance.getNodeInstances() ); Collections.sort( nodeInstances, new Comparator<NodeInstance>() { compositeNodeInstance.getContextInstances( ExclusiveGroup.EXCLUSIVE_GROUP ); if ( exclusiveGroupInstances != null ) { for ( ContextInstance contextInstance : exclusiveGroupInstances ) {