JBoss JBPM SVN: r3950 - in jbpm4/trunk/modules: examples/src/test/resources/org/jbpm/examples/concurrency/graphbased and 34 other directories.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2009-02-19 09:10:55 -0500 (Thu, 19 Feb 2009)
New Revision: 3950
Modified:
jbpm4/trunk/modules/api/src/main/resources/jpdl.xsd
jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/concurrency/graphbased/process.jpdl.xml
jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/end/multiple/process.jpdl.xml
jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/end/processinstance/process.jpdl.xml
jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/end/state/process.jpdl.xml
jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/esb/process.jpdl.xml
jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/exclusive/conditions/process.jpdl.xml
jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/exclusive/expression/process.jpdl.xml
jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/exclusive/handler/process.jpdl.xml
jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/hql/process.jpdl.xml
jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/java/process.jpdl.xml
jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/script/expression/process.jpdl.xml
jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/script/text/process.jpdl.xml
jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/sql/process.jpdl.xml
jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/state/choice/process.jpdl.xml
jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/state/sequence/process.jpdl.xml
jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/task/process.jpdl.xml
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/ExclusiveBinding.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/JpdlActivityBinding.java
jbpm4/trunk/modules/jpdl/src/test/resources/org/jbpm/test/xml/extended.jpdl.xml
jbpm4/trunk/modules/jpdl/src/test/resources/org/jbpm/test/xml/process.jpdl.xml
jbpm4/trunk/modules/jpdl/src/test/resources/org/jbpm/test/xml/valid.jpdl.xml
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/builder/ActivityBuilder.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/builder/ProcessDefinitionBuilder.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/builder/BuilderTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/eventlistener/EventPropagationTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/executionmode/embedded/Loan.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/executionmode/object/ObjectExecutionModeTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/db/model/ProcessCacheDbTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/db/model/ProcessDefinitionDbTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/execution/PvmProcessExecutionTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/jobexecutor/AsyncContinuationsTest.java
jbpm4/trunk/modules/test-db/src/main/java/org/jbpm/test/activities/ExclusiveTest.java
jbpm4/trunk/modules/test-db/src/main/java/org/jbpm/test/activities/StateTest.java
jbpm4/trunk/modules/test-db/src/main/java/org/jbpm/test/execution/FindExecutionTest.java
jbpm4/trunk/modules/test-db/src/main/java/org/jbpm/test/execution/SignalExecutionTest.java
jbpm4/trunk/modules/test-db/src/main/java/org/jbpm/test/execution/StartExecutionTest.java
jbpm4/trunk/modules/test-db/src/main/java/org/jbpm/test/history/AvgDurationTest.java
jbpm4/trunk/modules/test-db/src/main/java/org/jbpm/test/history/ChoiceDistributionTest.java
jbpm4/trunk/modules/test-db/src/main/java/org/jbpm/test/history/ProcessInstanceHistoryTest.java
jbpm4/trunk/modules/test-db/src/main/java/org/jbpm/test/process/ProcessServiceTest.java
jbpm4/trunk/modules/test-db/src/main/java/org/jbpm/test/variables/BasicVariablesTest.java
jbpm4/trunk/modules/test-db/src/main/java/org/jbpm/test/variables/VariableBasicTypesTest.java
jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/ContinuationTest.java
jbpm4/trunk/modules/test-load/src/test/resources/org/jbpm/test/load/executions/process.jpdl.xml
jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/AutomaticDecisionTest.java
jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/BasicExecutionFlowTest.java
jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/EventPropagationTest.java
jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/EventTest.java
jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/ExceptionHandlerTest.java
jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/ExecutionStateTest.java
jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/ExternalDecisionTest.java
jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/FunctionalActivityTest.java
jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/LoopingTest.java
jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/ScopeStateTest.java
jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/ScopeVariableDeclarationTest.java
jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/ScopeVariableTest.java
jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/SubProcessTest.java
jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/TransitionBasedConcurrencyTest.java
jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/TransitionEventsTest.java
jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch04-Jpdl.xml
jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch05-Jpdl.xml
Log:
JBPM-1967 rename flow to transition
Modified: jbpm4/trunk/modules/api/src/main/resources/jpdl.xsd
===================================================================
--- jbpm4/trunk/modules/api/src/main/resources/jpdl.xsd 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/api/src/main/resources/jpdl.xsd 2009-02-19 14:10:55 UTC (rev 3950)
@@ -84,7 +84,7 @@
</documentation></annotation>
<complexType>
<sequence>
- <element ref="tns:flow" minOccurs="0" maxOccurs="unbounded" />
+ <element ref="tns:transition" minOccurs="0" maxOccurs="unbounded" />
</sequence>
<attributeGroup ref="tns:activityAttributes" />
</complexType>
@@ -156,7 +156,7 @@
</documentation></annotation>
<complexType>
<sequence>
- <element ref="tns:flow" minOccurs="0" maxOccurs="unbounded" />
+ <element ref="tns:transition" minOccurs="0" maxOccurs="unbounded" />
</sequence>
<attributeGroup ref="tns:activityAttributes" />
</complexType>
@@ -165,15 +165,15 @@
<!-- ~~~ EXCLUSIVE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<element name="exclusive">
<annotation><documentation>Exclusive gateway: selects one path out of many alternatives.
- When an execution comes in, exactly one outgoing flow is taken.
+ When an execution comes in, exactly one outgoing transition is taken.
</documentation></annotation>
<complexType>
<sequence>
<element name="handler" minOccurs="0" type="tns:wireObjectType" />
- <element name="flow" minOccurs="0" maxOccurs="unbounded">
+ <element name="transition" minOccurs="0" maxOccurs="unbounded">
<complexType>
<complexContent>
- <extension base="tns:flowType">
+ <extension base="tns:transitionType">
<sequence>
<element name="condition" minOccurs="0" maxOccurs="unbounded">
<complexType>
@@ -197,7 +197,7 @@
<attributeGroup ref="tns:activityAttributes" />
<attribute name="expr" type="string">
<annotation><documentation>The script that will be evaluated and resolve to
- the name of the outgoing flow.
+ the name of the outgoing transition.
</documentation></annotation>
</attribute>
<attribute name="lang" type="string">
@@ -213,7 +213,7 @@
</documentation></annotation>
<complexType>
<sequence>
- <element ref="tns:flow" minOccurs="0" maxOccurs="unbounded" />
+ <element ref="tns:transition" minOccurs="0" maxOccurs="unbounded" />
</sequence>
<attributeGroup ref="tns:activityAttributes" />
</complexType>
@@ -225,7 +225,7 @@
</documentation></annotation>
<complexType>
<sequence>
- <element ref="tns:flow" minOccurs="0" maxOccurs="unbounded" />
+ <element ref="tns:transition" minOccurs="0" maxOccurs="unbounded" />
</sequence>
<attributeGroup ref="tns:activityAttributes" />
</complexType>
@@ -238,7 +238,7 @@
<complexContent>
<extension base="tns:scriptType">
<sequence>
- <element ref="tns:flow" minOccurs="0" maxOccurs="unbounded" />
+ <element ref="tns:transition" minOccurs="0" maxOccurs="unbounded" />
</sequence>
<attributeGroup ref="tns:activityAttributes" />
</extension>
@@ -253,7 +253,7 @@
<complexContent>
<extension base="tns:qlType">
<sequence>
- <element ref="tns:flow" minOccurs="0" maxOccurs="unbounded" />
+ <element ref="tns:transition" minOccurs="0" maxOccurs="unbounded" />
</sequence>
<attributeGroup ref="tns:activityAttributes" />
</extension>
@@ -268,7 +268,7 @@
<complexContent>
<extension base="tns:qlType">
<sequence>
- <element ref="tns:flow" minOccurs="0" maxOccurs="unbounded" />
+ <element ref="tns:transition" minOccurs="0" maxOccurs="unbounded" />
</sequence>
<attributeGroup ref="tns:activityAttributes" />
</extension>
@@ -286,7 +286,7 @@
<complexContent>
<extension base="tns:javaType">
<sequence>
- <element ref="tns:flow" minOccurs="0" maxOccurs="unbounded" />
+ <element ref="tns:transition" minOccurs="0" maxOccurs="unbounded" />
</sequence>
<attributeGroup ref="tns:activityAttributes" />
</extension>
@@ -301,7 +301,7 @@
<complexContent>
<extension base="tns:esbType">
<sequence>
- <element ref="tns:flow" minOccurs="0" maxOccurs="unbounded" />
+ <element ref="tns:transition" minOccurs="0" maxOccurs="unbounded" />
</sequence>
<attributeGroup ref="tns:activityAttributes" />
</extension>
@@ -314,7 +314,7 @@
</documentation></annotation>
<complexType>
<sequence>
- <element ref="tns:flow" minOccurs="0" maxOccurs="unbounded" />
+ <element ref="tns:transition" minOccurs="0" maxOccurs="unbounded" />
</sequence>
<attributeGroup ref="tns:activityAttributes" />
<attribute name="assignee" type="string" use="required">
@@ -337,7 +337,7 @@
- - >
<complexType>
<sequence>
- <element ref="tns:flow" minOccurs="0" maxOccurs="unbounded" />
+ <element ref="tns:transition" minOccurs="0" maxOccurs="unbounded" />
<element ref="tns:on" minOccurs="0" maxOccurs="unbounded">
<annotation><documentation>Events on which listeners can be registered.</documentation></annotation>
</element>
@@ -353,7 +353,7 @@
<complexType>
<sequence>
<group ref="tns:activityGroup" minOccurs="0" maxOccurs="unbounded" />
- <element ref="tns:flow" minOccurs="0" maxOccurs="unbounded" />
+ <element ref="tns:transition" minOccurs="0" maxOccurs="unbounded" />
<element ref="tns:on" minOccurs="0" maxOccurs="unbounded">
<annotation><documentation>Events on which listeners can be registered.</documentation></annotation>
</element>
@@ -369,7 +369,7 @@
<complexType>
<sequence>
<group ref="tns:delegationGroup"/>
- <element ref="tns:flow" minOccurs="0" maxOccurs="unbounded" />
+ <element ref="tns:transition" minOccurs="0" maxOccurs="unbounded" />
<element ref="tns:on" minOccurs="0" maxOccurs="unbounded">
<annotation><documentation>Events on which listeners can be registered.</documentation></annotation>
</element>
@@ -385,7 +385,7 @@
<complexContent>
<extension base="tns:emailType">
<sequence>
- <element ref="tns:flow" minOccurs="0" maxOccurs="unbounded" />
+ <element ref="tns:transition" minOccurs="0" maxOccurs="unbounded" />
<element ref="tns:on" minOccurs="0" maxOccurs="unbounded">
<annotation><documentation>Events on which listeners can be registered.</documentation></annotation>
</element>
@@ -403,7 +403,7 @@
<complexContent>
<extension base="tns:taskType">
<sequence>
- <element ref="tns:flow" minOccurs="0" maxOccurs="unbounded" />
+ <element ref="tns:transition" minOccurs="0" maxOccurs="unbounded" />
<element ref="tns:on" minOccurs="0" maxOccurs="unbounded">
<annotation><documentation>Events on which listeners can be registered.</documentation></annotation>
</element>
@@ -576,9 +576,9 @@
</attribute>
</attributeGroup>
- <complexType name="flowType">
- <annotation><documentation>The outgoing flows. The first in the list
- will be the default outgoing flow.
+ <complexType name="transitionType">
+ <annotation><documentation>The outgoing transitions. The first in the list
+ will be the default outgoing transition.
</documentation></annotation>
<!--
<sequence>
@@ -586,10 +586,10 @@
</sequence>
-->
<attribute name="name" type="string">
- <annotation><documentation>Name of this outgoing flow</documentation></annotation>
+ <annotation><documentation>Name of this outgoing transition</documentation></annotation>
</attribute>
<attribute name="to" type="string">
- <annotation><documentation>Name of the destination activity of this flow.
+ <annotation><documentation>Name of the destination activity of this transition.
</documentation></annotation>
</attribute>
<attribute name="g" type="string">
@@ -598,8 +598,8 @@
</attribute>
</complexType>
- <element name="flow" type="tns:flowType">
- <annotation><documentation>A flow from one activity to another.</documentation></annotation>
+ <element name="transition" type="tns:transitionType">
+ <annotation><documentation>A transition from one activity to another.</documentation></annotation>
</element>
<element name="on">
@@ -699,7 +699,7 @@
<element name="timer">
<annotation><documentation>A timer that will be bound to the most inner enclosing scope.
- Timers can give a signal to an activity instance. The signal will correspond to a flow
+ Timers can give a signal to an activity instance. The signal will correspond to a transition
or to an event being fired.
</documentation></annotation>
<complexType>
Modified: jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/concurrency/graphbased/process.jpdl.xml
===================================================================
--- jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/concurrency/graphbased/process.jpdl.xml 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/concurrency/graphbased/process.jpdl.xml 2009-02-19 14:10:55 UTC (rev 3950)
@@ -3,37 +3,37 @@
<process name="ConcurrencyGraphBased" xmlns="http://jbpm.org/4/jpdl">
<start g="16,102,48,48">
- <flow to="fork"/>
+ <transition to="fork"/>
</start>
<fork name="fork" g="96,102,48,48">
- <flow to="send invoice" g="120,41"/>
- <flow to="load truck"/>
- <flow to="print shipping documents" g="120,213"/>
+ <transition to="send invoice" g="120,41"/>
+ <transition to="load truck"/>
+ <transition to="print shipping documents" g="120,213"/>
</fork>
<state name="send invoice" g="176,16,149,52">
- <flow to="final join" g="606,41"/>
+ <transition to="final join" g="606,41"/>
</state>
<state name="load truck" g="176,100,149,52">
- <flow to="shipping join" g="377,126"/>
+ <transition to="shipping join" g="377,126"/>
</state>
<state name="print shipping documents" g="176,184,149,58">
- <flow to="shipping join" g="378,213"/>
+ <transition to="shipping join" g="378,213"/>
</state>
<join name="shipping join" g="353,145,48,48">
- <flow to="drive truck to destination"/>
+ <transition to="drive truck to destination"/>
</join>
<state name="drive truck to destination" g="431,140,148,52">
- <flow to="final join" g="607,165"/>
+ <transition to="final join" g="607,165"/>
</state>
<join name="final join" g="583,73,48,48">
- <flow to="end"/>
+ <transition to="end"/>
</join>
<end name="end" g="666,74,48,48"/>
Modified: jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/end/multiple/process.jpdl.xml
===================================================================
--- jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/end/multiple/process.jpdl.xml 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/end/multiple/process.jpdl.xml 2009-02-19 14:10:55 UTC (rev 3950)
@@ -3,13 +3,13 @@
<process name="EndMultiple" xmlns="http://jbpm.org/4/jpdl">
<start g="16,96,48,48">
- <flow to="get return code" />
+ <transition to="get return code" />
</start>
<state name="get return code" g="96,94,111,52">
- <flow name="200" to="ok" g="151,60" />
- <flow name="400" to="bad request" />
- <flow name="500" to="internal server error" g="151,183" />
+ <transition name="200" to="ok" g="151,60" />
+ <transition name="400" to="bad request" />
+ <transition name="500" to="internal server error" g="151,183" />
</state>
<end name="ok" g="238,37,48,48" />
Modified: jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/end/processinstance/process.jpdl.xml
===================================================================
--- jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/end/processinstance/process.jpdl.xml 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/end/processinstance/process.jpdl.xml 2009-02-19 14:10:55 UTC (rev 3950)
@@ -3,7 +3,7 @@
<process name="EndProcessInstance" xmlns="http://jbpm.org/4/jpdl">
<start g="85,73,80,40">
- <flow to="end" />
+ <transition to="end" />
</start>
<end name="end" g="191,73,80,40"/>
Modified: jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/end/state/process.jpdl.xml
===================================================================
--- jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/end/state/process.jpdl.xml 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/end/state/process.jpdl.xml 2009-02-19 14:10:55 UTC (rev 3950)
@@ -3,13 +3,13 @@
<process name="EndState" xmlns="http://jbpm.org/4/jpdl">
<start g="16,96,48,48">
- <flow to="get return code"/>
+ <transition to="get return code"/>
</start>
<state name="get return code" g="96,94,110,52">
- <flow name="200" to="ok" g="150,63"/>
- <flow name="400" to="bad request" />
- <flow name="500" to="internal server error" g="150,177"/>
+ <transition name="200" to="ok" g="150,63"/>
+ <transition name="400" to="bad request" />
+ <transition name="500" to="internal server error" g="150,177"/>
</state>
<end name="ok" state="completed" g="239,40,48,48"/>
Modified: jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/esb/process.jpdl.xml
===================================================================
--- jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/esb/process.jpdl.xml 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/esb/process.jpdl.xml 2009-02-19 14:10:55 UTC (rev 3950)
@@ -3,7 +3,7 @@
<process name="Esb" xmlns="http://jbpm.org/4/jpdl">
<start g="32,22,80,40">
- <flow to="invoke esb service" />
+ <transition to="invoke esb service" />
</start>
<esb name="invoke esb service"
@@ -16,7 +16,7 @@
<string value="deliver asap" />
</part>
- <flow to="wait" />
+ <transition to="wait" />
</esb>
<state name="wait" g="280,16,94,56" />
Modified: jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/exclusive/conditions/process.jpdl.xml
===================================================================
--- jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/exclusive/conditions/process.jpdl.xml 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/exclusive/conditions/process.jpdl.xml 2009-02-19 14:10:55 UTC (rev 3950)
@@ -3,17 +3,17 @@
<process name="ExclusiveConditions" xmlns="http://jbpm.org/4/jpdl">
<start g="16,102,48,48">
- <flow to="evaluate document" />
+ <transition to="evaluate document" />
</start>
<exclusive name="evaluate document" g="96,102,48,48">
- <flow to="submit document" g="120,60">
+ <transition to="submit document" g="120,60">
<condition expr="#{content=="good"}" />
- </flow>
- <flow to="try again">
+ </transition>
+ <transition to="try again">
<condition expr="#{content=="bad"}" />
- </flow>
- <flow to="give up" g="120,189" />
+ </transition>
+ <transition to="give up" g="120,189" />
</exclusive>
<state name="submit document" g="175,35,122,52"/>
Modified: jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/exclusive/expression/process.jpdl.xml
===================================================================
--- jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/exclusive/expression/process.jpdl.xml 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/exclusive/expression/process.jpdl.xml 2009-02-19 14:10:55 UTC (rev 3950)
@@ -3,13 +3,13 @@
<process name="ExclusiveExpression" xmlns="http://jbpm.org/4/jpdl">
<start g="16,102,48,48">
- <flow to="evaluate document"/>
+ <transition to="evaluate document"/>
</start>
<exclusive name="evaluate document" expr="#{content}" g="96,102,48,48">
- <flow name="good" to="submit document" g="120,60"/>
- <flow name="bad" to="try again"/>
- <flow name="ugly" to="give up" g="120,189"/>
+ <transition name="good" to="submit document" g="120,60"/>
+ <transition name="bad" to="try again"/>
+ <transition name="ugly" to="give up" g="120,189"/>
</exclusive>
<state name="submit document" g="175,35,122,52"/>
Modified: jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/exclusive/handler/process.jpdl.xml
===================================================================
--- jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/exclusive/handler/process.jpdl.xml 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/exclusive/handler/process.jpdl.xml 2009-02-19 14:10:55 UTC (rev 3950)
@@ -3,14 +3,14 @@
<process name="ExclusiveHandler" xmlns="http://jbpm.org/4/jpdl">
<start g="16,102,48,48">
- <flow to="evaluate document" />
+ <transition to="evaluate document" />
</start>
<exclusive name="evaluate document" g="96,102,48,48">
<handler class="org.jbpm.examples.exclusive.handler.ContentEvaluation" />
- <flow name="good" to="submit document" g="120,60" />
- <flow name="bad" to="try again" />
- <flow name="ugly" to="give up" g="120,189" />
+ <transition name="good" to="submit document" g="120,60" />
+ <transition name="bad" to="try again" />
+ <transition name="ugly" to="give up" g="120,189" />
</exclusive>
<state name="submit document" g="175,35,122,52"/>
Modified: jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/hql/process.jpdl.xml
===================================================================
--- jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/hql/process.jpdl.xml 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/hql/process.jpdl.xml 2009-02-19 14:10:55 UTC (rev 3950)
@@ -3,7 +3,7 @@
<process name="Hql" xmlns="http://jbpm.org/4/jpdl">
<start g="17,20,48,48">
- <flow to="get process names" />
+ <transition to="get process names" />
</start>
<hql name="get process names"
@@ -17,7 +17,7 @@
<parameters>
<string name="activityName" value="%o%" />
</parameters>
- <flow to="count activities" />
+ <transition to="count activities" />
</hql>
<hql name="count activities"
@@ -28,7 +28,7 @@
select count(*)
from org.jbpm.pvm.internal.model.ActivityImpl
</query>
- <flow to="wait" />
+ <transition to="wait" />
</hql>
<state name="wait" g="370,18,96,48"/>
Modified: jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/java/process.jpdl.xml
===================================================================
--- jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/java/process.jpdl.xml 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/java/process.jpdl.xml 2009-02-19 14:10:55 UTC (rev 3950)
@@ -3,7 +3,7 @@
<process name="Java" xmlns="http://jbpm.org/4/jpdl">
<start g="20,20,48,48">
- <flow to="invoke java method" />
+ <transition to="invoke java method" />
</start>
<java name="invoke java method"
@@ -17,7 +17,7 @@
<arg><string value="Hi, how are you?"/></arg>
- <flow to="wait" />
+ <transition to="wait" />
</java>
<state name="wait" g="255,16,88,52"/>
Modified: jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/script/expression/process.jpdl.xml
===================================================================
--- jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/script/expression/process.jpdl.xml 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/script/expression/process.jpdl.xml 2009-02-19 14:10:55 UTC (rev 3950)
@@ -3,7 +3,7 @@
<process name="ScriptExpression" xmlns="http://jbpm.org/4/jpdl">
<start g="17,19,48,48">
- <flow to="invoke script" />
+ <transition to="invoke script" />
</start>
<script name="invoke script"
@@ -11,7 +11,7 @@
var="text"
g="96,16,104,52">
- <flow to="wait" />
+ <transition to="wait" />
</script>
<state name="wait" g="232,16,80,52"/>
Modified: jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/script/text/process.jpdl.xml
===================================================================
--- jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/script/text/process.jpdl.xml 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/script/text/process.jpdl.xml 2009-02-19 14:10:55 UTC (rev 3950)
@@ -3,7 +3,7 @@
<process name="ScriptText" xmlns="http://jbpm.org/4/jpdl">
<start g="16,22,80,40">
- <flow to="invoke script" g="48,68,48,48"/>
+ <transition to="invoke script" g="48,68,48,48"/>
</start>
<script name="invoke script"
@@ -13,7 +13,7 @@
Send packet to #{person.address}
</text>
- <flow to="wait" />
+ <transition to="wait" />
</script>
<state name="wait" g="266,18,80,52"/>
Modified: jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/sql/process.jpdl.xml
===================================================================
--- jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/sql/process.jpdl.xml 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/sql/process.jpdl.xml 2009-02-19 14:10:55 UTC (rev 3950)
@@ -3,7 +3,7 @@
<process name="Sql" xmlns="http://jbpm.org/4/jpdl">
<start g="16,20,48,48">
- <flow to="get process names" />
+ <transition to="get process names" />
</start>
<sql name="get process names"
@@ -17,7 +17,7 @@
<parameters>
<string name="activityName" value="%o%" />
</parameters>
- <flow to="count activities" />
+ <transition to="count activities" />
</sql>
<sql name="count activities"
@@ -28,7 +28,7 @@
select count(*)
from JBPM_ACTIVITY
</query>
- <flow to="wait" />
+ <transition to="wait" />
</sql>
<state name="wait" g="378,18,94,48"/>
Modified: jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/state/choice/process.jpdl.xml
===================================================================
--- jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/state/choice/process.jpdl.xml 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/state/choice/process.jpdl.xml 2009-02-19 14:10:55 UTC (rev 3950)
@@ -3,12 +3,12 @@
<process name="StateChoice" xmlns="http://jbpm.org/4/jpdl">
<start g="16,60,48,48">
- <flow to="wait for response" />
+ <transition to="wait for response" />
</start>
<state name="wait for response" g="96,58,109,52">
- <flow name="accept" to="submit document" g="151,41"/>
- <flow name="reject" to="try again" g="151,125"/>
+ <transition name="accept" to="submit document" g="151,41"/>
+ <transition name="reject" to="try again" g="151,125"/>
</state>
<state name="submit document" g="237,16,114,52"/>
Modified: jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/state/sequence/process.jpdl.xml
===================================================================
--- jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/state/sequence/process.jpdl.xml 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/state/sequence/process.jpdl.xml 2009-02-19 14:10:55 UTC (rev 3950)
@@ -3,15 +3,15 @@
<process name="StateSequence" xmlns="http://jbpm.org/4/jpdl">
<start g="16,18,48,48">
- <flow to="a" />
+ <transition to="a" />
</start>
<state name="a" g="96,16,75,52">
- <flow to="b" />
+ <transition to="b" />
</state>
<state name="b" g="203,16,73,52">
- <flow to="c" />
+ <transition to="c" />
</state>
<state name="c" g="308,16,76,52" />
Modified: jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/task/process.jpdl.xml
===================================================================
--- jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/task/process.jpdl.xml 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/task/process.jpdl.xml 2009-02-19 14:10:55 UTC (rev 3950)
@@ -3,14 +3,14 @@
<process name="Task" xmlns="http://jbpm.org/4/jpdl">
<start g="20,20,48,48">
- <flow to="review" />
+ <transition to="review" />
</start>
<task name="review"
assignee="johndoe"
g="96,16,127,52">
- <flow to="wait" />
+ <transition to="wait" />
</task>
<state name="wait" g="255,16,88,52"/>
Modified: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/ExclusiveBinding.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/ExclusiveBinding.java 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/ExclusiveBinding.java 2009-02-19 14:10:55 UTC (rev 3950)
@@ -74,7 +74,7 @@
}
boolean hasConditions = false;
- List<Element> transitionElements = XmlUtil.elements(element, "flow");
+ List<Element> transitionElements = XmlUtil.elements(element, "transition");
ActivityImpl activity = parse.findObject(ActivityImpl.class);
List<TransitionImpl> transitions = (List) activity.getOutgoingTransitions();
Modified: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/JpdlActivityBinding.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/JpdlActivityBinding.java 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/JpdlActivityBinding.java 2009-02-19 14:10:55 UTC (rev 3950)
@@ -60,7 +60,7 @@
}
public void parseFlows(Element element, ActivityImpl activity, Parse parse) {
- List<Element> transitionElements = XmlUtil.elements(element, "flow");
+ List<Element> transitionElements = XmlUtil.elements(element, "transition");
UnresolvedTransitions unresolvedTransitions = parse.findObject(UnresolvedTransitions.class);
for (Element transitionElement: transitionElements) {
String transitionName = XmlUtil.attribute(transitionElement, "name", false, parse);
Modified: jbpm4/trunk/modules/jpdl/src/test/resources/org/jbpm/test/xml/extended.jpdl.xml
===================================================================
--- jbpm4/trunk/modules/jpdl/src/test/resources/org/jbpm/test/xml/extended.jpdl.xml 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/jpdl/src/test/resources/org/jbpm/test/xml/extended.jpdl.xml 2009-02-19 14:10:55 UTC (rev 3950)
@@ -4,12 +4,12 @@
xmlns:ext="http://jbpm.org/customextensions">
<start>
- <flow to="a"/>
+ <transition to="a"/>
</start>
<customactivity name="a" customattrib="xxx">
<customconfigelement a="yyy" />
- <flow to="end"/>
+ <transition to="end"/>
</customactivity>
<end name="end" />
Modified: jbpm4/trunk/modules/jpdl/src/test/resources/org/jbpm/test/xml/process.jpdl.xml
===================================================================
--- jbpm4/trunk/modules/jpdl/src/test/resources/org/jbpm/test/xml/process.jpdl.xml 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/jpdl/src/test/resources/org/jbpm/test/xml/process.jpdl.xml 2009-02-19 14:10:55 UTC (rev 3950)
@@ -3,15 +3,15 @@
<process name="StateSequence" xmlns="http://jbpm.org/4/jpdl">
<start g="16,18,48,48">
- <flow to="a" />
+ <transition to="a" />
</start>
<state name="a" g="96,16,75,52">
- <flow to="b" />
+ <transition to="b" />
</state>
<state name="b" g="203,16,73,52">
- <flow to="c" />
+ <transition to="c" />
</state>
<state name="c" g="308,16,76,52" />
Modified: jbpm4/trunk/modules/jpdl/src/test/resources/org/jbpm/test/xml/valid.jpdl.xml
===================================================================
--- jbpm4/trunk/modules/jpdl/src/test/resources/org/jbpm/test/xml/valid.jpdl.xml 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/jpdl/src/test/resources/org/jbpm/test/xml/valid.jpdl.xml 2009-02-19 14:10:55 UTC (rev 3950)
@@ -3,16 +3,16 @@
<process name="Purchase order" xmlns="http://jbpm.org/4/jpdl">
<start>
- <flow to="a" />
+ <transition to="a" />
</start>
<state name="a">
- <flow name="Supplier ok" to="b" />
+ <transition name="Supplier ok" to="b" />
</state>
<state name="b">
- <flow name="nok" to="Error" />
- <flow name="ok" to="Completed" />
+ <transition name="nok" to="Error" />
+ <transition name="ok" to="Completed" />
</state >
<end name="Completed" />
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/builder/ActivityBuilder.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/builder/ActivityBuilder.java 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/builder/ActivityBuilder.java 2009-02-19 14:10:55 UTC (rev 3950)
@@ -86,12 +86,12 @@
return compositeBuilder.endProcess();
}
- public ActivityBuilder flow(String to) {
+ public ActivityBuilder transition(String to) {
startFlow(to);
return this;
}
- public ActivityBuilder flow(String to, String name) {
+ public ActivityBuilder transition(String to, String name) {
startFlow(to).name(name);
return this;
}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/builder/ProcessDefinitionBuilder.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/builder/ProcessDefinitionBuilder.java 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/builder/ProcessDefinitionBuilder.java 2009-02-19 14:10:55 UTC (rev 3950)
@@ -126,6 +126,6 @@
protected void errorUnexistingFlowDestination(UnresolvedFlow unresolvedFlow) {
String sourceActivityName = unresolvedFlow.transition.getSource().getName();
- log.error("unexisting flow destination: "+sourceActivityName+"-->"+unresolvedFlow.destinationName);
+ log.error("unexisting transition destination: "+sourceActivityName+"-->"+unresolvedFlow.destinationName);
}
}
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/builder/BuilderTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/builder/BuilderTest.java 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/builder/BuilderTest.java 2009-02-19 14:10:55 UTC (rev 3950)
@@ -85,15 +85,15 @@
ClientProcessDefinition processDefinition = ProcessDefinitionBuilder
.startProcess("p")
.startActivity("x")
- .flow("a")
- .flow("b", "to b")
+ .transition("a")
+ .transition("b", "to b")
.startFlow("c")
.name("to c")
.endFlow()
- .flow("x")
+ .transition("x")
.endActivity()
.startActivity("a")
- .flow("b")
+ .transition("b")
.endActivity()
.startActivity("b")
.endActivity()
@@ -141,14 +141,14 @@
.startProcess()
.startActivity("1")
.startActivity("1.1")
- .flow("1.2.1", "to onedottwodotone")
+ .transition("1.2.1", "to onedottwodotone")
.endActivity()
.startActivity("1.2")
.startActivity("1.2.1")
.endActivity()
.startActivity("1.2.2")
.initial()
- .flow("1", "to one")
+ .transition("1", "to one")
.endActivity()
.startActivity("1.2.3")
.endActivity()
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/eventlistener/EventPropagationTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/eventlistener/EventPropagationTest.java 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/eventlistener/EventPropagationTest.java 2009-02-19 14:10:55 UTC (rev 3950)
@@ -56,10 +56,10 @@
.endEvent()
.startActivity("a", new WaitState())
.initial()
- .flow("b")
+ .transition("b")
.endActivity()
.startActivity("b", new WaitState())
- .flow("c")
+ .transition("c")
.endActivity()
.endActivity()
.startActivity("c", new WaitState())
@@ -92,10 +92,10 @@
.endEvent()
.startActivity("a", new WaitState())
.initial()
- .flow("b")
+ .transition("b")
.endActivity()
.startActivity("b", new WaitState())
- .flow("c")
+ .transition("c")
.endActivity()
.endActivity()
.startActivity("c", new WaitState())
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/executionmode/embedded/Loan.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/executionmode/embedded/Loan.java 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/executionmode/embedded/Loan.java 2009-02-19 14:10:55 UTC (rev 3950)
@@ -39,17 +39,17 @@
.startProcess("loan")
.startActivity("submit loan request", new AutomaticActivity())
.initial()
- .flow("evaluate")
+ .transition("evaluate")
.endActivity()
.startActivity("evaluate", new WaitState())
- .flow("wire money", "approve")
- .flow("end", "reject")
+ .transition("wire money", "approve")
+ .transition("end", "reject")
.endActivity()
.startActivity("wire money", new AutomaticActivity())
- .flow("archive")
+ .transition("archive")
.endActivity()
.startActivity("archive", new WaitState())
- .flow("end")
+ .transition("end")
.endActivity()
.startActivity("end", new WaitState())
.endActivity()
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/executionmode/object/ObjectExecutionModeTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/executionmode/object/ObjectExecutionModeTest.java 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/executionmode/object/ObjectExecutionModeTest.java 2009-02-19 14:10:55 UTC (rev 3950)
@@ -37,17 +37,17 @@
.startProcess("loan")
.startActivity("submit loan request", new AutomaticActivity())
.initial()
- .flow("evaluate")
+ .transition("evaluate")
.endActivity()
.startActivity("evaluate", new WaitState())
- .flow("wire money", "approve")
- .flow("end", "reject")
+ .transition("wire money", "approve")
+ .transition("end", "reject")
.endActivity()
.startActivity("wire money", new AutomaticActivity())
- .flow("archive")
+ .transition("archive")
.endActivity()
.startActivity("archive", new WaitState())
- .flow("end")
+ .transition("end")
.endActivity()
.startActivity("end", new WaitState())
.endActivity()
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/db/model/ProcessCacheDbTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/db/model/ProcessCacheDbTest.java 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/db/model/ProcessCacheDbTest.java 2009-02-19 14:10:55 UTC (rev 3950)
@@ -438,13 +438,13 @@
.startProcess()
.startActivity()
.initial()
- .flow("a")
+ .transition("a")
.endActivity()
.startActivity("a")
- .flow("b")
+ .transition("b")
.endActivity()
.startActivity("b")
- .flow("c")
+ .transition("c")
.endActivity()
.startActivity("c")
.endActivity()
@@ -525,8 +525,8 @@
.startProcess()
.startActivity()
.initial()
- .flow("a")
- .flow("b")
+ .transition("a")
+ .transition("b")
.endActivity()
.startActivity("a")
.endActivity()
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/db/model/ProcessDefinitionDbTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/db/model/ProcessDefinitionDbTest.java 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/db/model/ProcessDefinitionDbTest.java 2009-02-19 14:10:55 UTC (rev 3950)
@@ -176,17 +176,17 @@
.startProcess()
.startActivity("a")
.initial()
- .flow("a")
- .flow("b", "tob")
- .flow("c", "toc")
+ .transition("a")
+ .transition("b", "tob")
+ .transition("c", "toc")
.endActivity()
.startActivity("b")
- .flow("a", "toa")
- .flow("b")
- .flow("c", "toc")
+ .transition("a", "toa")
+ .transition("b")
+ .transition("c", "toc")
.endActivity()
.startActivity("c")
- .flow("c")
+ .transition("c")
.endActivity()
.startActivity("d")
.endActivity()
@@ -207,8 +207,8 @@
.startProcess()
.startActivity()
.initial()
- .flow("a")
- .flow("b")
+ .transition("a")
+ .transition("b")
.endActivity()
.startActivity("a")
.endActivity()
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/execution/PvmProcessExecutionTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/execution/PvmProcessExecutionTest.java 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/execution/PvmProcessExecutionTest.java 2009-02-19 14:10:55 UTC (rev 3950)
@@ -49,7 +49,7 @@
ClientProcessDefinition processDefinition = ProcessDefinitionBuilder.startProcess("test")
.startActivity("start", WaitState.class)
.initial()
- .flow("end", "end")
+ .transition("end", "end")
.endActivity()
.startActivity("end", AutomaticActivity.class)
.endActivity()
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/jobexecutor/AsyncContinuationsTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/jobexecutor/AsyncContinuationsTest.java 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/jobexecutor/AsyncContinuationsTest.java 2009-02-19 14:10:55 UTC (rev 3950)
@@ -75,19 +75,19 @@
.startActivity("start", AutomaticActivity.class)
.initial()
.asyncExecute()
- .flow("a")
+ .transition("a")
.endActivity()
.startActivity("a", AutomaticActivity.class)
.asyncExecute()
- .flow("b")
+ .transition("b")
.endActivity()
.startActivity("b", AutomaticActivity.class)
.asyncExecute()
- .flow("c")
+ .transition("c")
.endActivity()
.startActivity("c", AutomaticActivity.class)
.asyncExecute()
- .flow("end")
+ .transition("end")
.endActivity()
.startActivity("end", AutomaticActivity.class)
.endActivity()
Modified: jbpm4/trunk/modules/test-db/src/main/java/org/jbpm/test/activities/ExclusiveTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/main/java/org/jbpm/test/activities/ExclusiveTest.java 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/test-db/src/main/java/org/jbpm/test/activities/ExclusiveTest.java 2009-02-19 14:10:55 UTC (rev 3950)
@@ -37,11 +37,11 @@
deployJpdlXmlString(
"<process name='Poolcar'>" +
" <start>" +
- " <flow to='How far?' />" +
+ " <transition to='How far?' />" +
" </start>" +
" <exclusive name='How far?' expr='#{distance}'>" +
- " <flow name='far' to='Big car' />" +
- " <flow name='nearby' to='Small car' />" +
+ " <transition name='far' to='Big car' />" +
+ " <transition name='nearby' to='Small car' />" +
" </exclusive>" +
" <state name='Big car' />" +
" <state name='Small car' />" +
@@ -62,16 +62,16 @@
deployJpdlXmlString(
"<process name='Poolcar'>" +
" <start>" +
- " <flow to='How far?' />" +
+ " <transition to='How far?' />" +
" </start>" +
" <exclusive name='How far?'>" +
- " <flow to='Big car'>" +
+ " <transition to='Big car'>" +
" <condition expr='#{distance > 10}' />" +
- " </flow>" +
- " <flow to='Small car'>" +
+ " </transition>" +
+ " <transition to='Small car'>" +
" <condition expr='#{distance >= 3}' />" +
- " </flow>" +
- " <flow to='No car' />" +
+ " </transition>" +
+ " <transition to='No car' />" +
" </exclusive>" +
" <state name='Big car' />" +
" <state name='Small car' />" +
Modified: jbpm4/trunk/modules/test-db/src/main/java/org/jbpm/test/activities/StateTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/main/java/org/jbpm/test/activities/StateTest.java 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/test-db/src/main/java/org/jbpm/test/activities/StateTest.java 2009-02-19 14:10:55 UTC (rev 3950)
@@ -34,13 +34,13 @@
deployJpdlXmlString(
"<process name='ThreeStates'>" +
" <start name='a'>" +
- " <flow to='b' />" +
+ " <transition to='b' />" +
" </start>" +
" <state name='b'>" +
- " <flow to='c' />" +
+ " <transition to='c' />" +
" </state>" +
" <state name='c'>" +
- " <flow to='d' />" +
+ " <transition to='d' />" +
" </state>" +
" <end name='d' />" +
"</process>"
@@ -62,12 +62,12 @@
deployJpdlXmlString(
"<process name='p'>" +
" <start>" +
- " <flow to='ed' />" +
+ " <transition to='ed' />" +
" </start>" +
" <state name='ed'>" +
- " <flow name='left' to='b' />" +
- " <flow name='middle' to='c' />" +
- " <flow name='right' to='d' />" +
+ " <transition name='left' to='b' />" +
+ " <transition name='middle' to='c' />" +
+ " <transition name='right' to='d' />" +
" </state>" +
" <state name='b' />" +
" <state name='c' />" +
@@ -93,12 +93,12 @@
deployJpdlXmlString(
"<process name='p'>" +
" <start>" +
- " <flow to='a' />" +
+ " <transition to='a' />" +
" </start>" +
" <state name='a'>" +
- " <flow name='left' to='b' />" +
- " <flow name='middle' to='c' />" +
- " <flow name='right' to='d' />" +
+ " <transition name='left' to='b' />" +
+ " <transition name='middle' to='c' />" +
+ " <transition name='right' to='d' />" +
" </state>" +
" <state name='b' />" +
" <state name='c' />" +
@@ -118,12 +118,12 @@
deployJpdlXmlString(
"<process name='p'>" +
" <start>" +
- " <flow to='a' />" +
+ " <transition to='a' />" +
" </start>" +
" <state name='a'>" +
- " <flow name='left' to='b' />" +
- " <flow name='middle' to='c' />" +
- " <flow name='right' to='d' />" +
+ " <transition name='left' to='b' />" +
+ " <transition name='middle' to='c' />" +
+ " <transition name='right' to='d' />" +
" </state>" +
" <state name='b' />" +
" <state name='c' />" +
@@ -140,7 +140,7 @@
deployJpdlXmlString(
"<process name='p'>" +
" <start>" +
- " <flow to='a' />" +
+ " <transition to='a' />" +
" </start>" +
" <state name='a' />" +
"</process>"
Modified: jbpm4/trunk/modules/test-db/src/main/java/org/jbpm/test/execution/FindExecutionTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/main/java/org/jbpm/test/execution/FindExecutionTest.java 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/test-db/src/main/java/org/jbpm/test/execution/FindExecutionTest.java 2009-02-19 14:10:55 UTC (rev 3950)
@@ -33,7 +33,7 @@
deployJpdlXmlString(
"<process name='p'>" +
" <start>" +
- " <flow to='a' />" +
+ " <transition to='a' />" +
" </start>" +
" <state name='a' />" +
"</process>"
Modified: jbpm4/trunk/modules/test-db/src/main/java/org/jbpm/test/execution/SignalExecutionTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/main/java/org/jbpm/test/execution/SignalExecutionTest.java 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/test-db/src/main/java/org/jbpm/test/execution/SignalExecutionTest.java 2009-02-19 14:10:55 UTC (rev 3950)
@@ -39,13 +39,13 @@
deployJpdlXmlString(
"<process name='Insurance claim' key='ICL'>" +
" <start>" +
- " <flow to='a' />" +
+ " <transition to='a' />" +
" </start>" +
" <state name='a'>" +
- " <flow to='b' />" +
+ " <transition to='b' />" +
" </state>" +
" <state name='b'>" +
- " <flow to='c' />" +
+ " <transition to='c' />" +
" </state>" +
" <state name='c' />" +
"</process>"
@@ -68,13 +68,13 @@
deployJpdlXmlString(
"<process name='Insurance claim' key='ICL'>" +
" <start>" +
- " <flow to='a' />" +
+ " <transition to='a' />" +
" </start>" +
" <state name='a'>" +
- " <flow to='b' />" +
+ " <transition to='b' />" +
" </state>" +
" <state name='b'>" +
- " <flow to='c' />" +
+ " <transition to='c' />" +
" </state>" +
" <state name='c' />" +
"</process>"
@@ -97,10 +97,10 @@
deployJpdlXmlString(
"<process name='Insurance claim' key='ICL'>" +
" <start>" +
- " <flow to='a' />" +
+ " <transition to='a' />" +
" </start>" +
" <state name='a'>" +
- " <flow to='b' />" +
+ " <transition to='b' />" +
" </state>" +
" <state name='b' />" +
"</process>"
@@ -133,7 +133,7 @@
deployJpdlXmlString(
"<process name='p'>" +
" <start>" +
- " <flow to='a' />" +
+ " <transition to='a' />" +
" </start>" +
" <state name='a' />" +
"</process>"
Modified: jbpm4/trunk/modules/test-db/src/main/java/org/jbpm/test/execution/StartExecutionTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/main/java/org/jbpm/test/execution/StartExecutionTest.java 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/test-db/src/main/java/org/jbpm/test/execution/StartExecutionTest.java 2009-02-19 14:10:55 UTC (rev 3950)
@@ -40,7 +40,7 @@
deployJpdlXmlString(
"<process name='Insurance claim' key='ICL'>" +
" <start>" +
- " <flow to='a' />" +
+ " <transition to='a' />" +
" </start>" +
" <state name='a' />" +
"</process>"
@@ -56,7 +56,7 @@
deployJpdlXmlString(
"<process name='Insurance claim' key='ICL'>" +
" <start>" +
- " <flow to='a' />" +
+ " <transition to='a' />" +
" </start>" +
" <state name='a' />" +
"</process>"
@@ -70,7 +70,7 @@
deployJpdlXmlString(
"<process name='Insurance claim' key='ICL'>" +
" <start>" +
- " <flow to='b' />" +
+ " <transition to='b' />" +
" </start>" +
" <state name='b' />" +
"</process>"
@@ -86,7 +86,7 @@
deployJpdlXmlString(
"<process name='Insurance claim' key='ICL'>" +
" <start>" +
- " <flow to='a' />" +
+ " <transition to='a' />" +
" </start>" +
" <state name='a' />" +
"</process>"
@@ -95,7 +95,7 @@
deployJpdlXmlString(
"<process name='Insurance claim' key='ICL'>" +
" <start>" +
- " <flow to='b' />" +
+ " <transition to='b' />" +
" </start>" +
" <state name='b' />" +
"</process>"
@@ -123,7 +123,7 @@
deployJpdlXmlString(
"<process name='Insurance claim' key='ICL'>" +
" <start>" +
- " <flow to='a' />" +
+ " <transition to='a' />" +
" </start>" +
" <state name='a' />" +
"</process>"
@@ -139,7 +139,7 @@
deployJpdlXmlString(
"<process name='Insurance claim' key='ICL'>" +
" <start>" +
- " <flow to='a' />" +
+ " <transition to='a' />" +
" </start>" +
" <state name='a' />" +
"</process>"
@@ -169,7 +169,7 @@
deployJpdlXmlString(
"<process name='Insurance claim' key='ICL'>" +
" <start>" +
- " <flow to='a' />" +
+ " <transition to='a' />" +
" </start>" +
" <state name='a' />" +
"</process>"
@@ -198,7 +198,7 @@
deployJpdlXmlString(
"<process name='Insurance claim' key='ICL'>" +
" <start>" +
- " <flow to='a' />" +
+ " <transition to='a' />" +
" </start>" +
" <state name='a' />" +
"</process>"
Modified: jbpm4/trunk/modules/test-db/src/main/java/org/jbpm/test/history/AvgDurationTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/main/java/org/jbpm/test/history/AvgDurationTest.java 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/test-db/src/main/java/org/jbpm/test/history/AvgDurationTest.java 2009-02-19 14:10:55 UTC (rev 3950)
@@ -39,16 +39,16 @@
deployJpdlXmlString(
"<process name='Insurance claim' key='ICL'>" +
" <start>" +
- " <flow to='one' />" +
+ " <transition to='one' />" +
" </start>" +
" <state name='one'>" +
- " <flow to='two' />" +
+ " <transition to='two' />" +
" </state>" +
" <state name='two'>" +
- " <flow to='three' />" +
+ " <transition to='three' />" +
" </state>" +
" <state name='three'>" +
- " <flow to='end' />" +
+ " <transition to='end' />" +
" </state>" +
" <end name='end' />" +
"</process>"
Modified: jbpm4/trunk/modules/test-db/src/main/java/org/jbpm/test/history/ChoiceDistributionTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/main/java/org/jbpm/test/history/ChoiceDistributionTest.java 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/test-db/src/main/java/org/jbpm/test/history/ChoiceDistributionTest.java 2009-02-19 14:10:55 UTC (rev 3950)
@@ -37,12 +37,12 @@
deployJpdlXmlString(
"<process name='Transport Selection' key='TRS'>" +
" <start>" +
- " <flow to='How far?' />" +
+ " <transition to='How far?' />" +
" </start>" +
" <exclusive name='How far?' expr='#{distance}'>" +
- " <flow name='far' to='Big car' />" +
- " <flow name='nearby' to='Small car' />" +
- " <flow name='other country' to='Airoplane' />" +
+ " <transition name='far' to='Big car' />" +
+ " <transition name='nearby' to='Small car' />" +
+ " <transition name='other country' to='Airoplane' />" +
" </exclusive>" +
" <state name='Big car' />" +
" <state name='Small car' />" +
Modified: jbpm4/trunk/modules/test-db/src/main/java/org/jbpm/test/history/ProcessInstanceHistoryTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/main/java/org/jbpm/test/history/ProcessInstanceHistoryTest.java 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/test-db/src/main/java/org/jbpm/test/history/ProcessInstanceHistoryTest.java 2009-02-19 14:10:55 UTC (rev 3950)
@@ -37,7 +37,7 @@
deployJpdlXmlString(
"<process name='Insurance claim' key='ICL'>" +
" <start>" +
- " <flow to='end' />" +
+ " <transition to='end' />" +
" </start>" +
" <end name='end' />" +
"</process>"
Modified: jbpm4/trunk/modules/test-db/src/main/java/org/jbpm/test/process/ProcessServiceTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/main/java/org/jbpm/test/process/ProcessServiceTest.java 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/test-db/src/main/java/org/jbpm/test/process/ProcessServiceTest.java 2009-02-19 14:10:55 UTC (rev 3950)
@@ -158,7 +158,7 @@
.addString("xmlstring.jpdl.xml",
"<process name='deleteme' version='33'>" +
" <start>" +
- " <flow to='w' />" +
+ " <transition to='w' />" +
" </start>" +
" <state name='w' />" +
"</process>")
@@ -181,7 +181,7 @@
deployJpdlXmlString(
"<process name='deleteme' version='33'>" +
" <start>" +
- " <flow to='w' />" +
+ " <transition to='w' />" +
" </start>" +
" <state name='w' />" +
"</process>"
@@ -328,7 +328,7 @@
deployJpdlXmlString(
"<process name='minimal'>" +
" <start>" +
- " <flow to='end' />" +
+ " <transition to='end' />" +
" </start>" +
" <end name='end' />" +
"</process>"
Modified: jbpm4/trunk/modules/test-db/src/main/java/org/jbpm/test/variables/BasicVariablesTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/main/java/org/jbpm/test/variables/BasicVariablesTest.java 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/test-db/src/main/java/org/jbpm/test/variables/BasicVariablesTest.java 2009-02-19 14:10:55 UTC (rev 3950)
@@ -38,7 +38,7 @@
deployJpdlXmlString(
"<process name='var'>" +
" <start name='a'>" +
- " <flow to='b' />" +
+ " <transition to='b' />" +
" </start>" +
" <state name='b'/>" +
"</process>"
@@ -54,7 +54,7 @@
deployJpdlXmlString(
"<process name='var'>" +
" <start name='a'>" +
- " <flow to='b' />" +
+ " <transition to='b' />" +
" </start>" +
" <state name='b'/>" +
"</process>"
@@ -84,7 +84,7 @@
deployJpdlXmlString(
"<process name='var'>" +
" <start name='a'>" +
- " <flow to='b' />" +
+ " <transition to='b' />" +
" </start>" +
" <state name='b'/>" +
"</process>"
@@ -101,7 +101,7 @@
deployJpdlXmlString(
"<process name='var'>" +
" <start name='a'>" +
- " <flow to='b' />" +
+ " <transition to='b' />" +
" </start>" +
" <state name='b'/>" +
"</process>"
Modified: jbpm4/trunk/modules/test-db/src/main/java/org/jbpm/test/variables/VariableBasicTypesTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/main/java/org/jbpm/test/variables/VariableBasicTypesTest.java 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/test-db/src/main/java/org/jbpm/test/variables/VariableBasicTypesTest.java 2009-02-19 14:10:55 UTC (rev 3950)
@@ -36,7 +36,7 @@
deployJpdlXmlString(
"<process name='var'>" +
" <start name='a'>" +
- " <flow to='b' />" +
+ " <transition to='b' />" +
" </start>" +
" <state name='b'/>" +
"</process>"
Modified: jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/ContinuationTest.java
===================================================================
--- jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/ContinuationTest.java 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/ContinuationTest.java 2009-02-19 14:10:55 UTC (rev 3950)
@@ -74,19 +74,19 @@
.startActivity("start", AutomaticActivity.class)
.initial()
.asyncExecute()
- .flow("a")
+ .transition("a")
.endActivity()
.startActivity("a", AutomaticActivity.class)
.asyncExecute()
- .flow("b")
+ .transition("b")
.endActivity()
.startActivity("b", AutomaticActivity.class)
.asyncExecute()
- .flow("c")
+ .transition("c")
.endActivity()
.startActivity("c", AutomaticActivity.class)
.asyncExecute()
- .flow("end")
+ .transition("end")
.endActivity()
.startActivity("end", WaitState.class)
.endActivity()
Modified: jbpm4/trunk/modules/test-load/src/test/resources/org/jbpm/test/load/executions/process.jpdl.xml
===================================================================
--- jbpm4/trunk/modules/test-load/src/test/resources/org/jbpm/test/load/executions/process.jpdl.xml 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/test-load/src/test/resources/org/jbpm/test/load/executions/process.jpdl.xml 2009-02-19 14:10:55 UTC (rev 3950)
@@ -3,35 +3,35 @@
<process name="Process" xmlns="http://jbpm.org/4/jpdl">
<start>
- <flow to="a" />
+ <transition to="a" />
</start>
<java name="a"
class="org.jbpm.test.load.executions.Automatic"
method="doNothing">
- <flow to="b" />
+ <transition to="b" />
</java>
<java name="b"
class="org.jbpm.test.load.executions.Automatic"
method="doNothing">
- <flow to="c" />
+ <transition to="c" />
</java>
<state name="c">
- <flow to="d" />
+ <transition to="d" />
</state>
<java name="d"
class="org.jbpm.test.load.executions.Automatic"
method="doNothing">
- <flow to="e" />
+ <transition to="e" />
</java>
<java name="e"
class="org.jbpm.test.load.executions.Automatic"
method="doNothing">
- <flow to="end" />
+ <transition to="end" />
</java>
<end name="end" />
Modified: jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/AutomaticDecisionTest.java
===================================================================
--- jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/AutomaticDecisionTest.java 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/AutomaticDecisionTest.java 2009-02-19 14:10:55 UTC (rev 3950)
@@ -69,9 +69,9 @@
return ProcessDefinitionBuilder.startProcess()
.startActivity("creditRate?", new AutomaticCreditRating())
.initial()
- .flow("priority delivery", "good")
- .flow("bulk delivery", "average")
- .flow("payment upfront", "bad")
+ .transition("priority delivery", "good")
+ .transition("bulk delivery", "average")
+ .transition("payment upfront", "bad")
.endActivity()
.startActivity("priority delivery", new WaitState())
.endActivity()
Modified: jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/BasicExecutionFlowTest.java
===================================================================
--- jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/BasicExecutionFlowTest.java 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/BasicExecutionFlowTest.java 2009-02-19 14:10:55 UTC (rev 3950)
@@ -79,17 +79,17 @@
.startProcess("loan")
.startActivity("submit loan request", automaticActivity)
.initial()
- .flow("evaluate")
+ .transition("evaluate")
.endActivity()
.startActivity("evaluate", waitState)
- .flow("wire money", "approve")
- .flow("end", "reject")
+ .transition("wire money", "approve")
+ .transition("end", "reject")
.endActivity()
.startActivity("wire money", automaticActivity)
- .flow("archive")
+ .transition("archive")
.endActivity()
.startActivity("archive", waitState)
- .flow("end")
+ .transition("end")
.endActivity()
.startActivity("end", waitState)
.endActivity()
@@ -132,17 +132,17 @@
.startProcess("loan")
.startActivity("submit loan request", automaticActivity)
.initial()
- .flow("evaluate")
+ .transition("evaluate")
.endActivity()
.startActivity("evaluate", waitState)
- .flow("wire money", "approve")
- .flow("end", "reject")
+ .transition("wire money", "approve")
+ .transition("end", "reject")
.endActivity()
.startActivity("wire money", automaticActivity)
- .flow("archive")
+ .transition("archive")
.endActivity()
.startActivity("archive", waitState)
- .flow("end")
+ .transition("end")
.endActivity()
.startActivity("end", waitState)
.endActivity()
Modified: jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/EventPropagationTest.java
===================================================================
--- jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/EventPropagationTest.java 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/EventPropagationTest.java 2009-02-19 14:10:55 UTC (rev 3950)
@@ -71,7 +71,7 @@
.endEvent()
.startActivity("initial", new WaitState())
.initial()
- .flow("end")
+ .transition("end")
.endActivity()
.startActivity("end", new WaitState())
.endActivity()
@@ -94,7 +94,7 @@
.endEvent()
.startActivity("initial", new WaitState())
.initial()
- .flow("end")
+ .transition("end")
.endActivity()
.startActivity("end", new WaitState())
.endActivity()
@@ -118,7 +118,7 @@
.endEvent()
.startActivity("initial", new WaitState())
.initial()
- .flow("end", "go")
+ .transition("end", "go")
.endActivity()
.startActivity("end", new WaitState())
.endActivity()
@@ -203,7 +203,7 @@
.startActivity("sequence", new Sequence())
.initial()
.startActivity("one", new WaitState())
- .flow("two")
+ .transition("two")
.endActivity()
.startActivity("two", new WaitState())
.endActivity()
@@ -275,7 +275,7 @@
.startActivity("sequence", new Sequence())
.initial()
.startActivity("one", new WaitState())
- .flow("two", "increment")
+ .transition("two", "increment")
.endActivity()
.startActivity("two", new WaitState())
.endActivity()
Modified: jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/EventTest.java
===================================================================
--- jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/EventTest.java 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/EventTest.java 2009-02-19 14:10:55 UTC (rev 3950)
@@ -73,7 +73,7 @@
.startProcess("leave activity action test")
.startActivity("initial", new WaitState())
.initial()
- .flow("end")
+ .transition("end")
.startEvent(Event.END)
.listener(activityEndAction)
.endEvent()
@@ -147,7 +147,7 @@
.startProcess("enter activity action test")
.startActivity("initial", new WaitState())
.initial()
- .flow("end")
+ .transition("end")
.endActivity()
.startActivity("end", new WaitState())
.startEvent(Event.START)
@@ -201,7 +201,7 @@
.startProcess("custom activity action test")
.startActivity("initial", new WaitStateWithCustomEvent())
.initial()
- .flow("end")
+ .transition("end")
.startEvent("end of riveter shift") // http://en.wikipedia.org/wiki/Kilroy_was_here
.listener(checkRivetsAction)
.endEvent()
@@ -252,7 +252,7 @@
.startProcess("basic", new RecordingProcessDefinition())
.startActivity("initial", new AutomaticActivity())
.initial()
- .flow("end")
+ .transition("end")
.endActivity()
.startActivity("end", new EndState())
.endActivity()
Modified: jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/ExceptionHandlerTest.java
===================================================================
--- jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/ExceptionHandlerTest.java 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/ExceptionHandlerTest.java 2009-02-19 14:10:55 UTC (rev 3950)
@@ -72,7 +72,7 @@
.endExceptionHandler()
.startActivity("initial", new WaitState())
.initial()
- .flow("end")
+ .transition("end")
.startEvent(Event.END)
.listener(new Batter())
.endEvent()
@@ -96,7 +96,7 @@
.startProcess()
.startActivity("initial", new WaitState())
.initial()
- .flow("end")
+ .transition("end")
.startEvent(Event.END)
.startExceptionHandler(RuntimeException.class)
.listener(catcher)
@@ -123,7 +123,7 @@
.startProcess()
.startActivity("initial", new WaitState())
.initial()
- .flow("end")
+ .transition("end")
.startEvent(Event.END)
.listener(new Batter())
.startExceptionHandler(RuntimeException.class)
@@ -150,7 +150,7 @@
.startProcess()
.startActivity("initial",new WaitState())
.initial()
- .flow("end")
+ .transition("end")
.startEvent(Event.END)
.listener(new Batter())
.endEvent()
@@ -179,7 +179,7 @@
ClientProcessDefinition processDefinition = ProcessDefinitionBuilder.startProcess()
.startActivity("initial", new WaitState())
.initial()
- .flow("end")
+ .transition("end")
.startEvent("other")
.startExceptionHandler(RuntimeException.class)
.listener(catcher)
@@ -216,7 +216,7 @@
ClientProcessDefinition processDefinition = ProcessDefinitionBuilder.startProcess()
.startActivity("initial", new WaitState())
.initial()
- .flow("end")
+ .transition("end")
.startEvent(Event.END)
.startExceptionHandler(NullPointerException.class)
.listener(catcher)
@@ -254,7 +254,7 @@
.startProcess()
.startActivity("initial", new WaitState())
.initial()
- .flow("end")
+ .transition("end")
.startEvent(Event.END)
.startExceptionHandler(RuntimeException.class)
.listener(rethrowingCatcher)
Modified: jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/ExecutionStateTest.java
===================================================================
--- jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/ExecutionStateTest.java 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/ExecutionStateTest.java 2009-02-19 14:10:55 UTC (rev 3950)
@@ -80,10 +80,10 @@
ClientProcessDefinition processDefinition = ProcessDefinitionBuilder.startProcess()
.startActivity("a", new AutomaticActivity())
.initial()
- .flow("b")
+ .transition("b")
.endActivity()
.startActivity("b", new WaitState())
- .flow("c")
+ .transition("c")
.endActivity()
.startActivity("c", new AutomaticActivity())
.endActivity()
@@ -106,11 +106,11 @@
ClientProcessDefinition processDefinition = ProcessDefinitionBuilder.startProcess()
.startActivity("a", new AutomaticActivity())
.initial()
- .flow("b")
+ .transition("b")
.endActivity()
.startActivity("b", new WaitState())
.scope()
- .flow("c")
+ .transition("c")
.endActivity()
.startActivity("c", new AutomaticActivity())
.endActivity()
@@ -134,10 +134,10 @@
ClientProcessDefinition processDefinition = ProcessDefinitionBuilder.startProcess()
.startActivity("a", new AutomaticActivity())
.initial()
- .flow("b")
+ .transition("b")
.endActivity()
.startActivity("b", new WaitState())
- .flow("c")
+ .transition("c")
.endActivity()
.startActivity("c", new AutomaticActivity())
.endActivity()
@@ -163,10 +163,10 @@
.startProcess()
.startActivity("a", new AutomaticActivity())
.initial()
- .flow("b")
+ .transition("b")
.endActivity()
.startActivity("b", new WaitState())
- .flow("c")
+ .transition("c")
.endActivity()
.startActivity("c", new AutomaticActivity())
.endActivity()
Modified: jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/ExternalDecisionTest.java
===================================================================
--- jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/ExternalDecisionTest.java 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/ExternalDecisionTest.java 2009-02-19 14:10:55 UTC (rev 3950)
@@ -62,9 +62,9 @@
.startProcess()
.startActivity("creditRate?", new ExternalDecision())
.initial()
- .flow("priority delivery", "good")
- .flow("bulk delivery", "average")
- .flow("payment upfront", "bad")
+ .transition("priority delivery", "good")
+ .transition("bulk delivery", "average")
+ .transition("payment upfront", "bad")
.endActivity()
.startActivity("priority delivery", new WaitState())
.endActivity()
Modified: jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/FunctionalActivityTest.java
===================================================================
--- jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/FunctionalActivityTest.java 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/FunctionalActivityTest.java 2009-02-19 14:10:55 UTC (rev 3950)
@@ -39,7 +39,7 @@
/** shows how functional activities (activities that have a specific function
- * not related to control flow) can be implemented.
+ * not related to control transition) can be implemented.
*
* Examples of functional activities could be sending an email, doing a
* SQL update on a database, generating a file and so on.
@@ -77,10 +77,10 @@
.startProcess()
.startActivity("a", functionalActivity)
.initial()
- .flow("b")
+ .transition("b")
.endActivity()
.startActivity("b", functionalActivity)
- .flow("c")
+ .transition("c")
.endActivity()
.startActivity("c", functionalActivity)
.endActivity()
Modified: jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/LoopingTest.java
===================================================================
--- jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/LoopingTest.java 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/LoopingTest.java 2009-02-19 14:10:55 UTC (rev 3950)
@@ -88,11 +88,11 @@
.startProcess()
.startActivity("for", new For(loops))
.initial()
- .flow("recorder", "loop")
- .flow("end", "done")
+ .transition("recorder", "loop")
+ .transition("end", "done")
.endActivity()
.startActivity("recorder", new Recorder())
- .flow("for")
+ .transition("for")
.endActivity()
.startActivity("end", new WaitState())
.endActivity()
Modified: jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/ScopeStateTest.java
===================================================================
--- jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/ScopeStateTest.java 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/ScopeStateTest.java 2009-02-19 14:10:55 UTC (rev 3950)
@@ -62,11 +62,11 @@
.startProcess()
.startActivity("a", new AutomaticActivity())
.initial()
- .flow("b")
+ .transition("b")
.endActivity()
.startActivity("b", new WaitState())
.scope()
- .flow("c")
+ .transition("c")
.endActivity()
.startActivity("c", new WaitState())
.endActivity()
Modified: jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/ScopeVariableDeclarationTest.java
===================================================================
--- jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/ScopeVariableDeclarationTest.java 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/ScopeVariableDeclarationTest.java 2009-02-19 14:10:55 UTC (rev 3950)
@@ -219,7 +219,7 @@
.startActivity("left-start", new WaitState())
.initial()
.scope()
- .flow("right-inner")
+ .transition("right-inner")
.startVariable("fuel")
.initialValue(new StringDescriptor("kerosine"))
.endVariable()
Modified: jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/ScopeVariableTest.java
===================================================================
--- jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/ScopeVariableTest.java 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/ScopeVariableTest.java 2009-02-19 14:10:55 UTC (rev 3950)
@@ -60,11 +60,11 @@
.startProcess()
.startActivity("a", new WaitState())
.initial()
- .flow("b")
+ .transition("b")
.endActivity()
.startActivity("b", new WaitState())
.scope() // !!!!
- .flow("c")
+ .transition("c")
.endActivity()
.startActivity("c", new WaitState())
.endActivity()
@@ -90,11 +90,11 @@
.startProcess()
.startActivity("a", new WaitState())
.initial()
- .flow("b")
+ .transition("b")
.endActivity()
.startActivity("b", new WaitState())
.scope() // !!!!
- .flow("c")
+ .transition("c")
.endActivity()
.startActivity("c", new WaitState())
.endActivity()
@@ -121,11 +121,11 @@
.startProcess()
.startActivity("a", new WaitState())
.initial()
- .flow("b")
+ .transition("b")
.endActivity()
.startActivity("b", new WaitState())
.scope() // !!!!
- .flow("c")
+ .transition("c")
.endActivity()
.startActivity("c", new WaitState())
.endActivity()
@@ -152,11 +152,11 @@
.startProcess()
.startActivity("a", new WaitState())
.initial()
- .flow("b")
+ .transition("b")
.endActivity()
.startActivity("b", new WaitState())
.scope() // !!!!
- .flow("c")
+ .transition("c")
.endActivity()
.startActivity("c", new WaitState())
.endActivity()
@@ -181,11 +181,11 @@
.startProcess()
.startActivity("a", new WaitState())
.initial()
- .flow("b")
+ .transition("b")
.endActivity()
.startActivity("b", new WaitState())
.scope() // !!!!
- .flow("c")
+ .transition("c")
.endActivity()
.startActivity("c", new WaitState())
.endActivity()
Modified: jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/SubProcessTest.java
===================================================================
--- jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/SubProcessTest.java 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/SubProcessTest.java 2009-02-19 14:10:55 UTC (rev 3950)
@@ -79,10 +79,10 @@
.startProcess("sub")
.startActivity("sub1", new AutomaticActivity())
.initial()
- .flow("sub2")
+ .transition("sub2")
.endActivity()
.startActivity("sub2", new WaitState())
- .flow("sub3")
+ .transition("sub3")
.endActivity()
.startActivity("sub3", new EndState())
.endActivity()
@@ -92,10 +92,10 @@
.startProcess("super")
.startActivity("super1", new AutomaticActivity())
.initial()
- .flow("super2")
+ .transition("super2")
.endActivity()
.startActivity("super2", new SubProcess(subProcess))
- .flow("super3")
+ .transition("super3")
.endActivity()
.startActivity("super3", new WaitState())
.endActivity()
Modified: jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/TransitionBasedConcurrencyTest.java
===================================================================
--- jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/TransitionBasedConcurrencyTest.java 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/TransitionBasedConcurrencyTest.java 2009-02-19 14:10:55 UTC (rev 3950)
@@ -127,17 +127,17 @@
.startProcess()
.startActivity("fork", new Fork())
.initial()
- .flow("bill", "billing")
- .flow("ship", "shipping")
+ .transition("bill", "billing")
+ .transition("ship", "shipping")
.endActivity()
.startActivity("bill", new WaitState())
- .flow("join")
+ .transition("join")
.endActivity()
.startActivity("ship", new WaitState())
- .flow("join")
+ .transition("join")
.endActivity()
.startActivity("join", new Join())
- .flow("end")
+ .transition("end")
.endActivity()
.startActivity("end", new WaitState())
.endActivity()
Modified: jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/TransitionEventsTest.java
===================================================================
--- jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/TransitionEventsTest.java 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/TransitionEventsTest.java 2009-02-19 14:10:55 UTC (rev 3950)
@@ -84,7 +84,7 @@
.endEvent()
.startActivity("inside", new WaitState())
.initial()
- .flow("outside")
+ .transition("outside")
.startEvent(Event.END)
.listener(insideListener)
.endEvent()
@@ -163,7 +163,7 @@
.endEvent()
.startActivity("outside", new WaitState())
.initial()
- .flow("inside")
+ .transition("inside")
.startEvent(Event.END)
.listener(outsideListener)
.endEvent()
@@ -261,7 +261,7 @@
.endEvent()
.startActivity("inside", new WaitState())
.initial()
- .flow("inside")
+ .transition("inside")
.startEvent(Event.END)
.listener(insideListener)
.endEvent()
@@ -335,7 +335,7 @@
.endEvent()
.startActivity("inside", new WaitState())
.initial()
- .flow("inside")
+ .transition("inside")
.endActivity()
.endActivity()
.endProcess();
@@ -391,7 +391,7 @@
.listener(processListener)
.endEvent()
.startActivity("composite")
- .flow("outside")
+ .transition("outside")
.startEvent(Event.END)
.listener(compositeListener)
.endEvent()
@@ -495,7 +495,7 @@
.listener(sourceOutsideListener)
.endEvent()
.startActivity("source middle")
- .flow("destination inside")
+ .transition("destination inside")
.startEvent(Event.END)
.listener(sourceMiddleListener)
.endEvent()
Modified: jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch04-Jpdl.xml
===================================================================
--- jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch04-Jpdl.xml 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch04-Jpdl.xml 2009-02-19 14:10:55 UTC (rev 3950)
@@ -12,17 +12,17 @@
<process name="Purchase order" xmlns="http://jbpm.org/4/jpdl">
<start>
- <flow to="Verify supplier" />
+ <transition to="Verify supplier" />
</start>
<state name="Verify supplier">
- <flow name="Supplier ok" to="Check supplier data" />
- <flow name="Supplier not ok" to="Error" />
+ <transition name="Supplier ok" to="Check supplier data" />
+ <transition name="Supplier not ok" to="Error" />
</state>
<exclusive name="Check supplier data">
- <flow name="nok" to="Error" />
- <flow name="ok" to="Completed" />
+ <transition name="nok" to="Error" />
+ <transition name="ok" to="Completed" />
</exclusive>
<end name="Completed" />
@@ -118,7 +118,7 @@
<title><literal>start</literal></title>
<para>Indicates where an execution for this process starts. Typically there is
exactly one start activity in a process. A process has to have at least one start
- activity. A start activity must have exactly one outgoing flow and that flow
+ activity. A start activity must have exactly one outgoing transition and that transition
is taken when a process execution starts.
</para>
<table><title><literal>start</literal> attributes:</title>
@@ -139,7 +139,7 @@
<entry></entry>
<entry>optional</entry>
<entry>name of the activity. Since a start activity
- cannot have incoming flows, the name is optional.
+ cannot have incoming transitions, the name is optional.
</entry>
</row>
</tbody>
@@ -156,9 +156,9 @@
</thead>
<tbody>
<row>
- <entry><literal>flow</literal></entry>
+ <entry><literal>transition</literal></entry>
<entry>1</entry>
- <entry>the outgoing flow</entry>
+ <entry>the outgoing transition</entry>
</row>
</tbody>
</tgroup>
@@ -174,7 +174,7 @@
</para>
<section id="statesequence">
<title><literal>state</literal> sequence</title>
- <para>Let's look at an example which shows states connected with flows
+ <para>Let's look at an example which shows states connected with transitions
as a sequence</para>
<figure id="state.sequence">
<title>A sequence of states</title>
@@ -183,15 +183,15 @@
<programlisting><process name="StateSequence" xmlns="http://jbpm.org/4/jpdl">
<start>
- <flow to="a" />
+ <transition to="a" />
</start>
<state name="a">
- <flow to="b" />
+ <transition to="b" />
</state>
<state name="b">
- <flow to="c" />
+ <transition to="c" />
</state>
<state name="c" />
@@ -218,12 +218,12 @@
<programlisting><process name="StateChoice" xmlns="http://jbpm.org/4/jpdl">
<start>
- <flow to="wait for response" />
+ <transition to="wait for response" />
</start>
<state name="wait for response">
- <flow name="accept" to="submit document" />
- <flow name="reject" to="try again" />
+ <transition name="accept" to="submit document" />
+ <transition name="reject" to="try again" />
</state>
<state name="submit document" />
@@ -235,15 +235,15 @@
<programlisting>Execution execution = executionService.startProcessInstanceByKey("StateSequence");</programlisting>
<para>Now, the execution is arrived in the <literal>wait for response</literal>.
The execution will wait there until an external trigger is given. In case
- a <literal>state</literal> has multiple outgoing flows, the signalName given
- in the external trigger will be matched against the name of the outgoing flow
+ a <literal>state</literal> has multiple outgoing transitions, the signalName given
+ in the external trigger will be matched against the name of the outgoing transition
to take. So when we provide signalName <literal>accept</literal> like this:
</para>
<programlisting>executionService.signalExecutionById(executionId, "accept");</programlisting>
- <para>Then the execution will continue over the outgoing flow named
+ <para>Then the execution will continue over the outgoing transition named
<literal>accept</literal>. Analogue, when signalName <literal>reject</literal>
is given in the signalExecutionXxx methods, the execution will continue over
- the outgoing flow named reject.
+ the outgoing transition named reject.
</para>
</section>
</section>
@@ -319,7 +319,7 @@
<programlisting><process name="Java" xmlns="http://jbpm.org/4/jpdl">
<start>
- <flow to="invoke java method" />
+ <transition to="invoke java method" />
</start>
<java name="invoke java method"
@@ -332,7 +332,7 @@
<arg><string value="Hi, how are you?"/></arg>
- <flow to="wait" />
+ <transition to="wait" />
</java>
<state name="wait">
@@ -431,14 +431,14 @@
<programlisting><process name="ScriptExpression" xmlns="http://jbpm.org/4/jpdl">
<start>
- <flow to="invoke script" />
+ <transition to="invoke script" />
</start>
<script name="invoke script"
expr="Send packet to #{person.address}"
var="text">
- <flow to="wait" />
+ <transition to="wait" />
</script>
<state name="wait"/>
@@ -465,19 +465,19 @@
<section id="exclusive">
<title><literal>exclusive</literal></title>
<para>Takes one path of many alternatives. Also known as a decision. An exclusive
- activity has multiple outgoing flows and when an execution arrives in an exclusive
- activity, an automatic evaluation will decide which outgoing flow is taken.
+ activity has multiple outgoing transitions and when an execution arrives in an exclusive
+ activity, an automatic evaluation will decide which outgoing transition is taken.
</para>
<para>An exclusive activity should be configured in one of the three following ways:
</para>
<section id="exclusiveconditions">
<title>Exclusive conditions</title>
- <para>An exclusive with conditions on the flows evaluates the condition in each flow.
- The first flow for which the nested condition expression resolves to true or which does
+ <para>An exclusive with conditions on the transitions evaluates the condition in each transition.
+ The first transition for which the nested condition expression resolves to true or which does
not have a condition is taken.
</para>
- <table><title><literal>exclusive.flow.condition</literal> attributes:</title>
+ <table><title><literal>exclusive.transition.condition</literal> attributes:</title>
<tgroup cols="5" rowsep="1" colsep="1">
<thead>
<row>
@@ -519,17 +519,17 @@
<programlisting><process name="ExclusiveConditions" >
<start>
- <flow to="evaluate document" />
+ <transition to="evaluate document" />
</start>
<exclusive name="evaluate document">
- <flow to="submit document">
+ <transition to="submit document">
<emphasis role="bold"><condition expr="#{content=="good"}" /></emphasis>
- </flow>
- <flow to="try again">
+ </transition>
+ <transition to="try again">
<emphasis role="bold"><condition expr="#{content=="not so good"}" /></emphasis>
- </flow>
- <flow to="give up" />
+ </transition>
+ <transition to="give up" />
</exclusive>
<state name="submit document" />
@@ -544,7 +544,7 @@
<section id="exclusiveexpression">
<title>Exclusive expression</title>
<para>An exclusive expression evaluates to a String representing the name of
- an outgoing flow.
+ an outgoing transition.
</para>
<table><title><literal>exclusive</literal> attributes:</title>
<tgroup cols="5" rowsep="1" colsep="1">
@@ -585,11 +585,11 @@
</para>
<programlisting><process name="Poolcar">
<start>
- <flow to="How far?" />
+ <transition to="How far?" />
</start>
<exclusive name="How far?" <emphasis role="bold">expr="#{distance}"</emphasis>>
- <flow name="far" to="Big car" />
- <flow name="nearby" to="Small car" />
+ <transition name="far" to="Big car" />
+ <transition name="nearby" to="Small car" />
</exclusive>
<state name="Big car" />
<state name="Small car" />
@@ -606,7 +606,7 @@
<title>Exclusive handler</title>
<para>An exclusive handler is a java class that implements the
<literal>ExclusiveHandler</literal> interface. The exclusive handler
- will be responsible for selecting the name of the outgoing flow.
+ will be responsible for selecting the name of the outgoing transition.
</para>
<programlisting>public interface ExclusiveHandler {
String select(OpenExecution execution);
@@ -641,14 +641,14 @@
<programlisting><process name="ExclusiveHandler">
<start>
- <flow to="evaluate document" />
+ <transition to="evaluate document" />
</start>
<exclusive name="evaluate document">
<handler class="org.jbpm.examples.exclusive.handler.ContentEvaluation" />
- <flow name="good" to="submit document" />
- <flow name="bad" to="try again" />
- <flow name="ugly" to="give up" />
+ <transition name="good" to="submit document" />
+ <transition name="bad" to="try again" />
+ <transition name="ugly" to="give up" />
</exclusive>
<state name="submit document" />
@@ -699,7 +699,7 @@
<programlisting><process name="EndProcessInstance" xmlns="http://jbpm.org/4/jpdl">
<start>
- <flow to="end" />
+ <transition to="end" />
</start>
<end name="end" />
@@ -751,13 +751,13 @@
<programlisting><process name="EndMultiple" xmlns="http://;jbpm.org/4/jpdl">
<start>
- <flow to="get return code" />
+ <transition to="get return code" />
<start>
<state name="get return code">
- <flow name="200" to="ok"/>
- <flow name="400" to="bad request"/>
- <flow name="500" to="internal server error"/>
+ <transition name="200" to="ok"/>
+ <transition name="400" to="bad request"/>
+ <transition name="500" to="internal server error"/>
</state>
<end name="ok"/>
@@ -817,13 +817,13 @@
<programlisting><process name="EndState" xmlns="http://jbpm.org/4/jpdl">
<start>
- <flow to="get return code"/>
+ <transition to="get return code"/>
</start>
<state name="get return code">
- <flow name="200" to="ok"/>
- <flow name="400" to="bad request" />
- <flow name="500" to="internal server error"/>
+ <transition name="200" to="ok"/>
+ <transition name="400" to="bad request" />
+ <transition name="500" to="internal server error"/>
</state>
<end name="ok" state="completed"/>
@@ -883,9 +883,9 @@
</thead>
<tbody>
<row>
- <entry><literal>flow</literal></entry>
+ <entry><literal>transition</literal></entry>
<entry>0..*</entry>
- <entry>the outgoing flows</entry>
+ <entry>the outgoing transitions</entry>
</row>
</tbody>
</tgroup>
Modified: jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch05-Jpdl.xml
===================================================================
--- jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch05-Jpdl.xml 2009-02-19 13:55:13 UTC (rev 3949)
+++ jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch05-Jpdl.xml 2009-02-19 14:10:55 UTC (rev 3950)
@@ -12,17 +12,17 @@
<process name="Purchase order" xmlns="http://jbpm.org/4/jpdl">
<start>
- <flow to="Verify supplier" />
+ <transition to="Verify supplier" />
</start>
<state name="Verify supplier">
- <flow name="Supplier ok" to="Check supplier data" />
- <flow name="Supplier not ok" to="Error" />
+ <transition name="Supplier ok" to="Check supplier data" />
+ <transition name="Supplier not ok" to="Error" />
</state>
<exclusive name="Check supplier data">
- <flow name="nok" to="Error" />
- <flow name="ok" to="Completed" />
+ <transition name="nok" to="Error" />
+ <transition name="ok" to="Completed" />
</exclusive>
<end name="Completed" />
@@ -118,7 +118,7 @@
<title><literal>start</literal></title>
<para>Indicates where an execution for this process starts. Typically there is
exactly one start activity in a process. A process has to have at least one start
- activity. A start activity must have exactly one outgoing flow and that flow
+ activity. A start activity must have exactly one outgoing transition and that transition
is taken when a process execution starts.
</para>
<para>Known limitation: for now, a process can not have more then
@@ -142,7 +142,7 @@
<entry></entry>
<entry>optional</entry>
<entry>name of the activity. Since a start activity
- cannot have incoming flows, the name is optional.
+ cannot have incoming transitions, the name is optional.
</entry>
</row>
</tbody>
@@ -159,9 +159,9 @@
</thead>
<tbody>
<row>
- <entry><literal>flow</literal></entry>
+ <entry><literal>transition</literal></entry>
<entry>1</entry>
- <entry>the outgoing flow</entry>
+ <entry>the outgoing transition</entry>
</row>
</tbody>
</tgroup>
@@ -177,7 +177,7 @@
</para>
<section id="statesequence">
<title><literal>state</literal> sequence</title>
- <para>Let's look at an example which shows states connected with flows
+ <para>Let's look at an example which shows states connected with transitions
as a sequence</para>
<figure id="process.state.sequence">
<title>A sequence of states</title>
@@ -186,15 +186,15 @@
<programlisting><process name="StateSequence" xmlns="http://jbpm.org/4/jpdl">
<start>
- <flow to="a" />
+ <transition to="a" />
</start>
<state name="a">
- <flow to="b" />
+ <transition to="b" />
</state>
<state name="b">
- <flow to="c" />
+ <transition to="c" />
</state>
<state name="c" />
@@ -221,12 +221,12 @@
<programlisting><process name="StateChoice" xmlns="http://jbpm.org/4/jpdl">
<start>
- <flow to="wait for response" />
+ <transition to="wait for response" />
</start>
<state name="wait for response">
- <flow name="accept" to="submit document" />
- <flow name="reject" to="try again" />
+ <transition name="accept" to="submit document" />
+ <transition name="reject" to="try again" />
</state>
<state name="submit document" />
@@ -238,15 +238,15 @@
<programlisting>Execution execution = executionService.startProcessInstanceByKey("StateSequence");</programlisting>
<para>Now, the execution is arrived in the <literal>wait for response</literal>.
The execution will wait there until an external trigger is given. In case
- a <literal>state</literal> has multiple outgoing flows, the signalName given
- in the external trigger will be matched against the name of the outgoing flow
+ a <literal>state</literal> has multiple outgoing transitions, the signalName given
+ in the external trigger will be matched against the name of the outgoing transition
to take. So when we provide signalName <literal>accept</literal> like this:
</para>
<programlisting>executionService.signalExecutionById(executionId, "accept");</programlisting>
- <para>Then the execution will continue over the outgoing flow named
+ <para>Then the execution will continue over the outgoing transition named
<literal>accept</literal>. Analogue, when signalName <literal>reject</literal>
is given in the signalExecutionXxx methods, the execution will continue over
- the outgoing flow named reject.
+ the outgoing transition named reject.
</para>
</section>
</section>
@@ -254,19 +254,19 @@
<section id="exclusive">
<title><literal>exclusive</literal></title>
<para>Takes one path of many alternatives. Also known as a decision. An exclusive
- activity has multiple outgoing flows and when an execution arrives in an exclusive
- activity, an automatic evaluation will decide which outgoing flow is taken.
+ activity has multiple outgoing transitions and when an execution arrives in an exclusive
+ activity, an automatic evaluation will decide which outgoing transition is taken.
</para>
<para>An exclusive activity should be configured in one of the three following ways:
</para>
<section id="exclusiveconditions">
<title>Exclusive conditions</title>
- <para>An exclusive with conditions on the flows evaluates the condition in each flow.
- The first flow for which the nested condition expression resolves to true or which does
+ <para>An exclusive with conditions on the transitions evaluates the condition in each transition.
+ The first transition for which the nested condition expression resolves to true or which does
not have a condition is taken.
</para>
- <table><title><literal>exclusive.flow.condition</literal> attributes:</title>
+ <table><title><literal>exclusive.transition.condition</literal> attributes:</title>
<tgroup cols="5" rowsep="1" colsep="1">
<thead>
<row>
@@ -308,17 +308,17 @@
<programlisting><process name="ExclusiveConditions" >
<start>
- <flow to="evaluate document" />
+ <transition to="evaluate document" />
</start>
<exclusive name="evaluate document">
- <flow to="submit document">
+ <transition to="submit document">
<emphasis role="bold"><condition expr="#{content=="good"}" /></emphasis>
- </flow>
- <flow to="try again">
+ </transition>
+ <transition to="try again">
<emphasis role="bold"><condition expr="#{content=="not so good"}" /></emphasis>
- </flow>
- <flow to="give up" />
+ </transition>
+ <transition to="give up" />
</exclusive>
<state name="submit document" />
@@ -333,7 +333,7 @@
<section id="exclusiveexpression">
<title>Exclusive expression</title>
<para>An exclusive expression evaluates to a String representing the name of
- an outgoing flow.
+ an outgoing transition.
</para>
<table><title><literal>exclusive</literal> attributes:</title>
<tgroup cols="5" rowsep="1" colsep="1">
@@ -376,11 +376,11 @@
</figure>
<programlisting><process name="Poolcar">
<start>
- <flow to="How far?" />
+ <transition to="How far?" />
</start>
<exclusive name="How far?" <emphasis role="bold">expr="#{distance}"</emphasis>>
- <flow name="far" to="Big car" />
- <flow name="nearby" to="Small car" />
+ <transition name="far" to="Big car" />
+ <transition name="nearby" to="Small car" />
</exclusive>
<state name="Big car" />
<state name="Small car" />
@@ -397,7 +397,7 @@
<title>Exclusive handler</title>
<para>An exclusive handler is a java class that implements the
<literal>ExclusiveHandler</literal> interface. The exclusive handler
- will be responsible for selecting the name of the outgoing flow.
+ will be responsible for selecting the name of the outgoing transition.
</para>
<programlisting>public interface ExclusiveHandler {
String select(OpenExecution execution);
@@ -434,14 +434,14 @@
<programlisting><process name="ExclusiveHandler">
<start>
- <flow to="evaluate document" />
+ <transition to="evaluate document" />
</start>
<exclusive name="evaluate document">
<handler class="org.jbpm.examples.exclusive.handler.ContentEvaluation" />
- <flow name="good" to="submit document" />
- <flow name="bad" to="try again" />
- <flow name="ugly" to="give up" />
+ <transition name="good" to="submit document" />
+ <transition name="bad" to="try again" />
+ <transition name="ugly" to="give up" />
</exclusive>
<state name="submit document" />
@@ -488,37 +488,37 @@
<programlisting><process name="ConcurrencyGraphBased" xmlns="http://jbpm.org/4/jpdl">
<start>
- <flow to="fork"/>
+ <transition to="fork"/>
</start>
<emphasis role="bold"><fork name="fork">
- <flow to="send invoice" />
- <flow to="load truck"/>
- <flow to="print shipping documents" />
+ <transition to="send invoice" />
+ <transition to="load truck"/>
+ <transition to="print shipping documents" />
</fork></emphasis>
<state name="send invoice" >
- <flow to="final join" />
+ <transition to="final join" />
</state>
<state name="load truck" >
- <flow to="shipping join" />
+ <transition to="shipping join" />
</state>
<state name="print shipping documents">
- <flow to="shipping join" />
+ <transition to="shipping join" />
</state>
<emphasis role="bold"><join name="shipping join" >
- <flow to="drive truck to destination" />
+ <transition to="drive truck to destination" />
</join></emphasis>
<state name="drive truck to destination" >
- <flow to="final join" />
+ <transition to="final join" />
</state>
<emphasis role="bold"><join name="final join" >
- <flow to="end"/>
+ <transition to="end"/>
</join></emphasis>
<end name="end" />
@@ -552,7 +552,7 @@
<programlisting><process name="EndProcessInstance" xmlns="http://jbpm.org/4/jpdl">
<start>
- <flow to="end" />
+ <transition to="end" />
</start>
<end name="end" />
@@ -604,13 +604,13 @@
<programlisting><process name="EndMultiple" xmlns="http://;jbpm.org/4/jpdl">
<start>
- <flow to="get return code" />
+ <transition to="get return code" />
<start>
<state name="get return code">
- <flow name="200" to="ok"/>
- <flow name="400" to="bad request"/>
- <flow name="500" to="internal server error"/>
+ <transition name="200" to="ok"/>
+ <transition name="400" to="bad request"/>
+ <transition name="500" to="internal server error"/>
</state>
<end name="ok"/>
@@ -670,13 +670,13 @@
<programlisting><process name="EndState" xmlns="http://jbpm.org/4/jpdl">
<start>
- <flow to="get return code"/>
+ <transition to="get return code"/>
</start>
<state name="get return code">
- <flow name="200" to="ok"/>
- <flow name="400" to="bad request" />
- <flow name="500" to="internal server error"/>
+ <transition name="200" to="ok"/>
+ <transition name="400" to="bad request" />
+ <transition name="500" to="internal server error"/>
</state>
<end name="ok" state="completed"/>
@@ -771,7 +771,7 @@
<programlisting><process name="Java" xmlns="http://jbpm.org/4/jpdl">
<start>
- <flow to="invoke java method" />
+ <transition to="invoke java method" />
</start>
<java name="invoke java method"
@@ -784,7 +784,7 @@
<arg><string value="Hi, how are you?"/></arg>
- <flow to="wait" />
+ <transition to="wait" />
</java>
<state name="wait">
@@ -856,13 +856,13 @@
<programlisting><process name="Task" xmlns="http://jbpm.org/4/jpdl">
<start>
- <flow to="review" />
+ <transition to="review" />
</start>
<emphasis role="bold"><task name="review"
assignee="johndoe"></emphasis>
- <flow to="wait" />
+ <transition to="wait" />
<emphasis role="bold"></task></emphasis>
<state name="wait" />
@@ -940,14 +940,14 @@
<programlisting><process name="ScriptExpression" xmlns="http://jbpm.org/4/jpdl">
<start>
- <flow to="invoke script" />
+ <transition to="invoke script" />
</start>
<emphasis role="bold"><script name="invoke script"
expr="Send packet to #{person.address}"
var="text"></emphasis>
- <flow to="wait" />
+ <transition to="wait" />
<emphasis role="bold"></script></emphasis>
<state name="wait"/>
@@ -1045,7 +1045,7 @@
<programlisting><process name="ScriptText" xmlns="http://jbpm.org/4/jpdl">
<start>
- <flow to="invoke script" />
+ <transition to="invoke script" />
</start>
<emphasis role="bold"><script name="invoke script"
@@ -1053,7 +1053,7 @@
<text>
Send packet to #{person.address}
</text></emphasis>
- <flow to="wait" />
+ <transition to="wait" />
<emphasis role="bold"></script></emphasis>
<state name="wait"/>
@@ -1127,7 +1127,7 @@
<programlisting><process name="Esb" xmlns="http://jbpm.org/4/jpdl">
<start >
- <flow to="invoke esb service" />
+ <transition to="invoke esb service" />
</start>
<emphasis role="bold"><esb name="invoke esb service"
@@ -1139,7 +1139,7 @@
<string value="deliver asap" />
</part></emphasis>
- <flow to="wait" />
+ <transition to="wait" />
<emphasis role="bold"></esb></emphasis>
<state name="wait" />
@@ -1222,7 +1222,7 @@
<programlisting><process name="Hql" xmlns="http://jbpm.org/4/jpdl">
<start>
- <flow to="get process names" />
+ <transition to="get process names" />
</start>
<emphasis role="bold"><hql name="get process names"
@@ -1235,7 +1235,7 @@
<parameters>
<string name="activityName" value="%o%" />
</parameters></emphasis>
- <flow to="count activities" />
+ <transition to="count activities" />
<emphasis role="bold"></hql>
<hql name="count activities"
@@ -1245,7 +1245,7 @@
select count(*)
from org.jbpm.pvm.internal.model.ActivityImpl
</query></emphasis>
- <flow to="wait" />
+ <transition to="wait" />
<emphasis role="bold"></hql></emphasis>
<state name="wait"/>
@@ -1299,9 +1299,9 @@
</thead>
<tbody>
<row>
- <entry><literal>flow</literal></entry>
+ <entry><literal>transition</literal></entry>
<entry>0..*</entry>
- <entry>the outgoing flows</entry>
+ <entry>the outgoing transitions</entry>
</row>
</tbody>
</tgroup>
17 years, 2 months
JBoss JBPM SVN: r3949 - jbpm3/trunk/modules/core/src/main/java/org/jbpm/jpdl/xml.
by do-not-reply@jboss.org
Author: mputz
Date: 2009-02-19 08:55:13 -0500 (Thu, 19 Feb 2009)
New Revision: 3949
Modified:
jbpm3/trunk/modules/core/src/main/java/org/jbpm/jpdl/xml/JpdlXmlReader.java
Log:
JBPM-2051 - Incorrect WARN messages for swimlanes
Modified: jbpm3/trunk/modules/core/src/main/java/org/jbpm/jpdl/xml/JpdlXmlReader.java
===================================================================
--- jbpm3/trunk/modules/core/src/main/java/org/jbpm/jpdl/xml/JpdlXmlReader.java 2009-02-19 13:08:17 UTC (rev 3948)
+++ jbpm3/trunk/modules/core/src/main/java/org/jbpm/jpdl/xml/JpdlXmlReader.java 2009-02-19 13:55:13 UTC (rev 3949)
@@ -240,14 +240,6 @@
swimlane.setAssignmentDelegation(assignmentDelegation);
}
}
- else
- {
- Task startTask = taskMgmtDefinition.getStartTask();
- if ((startTask == null) || (startTask.getSwimlane() != swimlane))
- {
- addWarning("swimlane '" + swimlaneName + "' does not have an assignment");
- }
- }
taskMgmtDefinition.addSwimlane(swimlane);
}
}
@@ -995,7 +987,10 @@
Task startTask = taskMgmtDefinition.getStartTask();
Swimlane startTaskSwimlane = (startTask != null ? startTask.getSwimlane() : null);
- if ((swimlane.getAssignmentDelegation() == null) && (swimlane != startTaskSwimlane))
+ if ((swimlane.getAssignmentDelegation() == null)
+ && (swimlane.getActorIdExpression()==null)
+ && (swimlane.getPooledActorsExpression()==null)
+ && (swimlane != startTaskSwimlane))
{
addWarning("swimlane '" + swimlane.getName() + "' does not have an assignment");
}
17 years, 2 months
JBoss JBPM SVN: r3948 - in jbpm4/trunk/modules: api/src/main/java/org/jbpm/jpdl and 11 other directories.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2009-02-19 08:08:17 -0500 (Thu, 19 Feb 2009)
New Revision: 3948
Added:
jbpm4/trunk/modules/api/src/main/java/org/jbpm/jpdl/
jbpm4/trunk/modules/api/src/main/java/org/jbpm/jpdl/ExclusiveHandler.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/EndActivity.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/EndBinding.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/EndCancelBinding.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/EndErrorBinding.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/EsbActivity.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/EsbBinding.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/ExclusiveBinding.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/ExclusiveBuilder.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/ExclusiveConditionActivity.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/ExclusiveExpressionActivity.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/ExclusiveHandlerActivity.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/ForkActivity.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/ForkBinding.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/HqlActivity.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/HqlBinding.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/JavaActivity.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/JavaBinding.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/JoinActivity.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/JoinBinding.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/JpdlActivity.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/JpdlActivityBinding.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/JpdlExternalActivity.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/ScriptActivity.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/ScriptBinding.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/SqlActivity.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/SqlBinding.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/StartActivity.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/StartBinding.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/StateActivity.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/StateBinding.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/TaskActivity.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/TaskBinding.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/deploy/
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/deploy/ParseJpdlDeployer.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/model/
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/model/JpdlExecution.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/model/JpdlProcessDefinition.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/Activities.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/ActivitiesParser.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/JpdlParser.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/ParseJpdlBinding.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/StartActivities.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/UnresolvedTransition.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/UnresolvedTransitions.java
Removed:
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/el/
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/ExclusiveHandler.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/JpdlException.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/JpdlExecution.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/JpdlProcessDefinition.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/ProcessArchive.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/deploy/
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/impl/
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/xml/
Modified:
jbpm4/trunk/modules/jpdl/src/main/resources/jbpm.jpdl.activities.xml
jbpm4/trunk/modules/jpdl/src/main/resources/jbpm.jpdl.hbm.xml
jbpm4/trunk/modules/jpdl/src/main/resources/jbpm.jpdl.wire.bindings.xml
jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/JpdlTestCase.java
jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/parsing/JpdlParseTestCase.java
jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/test/xml/JpdlXmlTest.java
Log:
JBPM-1997 and JBPM-2011 including internal into the jpdl package names
Copied: jbpm4/trunk/modules/api/src/main/java/org/jbpm/jpdl/ExclusiveHandler.java (from rev 3920, jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/ExclusiveHandler.java)
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/jpdl/ExclusiveHandler.java (rev 0)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/jpdl/ExclusiveHandler.java 2009-02-19 13:08:17 UTC (rev 3948)
@@ -0,0 +1,34 @@
+/*
+ * 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.jbpm.jpdl;
+
+import org.jbpm.model.OpenExecution;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public interface ExclusiveHandler {
+
+ /** the name of the selected outgoing transition */
+ String select(OpenExecution execution);
+}
Property changes on: jbpm4/trunk/modules/api/src/main/java/org/jbpm/jpdl/ExclusiveHandler.java
___________________________________________________________________
Name: svn:mergeinfo
+
Deleted: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/ExclusiveHandler.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/ExclusiveHandler.java 2009-02-19 12:49:19 UTC (rev 3947)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/ExclusiveHandler.java 2009-02-19 13:08:17 UTC (rev 3948)
@@ -1,34 +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.jbpm.jpdl;
-
-import org.jbpm.model.OpenExecution;
-
-
-/**
- * @author Tom Baeyens
- */
-public interface ExclusiveHandler {
-
- /** the name of the selected outgoing transition */
- String select(OpenExecution execution);
-}
Deleted: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/JpdlException.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/JpdlException.java 2009-02-19 12:49:19 UTC (rev 3947)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/JpdlException.java 2009-02-19 13:08:17 UTC (rev 3948)
@@ -1,49 +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.jbpm.jpdl;
-
-import org.jbpm.JbpmException;
-
-/**
- * @author Tom Baeyens
- */
-public class JpdlException extends JbpmException {
-
- private static final long serialVersionUID = 1L;
-
- public JpdlException() {
- super();
- }
-
- public JpdlException(String msg, Throwable cause) {
- super(msg, cause);
- }
-
- public JpdlException(String msg) {
- super(msg);
- }
-
- public JpdlException(Throwable cause) {
- super(cause);
- }
-
-}
Deleted: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/JpdlExecution.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/JpdlExecution.java 2009-02-19 12:49:19 UTC (rev 3947)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/JpdlExecution.java 2009-02-19 13:08:17 UTC (rev 3948)
@@ -1,33 +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.jbpm.jpdl;
-
-import org.jbpm.pvm.internal.model.ExecutionImpl;
-
-/**
- * @author Tom Baeyens
- */
-public class JpdlExecution extends ExecutionImpl {
-
- private static final long serialVersionUID = 1L;
-
-}
Deleted: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/JpdlProcessDefinition.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/JpdlProcessDefinition.java 2009-02-19 12:49:19 UTC (rev 3947)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/JpdlProcessDefinition.java 2009-02-19 13:08:17 UTC (rev 3948)
@@ -1,38 +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.jbpm.jpdl;
-
-import org.jbpm.client.ClientProcessInstance;
-import org.jbpm.pvm.internal.model.ExecutionImpl;
-import org.jbpm.pvm.internal.model.ProcessDefinitionImpl;
-
-/**
- * @author Tom Baeyens
- */
-public class JpdlProcessDefinition extends ProcessDefinitionImpl {
-
- private static final long serialVersionUID = 1L;
-
- protected ExecutionImpl newProcessInstance() {
- return new JpdlExecution();
- }
-}
Deleted: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/ProcessArchive.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/ProcessArchive.java 2009-02-19 12:49:19 UTC (rev 3947)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/ProcessArchive.java 2009-02-19 13:08:17 UTC (rev 3948)
@@ -1,82 +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.jbpm.jpdl;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.Serializable;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipInputStream;
-
-import org.jbpm.pvm.internal.util.IoUtil;
-
-/**
- * reads a zip file into a set of byte arrays so that files can be
- * read multiple times during parsing of a process archive.
- *
- * @author Tom Baeyens
- */
-public class ProcessArchive implements Serializable {
-
- private static final long serialVersionUID = 1L;
-
- Map<String, byte[]> entries = new HashMap<String, byte[]>();
-
- // constructors /////////////////////////////////////////////////////////////
-
- public ProcessArchive(ZipInputStream zipInputStream) {
- try {
- ZipEntry zipEntry = zipInputStream.getNextEntry();
- while(zipEntry!=null) {
- String entryName = zipEntry.getName();
- byte[] bytes = IoUtil.readBytes(zipInputStream);
- if (bytes!=null) {
- entries.put(entryName, bytes);
- }
- zipEntry = zipInputStream.getNextEntry();
- }
- } catch (IOException e) {
- throw new JpdlException("couldn't read process archive", e);
- }
- }
-
- // methods for the process archive parsers //////////////////////////////////
-
- public Map<String, byte[]> getEntries() {
- return entries;
- }
-
- public byte[] getEntry(String entryName) {
- return entries.get(entryName);
- }
-
- public InputStream getEntryInputStream(String entryName) {
- return new ByteArrayInputStream(getEntry(entryName));
- }
-
- public byte[] removeEntry(String entryName) {
- return entries.remove(entryName);
- }
-}
Copied: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/EndActivity.java (from rev 3920, jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/EndActivity.java)
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/EndActivity.java (rev 0)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/EndActivity.java 2009-02-19 13:08:17 UTC (rev 3948)
@@ -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.jbpm.jpdl.internal.activity;
+
+import org.jbpm.activity.ActivityExecution;
+import org.jbpm.model.OpenExecution;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class EndActivity extends JpdlActivity {
+
+ private static final long serialVersionUID = 1L;
+
+ protected boolean endProcessInstance = true;
+ protected String state = null;
+
+ public void execute(ActivityExecution execution) {
+ OpenExecution executionToEnd = null;
+ if (endProcessInstance) {
+ executionToEnd = execution.getProcessInstance();
+ } else {
+ executionToEnd = execution;
+ }
+
+ if (state==null) {
+ execution.end(executionToEnd);
+ } else {
+ execution.end(executionToEnd, state);
+ }
+ }
+
+ public void setEndProcessInstance(boolean endProcessInstance) {
+ this.endProcessInstance = endProcessInstance;
+ }
+ public void setState(String state) {
+ this.state = state;
+ }
+}
Property changes on: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/EndActivity.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Copied: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/EndBinding.java (from rev 3920, jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/EndBinding.java)
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/EndBinding.java (rev 0)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/EndBinding.java 2009-02-19 13:08:17 UTC (rev 3948)
@@ -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.jbpm.jpdl.internal.activity;
+
+import org.jbpm.pvm.internal.util.XmlUtil;
+import org.jbpm.pvm.internal.xml.Parse;
+import org.jbpm.pvm.internal.xml.Parser;
+import org.w3c.dom.Element;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class EndBinding extends JpdlActivityBinding {
+
+ public EndBinding() {
+ super("end");
+ }
+
+ protected EndBinding(String tag) {
+ super(tag);
+ }
+
+ public Object parse(Element element, Parse parse, Parser parser) {
+
+ boolean endProcessInstance = true;
+ String ends = XmlUtil.attribute(element, "ends", false, parse);
+ if ("execution".equalsIgnoreCase(ends)) {
+ endProcessInstance = false;
+ }
+
+ String state = XmlUtil.attribute(element, "state", false, parse);
+
+ EndActivity endActivity = new EndActivity();
+ endActivity.setEndProcessInstance(endProcessInstance);
+ endActivity.setState(state);
+
+ return endActivity;
+ }
+}
Property changes on: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/EndBinding.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/EndCancelBinding.java (from rev 3920, jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/EndCancelBinding.java)
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/EndCancelBinding.java (rev 0)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/EndCancelBinding.java 2009-02-19 13:08:17 UTC (rev 3948)
@@ -0,0 +1,43 @@
+/*
+ * 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.jbpm.jpdl.internal.activity;
+
+import org.jbpm.pvm.internal.xml.Parse;
+import org.jbpm.pvm.internal.xml.Parser;
+import org.w3c.dom.Element;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class EndCancelBinding extends EndBinding {
+
+ public EndCancelBinding() {
+ super("end-cancel");
+ }
+
+ public Object parse(Element element, Parse parse, Parser parser) {
+ EndActivity endActivity = (EndActivity) super.parse(element, parse, parser);
+ endActivity.setState("cancel");
+ return endActivity;
+ }
+}
Property changes on: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/EndCancelBinding.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Copied: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/EndErrorBinding.java (from rev 3920, jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/EndErrorBinding.java)
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/EndErrorBinding.java (rev 0)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/EndErrorBinding.java 2009-02-19 13:08:17 UTC (rev 3948)
@@ -0,0 +1,43 @@
+/*
+ * 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.jbpm.jpdl.internal.activity;
+
+import org.jbpm.pvm.internal.xml.Parse;
+import org.jbpm.pvm.internal.xml.Parser;
+import org.w3c.dom.Element;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class EndErrorBinding extends EndBinding {
+
+ public EndErrorBinding() {
+ super("end-error");
+ }
+
+ public Object parse(Element element, Parse parse, Parser parser) {
+ EndActivity endActivity = (EndActivity) super.parse(element, parse, parser);
+ endActivity.setState("error");
+ return endActivity;
+ }
+}
Property changes on: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/EndErrorBinding.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Copied: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/EsbActivity.java (from rev 3920, jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/EsbActivity.java)
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/EsbActivity.java (rev 0)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/EsbActivity.java 2009-02-19 13:08:17 UTC (rev 3948)
@@ -0,0 +1,81 @@
+/*
+ * 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.jbpm.jpdl.internal.activity;
+
+import org.jboss.soa.esb.client.ServiceInvoker;
+import org.jboss.soa.esb.message.Body;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.format.MessageFactory;
+import org.jbpm.activity.ActivityExecution;
+import org.jbpm.internal.log.Log;
+import org.jbpm.pvm.internal.model.ExpressionEvaluator;
+import org.jbpm.pvm.internal.wire.Descriptor;
+import org.jbpm.pvm.internal.wire.WireContext;
+import org.jbpm.pvm.internal.wire.descriptor.ListDescriptor;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class EsbActivity extends JpdlActivity {
+
+ private static final long serialVersionUID = 1L;
+
+ private static Log log = Log.getLog(EsbActivity.class.getName());
+
+ protected String category = null;
+ protected String service = null;
+ protected ListDescriptor partsListDescriptor = null;
+
+ public void execute(ActivityExecution execution) throws Exception {
+ Message message = MessageFactory.getInstance().getMessage();
+ Body body = message.getBody();
+
+ if (partsListDescriptor!=null) {
+ WireContext wireContext = new WireContext();
+ for (Descriptor descriptor: partsListDescriptor.getValueDescriptors()) {
+ String name = descriptor.getName();
+
+ Object object = wireContext.create(descriptor, true);
+ if (object instanceof ExpressionEvaluator) {
+ ExpressionEvaluator expressionEvaluator = (ExpressionEvaluator) object;
+ object = expressionEvaluator.evaluateExpression(execution);
+ }
+ body.add(name, object);
+ }
+ }
+
+ ServiceInvoker invoker = new ServiceInvoker(category, service);
+ log.debug("sending "+message.getBody()+" to service "+service+" in category "+category+" over the esb");
+ invoker.deliverAsync(message);
+ }
+
+ public void setCategory(String category) {
+ this.category = category;
+ }
+ public void setService(String service) {
+ this.service = service;
+ }
+ public void setPartsListDescriptor(ListDescriptor partsListDescriptor) {
+ this.partsListDescriptor = partsListDescriptor;
+ }
+}
Property changes on: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/EsbActivity.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Copied: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/EsbBinding.java (from rev 3920, jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/EsbBinding.java)
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/EsbBinding.java (rev 0)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/EsbBinding.java 2009-02-19 13:08:17 UTC (rev 3948)
@@ -0,0 +1,95 @@
+/*
+ * 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.jbpm.jpdl.internal.activity;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jbpm.pvm.internal.util.XmlUtil;
+import org.jbpm.pvm.internal.wire.Descriptor;
+import org.jbpm.pvm.internal.wire.descriptor.AbstractDescriptor;
+import org.jbpm.pvm.internal.wire.descriptor.ExpressionDescriptor;
+import org.jbpm.pvm.internal.wire.descriptor.ListDescriptor;
+import org.jbpm.pvm.internal.wire.xml.WireParser;
+import org.jbpm.pvm.internal.xml.Parse;
+import org.jbpm.pvm.internal.xml.Parser;
+import org.w3c.dom.Element;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class EsbBinding extends JpdlActivityBinding {
+
+ public static final String TAG = "esb";
+ private static final WireParser wireParser = WireParser.getInstance();
+
+ public EsbBinding() {
+ super(TAG);
+ }
+
+ public Object parse(Element element, Parse parse, Parser parser) {
+ EsbActivity esbActivity = new EsbActivity();
+
+ String category = XmlUtil.attribute(element, "category", true, parse);
+ esbActivity.setCategory(category);
+
+ String service = XmlUtil.attribute(element, "service", true, parse);
+ esbActivity.setService(service);
+
+ List<Descriptor> partDescriptors = new ArrayList<Descriptor>();
+ List<Element> partElements = XmlUtil.elements(element, "part");
+ for (Element partElement: partElements) {
+ String name = XmlUtil.attribute(partElement, "name", true, parse);
+ AbstractDescriptor partDescriptor = getPartDescriptor(partElement, parse);
+ partDescriptor.setName(name);
+ partDescriptors.add(partDescriptor);
+ }
+ ListDescriptor partsListDescriptor = new ListDescriptor();
+ if (!partDescriptors.isEmpty()) {
+ partsListDescriptor.setValueDescriptors(partDescriptors);
+ }
+ esbActivity.setPartsListDescriptor(partsListDescriptor);
+
+ return esbActivity;
+ }
+
+ public AbstractDescriptor getPartDescriptor(Element partElement, Parse parse) {
+ String expression = XmlUtil.attribute(partElement, "expr");
+ Element descriptorElement = XmlUtil.element(partElement);
+
+ if ( ( (expression==null) && (descriptorElement==null) )
+ ||
+ ( (expression!=null) && (descriptorElement!=null) )
+ ) {
+ parse.addProblem("in <"+TAG+"...> an expr or exactly one child element is expected");
+ }
+
+ if (expression!=null) {
+ return new ExpressionDescriptor(expression, null);
+ }
+
+ AbstractDescriptor descriptor = (AbstractDescriptor) wireParser.parseElement(descriptorElement, parse, WireParser.CATEGORY_DESCRIPTOR);
+ return descriptor;
+ }
+
+}
Property changes on: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/EsbBinding.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Copied: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/ExclusiveBinding.java (from rev 3920, jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/ExclusiveBinding.java)
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/ExclusiveBinding.java (rev 0)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/ExclusiveBinding.java 2009-02-19 13:08:17 UTC (rev 3948)
@@ -0,0 +1,115 @@
+/*
+ * 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.jbpm.jpdl.internal.activity;
+
+import java.util.List;
+
+import org.jbpm.pvm.internal.model.ExpressionEvaluator;
+import org.jbpm.pvm.internal.model.ActivityImpl;
+import org.jbpm.pvm.internal.model.TransitionImpl;
+import org.jbpm.pvm.internal.util.XmlUtil;
+import org.jbpm.pvm.internal.wire.binding.ObjectBinding;
+import org.jbpm.pvm.internal.wire.descriptor.ExpressionDescriptor;
+import org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor;
+import org.jbpm.pvm.internal.wire.descriptor.ReferenceDescriptor;
+import org.jbpm.pvm.internal.wire.xml.WireParser;
+import org.jbpm.pvm.internal.xml.Parse;
+import org.jbpm.pvm.internal.xml.Parser;
+import org.w3c.dom.Element;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class ExclusiveBinding extends JpdlActivityBinding {
+
+ static ObjectBinding objectBinding = new ObjectBinding();
+ static WireParser wireParser = WireParser.getInstance();
+
+ public ExclusiveBinding() {
+ super("exclusive");
+ }
+
+ public Object parse(Element element, Parse parse, Parser parser) {
+ if (element.hasAttribute("expr")) {
+ ExclusiveExpressionActivity exclusiveExpressionActivity = new ExclusiveExpressionActivity();
+ String expr = element.getAttribute("expr");
+ exclusiveExpressionActivity.setExpr(expr);
+ return exclusiveExpressionActivity;
+ }
+
+ if (element.hasAttribute("handler-ref")) {
+ String exclusiveHandlerName = element.getAttribute("handler-ref");
+ ExclusiveHandlerActivity exclusiveHandlerActivity = new ExclusiveHandlerActivity();
+ exclusiveHandlerActivity.setExclusiveHandlerName(exclusiveHandlerName);
+ return exclusiveHandlerActivity;
+ }
+
+ Element handlerElement = XmlUtil.element(element, "handler");
+ if (handlerElement!=null) {
+ ExclusiveHandlerActivity exclusiveHandlerActivity = new ExclusiveHandlerActivity();
+ ObjectDescriptor exclusiveHandlerDescriptor = (ObjectDescriptor)
+ objectBinding.parse(handlerElement, parse, wireParser);
+ exclusiveHandlerActivity.setExclusiveHandlerDescriptor(exclusiveHandlerDescriptor);
+ return exclusiveHandlerActivity;
+ }
+
+ boolean hasConditions = false;
+ List<Element> transitionElements = XmlUtil.elements(element, "flow");
+ ActivityImpl activity = parse.findObject(ActivityImpl.class);
+ List<TransitionImpl> transitions = (List) activity.getOutgoingTransitions();
+
+ for (int i=0; i<transitionElements.size(); i++) {
+ TransitionImpl transition = transitions.get(i);
+ Element transitionElement = transitionElements.get(i);
+
+ Element conditionElement = XmlUtil.element(transitionElement, "condition");
+ if (conditionElement!=null) {
+ hasConditions = true;
+
+ if (conditionElement.hasAttribute("expr")) {
+ String expr = conditionElement.getAttribute("expr");
+ String lang = XmlUtil.attribute(conditionElement, "expr-lang");
+ ExpressionDescriptor expressionDescriptor = new ExpressionDescriptor(expr, lang);
+ transition.setConditionDescriptor(expressionDescriptor);
+
+ } else if (conditionElement.hasAttribute("ref")) {
+ String expr = conditionElement.getAttribute("ref");
+ ReferenceDescriptor refDescriptor = new ReferenceDescriptor(expr);
+ transition.setConditionDescriptor(refDescriptor);
+
+ } else if (ObjectBinding.isObjectDescriptor(conditionElement)) {
+ ObjectDescriptor conditionDescriptor = (ObjectDescriptor) objectBinding.parse(conditionElement, parse, parser);
+ transition.setConditionDescriptor(conditionDescriptor);
+ }
+ }
+ }
+
+ if (hasConditions) {
+ return new ExclusiveConditionActivity();
+ } else {
+ parse.addProblem("exclusive '"+element.getAttribute("name")+"' must have one of: expr attribute, handler attribute, handler element or condition expressions");
+ }
+
+ return null;
+ }
+}
Property changes on: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/ExclusiveBinding.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/ExclusiveBuilder.java (from rev 3920, jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/ExclusiveBuilder.java)
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/ExclusiveBuilder.java (rev 0)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/ExclusiveBuilder.java 2009-02-19 13:08:17 UTC (rev 3948)
@@ -0,0 +1,43 @@
+/*
+ * 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.jbpm.jpdl.internal.activity;
+
+import org.jbpm.pvm.internal.builder.ActivityBehaviourBuilder;
+import org.jbpm.pvm.internal.builder.ActivityBuilder;
+import org.jbpm.pvm.internal.builder.CompositeBuilder;
+import org.jbpm.pvm.internal.wire.Descriptor;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class ExclusiveBuilder extends ActivityBehaviourBuilder {
+
+ public ExclusiveBuilder(ActivityBuilder activityBuilder) {
+ super(activityBuilder);
+ }
+
+ public ExclusiveBuilder handler(Descriptor descriptor) {
+ // TODO finish this
+ return null;
+ }
+}
Property changes on: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/ExclusiveBuilder.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/ExclusiveConditionActivity.java (from rev 3920, jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/ExclusiveConditionActivity.java)
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/ExclusiveConditionActivity.java (rev 0)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/ExclusiveConditionActivity.java 2009-02-19 13:08:17 UTC (rev 3948)
@@ -0,0 +1,64 @@
+/*
+ * 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.jbpm.jpdl.internal.activity;
+
+import java.util.List;
+
+import org.jbpm.JbpmException;
+import org.jbpm.activity.ActivityExecution;
+import org.jbpm.model.Activity;
+import org.jbpm.model.Condition;
+import org.jbpm.model.Transition;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class ExclusiveConditionActivity extends JpdlActivity {
+
+ private static final long serialVersionUID = 1L;
+
+ public void execute(ActivityExecution execution) {
+ Transition transition = findTransition(execution);
+ if (transition==null) {
+ throw new JbpmException("no outgoing transition condition evaluated to true for exclusive "+execution.getActivity());
+ }
+ if (transition.getName()!=null) {
+ execution.historyExclusive(transition.getName());
+ }
+ execution.take(transition);
+ }
+
+ private Transition findTransition(ActivityExecution execution) {
+ Activity activity = execution.getActivity();
+ List<Transition> outgoingTransitions = activity.getOutgoingTransitions();
+ for (Transition transition : outgoingTransitions) {
+ Condition condition = transition.getCondition();
+ if ( (condition==null)
+ || (condition.evaluate(execution))
+ ) {
+ return transition;
+ }
+ }
+ return null;
+ }
+}
Copied: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/ExclusiveExpressionActivity.java (from rev 3920, jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/ExclusiveExpressionActivity.java)
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/ExclusiveExpressionActivity.java (rev 0)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/ExclusiveExpressionActivity.java 2009-02-19 13:08:17 UTC (rev 3948)
@@ -0,0 +1,70 @@
+/*
+ * 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.jbpm.jpdl.internal.activity;
+
+import org.jbpm.JbpmException;
+import org.jbpm.activity.ActivityExecution;
+import org.jbpm.env.EnvironmentHelper;
+import org.jbpm.model.Activity;
+import org.jbpm.model.Transition;
+import org.jbpm.pvm.internal.script.ScriptManager;
+
+/**
+ * @author Tom Baeyens
+ */
+public class ExclusiveExpressionActivity extends JpdlActivity {
+
+ private static final long serialVersionUID = 1L;
+
+ protected String expr;
+ protected String lang;
+
+ public void execute(ActivityExecution execution) throws Exception {
+ Activity activity = execution.getActivity();
+ String transitionName = null;
+
+ ScriptManager scriptManager = EnvironmentHelper.get(ScriptManager.class);
+ Object result = scriptManager.evaluateExpression(expr, execution, lang);
+ if ( (result!=null)
+ && (! (result instanceof String))
+ ) {
+ throw new JbpmException("expression '"+expr+"' in exclusive '"+activity.getName()+"' returned "+result.getClass().getName()+" instead of a transitionName (String): "+result);
+ }
+ transitionName = (String) result;
+
+ Transition transition = activity.getOutgoingTransition(transitionName);
+ if (transition==null) {
+ throw new JbpmException("expression '"+expr+"' in exclusive '"+activity.getName()+"' returned unexisting outgoing transition name: "+transitionName);
+ }
+
+ execution.historyExclusive(transitionName);
+
+ execution.take(transition);
+ }
+
+ public void setExpr(String expr) {
+ this.expr = expr;
+ }
+ public void setLang(String lang) {
+ this.lang = lang;
+ }
+}
Copied: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/ExclusiveHandlerActivity.java (from rev 3920, jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/ExclusiveHandlerActivity.java)
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/ExclusiveHandlerActivity.java (rev 0)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/ExclusiveHandlerActivity.java 2009-02-19 13:08:17 UTC (rev 3948)
@@ -0,0 +1,80 @@
+/*
+ * 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.jbpm.jpdl.internal.activity;
+
+import org.jbpm.JbpmException;
+import org.jbpm.activity.ActivityExecution;
+import org.jbpm.env.Environment;
+import org.jbpm.jpdl.ExclusiveHandler;
+import org.jbpm.model.Activity;
+import org.jbpm.model.Transition;
+import org.jbpm.pvm.internal.wire.Descriptor;
+import org.jbpm.pvm.internal.wire.WireContext;
+
+/**
+ * @author Tom Baeyens
+ */
+public class ExclusiveHandlerActivity extends JpdlActivity {
+
+ private static final long serialVersionUID = 1L;
+
+ protected String exclusiveHandlerName;
+ protected Descriptor exclusiveHandlerDescriptor;
+
+ public void execute(ActivityExecution execution) throws Exception {
+ Activity activity = execution.getActivity();
+ String transitionName = null;
+
+ Object object = null;
+ if (exclusiveHandlerDescriptor!=null) {
+ object = WireContext.create(exclusiveHandlerDescriptor);
+ } else if (exclusiveHandlerName!=null) {
+ Environment environment = Environment.getCurrent();
+ object = environment.get(exclusiveHandlerName);
+ }
+
+ if (object==null) {
+ throw new JbpmException("exclusive handler for "+activity+" is null");
+ }
+ if (! (object instanceof ExclusiveHandler)) {
+ throw new JbpmException("handler for exclusive is not a "+ExclusiveHandler.class.getName()+": "+object.getClass().getName());
+ }
+ ExclusiveHandler exclusiveHandler = (ExclusiveHandler) object;
+ transitionName = exclusiveHandler.select(execution);
+
+ Transition transition = activity.getOutgoingTransition(transitionName);
+ if (transition==null) {
+ throw new JbpmException("handler in exclusive '"+activity.getName()+"' returned unexisting outgoing transition name: "+transitionName);
+ }
+
+ execution.historyExclusive(transitionName);
+
+ execution.take(transition);
+ }
+
+ public void setExclusiveHandlerName(String exclusiveHandlerName) {
+ this.exclusiveHandlerName = exclusiveHandlerName;
+ }
+ public void setExclusiveHandlerDescriptor(Descriptor exclusiveHandlerDescriptor) {
+ this.exclusiveHandlerDescriptor = exclusiveHandlerDescriptor;
+ }
+}
Copied: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/ForkActivity.java (from rev 3920, jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/ForkActivity.java)
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/ForkActivity.java (rev 0)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/ForkActivity.java 2009-02-19 13:08:17 UTC (rev 3948)
@@ -0,0 +1,60 @@
+/*
+ * 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.jbpm.jpdl.internal.activity;
+
+import java.util.List;
+
+import org.jbpm.Execution;
+import org.jbpm.activity.ActivityExecution;
+import org.jbpm.model.Activity;
+import org.jbpm.model.OpenExecution;
+import org.jbpm.model.Transition;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class ForkActivity extends JpdlActivity {
+
+ private static final long serialVersionUID = 1L;
+
+ public void execute(ActivityExecution execution) throws Exception {
+ OpenExecution processInstance = execution.getProcessInstance();
+
+ Activity activity = execution.getActivity();
+ List<Transition> outgoingTransitions = activity.getOutgoingTransitions();
+
+ // for each outgoing transition
+ for (Transition outgoingTransition: outgoingTransitions) {
+ // launch a concurrent path of execution
+ String childExecutionName = outgoingTransition.getName();
+ // creating the execution will cause the execution to become inactive
+ Execution childExecution = execution.createExecution(childExecutionName, processInstance);
+ execution.take(outgoingTransition, childExecution);
+ }
+
+ // if this was the first fork
+ if (execution.isProcessInstance()) {
+ execution.setActivity(null);
+ }
+ }
+}
Property changes on: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/ForkActivity.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Copied: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/ForkBinding.java (from rev 3920, jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/ForkBinding.java)
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/ForkBinding.java (rev 0)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/ForkBinding.java 2009-02-19 13:08:17 UTC (rev 3948)
@@ -0,0 +1,42 @@
+/*
+ * 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.jbpm.jpdl.internal.activity;
+
+import org.jbpm.pvm.internal.xml.Parse;
+import org.jbpm.pvm.internal.xml.Parser;
+import org.w3c.dom.Element;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class ForkBinding extends JpdlActivityBinding {
+
+ public ForkBinding() {
+ super("fork");
+ }
+
+ public Object parse(Element element, Parse parse, Parser parser) {
+ return new ForkActivity();
+ }
+
+}
Property changes on: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/ForkBinding.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/HqlActivity.java (from rev 3920, jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/HqlActivity.java)
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/HqlActivity.java (rev 0)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/HqlActivity.java 2009-02-19 13:08:17 UTC (rev 3948)
@@ -0,0 +1,104 @@
+/*
+ * 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.jbpm.jpdl.internal.activity;
+
+import org.hibernate.Query;
+import org.hibernate.Session;
+import org.jbpm.JbpmException;
+import org.jbpm.activity.ActivityExecution;
+import org.jbpm.env.Environment;
+import org.jbpm.internal.log.Log;
+import org.jbpm.pvm.internal.wire.Descriptor;
+import org.jbpm.pvm.internal.wire.WireContext;
+import org.jbpm.pvm.internal.wire.descriptor.ListDescriptor;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class HqlActivity extends JpdlActivity {
+
+ private static final Log log = Log.getLog(HqlActivity.class.getName());
+
+ private static final long serialVersionUID = 1L;
+
+ protected String query;
+ protected ListDescriptor parametersDescriptor;
+ protected String resultVariableName;
+ protected boolean isResultUnique;
+
+ public void execute(ActivityExecution execution) {
+ Environment environment = Environment.getCurrent();
+ if (environment==null) {
+ throw new JbpmException("no environment for jpdl activity "+HqlBinding.TAG);
+ }
+ Session session = environment.get(Session.class);
+
+ Query q = createQuery(session);
+
+ if (parametersDescriptor!=null) {
+ for (Descriptor valueDescriptor: parametersDescriptor.getValueDescriptors()) {
+ String parameterName = valueDescriptor.getName();
+ Object value = WireContext.create(valueDescriptor);
+ applyParameter(q, parameterName, value);
+ }
+ }
+
+ Object result = null;
+ if (isResultUnique) {
+ result = q.uniqueResult();
+ } else {
+ result = q.list();
+ }
+
+ execution.setVariable(resultVariableName, result);
+
+ execution.historyAutomatic();
+ }
+
+ protected Query createQuery(Session session) {
+ return session.createQuery(query);
+ }
+
+ public void applyParameter(Query q, String parameterName, Object value) {
+ if (value instanceof String) {
+ q.setString(parameterName, (String) value);
+ } else if (value instanceof Long) {
+ q.setLong(parameterName, (Long) value);
+ } else {
+ log.error("unknown hql parameter type: "+value.getClass().getName());
+ }
+ }
+
+ public void setQuery(String query) {
+ this.query = query;
+ }
+ public void setParametersDescriptor(ListDescriptor parametersDescriptor) {
+ this.parametersDescriptor = parametersDescriptor;
+ }
+ public void setResultUnique(boolean isResultUnique) {
+ this.isResultUnique = isResultUnique;
+ }
+ public void setResultVariableName(String resultVariableName) {
+ this.resultVariableName = resultVariableName;
+ }
+}
Property changes on: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/HqlActivity.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/HqlBinding.java (from rev 3920, jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/HqlBinding.java)
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/HqlBinding.java (rev 0)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/HqlBinding.java 2009-02-19 13:08:17 UTC (rev 3948)
@@ -0,0 +1,88 @@
+/*
+ * 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.jbpm.jpdl.internal.activity;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jbpm.pvm.internal.util.XmlUtil;
+import org.jbpm.pvm.internal.wire.Descriptor;
+import org.jbpm.pvm.internal.wire.descriptor.ListDescriptor;
+import org.jbpm.pvm.internal.wire.xml.WireParser;
+import org.jbpm.pvm.internal.xml.Parse;
+import org.jbpm.pvm.internal.xml.Parser;
+import org.w3c.dom.Element;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class HqlBinding extends JpdlActivityBinding {
+
+ public static final String TAG = "hql";
+
+ public HqlBinding() {
+ super(TAG);
+ }
+
+ protected HqlBinding(String tagName) {
+ super(tagName);
+ }
+
+ public Object parse(Element element, Parse parse, Parser parser) {
+ HqlActivity hqlActivity = createHqlActivity();
+
+ Element queryElement = XmlUtil.element(element, "query", true, parse);
+ if (queryElement!=null) {
+ String query = XmlUtil.getContentText(queryElement);
+ hqlActivity.setQuery(query);
+ }
+
+ if (XmlUtil.attributeBoolean(element, "unique", false, parse, Boolean.FALSE)) {
+ hqlActivity.setResultUnique(true);
+ }
+
+ String variableName = XmlUtil.attribute(element, "var", true, parse);
+ hqlActivity.setResultVariableName(variableName);
+
+ Element parametersElement = XmlUtil.element(element, "parameters");
+ List<Element> paramElements = XmlUtil.elements(parametersElement);
+ if (!paramElements.isEmpty()) {
+ List<Descriptor> parametersDescriptor = new ArrayList<Descriptor>();
+ for (Element paramElement: paramElements) {
+ WireParser wireParser = WireParser.getInstance();
+ Descriptor paramDescriptor = (Descriptor) wireParser.parseElement(paramElement, parse, WireParser.CATEGORY_DESCRIPTOR);
+ parametersDescriptor.add(paramDescriptor);
+ }
+
+ ListDescriptor parametersListDescriptor = new ListDescriptor();
+ parametersListDescriptor.setValueDescriptors(parametersDescriptor);
+ hqlActivity.setParametersDescriptor(parametersListDescriptor);
+ }
+
+ return hqlActivity;
+ }
+
+ protected HqlActivity createHqlActivity() {
+ return new HqlActivity();
+ }
+}
Property changes on: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/HqlBinding.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/JavaActivity.java (from rev 3920, jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/JavaActivity.java)
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/JavaActivity.java (rev 0)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/JavaActivity.java 2009-02-19 13:08:17 UTC (rev 3948)
@@ -0,0 +1,94 @@
+/*
+ * 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.jbpm.jpdl.internal.activity;
+
+import java.lang.reflect.Method;
+import java.util.List;
+
+import org.jbpm.activity.ActivityExecution;
+import org.jbpm.pvm.internal.util.ReflectUtil;
+import org.jbpm.pvm.internal.wire.Descriptor;
+import org.jbpm.pvm.internal.wire.WireContext;
+import org.jbpm.pvm.internal.wire.WireException;
+import org.jbpm.pvm.internal.wire.descriptor.ArgDescriptor;
+import org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor;
+import org.jbpm.pvm.internal.wire.operation.InvokeOperation;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class JavaActivity extends JpdlActivity {
+
+ private static final long serialVersionUID = 1L;
+
+ protected Descriptor descriptor;
+ protected String methodName;
+ protected String variableName;
+ protected InvokeOperation invokeOperation;
+
+ public void execute(ActivityExecution execution) throws Exception {
+ WireContext wireContext = new WireContext();
+ Object target = wireContext.create(descriptor, false);
+
+ try {
+ List<ArgDescriptor> argDescriptors = null;
+ Object[] args = null;
+ if (invokeOperation!=null) {
+ argDescriptors = invokeOperation.getArgDescriptors();
+ args = ObjectDescriptor.getArgs(wireContext, argDescriptors);
+ }
+
+ Class<?> clazz = target.getClass();
+ Method method = ReflectUtil.findMethod(clazz, methodName, argDescriptors, args);
+ if (method==null) {
+ throw new WireException("method "+ReflectUtil.getSignature(methodName, argDescriptors, args)+" unavailable");
+ }
+
+ Object returnValue = ReflectUtil.invoke(method, target, args);
+
+ if (variableName!=null) {
+ execution.setVariable(variableName, returnValue);
+ }
+
+ execution.historyAutomatic();
+
+ } catch (WireException e) {
+ throw e;
+ } catch (Exception e) {
+ throw new WireException("couldn't invoke method "+methodName+": "+e.getMessage(), e);
+ }
+ }
+
+ public void setDescriptor(Descriptor descriptor) {
+ this.descriptor = descriptor;
+ }
+ public void setMethodName(String methodName) {
+ this.methodName = methodName;
+ }
+ public void setVariableName(String variableName) {
+ this.variableName = variableName;
+ }
+ public void setInvokeOperation(InvokeOperation invokeOperation) {
+ this.invokeOperation = invokeOperation;
+ }
+}
Property changes on: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/JavaActivity.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Copied: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/JavaBinding.java (from rev 3920, jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/JavaBinding.java)
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/JavaBinding.java (rev 0)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/JavaBinding.java 2009-02-19 13:08:17 UTC (rev 3948)
@@ -0,0 +1,102 @@
+/*
+ * 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.jbpm.jpdl.internal.activity;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+
+import org.jbpm.pvm.internal.util.XmlUtil;
+import org.jbpm.pvm.internal.wire.descriptor.ArgDescriptor;
+import org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor;
+import org.jbpm.pvm.internal.wire.operation.InvokeOperation;
+import org.jbpm.pvm.internal.wire.operation.Operation;
+import org.jbpm.pvm.internal.wire.xml.WireParser;
+import org.jbpm.pvm.internal.xml.Parse;
+import org.jbpm.pvm.internal.xml.Parser;
+import org.w3c.dom.Element;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class JavaBinding extends JpdlActivityBinding {
+
+ public static final String TAG = "java";
+
+ private static final WireParser wireParser = WireParser.getInstance();
+
+ public JavaBinding() {
+ super(TAG);
+ }
+
+ public Object parse(Element element, Parse parse, Parser parser) {
+ JavaActivity javaActivity = new JavaActivity();
+
+ String methodName = XmlUtil.attribute(element, "method", true, parse, null);
+ javaActivity.setMethodName(methodName);
+
+ String variableName = XmlUtil.attribute(element, "var");
+ javaActivity.setVariableName(variableName);
+
+ List<Element> argElements = XmlUtil.elements(element, "arg");
+ if (!argElements.isEmpty()) {
+ List<ArgDescriptor> argDescriptors = wireParser.parseArgs(argElements, parse);
+ InvokeOperation invokeOperation = new InvokeOperation();
+ invokeOperation.setArgDescriptors(argDescriptors);
+ javaActivity.setInvokeOperation(invokeOperation);
+ }
+
+ String className = XmlUtil.attribute(element, "class");
+ if (className!=null) {
+ ObjectDescriptor objectDescriptor = new ObjectDescriptor();
+
+ objectDescriptor.setClassName(className);
+
+ // read the operations elements
+ List<Operation> operations = null;
+ List<Element> elements = XmlUtil.elements(element);
+
+ Set<String> operationTagNames = wireParser.getBindings().getTagNames(WireParser.CATEGORY_OPERATION);
+ for (Element childElement: elements) {
+ if (operationTagNames.contains(childElement.getTagName())) {
+ Operation operation = (Operation) wireParser.parseElement(childElement, parse, WireParser.CATEGORY_OPERATION);
+ if (operations==null) {
+ operations = new ArrayList<Operation>();
+ }
+ operations.add(operation);
+ }
+ }
+ objectDescriptor.setOperations(operations);
+
+ // autowiring
+ Boolean isAutoWireEnabled = XmlUtil.attributeBoolean(element, "auto-wire", false, parse);
+ if (isAutoWireEnabled!=null) {
+ objectDescriptor.setAutoWireEnabled(isAutoWireEnabled.booleanValue());
+ }
+
+ javaActivity.setDescriptor(objectDescriptor);
+ }
+
+ return javaActivity;
+ }
+}
Property changes on: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/JavaBinding.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Copied: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/JoinActivity.java (from rev 3920, jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/JoinActivity.java)
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/JoinActivity.java (rev 0)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/JoinActivity.java 2009-02-19 13:08:17 UTC (rev 3948)
@@ -0,0 +1,101 @@
+/*
+ * 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.jbpm.jpdl.internal.activity;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.jbpm.Execution;
+import org.jbpm.activity.ActivityExecution;
+import org.jbpm.model.Activity;
+import org.jbpm.model.OpenExecution;
+import org.jbpm.model.Transition;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class JoinActivity extends JpdlActivity {
+
+ private static final long serialVersionUID = 1L;
+
+ public void execute(ActivityExecution execution) throws Exception {
+ // end the child execution execution
+ // this will also remove the execution from it's parent
+ execution.setState(Execution.STATE_INACTIVE);
+ execution.waitForSignal();
+
+ Activity join = execution.getActivity();
+ List<OpenExecution> joinedExecutions = findJoinedExecutions(execution, join);
+
+ if (isComplete(joinedExecutions, join)) {
+ endJoinedExecutions(joinedExecutions, execution);
+
+ OpenExecution processInstance = execution.getProcessInstance();
+
+ Execution outgoingExecution = null;
+ if ( processInstance.getExecutions()==null
+ || processInstance.getExecutions().isEmpty()
+ ) {
+ outgoingExecution = processInstance;
+ } else {
+ outgoingExecution = execution.createExecution(processInstance);
+ }
+
+ execution.setActivity(join, outgoingExecution);
+ Transition transition = join.getDefaultTransition();
+ execution.take(transition, outgoingExecution);
+ }
+ }
+
+ List<OpenExecution> findJoinedExecutions(OpenExecution execution, Activity join) {
+ List<OpenExecution> joinedExecutions = new ArrayList<OpenExecution>();
+ scanRecursive(execution.getProcessInstance(), join, joinedExecutions);
+ return joinedExecutions;
+ }
+
+ void scanRecursive(OpenExecution execution, Activity join, List<OpenExecution> joinedExecutions) {
+ // if the execution is positioned in the join
+ if (join.equals(execution.getActivity())) {
+ joinedExecutions.add(execution);
+ }
+ Collection<OpenExecution> childExecutions = execution.getExecutions();
+ if (childExecutions!=null) {
+ for (OpenExecution childExecution: childExecutions) {
+ scanRecursive(childExecution, join, joinedExecutions);
+ }
+ }
+ }
+
+ boolean isComplete(List<OpenExecution> joinedExecutions, Activity join) {
+ int executionsToJoin = join.getIncomingTransitions().size();
+ return (executionsToJoin==joinedExecutions.size());
+ }
+
+ void endJoinedExecutions(List<OpenExecution> joinedExecutions, ActivityExecution execution) {
+ for (OpenExecution joinedExecution: joinedExecutions) {
+ execution.end(joinedExecution);
+ }
+ }
+
+}
Property changes on: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/JoinActivity.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Copied: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/JoinBinding.java (from rev 3920, jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/JoinBinding.java)
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/JoinBinding.java (rev 0)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/JoinBinding.java 2009-02-19 13:08:17 UTC (rev 3948)
@@ -0,0 +1,42 @@
+/*
+ * 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.jbpm.jpdl.internal.activity;
+
+import org.jbpm.pvm.internal.xml.Parse;
+import org.jbpm.pvm.internal.xml.Parser;
+import org.w3c.dom.Element;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class JoinBinding extends JpdlActivityBinding {
+
+ public JoinBinding() {
+ super("join");
+ }
+
+ public Object parse(Element element, Parse parse, Parser parser) {
+ return new JoinActivity();
+ }
+
+}
Property changes on: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/JoinBinding.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/JpdlActivity.java (from rev 3920, jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/JpdlActivity.java)
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/JpdlActivity.java (rev 0)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/JpdlActivity.java 2009-02-19 13:08:17 UTC (rev 3948)
@@ -0,0 +1,35 @@
+/*
+ * 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.jbpm.jpdl.internal.activity;
+
+import org.jbpm.activity.ActivityBehaviour;
+
+/**
+ * @author Tom Baeyens
+ */
+public abstract class JpdlActivity implements ActivityBehaviour {
+
+ private static final long serialVersionUID = 1L;
+
+ protected long dbid;
+
+}
Property changes on: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/JpdlActivity.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Copied: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/JpdlActivityBinding.java (from rev 3920, jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/JpdlActivityBinding.java)
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/JpdlActivityBinding.java (rev 0)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/JpdlActivityBinding.java 2009-02-19 13:08:17 UTC (rev 3948)
@@ -0,0 +1,73 @@
+/*
+ * 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.jbpm.jpdl.internal.activity;
+
+import java.util.List;
+
+import org.jbpm.jpdl.internal.xml.UnresolvedTransitions;
+import org.jbpm.pvm.internal.model.ActivityImpl;
+import org.jbpm.pvm.internal.model.TransitionImpl;
+import org.jbpm.pvm.internal.util.TagBinding;
+import org.jbpm.pvm.internal.util.XmlUtil;
+import org.jbpm.pvm.internal.xml.Parse;
+import org.w3c.dom.Element;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public abstract class JpdlActivityBinding extends TagBinding {
+
+ public JpdlActivityBinding(String tagName) {
+ super(tagName, "http://jbpm.org/4/jpdl", "activity");
+ }
+
+ public void parseName(Element element, ActivityImpl activity, Parse parse) {
+ String name = XmlUtil.attribute(element, "name", isNameRequired(), parse);
+
+ if (name!=null) {
+ // basic name validation
+ if ("".equals(name)) {
+ parse.addProblem(XmlUtil.errorMessageAttribute(element, "name", name, "is empty"));
+ } else if (name.indexOf('/')!=-1) {
+ parse.addProblem(XmlUtil.errorMessageAttribute(element, "name", name, "contains slash (/)"));
+ }
+ activity.setName(name);
+ }
+ }
+
+ public boolean isNameRequired() {
+ return true;
+ }
+
+ public void parseFlows(Element element, ActivityImpl activity, Parse parse) {
+ List<Element> transitionElements = XmlUtil.elements(element, "flow");
+ UnresolvedTransitions unresolvedTransitions = parse.findObject(UnresolvedTransitions.class);
+ for (Element transitionElement: transitionElements) {
+ String transitionName = XmlUtil.attribute(transitionElement, "name", false, parse);
+ TransitionImpl transition = activity.createOutgoingTransition(transitionName);
+ unresolvedTransitions.add(transition, transitionElement);
+ }
+ }
+
+}
+
Property changes on: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/JpdlActivityBinding.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/JpdlExternalActivity.java (from rev 3920, jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/JpdlExternalActivity.java)
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/JpdlExternalActivity.java (rev 0)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/JpdlExternalActivity.java 2009-02-19 13:08:17 UTC (rev 3948)
@@ -0,0 +1,31 @@
+/*
+ * 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.jbpm.jpdl.internal.activity;
+
+import org.jbpm.activity.ExternalActivityBehaviour;
+
+/**
+ * @author Tom Baeyens
+ */
+public abstract class JpdlExternalActivity extends JpdlActivity implements ExternalActivityBehaviour {
+
+}
Property changes on: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/JpdlExternalActivity.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Copied: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/ScriptActivity.java (from rev 3920, jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/ScriptActivity.java)
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/ScriptActivity.java (rev 0)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/ScriptActivity.java 2009-02-19 13:08:17 UTC (rev 3948)
@@ -0,0 +1,60 @@
+/*
+ * 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.jbpm.jpdl.internal.activity;
+
+import org.jbpm.activity.ActivityExecution;
+import org.jbpm.env.Environment;
+import org.jbpm.pvm.internal.script.ScriptManager;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class ScriptActivity extends JpdlActivity {
+
+ private static final long serialVersionUID = 1L;
+
+ protected String script;
+ protected String language;
+ protected String variableName;
+
+ public void execute(ActivityExecution execution) {
+ ScriptManager scriptManager = Environment.getFromCurrent(ScriptManager.class);
+ Object returnValue = scriptManager.evaluateScript(script, execution, language);
+
+ if (variableName!=null) {
+ execution.setVariable(variableName, returnValue);
+ }
+
+ execution.historyAutomatic();
+ }
+
+ public void setScript(String script) {
+ this.script = script;
+ }
+ public void setLanguage(String language) {
+ this.language = language;
+ }
+ public void setVariableName(String variableName) {
+ this.variableName = variableName;
+ }
+}
Property changes on: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/ScriptActivity.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Copied: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/ScriptBinding.java (from rev 3920, jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/ScriptBinding.java)
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/ScriptBinding.java (rev 0)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/ScriptBinding.java 2009-02-19 13:08:17 UTC (rev 3948)
@@ -0,0 +1,69 @@
+/*
+ * 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.jbpm.jpdl.internal.activity;
+
+import org.jbpm.env.Environment;
+import org.jbpm.pvm.internal.script.ScriptManager;
+import org.jbpm.pvm.internal.util.XmlUtil;
+import org.jbpm.pvm.internal.xml.Parse;
+import org.jbpm.pvm.internal.xml.Parser;
+import org.w3c.dom.Element;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class ScriptBinding extends JpdlActivityBinding {
+
+ private static final String TAG = "script";
+
+ public ScriptBinding() {
+ super(TAG);
+ }
+
+ public Object parse(Element element, Parse parse, Parser parser) {
+ String language = null;
+
+ String script = XmlUtil.attribute(element, "expr");
+ Element textElement = XmlUtil.element(element, "text");
+ if(script!=null) {
+ ScriptManager scriptManager = Environment.getFromCurrent(ScriptManager.class);
+ language = scriptManager.getDefaultExpressionLanguage();
+ if (textElement!=null) {
+ parse.addProblem("in <script ...> attribute expr can't be combined with a nexted text element");
+ }
+ } else {
+ language = XmlUtil.attribute(element, "lang");
+ script = XmlUtil.getContentText(textElement);
+ }
+
+ String variableName = XmlUtil.attribute(element, "var");
+
+ ScriptActivity scriptActivity = new ScriptActivity();
+ scriptActivity.setScript(script);
+ scriptActivity.setLanguage(language);
+ scriptActivity.setVariableName(variableName);
+
+ return scriptActivity;
+ }
+
+}
Property changes on: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/ScriptBinding.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Copied: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/SqlActivity.java (from rev 3920, jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/SqlActivity.java)
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/SqlActivity.java (rev 0)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/SqlActivity.java 2009-02-19 13:08:17 UTC (rev 3948)
@@ -0,0 +1,37 @@
+/*
+ * 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.jbpm.jpdl.internal.activity;
+
+import org.hibernate.Query;
+import org.hibernate.Session;
+
+/**
+ * @author Tom Baeyens
+ */
+public class SqlActivity extends HqlActivity {
+
+ private static final long serialVersionUID = 1L;
+
+ protected Query createQuery(Session session) {
+ return session.createSQLQuery(query);
+ }
+}
Property changes on: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/SqlActivity.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/SqlBinding.java (from rev 3920, jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/SqlBinding.java)
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/SqlBinding.java (rev 0)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/SqlBinding.java 2009-02-19 13:08:17 UTC (rev 3948)
@@ -0,0 +1,39 @@
+/*
+ * 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.jbpm.jpdl.internal.activity;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class SqlBinding extends HqlBinding {
+
+ public static final String TAG = "sql";
+
+ public SqlBinding() {
+ super(TAG);
+ }
+
+ protected HqlActivity createHqlActivity() {
+ return new SqlActivity();
+ }
+}
Property changes on: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/SqlBinding.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/StartActivity.java (from rev 3920, jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/StartActivity.java)
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/StartActivity.java (rev 0)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/StartActivity.java 2009-02-19 13:08:17 UTC (rev 3948)
@@ -0,0 +1,36 @@
+/*
+ * 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.jbpm.jpdl.internal.activity;
+
+import org.jbpm.activity.ActivityExecution;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class StartActivity extends JpdlActivity {
+
+ private static final long serialVersionUID = 1L;
+
+ public void execute(ActivityExecution execution) {
+ }
+}
Property changes on: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/StartActivity.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Copied: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/StartBinding.java (from rev 3920, jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/StartBinding.java)
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/StartBinding.java (rev 0)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/StartBinding.java 2009-02-19 13:08:17 UTC (rev 3948)
@@ -0,0 +1,50 @@
+/*
+ * 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.jbpm.jpdl.internal.activity;
+
+import org.jbpm.jpdl.internal.xml.StartActivities;
+import org.jbpm.pvm.internal.model.ActivityImpl;
+import org.jbpm.pvm.internal.xml.Parse;
+import org.jbpm.pvm.internal.xml.Parser;
+import org.w3c.dom.Element;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class StartBinding extends JpdlActivityBinding {
+
+ public StartBinding() {
+ super("start");
+ }
+
+ public Object parse(Element element, Parse parse, Parser parser) {
+ ActivityImpl startActivity = parse.findObject(ActivityImpl.class);
+ StartActivities startActivities = parse.findObject(StartActivities.class);
+ startActivities.add(startActivity);
+ return new StartActivity();
+ }
+
+ public boolean isNameRequired() {
+ return false;
+ }
+}
Property changes on: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/StartBinding.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/StateActivity.java (from rev 3920, jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/StateActivity.java)
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/StateActivity.java (rev 0)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/StateActivity.java 2009-02-19 13:08:17 UTC (rev 3948)
@@ -0,0 +1,60 @@
+/*
+ * 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.jbpm.jpdl.internal.activity;
+
+import java.util.Map;
+
+import org.jbpm.activity.ActivityExecution;
+import org.jbpm.model.Activity;
+import org.jbpm.model.Transition;
+
+/**
+ * @author Tom Baeyens
+ */
+public class StateActivity extends JpdlExternalActivity {
+
+ private static final long serialVersionUID = 1L;
+
+ public void execute(ActivityExecution execution) {
+ execution.historyActivityStart();
+
+ execution.waitForSignal();
+ }
+
+ public void signal(ActivityExecution execution, String signalName, Map<String, Object> parameters) {
+ Activity activity = execution.getActivity();
+
+ if (parameters!=null) {
+ execution.setVariables(parameters);
+ }
+
+ execution.fire(signalName, activity);
+
+ Transition transition = activity.findOutgoingTransition(signalName);
+ if (transition!=null) {
+ execution.historyActivityEnd(signalName);
+ execution.take(transition);
+ } else {
+ execution.waitForSignal();
+ }
+ }
+}
Property changes on: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/StateActivity.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Copied: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/StateBinding.java (from rev 3920, jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/StateBinding.java)
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/StateBinding.java (rev 0)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/StateBinding.java 2009-02-19 13:08:17 UTC (rev 3948)
@@ -0,0 +1,44 @@
+/*
+ * 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.jbpm.jpdl.internal.activity;
+
+import org.jbpm.pvm.internal.model.ActivityImpl;
+import org.jbpm.pvm.internal.util.XmlUtil;
+import org.jbpm.pvm.internal.xml.Parse;
+import org.jbpm.pvm.internal.xml.Parser;
+import org.w3c.dom.Element;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class StateBinding extends JpdlActivityBinding {
+
+ public StateBinding() {
+ super("state");
+ }
+
+ public Object parse(Element element, Parse parse, Parser parser) {
+ return new StateActivity();
+ }
+
+}
Property changes on: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/StateBinding.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/TaskActivity.java (from rev 3920, jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/TaskActivity.java)
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/TaskActivity.java (rev 0)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/TaskActivity.java 2009-02-19 13:08:17 UTC (rev 3948)
@@ -0,0 +1,77 @@
+/*
+ * 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.jbpm.jpdl.internal.activity;
+
+import java.util.Map;
+
+import org.jbpm.JbpmException;
+import org.jbpm.activity.ActivityExecution;
+import org.jbpm.env.Environment;
+import org.jbpm.model.Activity;
+import org.jbpm.model.Transition;
+import org.jbpm.pvm.internal.task.TaskImpl;
+import org.jbpm.session.TaskDbSession;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class TaskActivity extends JpdlExternalActivity {
+
+ private static final long serialVersionUID = 1L;
+
+ protected String assignee;
+
+ public void execute(ActivityExecution execution) {
+ TaskDbSession taskDbSession = Environment.getFromCurrent(TaskDbSession.class);
+ TaskImpl task = TaskImpl.create();
+ task.setExecution(execution);
+ task.setName(execution.getActivityName());
+ task.setAssignee(assignee);
+ taskDbSession.saveTask(task);
+
+ execution.historyTaskStart(assignee);
+ execution.waitForSignal();
+ }
+
+ public void signal(ActivityExecution execution, String signalName, Map<String, Object> parameters) {
+ Activity activity = execution.getActivity();
+
+ if (parameters!=null) {
+ execution.setVariables(parameters);
+ }
+
+ execution.fire(signalName, activity);
+
+ Transition transition = activity.findOutgoingTransition(signalName);
+ if (transition!=null) {
+ execution.historyTaskEnd(signalName);
+ execution.take(transition);
+ } else {
+ throw new JbpmException("task outcome '"+signalName+"' doesn't match with the an outgoing transition "+activity.getOutgoingTransitions());
+ }
+ }
+
+ public void setAssignee(String assignee) {
+ this.assignee = assignee;
+ }
+}
Property changes on: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/TaskActivity.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Copied: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/TaskBinding.java (from rev 3920, jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/TaskBinding.java)
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/TaskBinding.java (rev 0)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/TaskBinding.java 2009-02-19 13:08:17 UTC (rev 3948)
@@ -0,0 +1,50 @@
+/*
+ * 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.jbpm.jpdl.internal.activity;
+
+import org.jbpm.pvm.internal.util.XmlUtil;
+import org.jbpm.pvm.internal.xml.Parse;
+import org.jbpm.pvm.internal.xml.Parser;
+import org.w3c.dom.Element;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class TaskBinding extends JpdlActivityBinding {
+
+ private static final String TAG = "task";
+
+ public TaskBinding() {
+ super(TAG);
+ }
+
+ public Object parse(Element element, Parse parse, Parser parser) {
+ TaskActivity taskActivity = new TaskActivity();
+
+ String assignee = XmlUtil.attribute(element, "assignee", true, parse);
+ taskActivity.setAssignee(assignee);
+
+ return taskActivity;
+ }
+
+}
Property changes on: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/TaskBinding.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Copied: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/deploy/ParseJpdlDeployer.java (from rev 3920, jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/deploy/ParseJpdlDeployer.java)
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/deploy/ParseJpdlDeployer.java (rev 0)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/deploy/ParseJpdlDeployer.java 2009-02-19 13:08:17 UTC (rev 3948)
@@ -0,0 +1,54 @@
+/*
+ * 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.jbpm.jpdl.internal.deploy;
+
+import org.jbpm.jpdl.internal.xml.JpdlParser;
+import org.jbpm.pvm.internal.deploy.Deployer;
+import org.jbpm.pvm.internal.svc.DeploymentImpl;
+import org.jbpm.pvm.internal.xml.Parse;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class ParseJpdlDeployer implements Deployer {
+
+ static JpdlParser jpdlParser = new JpdlParser();
+
+ public void deploy(DeploymentImpl deployment) {
+ for (String fileName: deployment.getFileNamesForType("jpdl")) {
+ // parse them
+ Parse parse = jpdlParser.createParse();
+ parse.setProblems(deployment.getProblems());
+ parse.setInputStream(deployment.getFile(fileName));
+ parse.execute();
+
+ // add the parsed xml dom to the deployment documents
+ // so that other subsequent deployers can just use the dom
+ // instead of reparsing the whole jpdl.xml file
+ deployment.addDocument(fileName, parse.getDocument());
+ // add the parsed process definition to the objects
+ // this is where the save process deployer will find it
+ deployment.addObject(fileName, parse.getDocumentObject());
+ }
+ }
+}
Property changes on: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/deploy/ParseJpdlDeployer.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Copied: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/model/JpdlExecution.java (from rev 3920, jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/JpdlExecution.java)
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/model/JpdlExecution.java (rev 0)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/model/JpdlExecution.java 2009-02-19 13:08:17 UTC (rev 3948)
@@ -0,0 +1,33 @@
+/*
+ * 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.jbpm.jpdl.internal.model;
+
+import org.jbpm.pvm.internal.model.ExecutionImpl;
+
+/**
+ * @author Tom Baeyens
+ */
+public class JpdlExecution extends ExecutionImpl {
+
+ private static final long serialVersionUID = 1L;
+
+}
Property changes on: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/model/JpdlExecution.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Copied: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/model/JpdlProcessDefinition.java (from rev 3920, jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/JpdlProcessDefinition.java)
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/model/JpdlProcessDefinition.java (rev 0)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/model/JpdlProcessDefinition.java 2009-02-19 13:08:17 UTC (rev 3948)
@@ -0,0 +1,38 @@
+/*
+ * 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.jbpm.jpdl.internal.model;
+
+import org.jbpm.client.ClientProcessInstance;
+import org.jbpm.pvm.internal.model.ExecutionImpl;
+import org.jbpm.pvm.internal.model.ProcessDefinitionImpl;
+
+/**
+ * @author Tom Baeyens
+ */
+public class JpdlProcessDefinition extends ProcessDefinitionImpl {
+
+ private static final long serialVersionUID = 1L;
+
+ protected ExecutionImpl newProcessInstance() {
+ return new JpdlExecution();
+ }
+}
Property changes on: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/model/JpdlProcessDefinition.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Copied: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/Activities.java (from rev 3920, jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/xml/Activities.java)
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/Activities.java (rev 0)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/Activities.java 2009-02-19 13:08:17 UTC (rev 3948)
@@ -0,0 +1,38 @@
+/*
+ * 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.jbpm.jpdl.internal.xml;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jbpm.pvm.internal.xml.Bindings;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class Activities {
+
+ List<String> schemaResources = new ArrayList<String>();
+ Bindings bindings = new Bindings();
+
+}
Property changes on: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/Activities.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/ActivitiesParser.java (from rev 3920, jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/xml/ActivitiesParser.java)
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/ActivitiesParser.java (rev 0)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/ActivitiesParser.java 2009-02-19 13:08:17 UTC (rev 3948)
@@ -0,0 +1,74 @@
+/*
+ * 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.jbpm.jpdl.internal.xml;
+
+import org.jbpm.internal.log.Log;
+import org.jbpm.pvm.internal.util.ReflectUtil;
+import org.jbpm.pvm.internal.util.XmlUtil;
+import org.jbpm.pvm.internal.xml.Binding;
+import org.jbpm.pvm.internal.xml.Parse;
+import org.jbpm.pvm.internal.xml.Parser;
+import org.w3c.dom.Element;
+
+/**
+ * @author Tom Baeyens
+ */
+public class ActivitiesParser extends Parser {
+
+ private static final Log log = Log.getLog(ActivitiesParser.class.getName());
+
+ public Object parseDocumentElement(Element documentElement, Parse parse) {
+ Activities activities = parse.findObject(Activities.class);
+ if (activities==null) {
+ activities = new Activities();
+ }
+ parse.setDocumentObject(activities);
+
+ for (Element bindingElement : XmlUtil.elements(documentElement, "activity")) {
+ Binding binding = instantiateBinding(bindingElement, parse);
+ activities.bindings.addBinding(binding);
+ }
+
+ for (Element schemaElement : XmlUtil.elements(documentElement, "schema")) {
+ String schemaResource = XmlUtil.attribute(schemaElement, "resource", true, parse);
+ activities.schemaResources.add(schemaResource);
+ }
+
+ return activities;
+ }
+
+ protected Binding instantiateBinding(Element bindingElement, Parse parse) {
+ String bindingClassName = XmlUtil.attribute(bindingElement, "binding", true, parse);
+
+ log.trace("adding activity binding "+bindingClassName);
+
+ if (bindingClassName!=null) {
+ try {
+ Class<?> bindingClass = ReflectUtil.loadClass(classLoader, bindingClassName);
+ return (Binding) bindingClass.newInstance();
+ } catch (Exception e) {
+ parse.addProblem("couldn't instantiate activity binding "+bindingClassName, e);
+ }
+ }
+ return null;
+ }
+}
Property changes on: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/ActivitiesParser.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/JpdlParser.java (from rev 3920, jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/xml/JpdlParser.java)
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/JpdlParser.java (rev 0)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/JpdlParser.java 2009-02-19 13:08:17 UTC (rev 3948)
@@ -0,0 +1,177 @@
+/*
+ * 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.jbpm.jpdl.internal.xml;
+
+import java.net.URL;
+import java.util.Enumeration;
+import java.util.List;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.SAXParser;
+
+import org.jbpm.activity.ActivityBehaviour;
+import org.jbpm.internal.log.Log;
+import org.jbpm.jpdl.internal.activity.JpdlActivityBinding;
+import org.jbpm.jpdl.internal.model.JpdlProcessDefinition;
+import org.jbpm.pvm.internal.model.ActivityImpl;
+import org.jbpm.pvm.internal.model.ProcessDefinitionImpl;
+import org.jbpm.pvm.internal.util.ReflectUtil;
+import org.jbpm.pvm.internal.util.XmlUtil;
+import org.jbpm.pvm.internal.xml.DomBuilder;
+import org.jbpm.pvm.internal.xml.Parse;
+import org.jbpm.pvm.internal.xml.Parser;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.xml.sax.InputSource;
+import org.xml.sax.XMLReader;
+
+/**
+ * @author Tom Baeyens
+ */
+public class JpdlParser extends Parser {
+
+ private static final Log log = Log.getLog(JpdlParser.class.getName());
+
+ public static final String[] DEFAULT_ACTIVITIES_RESOURCES = new String[]{
+ "jbpm.jpdl.activities.xml",
+ "jbpm.user.activities.xml"
+ };
+
+ static ActivitiesParser activityParser = new ActivitiesParser();
+
+ public JpdlParser() {
+ initialize();
+
+ Activities activitiesConfiguration = parseActivitiesConfiguration();
+ setBindings(activitiesConfiguration.bindings);
+ setSchemaResources(activitiesConfiguration.schemaResources);
+ }
+
+ protected Activities parseActivitiesConfiguration() {
+ Activities activities = new Activities();
+
+ for (String activityResource: DEFAULT_ACTIVITIES_RESOURCES) {
+ Enumeration<URL> resourceUrls = ReflectUtil.getResources(null, activityResource);
+ if (resourceUrls.hasMoreElements()) {
+ while (resourceUrls.hasMoreElements()) {
+ URL resourceUrl = resourceUrls.nextElement();
+ log.trace("loading jpdl activities from resource: "+resourceUrl);
+ activityParser.createParse()
+ .setUrl(resourceUrl)
+ .pushObject(activities)
+ .execute()
+ .checkProblems("jpdl activities from "+resourceUrl.toString());
+ }
+ } else {
+ log.trace("skipping unavailable jpdl activities resource: "+activityResource);
+ }
+ }
+
+ return activities;
+ }
+
+ public Object parseDocumentElement(Element documentElement, Parse parse) {
+ ProcessDefinitionImpl processDefinition = (ProcessDefinitionImpl) parse.getDocumentObject();
+ if (processDefinition==null) {
+ processDefinition = new JpdlProcessDefinition();
+ }
+
+ StartActivities startActivities = new StartActivities();
+ parse.pushObject(startActivities);
+ try {
+ String name = XmlUtil.attribute(documentElement, "name", true, parse);
+ processDefinition.setName(name);
+
+ String packageName = XmlUtil.attribute(documentElement, "package");
+ processDefinition.setPackageName(packageName);
+
+ Integer version = XmlUtil.attributeInteger(documentElement, "version", false, parse);
+ if (version!=null) {
+ processDefinition.setVersion(version);
+ }
+
+ String key = XmlUtil.attribute(documentElement, "key", false, parse);
+ if (key!=null) {
+ processDefinition.setKey(key);
+ }
+
+ Element descriptionElement = XmlUtil.element(documentElement, "description");
+ if (descriptionElement!=null) {
+ String description = XmlUtil.getContentText(descriptionElement);
+ processDefinition.setDescription(description);
+ }
+
+ UnresolvedTransitions unresolvedTransitions = new UnresolvedTransitions();
+ parse.pushObject(unresolvedTransitions);
+
+ List<Element> elements = XmlUtil.elements(documentElement);
+ for (Element element: elements) {
+ JpdlActivityBinding activityBinding = (JpdlActivityBinding) getBinding(element, "activity");
+ if (activityBinding!=null) {
+ ActivityImpl activity = (ActivityImpl) processDefinition.createActivity();
+ parse.pushObject(activity);
+ try {
+ activityBinding.parseName(element, activity, parse);
+ activityBinding.parseFlows(element, activity, parse);
+ ActivityBehaviour activityBehaviour = (ActivityBehaviour) activityBinding.parse(element, parse, this);
+ activity.setBehaviour(activityBehaviour);
+ } finally {
+ parse.popObject();
+ }
+ } else {
+ log.debug("unrecognized activity: "+XmlUtil.getTagLocalName(element));
+ }
+ }
+
+ for (UnresolvedTransition unresolvedTransition: unresolvedTransitions.list) {
+ unresolvedTransition.resolve(processDefinition, parse);
+ }
+
+ // TODO remove the initial attribute parsing
+ String initialActivityName = XmlUtil.attribute(documentElement, "initial", false, parse);
+ if (initialActivityName!=null) {
+ ActivityImpl initial = processDefinition.getActivity(initialActivityName);
+ if (initial==null) {
+ parse.addProblem("initial activity '"+initialActivityName+"' was not found");
+ } else {
+ processDefinition.setInitial(initial);
+ }
+ }
+
+ } finally {
+ parse.popObject();
+ }
+
+
+ if (startActivities.size()==0) {
+ parse.addProblem("no start activity in process");
+ } else if (startActivities.size()>1) {
+ parse.addProblem("multiple start events not yet supported");
+ // TODO verify that all start events have conditions
+ } else {
+ ActivityImpl uniqueStartEvent = startActivities.get(0);
+ processDefinition.setInitial(uniqueStartEvent);
+ }
+
+ return processDefinition;
+ }
+}
Property changes on: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/JpdlParser.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Copied: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/ParseJpdlBinding.java (from rev 3920, jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/xml/ParseJpdlBinding.java)
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/ParseJpdlBinding.java (rev 0)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/ParseJpdlBinding.java 2009-02-19 13:08:17 UTC (rev 3948)
@@ -0,0 +1,45 @@
+/*
+ * 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.jbpm.jpdl.internal.xml;
+
+import org.jbpm.jpdl.internal.deploy.ParseJpdlDeployer;
+import org.jbpm.pvm.internal.wire.binding.WireDescriptorBinding;
+import org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor;
+import org.jbpm.pvm.internal.xml.Parse;
+import org.jbpm.pvm.internal.xml.Parser;
+import org.w3c.dom.Element;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class ParseJpdlBinding extends WireDescriptorBinding {
+
+ public ParseJpdlBinding() {
+ super("parse-jpdl");
+ }
+
+ public Object parse(Element element, Parse parse, Parser parser) {
+ return new ObjectDescriptor(ParseJpdlDeployer.class);
+ }
+
+}
Property changes on: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/ParseJpdlBinding.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Copied: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/StartActivities.java (from rev 3920, jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/xml/StartActivities.java)
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/StartActivities.java (rev 0)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/StartActivities.java 2009-02-19 13:08:17 UTC (rev 3948)
@@ -0,0 +1,50 @@
+/*
+ * 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.jbpm.jpdl.internal.xml;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jbpm.pvm.internal.model.ActivityImpl;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class StartActivities {
+
+ List<ActivityImpl> startEvents = new ArrayList<ActivityImpl>();
+
+
+ public void add(ActivityImpl startEventActivity) {
+ startEvents.add(startEventActivity);
+ }
+
+ public int size() {
+ return startEvents.size();
+ }
+
+ public ActivityImpl get(int i) {
+ return startEvents.get(i);
+ }
+
+}
Copied: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/UnresolvedTransition.java (from rev 3920, jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/xml/UnresolvedTransition.java)
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/UnresolvedTransition.java (rev 0)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/UnresolvedTransition.java 2009-02-19 13:08:17 UTC (rev 3948)
@@ -0,0 +1,49 @@
+/*
+ * 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.jbpm.jpdl.internal.xml;
+
+import org.jbpm.pvm.internal.model.ActivityImpl;
+import org.jbpm.pvm.internal.model.ProcessDefinitionImpl;
+import org.jbpm.pvm.internal.model.TransitionImpl;
+import org.jbpm.pvm.internal.util.XmlUtil;
+import org.jbpm.pvm.internal.xml.Parse;
+import org.w3c.dom.Element;
+
+public class UnresolvedTransition {
+ TransitionImpl transition;
+ Element transitionElement;
+ public UnresolvedTransition(TransitionImpl transition, Element transitionElement) {
+ this.transition = transition;
+ this.transitionElement = transitionElement;
+ }
+ public void resolve(ProcessDefinitionImpl processDefinition, Parse parse) {
+ String to = XmlUtil.attribute(transitionElement, "to", true, parse);
+ if (to!=null) {
+ ActivityImpl destination = (ActivityImpl) processDefinition.findActivity(to);
+ if (destination!=null) {
+ destination.addIncomingTransition(transition);
+ } else {
+ parse.addProblem(XmlUtil.errorMessageAttribute(transitionElement, "to", to, "doesn't reference an existing activity name"));
+ }
+ }
+ }
+}
\ No newline at end of file
Property changes on: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/UnresolvedTransition.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/UnresolvedTransitions.java (from rev 3920, jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/xml/UnresolvedTransitions.java)
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/UnresolvedTransitions.java (rev 0)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/UnresolvedTransitions.java 2009-02-19 13:08:17 UTC (rev 3948)
@@ -0,0 +1,35 @@
+/*
+ * 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.jbpm.jpdl.internal.xml;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jbpm.pvm.internal.model.TransitionImpl;
+import org.w3c.dom.Element;
+
+public class UnresolvedTransitions {
+ List<UnresolvedTransition> list = new ArrayList<UnresolvedTransition>();
+ public void add(TransitionImpl transition, Element transitionElement) {
+ list.add(new UnresolvedTransition(transition, transitionElement));
+ }
+}
\ No newline at end of file
Property changes on: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/UnresolvedTransitions.java
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: jbpm4/trunk/modules/jpdl/src/main/resources/jbpm.jpdl.activities.xml
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/resources/jbpm.jpdl.activities.xml 2009-02-19 12:49:19 UTC (rev 3947)
+++ jbpm4/trunk/modules/jpdl/src/main/resources/jbpm.jpdl.activities.xml 2009-02-19 13:08:17 UTC (rev 3948)
@@ -1,17 +1,17 @@
<activities>
<schema resource="jpdl.xsd" />
- <activity binding="org.jbpm.jpdl.activity.StartBinding" />
- <activity binding="org.jbpm.jpdl.activity.StateBinding" />
- <activity binding="org.jbpm.jpdl.activity.ExclusiveBinding" />
- <activity binding="org.jbpm.jpdl.activity.EndBinding" />
- <activity binding="org.jbpm.jpdl.activity.EndCancelBinding" />
- <activity binding="org.jbpm.jpdl.activity.EndErrorBinding" />
- <activity binding="org.jbpm.jpdl.activity.ForkBinding" />
- <activity binding="org.jbpm.jpdl.activity.JoinBinding" />
- <activity binding="org.jbpm.jpdl.activity.HqlBinding" />
- <activity binding="org.jbpm.jpdl.activity.SqlBinding" />
- <activity binding="org.jbpm.jpdl.activity.JavaBinding" />
- <activity binding="org.jbpm.jpdl.activity.ScriptBinding" />
- <activity binding="org.jbpm.jpdl.activity.EsbBinding" />
- <activity binding="org.jbpm.jpdl.activity.TaskBinding" />
+ <activity binding="org.jbpm.jpdl.internal.activity.StartBinding" />
+ <activity binding="org.jbpm.jpdl.internal.activity.StateBinding" />
+ <activity binding="org.jbpm.jpdl.internal.activity.ExclusiveBinding" />
+ <activity binding="org.jbpm.jpdl.internal.activity.EndBinding" />
+ <activity binding="org.jbpm.jpdl.internal.activity.EndCancelBinding" />
+ <activity binding="org.jbpm.jpdl.internal.activity.EndErrorBinding" />
+ <activity binding="org.jbpm.jpdl.internal.activity.ForkBinding" />
+ <activity binding="org.jbpm.jpdl.internal.activity.JoinBinding" />
+ <activity binding="org.jbpm.jpdl.internal.activity.HqlBinding" />
+ <activity binding="org.jbpm.jpdl.internal.activity.SqlBinding" />
+ <activity binding="org.jbpm.jpdl.internal.activity.JavaBinding" />
+ <activity binding="org.jbpm.jpdl.internal.activity.ScriptBinding" />
+ <activity binding="org.jbpm.jpdl.internal.activity.EsbBinding" />
+ <activity binding="org.jbpm.jpdl.internal.activity.TaskBinding" />
</activities>
Modified: jbpm4/trunk/modules/jpdl/src/main/resources/jbpm.jpdl.hbm.xml
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/resources/jbpm.jpdl.hbm.xml 2009-02-19 12:49:19 UTC (rev 3947)
+++ jbpm4/trunk/modules/jpdl/src/main/resources/jbpm.jpdl.hbm.xml 2009-02-19 13:08:17 UTC (rev 3948)
@@ -3,26 +3,26 @@
<hibernate-mapping default-access="field">
- <joined-subclass name="org.jbpm.jpdl.JpdlProcessDefinition" table="JBPM_JPDL_PROCDEF" extends="org.jbpm.pvm.internal.model.ProcessDefinitionImpl">
+ <joined-subclass name="org.jbpm.jpdl.internal.model.JpdlProcessDefinition" table="JBPM_JPDL_PROCDEF" extends="org.jbpm.pvm.internal.model.ProcessDefinitionImpl">
<key column="DBID_"/>
</joined-subclass>
- <joined-subclass name="org.jbpm.jpdl.JpdlExecution" table="JBPM_JPDL_EXECUTION" extends="org.jbpm.pvm.internal.model.ExecutionImpl">
+ <joined-subclass name="org.jbpm.jpdl.internal.model.JpdlExecution" table="JBPM_JPDL_EXECUTION" extends="org.jbpm.pvm.internal.model.ExecutionImpl">
<key column="DBID_"/>
</joined-subclass>
- <class name="org.jbpm.jpdl.activity.JpdlActivity" table="JBPM_JPDL_ACTIVITY" abstract="true" discriminator-value="X">
+ <class name="org.jbpm.jpdl.internal.activity.JpdlActivity" table="JBPM_JPDL_ACTIVITY" abstract="true" discriminator-value="X">
<id name="dbid" column="DBID_">
<generator class="native" />
</id>
<discriminator column="CLASS_" />
- <subclass name="org.jbpm.jpdl.activity.StartActivity" discriminator-value="start" />
- <subclass name="org.jbpm.jpdl.activity.ExclusiveConditionActivity" discriminator-value="excl-cond" />
- <subclass name="org.jbpm.jpdl.activity.ExclusiveExpressionActivity" discriminator-value="excl-expr">
+ <subclass name="org.jbpm.jpdl.internal.activity.StartActivity" discriminator-value="start" />
+ <subclass name="org.jbpm.jpdl.internal.activity.ExclusiveConditionActivity" discriminator-value="excl-cond" />
+ <subclass name="org.jbpm.jpdl.internal.activity.ExclusiveExpressionActivity" discriminator-value="excl-expr">
<property name="expr" column="TEXT_" />
<property name="lang" column="TEXT2_" />
</subclass>
- <subclass name="org.jbpm.jpdl.activity.ExclusiveHandlerActivity" discriminator-value="excl-handler">
+ <subclass name="org.jbpm.jpdl.internal.activity.ExclusiveHandlerActivity" discriminator-value="excl-handler">
<property name="exclusiveHandlerName" column="TEXT_" />
<many-to-one name="exclusiveHandlerDescriptor"
column="EXCLDESCR_"
@@ -31,14 +31,14 @@
foreign-key="FK_ACT_EXCLDESCR"
index="IDX_ACT_EXCLDESCR" />
</subclass>
- <subclass name="org.jbpm.jpdl.activity.StateActivity" discriminator-value="state" />
- <subclass name="org.jbpm.jpdl.activity.EndActivity" discriminator-value="end">
+ <subclass name="org.jbpm.jpdl.internal.activity.StateActivity" discriminator-value="state" />
+ <subclass name="org.jbpm.jpdl.internal.activity.EndActivity" discriminator-value="end">
<property name="endProcessInstance" column="ENDPI_" />
<property name="state" column="TEXT_" />
</subclass>
- <subclass name="org.jbpm.jpdl.activity.ForkActivity" discriminator-value="fork" />
- <subclass name="org.jbpm.jpdl.activity.JoinActivity" discriminator-value="join" />
- <subclass name="org.jbpm.jpdl.activity.HqlActivity" discriminator-value="hql">
+ <subclass name="org.jbpm.jpdl.internal.activity.ForkActivity" discriminator-value="fork" />
+ <subclass name="org.jbpm.jpdl.internal.activity.JoinActivity" discriminator-value="join" />
+ <subclass name="org.jbpm.jpdl.internal.activity.HqlActivity" discriminator-value="hql">
<property name="query" column="TEXT_" />
<property name="resultVariableName" column="TEXT2_" />
<property name="isResultUnique" column="ISUNIQ_" />
@@ -49,9 +49,9 @@
foreign-key="FK_ACT_PARAMDESCR"
index="IDX_ACT_PARAMDESCR" />
- <subclass name="org.jbpm.jpdl.activity.SqlActivity" discriminator-value="sql" />
+ <subclass name="org.jbpm.jpdl.internal.activity.SqlActivity" discriminator-value="sql" />
</subclass>
- <subclass name="org.jbpm.jpdl.activity.JavaActivity" discriminator-value="java">
+ <subclass name="org.jbpm.jpdl.internal.activity.JavaActivity" discriminator-value="java">
<property name="methodName" column="TEXT_" />
<property name="variableName" column="TEXT2_" />
<many-to-one name="descriptor"
@@ -67,12 +67,12 @@
foreign-key="FK_ACT_INVKOPER"
index="IDX_ACT_INVKOPER" />
</subclass>
- <subclass name="org.jbpm.jpdl.activity.ScriptActivity" discriminator-value="script">
+ <subclass name="org.jbpm.jpdl.internal.activity.ScriptActivity" discriminator-value="script">
<property name="script" column="TEXT_" />
<property name="language" column="TEXT2_" />
<property name="variableName" column="TEXT3_" />
</subclass>
- <subclass name="org.jbpm.jpdl.activity.EsbActivity" discriminator-value="esb">
+ <subclass name="org.jbpm.jpdl.internal.activity.EsbActivity" discriminator-value="esb">
<property name="service" column="TEXT_" />
<property name="category" column="TEXT2_" />
<many-to-one name="partsListDescriptor"
@@ -82,7 +82,7 @@
foreign-key="FK_ACT_PARTSDESCR"
index="IDX_ACT_PARTSDESCR" />
</subclass>
- <subclass name="org.jbpm.jpdl.activity.TaskActivity" discriminator-value="task">
+ <subclass name="org.jbpm.jpdl.internal.activity.TaskActivity" discriminator-value="task">
<property name="assignee" column="TEXT_" />
</subclass>
</class>
Modified: jbpm4/trunk/modules/jpdl/src/main/resources/jbpm.jpdl.wire.bindings.xml
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/resources/jbpm.jpdl.wire.bindings.xml 2009-02-19 12:49:19 UTC (rev 3947)
+++ jbpm4/trunk/modules/jpdl/src/main/resources/jbpm.jpdl.wire.bindings.xml 2009-02-19 13:08:17 UTC (rev 3948)
@@ -1,3 +1,3 @@
<wire-bindings>
- <binding class="org.jbpm.jpdl.xml.ParseJpdlBinding" />
+ <binding class="org.jbpm.jpdl.internal.xml.ParseJpdlBinding" />
</wire-bindings>
Modified: jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/JpdlTestCase.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/JpdlTestCase.java 2009-02-19 12:49:19 UTC (rev 3947)
+++ jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/JpdlTestCase.java 2009-02-19 13:08:17 UTC (rev 3948)
@@ -23,7 +23,7 @@
import org.jbpm.client.ClientProcessDefinition;
import org.jbpm.internal.log.Log;
-import org.jbpm.jpdl.xml.JpdlParser;
+import org.jbpm.jpdl.internal.xml.JpdlParser;
import org.jbpm.pvm.internal.xml.Parse;
import org.jbpm.test.BaseJbpmTestCase;
Modified: jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/parsing/JpdlParseTestCase.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/parsing/JpdlParseTestCase.java 2009-02-19 12:49:19 UTC (rev 3947)
+++ jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/parsing/JpdlParseTestCase.java 2009-02-19 13:08:17 UTC (rev 3948)
@@ -25,7 +25,7 @@
import org.jbpm.Problem;
import org.jbpm.client.ClientProcessDefinition;
-import org.jbpm.jpdl.xml.JpdlParser;
+import org.jbpm.jpdl.internal.xml.JpdlParser;
import org.jbpm.test.BaseJbpmTestCase;
Modified: jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/test/xml/JpdlXmlTest.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/test/xml/JpdlXmlTest.java 2009-02-19 12:49:19 UTC (rev 3947)
+++ jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/test/xml/JpdlXmlTest.java 2009-02-19 13:08:17 UTC (rev 3948)
@@ -24,7 +24,7 @@
import java.util.List;
import org.jbpm.Problem;
-import org.jbpm.jpdl.xml.JpdlParser;
+import org.jbpm.jpdl.internal.xml.JpdlParser;
import org.jbpm.test.BaseJbpmTestCase;
/**
17 years, 2 months
JBoss JBPM SVN: r3947 - jbpm4/trunk/modules/jpdl/src/main/resources.
by do-not-reply@jboss.org
Author: heiko.braun(a)jboss.com
Date: 2009-02-19 07:49:19 -0500 (Thu, 19 Feb 2009)
New Revision: 3947
Modified:
jbpm4/trunk/modules/jpdl/src/main/resources/hibernate.properties.hsqldb.xml
Log:
default hsql connetion props
Modified: jbpm4/trunk/modules/jpdl/src/main/resources/hibernate.properties.hsqldb.xml
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/resources/hibernate.properties.hsqldb.xml 2009-02-19 11:02:24 UTC (rev 3946)
+++ jbpm4/trunk/modules/jpdl/src/main/resources/hibernate.properties.hsqldb.xml 2009-02-19 12:49:19 UTC (rev 3947)
@@ -5,8 +5,8 @@
<!-- JDBC connection properties (begin) -->
<property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
<property name="hibernate.connection.url">jdbc:hsqldb:file:${project.build.directory}/hypersonic/jbpm4DB</property>
- <property name="hibernate.connection.username">${jdbc.hsql.username}</property>
- <property name="hibernate.connection.password">${jdbc.hsql.password}</property>
+ <property name="hibernate.connection.username">sa</property>
+ <property name="hibernate.connection.password"></property>
<!-- JDBC connection properties (end) -->
<!-- Automatic schema creation (begin) -->
17 years, 2 months
JBoss JBPM SVN: r3946 - jbpm4/trunk/modules/distro/scripts.
by do-not-reply@jboss.org
Author: heiko.braun(a)jboss.com
Date: 2009-02-19 06:02:24 -0500 (Thu, 19 Feb 2009)
New Revision: 3946
Modified:
jbpm4/trunk/modules/distro/scripts/antrun-installer.xml
Log:
Disable hbm2ddl.auto when running in-container
Modified: jbpm4/trunk/modules/distro/scripts/antrun-installer.xml
===================================================================
--- jbpm4/trunk/modules/distro/scripts/antrun-installer.xml 2009-02-19 10:41:27 UTC (rev 3945)
+++ jbpm4/trunk/modules/distro/scripts/antrun-installer.xml 2009-02-19 11:02:24 UTC (rev 3946)
@@ -66,7 +66,7 @@
<property name="hsqldb.cfg.xml" value="${deploy.artifacts.resources}/jbpm-jpdl-config/hibernate.cfg.hsqldb.xml"/>
<macro-disable file="${hsqldb.cfg.xml}" section="JDBC connection properties"/>
- <!--macro-disable file="${hsqldb.cfg.xml}" section="Automatic schema creation"/-->
+ <macro-disable file="${hsqldb.cfg.xml}" section="Automatic schema creation"/>
<macro-enable file="${hsqldb.cfg.xml}" section="DataSource properties"/>
<macro-enable file="${hsqldb.cfg.xml}" section="JTA transaction properties"/>
17 years, 2 months
JBoss JBPM SVN: r3945 - jbpm3/trunk/modules/examples.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-02-19 05:41:27 -0500 (Thu, 19 Feb 2009)
New Revision: 3945
Modified:
jbpm3/trunk/modules/examples/pom.xml
Log:
[JBPM-2050] jBPM exmaples cannot be compiled
Modified: jbpm3/trunk/modules/examples/pom.xml
===================================================================
--- jbpm3/trunk/modules/examples/pom.xml 2009-02-19 10:26:11 UTC (rev 3944)
+++ jbpm3/trunk/modules/examples/pom.xml 2009-02-19 10:41:27 UTC (rev 3945)
@@ -102,4 +102,15 @@
</plugins>
</build>
+ <!--
+ Repositories
+ [JBPM-2050] jBPM exmaples cannot be compiled
+ -->
+ <repositories>
+ <repository>
+ <id>repository.jboss.org</id>
+ <url>http://repository.jboss.org/maven2</url>
+ </repository>
+ </repositories>
+
</project>
17 years, 2 months
JBoss JBPM SVN: r3944 - in jbpm4/trunk: modules/enterprise and 1 other directory.
by do-not-reply@jboss.org
Author: heiko.braun(a)jboss.com
Date: 2009-02-19 05:26:11 -0500 (Thu, 19 Feb 2009)
New Revision: 3944
Added:
jbpm4/trunk/modules/enterprise/README.txt
Removed:
jbpm4/trunk/modules/enterprise/README
Modified:
jbpm4/trunk/pom.xml
jbpm4/trunk/profiles.xml.example
Log:
Remove Hsql properties from profiles.xml
Deleted: jbpm4/trunk/modules/enterprise/README
===================================================================
--- jbpm4/trunk/modules/enterprise/README 2009-02-19 10:22:20 UTC (rev 3943)
+++ jbpm4/trunk/modules/enterprise/README 2009-02-19 10:26:11 UTC (rev 3944)
@@ -1,15 +0,0 @@
-Tests in the enterprise module are integration tests. The maven surefire plugin
-runs tests during the 'test' phase by default. This module is configured to
-skip test execution during the 'test' phase, allowing the build to reach the
-'package' phase and assemble the ejb jar.
-
-Enterprise tests are associated to the 'integration-test' phase that occurs
-after 'package' but before 'install'. In order to run properly, enterprise
-tests require a running JBoss application server. The address to which the
-server is bound must be specified in the Maven property 'jboss.bind.address',
-otherwise the tests will be skipped.
-
-mvn -Djboss.bind.address=127.0.0.1 integration-test
-
-Because several databases do not allow DDL in JTA transactions, the database
-schema has to be created prior to executing the tests for the first time.
\ No newline at end of file
Copied: jbpm4/trunk/modules/enterprise/README.txt (from rev 3934, jbpm4/trunk/modules/enterprise/README)
===================================================================
--- jbpm4/trunk/modules/enterprise/README.txt (rev 0)
+++ jbpm4/trunk/modules/enterprise/README.txt 2009-02-19 10:26:11 UTC (rev 3944)
@@ -0,0 +1,16 @@
+Tests in the enterprise module are integration tests. The maven surefire plugin
+runs tests during the 'test' phase by default. This module is configured to
+skip test execution during the 'test' phase, allowing the build to reach the
+'package' phase and assemble the ejb jar.
+
+Enterprise tests are associated to the 'integration-test' phase that occurs
+after 'package' but before 'install'. In order to run properly, enterprise
+tests require a running JBoss application server. The address to which the
+server is bound must be specified in the Maven property 'jboss.bind.address',
+otherwise the tests will be skipped.
+
+mvn -Djboss.bind.address=127.0.0.1 test
+
+Because several databases do not allow DDL in JTA transactions, the database
+schema has to be created prior to executing the tests for the first time,
+unless you've chosen Hsql as the target database when running the installer.
Modified: jbpm4/trunk/pom.xml
===================================================================
--- jbpm4/trunk/pom.xml 2009-02-19 10:22:20 UTC (rev 3943)
+++ jbpm4/trunk/pom.xml 2009-02-19 10:26:11 UTC (rev 3944)
@@ -36,8 +36,7 @@
<module>modules/pvm</module>
<module>modules/examples</module>
<module>modules/jpdl</module>
- <module>modules/enterprise</module>
- <module>modules/integration</module>
+ <module>modules/enterprise</module>
<module>modules/test-base</module>
<module>modules/test-db</module>
<module>modules/test-pojo</module>
@@ -367,6 +366,7 @@
<profile>
<id>distro</id>
<modules>
+ <module>modules/integration</module>
<module>modules/devguide</module>
<module>modules/distro</module>
<module>modules/userguide</module>
Modified: jbpm4/trunk/profiles.xml.example
===================================================================
--- jbpm4/trunk/profiles.xml.example 2009-02-19 10:22:20 UTC (rev 3943)
+++ jbpm4/trunk/profiles.xml.example 2009-02-19 10:26:11 UTC (rev 3944)
@@ -25,15 +25,7 @@
<!--
DEFAULT CONNECTION SETTINGS FOR THE JBPM QA ENV
- -->
-
- <jdbc.hsql.server>localhost</jdbc.hsql.server>
- <jdbc.hsql.port>3306</jdbc.hsql.port>
- <jdbc.hsql.database>jbpmtest</jdbc.hsql.database>
- <jdbc.hsql.url>jdbc:hsqldb:mem:.</jdbc.hsql.url>
- <jdbc.hsql.username>sa</jdbc.hsql.username>
- <jdbc.hsql.password></jdbc.hsql.password>
-
+ -->
<jdbc.mysql.server>localhost</jdbc.mysql.server>
<jdbc.mysql.port>3306</jdbc.mysql.port>
<jdbc.mysql.database>jbpm4</jdbc.mysql.database>
17 years, 2 months
JBoss JBPM SVN: r3943 - jbpm3/branches/jbpm-3.2.5.SP/modules/examples.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-02-19 05:22:20 -0500 (Thu, 19 Feb 2009)
New Revision: 3943
Modified:
jbpm3/branches/jbpm-3.2.5.SP/modules/examples/pom.xml
Log:
[JBPM-2050] jBPM exmaples cannot be compiled
Modified: jbpm3/branches/jbpm-3.2.5.SP/modules/examples/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2.5.SP/modules/examples/pom.xml 2009-02-19 09:58:39 UTC (rev 3942)
+++ jbpm3/branches/jbpm-3.2.5.SP/modules/examples/pom.xml 2009-02-19 10:22:20 UTC (rev 3943)
@@ -101,6 +101,17 @@
</plugins>
</build>
+ <!--
+ Repositories
+ [JBPM-2050] jBPM exmaples cannot be compiled
+ -->
+ <repositories>
+ <repository>
+ <id>repository.jboss.org</id>
+ <url>http://repository.jboss.org/maven2</url>
+ </repository>
+ </repositories>
+
<profiles>
<!--
Name: sybase
17 years, 2 months
JBoss JBPM SVN: r3942 - in jbpm4/trunk/modules: distro/scripts and 6 other directories.
by do-not-reply@jboss.org
Author: heiko.braun(a)jboss.com
Date: 2009-02-19 04:58:39 -0500 (Thu, 19 Feb 2009)
New Revision: 3942
Added:
jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/test/xml/DbGenTest.java
jbpm4/trunk/modules/jpdl/src/test/resources/org/jbpm/test/xml/process.jpdl.xml
Removed:
jbpm4/trunk/modules/examples/scripts/
Modified:
jbpm4/trunk/modules/distro/pom.xml
jbpm4/trunk/modules/distro/scripts/assembly-deploy-artifacts.xml
jbpm4/trunk/modules/distro/src/main/resources/installer/install-definition.xml
jbpm4/trunk/modules/examples/pom.xml
jbpm4/trunk/modules/jpdl/pom.xml
jbpm4/trunk/modules/jpdl/scripts/assembly-config.xml
Log:
Ship pre-populated hypersonic DB with installer
Modified: jbpm4/trunk/modules/distro/pom.xml
===================================================================
--- jbpm4/trunk/modules/distro/pom.xml 2009-02-19 09:43:09 UTC (rev 3941)
+++ jbpm4/trunk/modules/distro/pom.xml 2009-02-19 09:58:39 UTC (rev 3942)
@@ -69,8 +69,15 @@
<classifier>config</classifier>
<version>${version}</version>
</dependency>
+
<dependency>
<groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-examples</artifactId>
+ <version>${version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jbpm.jbpm4</groupId>
<artifactId>jbpm-task</artifactId>
<version>${version}</version>
</dependency>
Modified: jbpm4/trunk/modules/distro/scripts/assembly-deploy-artifacts.xml
===================================================================
--- jbpm4/trunk/modules/distro/scripts/assembly-deploy-artifacts.xml 2009-02-19 09:43:09 UTC (rev 3941)
+++ jbpm4/trunk/modules/distro/scripts/assembly-deploy-artifacts.xml 2009-02-19 09:58:39 UTC (rev 3942)
@@ -65,8 +65,7 @@
<include>*:jbpm-jboss5:jar:config</include>
</includes>
<unpack>true</unpack>
- </dependencySet>
-
+ </dependencySet>
</dependencySets>
<fileSets>
Modified: jbpm4/trunk/modules/distro/src/main/resources/installer/install-definition.xml
===================================================================
--- jbpm4/trunk/modules/distro/src/main/resources/installer/install-definition.xml 2009-02-19 09:43:09 UTC (rev 3941)
+++ jbpm4/trunk/modules/distro/src/main/resources/installer/install-definition.xml 2009-02-19 09:58:39 UTC (rev 3942)
@@ -234,6 +234,9 @@
<file src="@{deploy.artifacts.dir}/resources/jbpm-jpdl-config/jbpm-hsqldb-ds.xml" targetdir="${jbossInstallPath}/server/${jbossTargetServer}/deploy/jbpm" condition="isHypersonic"/>
<singlefile src="@{deploy.artifacts.dir}/resources/jbpm-jpdl-config/hibernate.cfg.hsqldb.xml" condition="isHypersonic"
target="${jbossInstallPath}/server/${jbossTargetServer}/deploy/jbpm/jbpm-service.sar/hibernate.cfg.xml" />
+ <fileset dir="@{deploy.artifacts.dir}/resources/jbpm-jpdl-config" targetdir="${jbossInstallPath}/server/${jbossTargetServer}/data" condition="isHypersonic">
+ <include name="hypersonic/jbpm4DB.*" />
+ </fileset>
<!-- Database MySQL -->
<file src="@{deploy.artifacts.dir}/resources/jbpm-jpdl-config/jbpm-mysql-ds.xml" targetdir="${jbossInstallPath}/server/${jbossTargetServer}/deploy/jbpm" condition="isMySQL"/>
Modified: jbpm4/trunk/modules/examples/pom.xml
===================================================================
--- jbpm4/trunk/modules/examples/pom.xml 2009-02-19 09:43:09 UTC (rev 3941)
+++ jbpm4/trunk/modules/examples/pom.xml 2009-02-19 09:58:39 UTC (rev 3942)
@@ -98,24 +98,6 @@
</executions>
</plugin>
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>single</goal>
- </goals>
- <configuration>
- <finalName>${project.build.finalName}</finalName>
- <appendAssemblyId>true</appendAssemblyId>
- <descriptors>
- <descriptor>scripts/assembly-config.xml</descriptor>
- </descriptors>
- </configuration>
- </execution>
- </executions>
- </plugin>
</plugins>
</build>
</project>
\ No newline at end of file
Modified: jbpm4/trunk/modules/jpdl/pom.xml
===================================================================
--- jbpm4/trunk/modules/jpdl/pom.xml 2009-02-19 09:43:09 UTC (rev 3941)
+++ jbpm4/trunk/modules/jpdl/pom.xml 2009-02-19 09:58:39 UTC (rev 3942)
@@ -136,6 +136,20 @@
<!-- Profiles -->
<profiles>
+ <profile>
+ <id>distro</id>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skipTests>false</skipTests>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
</profiles>
</project>
\ No newline at end of file
Modified: jbpm4/trunk/modules/jpdl/scripts/assembly-config.xml
===================================================================
--- jbpm4/trunk/modules/jpdl/scripts/assembly-config.xml 2009-02-19 09:43:09 UTC (rev 3941)
+++ jbpm4/trunk/modules/jpdl/scripts/assembly-config.xml 2009-02-19 09:58:39 UTC (rev 3942)
@@ -1,5 +1,5 @@
<assembly xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/assembly-1.1.0-SNAPSHOT.xsd">
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/assembly-1.1.0-SNAPSHOT.xsd">
<id>config</id>
<formats>
<format>jar</format>
@@ -9,13 +9,22 @@
<fileSet>
<directory>${project.build.outputDirectory}</directory>
<outputDirectory>/</outputDirectory>
- <includes>
+ <includes>
<include>jbpm.cfg.xml</include>
<include>logging.properties</include>
<include>hibernate.cfg.xml</include>
<include>hibernate.cfg.*.xml</include>
<include>jbpm-*-ds.xml</include>
</includes>
- </fileSet>
+ </fileSet>
+ <fileSet>
+ <directory>${project.build.directory}</directory>
+ <outputDirectory>/</outputDirectory>
+ <includes>
+ <include>hypersonic/jbpm4DB.log</include>
+ <include>hypersonic/jbpm4DB.properties</include>
+ <include>hypersonic/jbpm4DB.script</include>
+ </includes>
+ </fileSet>
</fileSets>
</assembly>
\ No newline at end of file
Added: jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/test/xml/DbGenTest.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/test/xml/DbGenTest.java (rev 0)
+++ jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/test/xml/DbGenTest.java 2009-02-19 09:58:39 UTC (rev 3942)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.jbpm.test.xml;
+
+import org.jbpm.test.JbpmTestCase;
+import org.jbpm.Execution;
+
+/**
+ * A simple test execution that force the generation of the
+ * hypersomic database structure.
+ *
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class DbGenTest extends JbpmTestCase
+{
+
+ public void testWaitStatesSequence() {
+ deployJpdlResource("org/jbpm/test/xml/process.jpdl.xml");
+
+ Execution execution = executionService.startProcessInstanceByKey("StateSequence");
+ assertEquals("a", execution.getActivityName());
+
+ String executionId = execution.getId();
+ execution = executionService.signalExecutionById(executionId);
+ assertEquals("b", execution.getActivityName());
+
+ execution = executionService.signalExecutionById(executionId);
+ assertEquals("c", execution.getActivityName());
+ }
+}
Added: jbpm4/trunk/modules/jpdl/src/test/resources/org/jbpm/test/xml/process.jpdl.xml
===================================================================
--- jbpm4/trunk/modules/jpdl/src/test/resources/org/jbpm/test/xml/process.jpdl.xml (rev 0)
+++ jbpm4/trunk/modules/jpdl/src/test/resources/org/jbpm/test/xml/process.jpdl.xml 2009-02-19 09:58:39 UTC (rev 3942)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<process name="StateSequence" xmlns="http://jbpm.org/4/jpdl">
+
+ <start g="16,18,48,48">
+ <flow to="a" />
+ </start>
+
+ <state name="a" g="96,16,75,52">
+ <flow to="b" />
+ </state>
+
+ <state name="b" g="203,16,73,52">
+ <flow to="c" />
+ </state>
+
+ <state name="c" g="308,16,76,52" />
+
+</process>
\ No newline at end of file
17 years, 2 months
JBoss JBPM SVN: r3941 - jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/test/resources.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-02-19 04:43:09 -0500 (Thu, 19 Feb 2009)
New Revision: 3941
Modified:
jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/test/resources/log4j.xml
Log:
[JBPM-2043] Disable org.hibernate.SQL DEBUG logging
Modified: jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/test/resources/log4j.xml
===================================================================
--- jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/test/resources/log4j.xml 2009-02-19 09:24:17 UTC (rev 3940)
+++ jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/test/resources/log4j.xml 2009-02-19 09:43:09 UTC (rev 3941)
@@ -35,12 +35,18 @@
<category name="org.hibernate">
<priority value="INFO" />
</category>
+
+ <!--
<category name="org.hibernate.SQL">
<priority value="DEBUG" />
</category>
+ -->
+
+ <!--
<category name="org.hibernate.connection">
<priority value="TRACE" />
</category>
+ -->
<!-- ======================= -->
<!-- Setup the Root category -->
17 years, 2 months