[jbpm-commits] JBoss JBPM SVN: r1698 - in jbossbpm/spec/trunk/modules: dialects/api10/src/main/java/org/jboss/bpm/dialect/api10 and 4 other directories.
do-not-reply at jboss.org
do-not-reply at jboss.org
Wed Jul 23 16:17:53 EDT 2008
Author: thomas.diesler at jboss.com
Date: 2008-07-23 16:17:53 -0400 (Wed, 23 Jul 2008)
New Revision: 1698
Added:
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ExclusiveGatewayDataBased.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ExclusiveGatewayEventBased.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Flow.java
jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBFlow.java
Removed:
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/DataBasedExclusiveGateway.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/EventBasedExclusiveGateway.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Flow.java
jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBConnectingObject.java
Modified:
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/MessageFlow.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ProcessBuilder.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/SequenceFlow.java
jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/ProcessUnmarshaller.java
jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBGateway.java
jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBIntermediateEvent.java
jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBMessageFlow.java
jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBSequenceFlow.java
jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBStartEvent.java
jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBSubProcess.java
jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBTask.java
jbossbpm/spec/trunk/modules/dialects/stp/src/main/java/org/jboss/bpm/dialect/stp/ProcessUnmarshaller.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/client/internal/ExecutionManagerImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ComplexGatewayImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ExclusiveGatewayImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/FlowImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/FlowObjectImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/GatewayImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/InclusiveGatewayImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/MessageFlowImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ParallelGatewayImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ProcessBuilderImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/SequenceFlowImpl.java
Log:
Add more gateway support for STP
Deleted: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/DataBasedExclusiveGateway.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/DataBasedExclusiveGateway.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/DataBasedExclusiveGateway.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -1,55 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.bpm.model;
-
-
-//$Id$
-
-/**
- * The Data-Based Exclusive Gateways are the most commonly used type of Gateways. The set of Gates for Data-Based
- * Exclusive Decisions is based on the boolean expression contained in the ConditionExpression attribute of the outgoing
- * Sequence Flow of the Gateway. These expressions use the values of process data to determine which path should be taken
- * (hence the name Data-Based).
- *
- * The conditions for the alternative Gates should be evaluated in a specific order. The first one that evaluates as TRUE will
- * determine the Sequence Flow that will be taken. Since the behavior of this Gateway is exclusive, any other conditions that
- * may actually be TRUE will be ignored--only one Gate can be chosen. One of the Gates may be “default” (or otherwise),
- * and is the last Gate considered. This means that if none of the other Gates are chosen, then the default Gate will be
- * chosen—along with its associated Sequence Flow.
- *
- * The default Gate is not mandatory for a Gateway. This means that if it is not used, then it is up to the modeler to insure
- * that at least one Gate be valid at runtime. BPMN does not specify what will happen if there are no valid Gates. However,
- * BPMN does specify that there MUST NOT be implicit flow and that all Normal Flow of a Process must be expressed
- * through Sequence Flow. This would mean that a Process Model that has a Gateway that potentially does not have a valid
- * Gate at runtime is an invalid model.
- *
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
-public interface DataBasedExclusiveGateway extends ExclusiveGateway
-{
- /**
- * A Default Gate MAY be specified
- */
- Gate getDefaultGate();
-
-}
\ No newline at end of file
Deleted: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/EventBasedExclusiveGateway.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/EventBasedExclusiveGateway.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/EventBasedExclusiveGateway.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -1,53 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.bpm.model;
-
-
-//$Id$
-
-/**
- * The inclusion of Event-Based Exclusive Gateways is the result of recent developments in the handling of distributed
- * systems (e.g., with pi-calculus) and was derived from the BPEL4WS pick. On the input side, their behavior is the same as
- * a Data-Based Exclusive Gateway (see “Data-Based” on page 73). On the output side, the basic idea is that this Decision
- * represents a branching point in the process where the alternatives are based on events that occurs at that point in the
- * Process, rather than the evaluation of expressions using process data. A specific event, usually the receipt of a message,
- * determines which of the paths will be taken. For example, if a company is waiting for a response from a customer, they
- * will perform one set of activities if the customer responds “Yes” and another set of activities if the customer responds
- * “No.” The customer’s response determines which path is taken. The identity of the Message determines which path is taken.
- * That is, the “Yes” Message and the “No” message are different messages—they are not the same message with different values
- * within a property of the Message. The receipt of the message can be modeled with a Task of TaskType Receive or an
- * Intermediate Event with a Message Trigger. In addition to Messages, other Triggers for Intermediate Events can be used, such as Timers.
- *
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
-public interface EventBasedExclusiveGateway extends ExclusiveGateway
-{
- /**
- * Event-Based Gateways can be defined as the instantiation mechanism for the
- * Process with the Instantiate attribute. This attribute MAY be set to true if the
- * Gateway is the first element after the Start Event or a starting Gateway if there is
- * no Start Event (i.e., there are no incoming Sequence Flow).
- */
- boolean isInstantiate();
-
-}
\ No newline at end of file
Copied: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ExclusiveGatewayDataBased.java (from rev 1697, jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/DataBasedExclusiveGateway.java)
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ExclusiveGatewayDataBased.java (rev 0)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ExclusiveGatewayDataBased.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.model;
+
+
+//$Id$
+
+/**
+ * The Data-Based Exclusive Gateways are the most commonly used type of Gateways. The set of Gates for Data-Based
+ * Exclusive Decisions is based on the boolean expression contained in the ConditionExpression attribute of the outgoing
+ * Sequence Flow of the Gateway. These expressions use the values of process data to determine which path should be taken
+ * (hence the name Data-Based).
+ *
+ * The conditions for the alternative Gates should be evaluated in a specific order. The first one that evaluates as TRUE will
+ * determine the Sequence Flow that will be taken. Since the behavior of this Gateway is exclusive, any other conditions that
+ * may actually be TRUE will be ignored--only one Gate can be chosen. One of the Gates may be “default” (or otherwise),
+ * and is the last Gate considered. This means that if none of the other Gates are chosen, then the default Gate will be
+ * chosen—along with its associated Sequence Flow.
+ *
+ * The default Gate is not mandatory for a Gateway. This means that if it is not used, then it is up to the modeler to insure
+ * that at least one Gate be valid at runtime. BPMN does not specify what will happen if there are no valid Gates. However,
+ * BPMN does specify that there MUST NOT be implicit flow and that all Normal Flow of a Process must be expressed
+ * through Sequence Flow. This would mean that a Process Model that has a Gateway that potentially does not have a valid
+ * Gate at runtime is an invalid model.
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public interface ExclusiveGatewayDataBased extends ExclusiveGateway
+{
+ /**
+ * A Default Gate MAY be specified
+ */
+ Gate getDefaultGate();
+
+}
\ No newline at end of file
Copied: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ExclusiveGatewayEventBased.java (from rev 1697, jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/EventBasedExclusiveGateway.java)
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ExclusiveGatewayEventBased.java (rev 0)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ExclusiveGatewayEventBased.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.model;
+
+
+//$Id$
+
+/**
+ * The inclusion of Event-Based Exclusive Gateways is the result of recent developments in the handling of distributed
+ * systems (e.g., with pi-calculus) and was derived from the BPEL4WS pick. On the input side, their behavior is the same as
+ * a Data-Based Exclusive Gateway (see “Data-Based” on page 73). On the output side, the basic idea is that this Decision
+ * represents a branching point in the process where the alternatives are based on events that occurs at that point in the
+ * Process, rather than the evaluation of expressions using process data. A specific event, usually the receipt of a message,
+ * determines which of the paths will be taken. For example, if a company is waiting for a response from a customer, they
+ * will perform one set of activities if the customer responds “Yes” and another set of activities if the customer responds
+ * “No.” The customer’s response determines which path is taken. The identity of the Message determines which path is taken.
+ * That is, the “Yes” Message and the “No” message are different messages—they are not the same message with different values
+ * within a property of the Message. The receipt of the message can be modeled with a Task of TaskType Receive or an
+ * Intermediate Event with a Message Trigger. In addition to Messages, other Triggers for Intermediate Events can be used, such as Timers.
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public interface ExclusiveGatewayEventBased extends ExclusiveGateway
+{
+ /**
+ * Event-Based Gateways can be defined as the instantiation mechanism for the
+ * Process with the Instantiate attribute. This attribute MAY be set to true if the
+ * Gateway is the first element after the Start Event or a starting Gateway if there is
+ * no Start Event (i.e., there are no incoming Sequence Flow).
+ */
+ boolean isInstantiate();
+
+}
\ No newline at end of file
Deleted: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Flow.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Flow.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Flow.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -1,58 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.bpm.model;
-
-//$Id$
-
-/**
- * A Flow is a graphical line connecting two objects in a BPD.
- * <p/>
- * There are two types of Flow: {@link SequenceFlow} and {@link MessageFlow}, each with their own line style.
- * Flow is also used in a generic sense (and lowercase) to describe how Tokens will traverse from the
- * {@link StartEvent} to an {@link EndEvent}.
- *
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
-public interface Flow extends SupportingElement
-{
- /**
- * Get the optional name
- */
- String getName();
-
- /**
- * Get the required target name
- */
- String getTargetName();
-
- /**
- * Get the source flow object
- */
- FlowObject getSource();
-
- /**
- * Get the target flow object
- */
- FlowObject getTarget();
-
-}
\ No newline at end of file
Added: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Flow.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Flow.java (rev 0)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Flow.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -0,0 +1,59 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.model;
+
+//$Id$
+
+/**
+ * There are two ways of Connecting Objects in BPMN: a Flow, either sequence or message, and an Association. Sequence
+ * Flow and Message Flow, to a certain extent, represent orthogonal aspects of the business processes depicted in a model,
+ * although they both affect the performance of activities within a Process.
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public interface Flow extends GraphicalElement
+{
+ /**
+ * Name is an optional attribute that is text description of the Connecting Object.
+ */
+ String getName();
+
+ /**
+ * SourceRef is an attribute that identifies which Graphical Element the Connecting
+ * Object is connected from. Note: there are restrictions as to what objects Sequence
+ * Flow and Message Flow can connect.
+ */
+ GraphicalElement getSourceRef();
+
+ /**
+ * TargetRef is an attribute that identifies which Graphical Element the Connecting
+ * Object is connected to. Note: there are restrictions as to what objects Sequence
+ * Flow and Message Flow can connect.
+ */
+ GraphicalElement getTargetRef();
+
+ /**
+ * Get the required target name
+ */
+ String getTargetName();
+}
\ No newline at end of file
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/MessageFlow.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/MessageFlow.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/MessageFlow.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -24,13 +24,19 @@
//$Id$
/**
- * A Message Flow is a dashed line that is used to show the flow of messages between two entities that are prepared to send and receive them.
- * In BPMN, two separate Pools in the Diagram will represent the two entities.
+ * A Message Flow is a dashed line that is used to show the flow of messages between two entities that are prepared to
+ * send and receive them. In BPMN, two separate Pools in the Diagram will represent the two entities.
*
+ * Message Flow MUST connect two Pools, either to the Pools themselves or to Flow Objects within the Pools. They cannot
+ * connect two objects within the same Pool.
+ *
* @author thomas.diesler at jboss.com
* @since 08-Jul-2008
*/
public interface MessageFlow extends Flow
{
-
+ /**
+ * MessageRef is an optional attribute that identifies the Message that is being sent.
+ */
+ Message getMessageRef();
}
\ No newline at end of file
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ProcessBuilder.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ProcessBuilder.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ProcessBuilder.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -80,7 +80,7 @@
/**
* Add an {@link ExclusiveGateway} with a given name
*/
- ProcessBuilder addExclusiveGateway(String name);
+ ProcessBuilder addExclusiveDataBasedGateway(String name);
/**
* Add an {@link InclusiveGateway} with a given name
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/SequenceFlow.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/SequenceFlow.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/SequenceFlow.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -24,13 +24,48 @@
//$Id$
/**
- * A Sequence Flow is a solid graphical line that is used to show the order that Activities will be performed in a Process.
- * Each Flow has only one source and only one target.
+ * A Sequence Flow is used to show the order that activities will be performed in a Process. Each Flow has only one
+ * source and only one target. The source and target must be from the set of the following Flow Objects: Events (Start,
+ * Intermediate, and End), Activities (Task and Sub-Process), and Gateways. During performance (or simulation) of the
+ * process, a Token will leave the source Flow Object, traverse down the Sequence Flow, and enter the target Flow
+ * Object.
*
* @author thomas.diesler at jboss.com
* @since 08-Jul-2008
*/
public interface SequenceFlow extends Flow
{
+ /**
+ * The ConditionType
+ */
+ enum ConditionType
+ {
+ None, Expression, Default
+ }
+ /**
+ * By default, the ConditionType of a Sequence Flow is None. This means that there is no evaluation at runtime to
+ * determine whether or not the Sequence Flow will be used. Once a Token is ready to traverse the Sequence Flow (i.e.,
+ * the Source is an activity that has completed), then the Token will do so. The normal, uncontrolled use of Sequence
+ * Flow, in a sequence of activities, will have a None ConditionType. A None ConditionType MUST NOT be used if the
+ * Source of the Sequence Flow is an Exclusive Data-Based or Inclusive Gateway. The ConditionType attribute MAY be set
+ * to Expression if the Source of the Sequence Flow is a Task, a Sub-Process, or a Gateway of type Exclusive-Data-
+ * Based or Inclusive. If the ConditionType attribute is set to Expression, then a condition marker SHALL be added to
+ * the line if the Sequence Flow is outgoing from an activity. However, a condition indicator MUST NOT be added to the
+ * line if the Sequence Flow is outgoing from a Gateway. An Expression ConditionType MUST NOT be used if the Source of
+ * the Sequence Flow is an Event-Based Exclusive Gateway, a Complex Gateway, a Parallel Gateway, a Start Event, or an
+ * Intermediate Event. In addition, an Expression ConditionType MUST NOT be used if the Sequence Flow is associated
+ * with the Default Gate of a Gateway. The ConditionType attribute MAY be set to Default only if the Source of the
+ * Sequence Flow is an activity or an Exclusive Data-Based Gateway.
+ */
+ ConditionType getConditionType();
+
+ /**
+ * If the ConditionType attribute is set to Expression, then the ConditionExpression attribute MUST be defined as a
+ * valid expression. The expression will be evaluated at runtime. If the result of the evaluation is TRUE, then a
+ * Token will be generated and will traverse the Sequence--Subject to any constraints imposed by a Source that is a
+ * Gateway.
+ */
+ Expression getConditionExpression();
+
}
\ No newline at end of file
Modified: jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/ProcessUnmarshaller.java
===================================================================
--- jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/ProcessUnmarshaller.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/ProcessUnmarshaller.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -34,7 +34,7 @@
import org.jboss.bpm.dialect.api10.model.JAXBComplexGateway;
import org.jboss.bpm.dialect.api10.model.JAXBEndEvent;
import org.jboss.bpm.dialect.api10.model.JAXBExclusiveGateway;
-import org.jboss.bpm.dialect.api10.model.JAXBConnectingObject;
+import org.jboss.bpm.dialect.api10.model.JAXBFlow;
import org.jboss.bpm.dialect.api10.model.JAXBFlowObject;
import org.jboss.bpm.dialect.api10.model.JAXBHandler;
import org.jboss.bpm.dialect.api10.model.JAXBInclusiveGateway;
@@ -121,29 +121,29 @@
private void adaptExclusiveGateway(ProcessBuilder builder, JAXBExclusiveGateway jaxb)
{
- builder.addExclusiveGateway(jaxb.getName());
- for(JAXBConnectingObject flow : jaxb.getOutFlows())
+ builder.addExclusiveDataBasedGateway(jaxb.getName());
+ for(JAXBFlow flow : jaxb.getOutFlows())
builder.addSequenceFlow(flow.getTargetName());
}
private void adaptInclusiveGateway(ProcessBuilder builder, JAXBInclusiveGateway jaxb)
{
builder.addInclusiveGateway(jaxb.getName());
- for(JAXBConnectingObject flow : jaxb.getOutFlows())
+ for(JAXBFlow flow : jaxb.getOutFlows())
builder.addSequenceFlow(flow.getTargetName());
}
private void adaptComplexGateway(ProcessBuilder builder, JAXBComplexGateway jaxb)
{
builder.addComplexGateway(jaxb.getName());
- for(JAXBConnectingObject flow : jaxb.getOutFlows())
+ for(JAXBFlow flow : jaxb.getOutFlows())
builder.addSequenceFlow(flow.getTargetName());
}
private void adaptParallelGateway(ProcessBuilder builder, JAXBParallelGateway jaxb)
{
builder.addParallelGateway(jaxb.getName());
- for(JAXBConnectingObject flow : jaxb.getOutFlows())
+ for(JAXBFlow flow : jaxb.getOutFlows())
builder.addSequenceFlow(flow.getTargetName());
}
Deleted: jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBConnectingObject.java
===================================================================
--- jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBConnectingObject.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBConnectingObject.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -1,68 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.bpm.dialect.api10.model;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlType;
-
-// $Id$
-
-/**
- * A Flow is a graphical line connecting two objects in a BPD.
- *
- * There are two types of Flow: Sequence Flow and Message Flow, each with their own line style. Flow is also used in a generic sense (and lowercase) to describe how
- * Tokens will traverse Sequence Flow from the Start Event to an End Event.
- *
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
- at XmlType(name = "ConnectingObject")
-public class JAXBConnectingObject extends JAXBGraphicalElement
-{
- private String name;
- private String targetName;
-
- public String getName()
- {
- return name;
- }
-
- @XmlAttribute(required = false)
- public void setName(String name)
- {
- this.name = name;
- }
-
- public String getTargetName()
- {
- return targetName;
- }
-
- /**
- * Set the target name Note, this MUST NOT leak into the public API.
- */
- @XmlAttribute(name = "to", required = true)
- public void setTargetName(String targetName)
- {
- this.targetName = targetName;
- }
-}
\ No newline at end of file
Copied: jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBFlow.java (from rev 1697, jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBConnectingObject.java)
===================================================================
--- jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBFlow.java (rev 0)
+++ jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBFlow.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -0,0 +1,68 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.dialect.api10.model;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+// $Id$
+
+/**
+ * A Flow is a graphical line connecting two objects in a BPD.
+ *
+ * There are two types of Flow: Sequence Flow and Message Flow, each with their own line style. Flow is also used in a generic sense (and lowercase) to describe how
+ * Tokens will traverse Sequence Flow from the Start Event to an End Event.
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+ at XmlType(name = "Flow")
+public class JAXBFlow extends JAXBGraphicalElement
+{
+ private String name;
+ private String targetName;
+
+ public String getName()
+ {
+ return name;
+ }
+
+ @XmlAttribute(required = false)
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public String getTargetName()
+ {
+ return targetName;
+ }
+
+ /**
+ * Set the target name Note, this MUST NOT leak into the public API.
+ */
+ @XmlAttribute(name = "to", required = true)
+ public void setTargetName(String targetName)
+ {
+ this.targetName = targetName;
+ }
+}
\ No newline at end of file
Modified: jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBGateway.java
===================================================================
--- jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBGateway.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBGateway.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -50,7 +50,7 @@
@XmlElement(name = "sequence", type = JAXBSequenceFlow.class),
@XmlElement(name = "message", type = JAXBMessageFlow.class)
})
- private List<JAXBConnectingObject> outFlows = new ArrayList<JAXBConnectingObject>();
+ private List<JAXBFlow> outFlows = new ArrayList<JAXBFlow>();
public String getName()
{
@@ -67,12 +67,12 @@
this.name = name;
}
- public List<JAXBConnectingObject> getOutFlows()
+ public List<JAXBFlow> getOutFlows()
{
return outFlows;
}
- public void setOutFlow(List<JAXBConnectingObject> outFlow)
+ public void setOutFlow(List<JAXBFlow> outFlow)
{
this.outFlows = outFlow;
}
Modified: jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBIntermediateEvent.java
===================================================================
--- jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBIntermediateEvent.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBIntermediateEvent.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -49,7 +49,7 @@
@XmlElement(name = "sequence", type = JAXBSequenceFlow.class),
@XmlElement(name = "message", type = JAXBMessageFlow.class)
})
- private JAXBConnectingObject outFlow;
+ private JAXBFlow outFlow;
public String getName()
{
@@ -69,13 +69,13 @@
this.name = name;
}
- public JAXBConnectingObject getOutFlow()
+ public JAXBFlow getOutFlow()
{
return outFlow;
}
@XmlTransient
- public void setOutFlow(JAXBConnectingObject outFlow)
+ public void setOutFlow(JAXBFlow outFlow)
{
this.outFlow = outFlow;
}
Modified: jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBMessageFlow.java
===================================================================
--- jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBMessageFlow.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBMessageFlow.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -34,6 +34,6 @@
* @since 08-Jul-2008
*/
@XmlType(name="MessageFlow")
-public class JAXBMessageFlow extends JAXBConnectingObject
+public class JAXBMessageFlow extends JAXBFlow
{
}
\ No newline at end of file
Modified: jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBSequenceFlow.java
===================================================================
--- jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBSequenceFlow.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBSequenceFlow.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -34,6 +34,6 @@
* @since 08-Jul-2008
*/
@XmlType(name="SequenceFlow")
-public class JAXBSequenceFlow extends JAXBConnectingObject
+public class JAXBSequenceFlow extends JAXBFlow
{
}
\ No newline at end of file
Modified: jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBStartEvent.java
===================================================================
--- jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBStartEvent.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBStartEvent.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -41,15 +41,15 @@
@XmlElements( {
@XmlElement(name = "sequence", type = JAXBSequenceFlow.class),
@XmlElement(name = "message", type = JAXBMessageFlow.class) })
- private JAXBConnectingObject outFlow;
+ private JAXBFlow outFlow;
- public JAXBConnectingObject getOutFlow()
+ public JAXBFlow getOutFlow()
{
return outFlow;
}
@XmlTransient
- public void setOutFlow(JAXBConnectingObject outFlow)
+ public void setOutFlow(JAXBFlow outFlow)
{
this.outFlow = outFlow;
}
Modified: jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBSubProcess.java
===================================================================
--- jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBSubProcess.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBSubProcess.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -44,15 +44,15 @@
@XmlElements( {
@XmlElement(name = "sequence", type = JAXBSequenceFlow.class),
@XmlElement(name = "message", type = JAXBMessageFlow.class) })
- private JAXBConnectingObject outFlow;
+ private JAXBFlow outFlow;
- public JAXBConnectingObject getOutFlow()
+ public JAXBFlow getOutFlow()
{
return outFlow;
}
@XmlTransient
- public void setOutFlow(JAXBConnectingObject outFlow)
+ public void setOutFlow(JAXBFlow outFlow)
{
this.outFlow = outFlow;
}
Modified: jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBTask.java
===================================================================
--- jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBTask.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBTask.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -48,7 +48,7 @@
@XmlElements( {
@XmlElement(name = "sequence", type = JAXBSequenceFlow.class),
@XmlElement(name = "message", type = JAXBMessageFlow.class) })
- private JAXBConnectingObject outFlow;
+ private JAXBFlow outFlow;
enum TaskType { Service, Receive, Send, User, Script, Manual, Reference, None}
private TaskType taskType;
@@ -56,13 +56,13 @@
// WebService, Java, Other, Unspecified
private String implementation;
- public JAXBConnectingObject getOutFlow()
+ public JAXBFlow getOutFlow()
{
return outFlow;
}
@XmlTransient
- public void setOutFlow(JAXBConnectingObject outFlow)
+ public void setOutFlow(JAXBFlow outFlow)
{
this.outFlow = outFlow;
}
Modified: jbossbpm/spec/trunk/modules/dialects/stp/src/main/java/org/jboss/bpm/dialect/stp/ProcessUnmarshaller.java
===================================================================
--- jbossbpm/spec/trunk/modules/dialects/stp/src/main/java/org/jboss/bpm/dialect/stp/ProcessUnmarshaller.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/dialects/stp/src/main/java/org/jboss/bpm/dialect/stp/ProcessUnmarshaller.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -167,6 +167,18 @@
builder.addTask(name);
adaptOutgoingEdges(builder, stpActivity);
}
+ else if (activityType == ActivityType.GATEWAY_DATA_BASED_EXCLUSIVE)
+ {
+ String name = stpActivity.getLabel();
+ builder.addExclusiveDataBasedGateway(name);
+ adaptOutgoingEdges(builder, stpActivity);
+ }
+ else if (activityType == ActivityType.GATEWAY_PARALLEL)
+ {
+ String name = stpActivity.getLabel();
+ builder.addParallelGateway(name);
+ adaptOutgoingEdges(builder, stpActivity);
+ }
else
{
throw new InvalidProcessException("Unsupported activity type: " + activityType);
@@ -175,13 +187,17 @@
private void adaptOutgoingEdges(ProcessBuilder builder, Activity stpActivity)
{
- for (String edgeId : stpActivity.getOutgoingEdges())
+ for (String edgeIds : stpActivity.getOutgoingEdges())
{
- SequenceEdge seqEdge = getSequenceEdgeById(edgeId);
- String targetId = seqEdge.getTarget();
- Activity targetAct = getActivityById(targetId);
- String targetName = targetAct.getLabel();
- builder.addSequenceFlow(targetName);
+ String[] edgeIdArr = edgeIds.split("\\s");
+ for (String edgeId : edgeIdArr)
+ {
+ SequenceEdge seqEdge = getSequenceEdgeById(edgeId);
+ String targetId = seqEdge.getTarget();
+ Activity targetAct = getActivityById(targetId);
+ String targetName = targetAct.getLabel();
+ builder.addSequenceFlow(targetName);
+ }
}
}
@@ -192,7 +208,7 @@
if (seqEdge.getId().equals(edgeId))
return seqEdge;
}
- return null;
+ throw new InvalidProcessException("Cannot find SequenceEdge: " + edgeId);
}
private Activity getActivityById(String id)
@@ -202,6 +218,6 @@
if (act.getId().equals(id))
return act;
}
- return null;
+ throw new InvalidProcessException("Cannot find Activity: " + id);
}
}
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/client/internal/ExecutionManagerImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/client/internal/ExecutionManagerImpl.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/client/internal/ExecutionManagerImpl.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -87,7 +87,7 @@
Token token = tuple.getToken();
// Get the target and its handlers
- FlowObject target = flow.getTarget();
+ FlowObject target = (FlowObject)flow.getTargetRef();
ExecutionHandler exHandler = getExecutionHandler(target);
SignalHandler sigHandler = getSignalHandler(target);
FlowHandler flowHandler = getFlowHandler(target);
@@ -125,7 +125,7 @@
InitialFlow(StartEvent start)
{
super("start");
- setTarget(start);
+ setTargetRef(start);
}
}
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ComplexGatewayImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ComplexGatewayImpl.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ComplexGatewayImpl.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -23,11 +23,17 @@
//$Id$
+import java.util.List;
+
+import org.jboss.bpm.NotImplementedException;
import org.jboss.bpm.model.ComplexGateway;
+import org.jboss.bpm.model.Expression;
+import org.jboss.bpm.model.Gate;
/**
- * A Complex Gateway handles situations that are not easily handled through the other types of Gateways. Complex Gateways can also be used to combine a set of linked
- * simple Gateways into a single, more compact situation. Modelers can provide complex expressions that determine the merging and/or splitting behavior of the Gateway.
+ * A Complex Gateway handles situations that are not easily handled through the other types of Gateways. Complex
+ * Gateways can also be used to combine a set of linked simple Gateways into a single, more compact situation. Modelers
+ * can provide complex expressions that determine the merging and/or splitting behavior of the Gateway.
*
* @author thomas.diesler at jboss.com
* @since 08-Jul-2008
@@ -39,6 +45,26 @@
super(name);
}
+ public Expression getIncommingCondition()
+ {
+ throw new NotImplementedException();
+ }
+
+ public Expression getOutgoingCondition()
+ {
+ throw new NotImplementedException();
+ }
+
+ public List<Gate> getGates()
+ {
+ throw new NotImplementedException();
+ }
+
+ public GatewayType getGatewayType()
+ {
+ throw new NotImplementedException();
+ }
+
public String toString()
{
return "ComplexGateway[" + getName() + "]";
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ExclusiveGatewayImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ExclusiveGatewayImpl.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ExclusiveGatewayImpl.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -23,7 +23,11 @@
//$Id$
+import java.util.List;
+
+import org.jboss.bpm.NotImplementedException;
import org.jboss.bpm.model.ExclusiveGateway;
+import org.jboss.bpm.model.Gate;
/**
* A point in the workflow process where, based on a decision or workflow control data, one of several branches is chosen.
@@ -31,13 +35,18 @@
* @author thomas.diesler at jboss.com
* @since 08-Jul-2008
*/
-public class ExclusiveGatewayImpl extends GatewayImpl implements ExclusiveGateway
+public abstract class ExclusiveGatewayImpl extends GatewayImpl implements ExclusiveGateway
{
public ExclusiveGatewayImpl(String name)
{
super(name);
}
+ public GatewayType getGatewayType()
+ {
+ return GatewayType.Exclusive;
+ }
+
public String toString()
{
return "ExclusiveGateway[" + getName() + "]";
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/FlowImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/FlowImpl.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/FlowImpl.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -23,8 +23,10 @@
//$Id$
+import org.jboss.bpm.NotImplementedException;
import org.jboss.bpm.model.Flow;
import org.jboss.bpm.model.FlowObject;
+import org.jboss.bpm.model.GraphicalElement;
/**
* A Flow is a graphical line connecting two objects in a BPD. There are two types of Flow: Sequence Flow and Message Flow, each with their own line style. Flow is also
@@ -37,8 +39,8 @@
{
private String name;
private String targetName;
- private FlowObject source;
- private FlowObject target;
+ private GraphicalElement source;
+ private GraphicalElement target;
public FlowImpl(String targetName)
{
@@ -55,28 +57,28 @@
this.name = name;
}
- public String getTargetName()
+ public GraphicalElement getSourceRef()
{
- return targetName;
- }
-
- public FlowObject getSource()
- {
return source;
}
- public void setSource(FlowObject source)
+ protected void setSourceRef(GraphicalElement source)
{
this.source = source;
}
- public FlowObject getTarget()
+ public GraphicalElement getTargetRef()
{
return target;
}
-
- public void setTarget(FlowObject target)
+
+ protected void setTargetRef(GraphicalElement target)
{
this.target = target;
}
+
+ public String getTargetName()
+ {
+ return targetName;
+ }
}
\ No newline at end of file
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/FlowObjectImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/FlowObjectImpl.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/FlowObjectImpl.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -129,8 +129,8 @@
throw new InvalidProcessException("Target does not support in flow: " + target);
}
- flow.setSource(this);
- flow.setTarget(target);
+ flow.setSourceRef(this);
+ flow.setTargetRef(target);
}
}
}
\ No newline at end of file
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/GatewayImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/GatewayImpl.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/GatewayImpl.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -29,8 +29,10 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.jboss.bpm.NotImplementedException;
import org.jboss.bpm.model.Flow;
import org.jboss.bpm.model.FlowObject;
+import org.jboss.bpm.model.Gate;
import org.jboss.bpm.model.Gateway;
import org.jboss.bpm.model.Signal;
import org.jboss.bpm.runtime.ExecutionHandler;
@@ -47,7 +49,7 @@
* @author thomas.diesler at jboss.com
* @since 08-Jul-2008
*/
-public class GatewayImpl extends FlowObjectImpl implements Gateway, HandlerSetterSupport, MultipleInFlowSetterSupport, MultipleOutFlowSetterSupport
+public abstract class GatewayImpl extends FlowObjectImpl implements Gateway, HandlerSetterSupport, MultipleInFlowSetterSupport, MultipleOutFlowSetterSupport
{
// provide logging
private static final Log log = LogFactory.getLog(GatewayImpl.class);
@@ -69,6 +71,11 @@
return name;
}
+ public List<Gate> getGates()
+ {
+ throw new NotImplementedException();
+ }
+
public List<Flow> getOutFlows()
{
return Collections.unmodifiableList(outFlows);
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/InclusiveGatewayImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/InclusiveGatewayImpl.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/InclusiveGatewayImpl.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -23,6 +23,10 @@
//$Id$
+import java.util.List;
+
+import org.jboss.bpm.NotImplementedException;
+import org.jboss.bpm.model.Gate;
import org.jboss.bpm.model.InclusiveGateway;
@@ -42,6 +46,21 @@
super(name);
}
+ public Gate getDefaultGate()
+ {
+ throw new NotImplementedException();
+ }
+
+ public List<Gate> getGates()
+ {
+ throw new NotImplementedException();
+ }
+
+ public GatewayType getGatewayType()
+ {
+ throw new NotImplementedException();
+ }
+
public String toString()
{
return "InclusiveGateway[" + getName() + "]";
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/MessageFlowImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/MessageFlowImpl.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/MessageFlowImpl.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -23,6 +23,9 @@
//$Id$
+import org.jboss.bpm.NotImplementedException;
+import org.jboss.bpm.model.GraphicalElement;
+import org.jboss.bpm.model.Message;
import org.jboss.bpm.model.MessageFlow;
/**
@@ -39,4 +42,19 @@
{
super(targetName);
}
+
+ public Message getMessageRef()
+ {
+ throw new NotImplementedException();
+ }
+
+ public GraphicalElement getSourceRef()
+ {
+ throw new NotImplementedException();
+ }
+
+ public GraphicalElement getTargetRef()
+ {
+ throw new NotImplementedException();
+ }
}
\ No newline at end of file
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ParallelGatewayImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ParallelGatewayImpl.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ParallelGatewayImpl.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -23,7 +23,11 @@
//$Id$
+import java.util.List;
+
+import org.jboss.bpm.NotImplementedException;
import org.jboss.bpm.model.Flow;
+import org.jboss.bpm.model.Gate;
import org.jboss.bpm.model.ParallelGateway;
import org.jboss.bpm.runtime.FlowHandler;
import org.jboss.bpm.runtime.FlowScheduler;
@@ -44,6 +48,16 @@
super(name);
}
+ public List<Gate> getGates()
+ {
+ throw new NotImplementedException();
+ }
+
+ public GatewayType getGatewayType()
+ {
+ throw new NotImplementedException();
+ }
+
/**
* The default FlowHandler adds all out flows to the queue
*/
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ProcessBuilderImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ProcessBuilderImpl.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ProcessBuilderImpl.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -124,9 +124,9 @@
return this;
}
- public ProcessBuilder addExclusiveGateway(String name)
+ public ProcessBuilder addExclusiveDataBasedGateway(String name)
{
- flowObject = new ExclusiveGatewayImpl(name);
+ flowObject = new ExclusiveGatewayDataBasedImpl(name);
proc.addFlowObject(flowObject);
return this;
}
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/SequenceFlowImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/SequenceFlowImpl.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/SequenceFlowImpl.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -23,6 +23,9 @@
//$Id$
+import org.jboss.bpm.NotImplementedException;
+import org.jboss.bpm.model.Expression;
+import org.jboss.bpm.model.GraphicalElement;
import org.jboss.bpm.model.SequenceFlow;
/**
@@ -38,4 +41,14 @@
{
super(targetName);
}
+
+ public Expression getConditionExpression()
+ {
+ throw new NotImplementedException();
+ }
+
+ public ConditionType getConditionType()
+ {
+ throw new NotImplementedException();
+ }
}
\ No newline at end of file
More information about the jbpm-commits
mailing list