Hi everybody!

I'm struggling with the forEach construct. We already had a Drools Flow
running using Drools 5.0.
Now we would like to port it to Drools Flow 5.1.1.

It seems that there is a problem with the ForEach Construct in combination
with the XOR Gateway (the same
seems to be true for the OR Gateway):

Even if i set both constrains of the gateway to "eval( true )" i got an
runtime Error like (full Stacktrace at the end of my post):
Caused by: java.lang.IllegalArgumentException: XOR split could not find at
least one valid outgoing connection for split Art des Arbeitsanstosses
pruefen

I can even reproduce this behaviour when building a small workflow from
scratch.
Had anyone else such an error? Does anyone know a workaround for this?
You can reproduce this with the attached Flows.


Any help is really appreciated!
Regards,
Dirk Hermanns

P.S.: If i try to build such an Flow using the new bpmn Notation, i get an
error when building the package in Guvnor: Workitem Node xxx has no
incoming connection.
So this doesn't seem to help :(. Has anyone got the forEach (or Multiple
Instances) feature with Drools 5.1.1 working?


org.drools.RuntimeDroolsException: Unexpected exception executing action
org.drools.process.instance.event.DefaultSignalManager$SignalAction@15c90f4
      at org.drools.common.AbstractWorkingMemory.executeQueuedActions
(AbstractWorkingMemory.java:1473)
      at org.drools.common.DefaultAgenda.fireAllRules
(DefaultAgenda.java:1074)
      at org.drools.common.AbstractWorkingMemory.fireAllRules
(AbstractWorkingMemory.java:785)
      at org.drools.common.AbstractWorkingMemory.fireAllRules
(AbstractWorkingMemory.java:751)
      at
org.drools.process.instance.impl.DefaultWorkItemManager.completeWorkItem
(DefaultWorkItemManager.java:120)
      at
de.lvm.vorverteilung.internal.util.VorvertelungsauftragAnalysierenWorkItemHandler.executeWorkItem
(VorvertelungsauftragAnalysierenWorkItemHandler.java:51)
      at
org.drools.process.instance.impl.DefaultWorkItemManager.internalExecuteWorkItem
(DefaultWorkItemManager.java:72)
      at
org.drools.workflow.instance.node.WorkItemNodeInstance.internalTrigger
(WorkItemNodeInstance.java:101)
      at org.drools.workflow.instance.impl.NodeInstanceImpl.trigger
(NodeInstanceImpl.java:117)
      at
org.drools.workflow.instance.impl.NodeInstanceImpl.triggerConnection
(NodeInstanceImpl.java:178)
      at
org.drools.workflow.instance.impl.NodeInstanceImpl.triggerCompleted
(NodeInstanceImpl.java:144)
      at
org.drools.workflow.instance.node.StartNodeInstance.triggerCompleted
(StartNodeInstance.java:49)
      at
org.drools.workflow.instance.node.StartNodeInstance.internalTrigger
(StartNodeInstance.java:41)
      at org.drools.workflow.instance.impl.NodeInstanceImpl.trigger
(NodeInstanceImpl.java:117)
      at org.drools.ruleflow.instance.RuleFlowProcessInstance.internalStart
(RuleFlowProcessInstance.java:32)
      at org.drools.process.instance.impl.ProcessInstanceImpl.start
(ProcessInstanceImpl.java:192)
      at
org.drools.workflow.instance.impl.WorkflowProcessInstanceImpl.start
(WorkflowProcessInstanceImpl.java:309)
      at org.drools.common.AbstractWorkingMemory.startProcess
(AbstractWorkingMemory.java:1644)
      at org.drools.impl.StatefulKnowledgeSessionImpl.startProcess
(StatefulKnowledgeSessionImpl.java:306)
      at de.lvm.vorverteilung.internal.rules.TerminHRuleFlowTest.runTermin1
(TerminHRuleFlowTest.java:252)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall
(FrameworkMethod.java:44)
      at org.junit.internal.runners.model.ReflectiveCallable.run
(ReflectiveCallable.java:15)
      at org.junit.runners.model.FrameworkMethod.invokeExplosively
(FrameworkMethod.java:41)
      at org.junit.internal.runners.statements.InvokeMethod.evaluate
(InvokeMethod.java:20)
      at org.junit.internal.runners.statements.RunBefores.evaluate
(RunBefores.java:28)
      at org.junit.internal.runners.statements.RunAfters.evaluate
(RunAfters.java:31)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild
(BlockJUnit4ClassRunner.java:70)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild
(BlockJUnit4ClassRunner.java:44)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
      at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
      at org.junit.internal.runners.statements.RunBefores.evaluate
(RunBefores.java:28)
      at org.junit.internal.runners.statements.RunAfters.evaluate
(RunAfters.java:31)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
      at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run
(JUnit4TestReference.java:46)
      at org.eclipse.jdt.internal.junit.runner.TestExecution.run
(TestExecution.java:38)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests
(RemoteTestRunner.java:467)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests
(RemoteTestRunner.java:683)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run
(RemoteTestRunner.java:390)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main
(RemoteTestRunner.java:197)
Caused by: java.lang.IllegalArgumentException: XOR split could not find at
least one valid outgoing connection for split Art des Arbeitsanstosses
pruefen
      at org.drools.workflow.instance.node.SplitInstance.internalTrigger
(SplitInstance.java:92)
      at org.drools.workflow.instance.impl.NodeInstanceImpl.trigger
(NodeInstanceImpl.java:117)
      at
org.drools.workflow.instance.impl.NodeInstanceImpl.triggerConnection
(NodeInstanceImpl.java:178)
      at
org.drools.workflow.instance.impl.NodeInstanceImpl.triggerCompleted
(NodeInstanceImpl.java:144)
      at
org.drools.workflow.instance.impl.ExtendedNodeInstanceImpl.triggerCompleted
(ExtendedNodeInstanceImpl.java:53)
      at
org.drools.workflow.instance.node.StateBasedNodeInstance.triggerCompleted
(StateBasedNodeInstance.java:117)
      at
org.drools.workflow.instance.node.StateBasedNodeInstance.triggerCompleted
(StateBasedNodeInstance.java:98)
      at
org.drools.workflow.instance.node.WorkItemNodeInstance.internalTrigger
(WorkItemNodeInstance.java:105)
      at org.drools.workflow.instance.impl.NodeInstanceImpl.trigger
(NodeInstanceImpl.java:117)
      at
org.drools.workflow.instance.impl.NodeInstanceImpl.triggerConnection
(NodeInstanceImpl.java:178)
      at
org.drools.workflow.instance.impl.NodeInstanceImpl.triggerCompleted
(NodeInstanceImpl.java:144)
      at
org.drools.workflow.instance.impl.ExtendedNodeInstanceImpl.triggerCompleted
(ExtendedNodeInstanceImpl.java:53)
      at
org.drools.workflow.instance.node.StateBasedNodeInstance.triggerCompleted
(StateBasedNodeInstance.java:117)
      at
org.drools.workflow.instance.node.StateBasedNodeInstance.triggerCompleted
(StateBasedNodeInstance.java:98)
      at org.drools.workflow.instance.node.RuleSetNodeInstance.signalEvent
(RuleSetNodeInstance.java:71)
      at
org.drools.workflow.instance.impl.WorkflowProcessInstanceImpl.signalEvent
(WorkflowProcessInstanceImpl.java:343)
      at
org.drools.process.instance.event.DefaultSignalManager.internalSignalEvent
(DefaultSignalManager.java:79)
      at org.drools.process.instance.event.DefaultSignalManager
$SignalAction.execute(DefaultSignalManager.java:167)
      at org.drools.common.AbstractWorkingMemory.executeQueuedActions
(AbstractWorkingMemory.java:1471)
      ... 43 more


(See attached file: ZZTestFlow2.rf)(See attached file: ZZTestFlow.bpmn)