ForEachNodeInstance.this.triggerCompleted(org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE, true);
} else {
List<NodeInstance> nodeInstances = new ArrayList<NodeInstance>();
for (Object o: collection) {
String variableName = getForEachNode().getVariableName();
NodeInstance nodeInstance = (NodeInstance)
((NodeInstanceContainer) getNodeInstanceContainer()).getNodeInstance(getForEachSplitNode().getTo().getTo());
VariableScopeInstance variableScopeInstance = (VariableScopeInstance)
nodeInstance.resolveContextInstance(VariableScope.VARIABLE_SCOPE, variableName);
variableScopeInstance.setVariable(variableName, o);
nodeInstances.add(nodeInstance);
}
for (NodeInstance nodeInstance: nodeInstances) {
((org.jbpm.workflow.instance.NodeInstance) nodeInstance).trigger(this, getForEachSplitNode().getTo().getToType());