Author: koen.aers(a)jboss.com
Date: 2008-07-24 08:59:42 -0400 (Thu, 24 Jul 2008)
New Revision: 9266
Modified:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/flow/jpdl4/core/Process.java
Log:
only one start state per process
Modified:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/flow/jpdl4/core/Process.java
===================================================================
---
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/flow/jpdl4/core/Process.java 2008-07-24
12:54:41 UTC (rev 9265)
+++
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/flow/jpdl4/core/Process.java 2008-07-24
12:59:42 UTC (rev 9266)
@@ -2,6 +2,7 @@
import java.util.ArrayList;
import java.util.HashMap;
+import java.util.Iterator;
import java.util.List;
public class Process {
@@ -39,5 +40,15 @@
node.setNodeContainer(null);
nodes.remove(node);
}
+
+ public StartState getStartState() {
+ for (Iterator<Node> iterator = nodes.iterator(); iterator.hasNext(); ) {
+ Node node = iterator.next();
+ if (node instanceof StartState) {
+ return (StartState)node;
+ }
+ }
+ return null;
+ }
}
Show replies by date