You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by ea...@apache.org on 2015/03/16 18:54:11 UTC
svn commit: r1667087 -
/uima/sandbox/uima-ducc/trunk/uima-ducc-user/src/main/java/org/apache/uima/ducc/FlowController.java
Author: eae
Date: Mon Mar 16 17:54:10 2015
New Revision: 1667087
URL: http://svn.apache.org/r1667087
Log:
UIMA-4278
Modified:
uima/sandbox/uima-ducc/trunk/uima-ducc-user/src/main/java/org/apache/uima/ducc/FlowController.java
Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-user/src/main/java/org/apache/uima/ducc/FlowController.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-user/src/main/java/org/apache/uima/ducc/FlowController.java?rev=1667087&r1=1667086&r2=1667087&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-user/src/main/java/org/apache/uima/ducc/FlowController.java (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-user/src/main/java/org/apache/uima/ducc/FlowController.java Mon Mar 16 17:54:10 2015
@@ -144,11 +144,17 @@ public class FlowController extends JCas
throw new IllegalStateException("More than one instance of Workitem type");
}
if (wi.getSendToAll()) {
- // send WI-CAS to all delegates
+ // send WI-CAS to any remaining delegates
}
else if (wi.getSendToLast()) {
- // send to last delegate only
- currentStep = mSequence.size() - 1;
+ // send WI-CAS to last delegate, unless the only delegate is the initial CM
+ if (currentStep < (mSequence.size() - 1)) {
+ currentStep = mSequence.size() - 1;
+ }
+ }
+ else {
+ // send WI-CAS back to JD
+ return new FinalStep();
}
}
// No Workitem FS in CAS, WI-CAS is at end of flow