jbpm-tempranillo Mailing List for jBPM
open-source, flexible Business Process Management (BPM) in Java
Brought to you by:
krisverlaenen
You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(11) |
Sep
(4) |
Oct
(91) |
Nov
(68) |
Dec
(36) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(60) |
Feb
(30) |
Mar
(257) |
Apr
(175) |
May
(126) |
Jun
(303) |
Jul
(99) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Nick B. <nic...@gm...> - 2010-02-02 16:47:42
|
Hello, I'm looking into upgrading our process definitions and integration / embedding code written in JBPM3 to JBPM4. Our code does not use any application server like JBoss so we do not rely on container or third party integration. Needless to say I see quite a lot has changed now that version 4 has arrived. The JBPM3 technology was more of a classic Finite State Machine. JBPM4 seems to have a new layer of abstraction: I see no sign of any GraphElement, Node, State, Transition, ActionHandler, ExecutionContext etc etc. I'm having a hard time seeing where these things morphed into or whether the original FSM idiom is simply gone. Stuff like "Swimlane" and "Task" strikes me as quite the departure so I'm not holding much hope. Currently we have several dozen process definitions ranging from 10 to 40 elements, the larger ones end up being around 1500 lines of XML. Is it even worth it to try and figure out where JBPM4 can fit into a migration strategy from JBPM3? I see some stuff that's named similarly in a package called org.jbpm...internal (that "internal" seems quite the red flag) that unfortunately isn't even close to the old code interface-wise. Specifically can anyone tell me where GraphElement, Node, State, Transition, ActionHandler, ExecutionContext may have gone or how they've changed? Thanks, Nick |
From: <do-...@jb...> - 2008-07-07 15:30:39
|
Author: porcherg Date: 2008-07-07 11:30:34 -0400 (Mon, 07 Jul 2008) New Revision: 1533 Modified: pvm/trunk/modules/core/src/test/java/org/jbpm/svc/hibernate/Order.hbm.xml Log: update db mapping Modified: pvm/trunk/modules/core/src/test/java/org/jbpm/svc/hibernate/Order.hbm.xml =================================================================== --- pvm/trunk/modules/core/src/test/java/org/jbpm/svc/hibernate/Order.hbm.xml 2008-07-07 15:26:54 UTC (rev 1532) +++ pvm/trunk/modules/core/src/test/java/org/jbpm/svc/hibernate/Order.hbm.xml 2008-07-07 15:30:34 UTC (rev 1533) @@ -3,7 +3,7 @@ <hibernate-mapping package="org.jbpm.svc.hibernate" default-access="field"> - <typedef name="execution" class="org.jbpm.svc.hibernate.ExecutionType" /> + <typedef name="execution" class="org.jbpm.pvm.client.ClientProcessInstance" /> <class name="Order" table="ORDERS"> |
From: <do-...@jb...> - 2008-07-07 15:27:32
|
Author: porcherg Date: 2008-07-07 11:26:54 -0400 (Mon, 07 Jul 2008) New Revision: 1532 Modified: pvm/trunk/modules/core/src/test/java/org/jbpm/svc/jobexecutor/ContinuationTest.cfg.xml pvm/trunk/modules/core/src/test/java/org/jbpm/svc/jobexecutor/ContinuationTest.java Log: fix continuationTest Modified: pvm/trunk/modules/core/src/test/java/org/jbpm/svc/jobexecutor/ContinuationTest.cfg.xml =================================================================== --- pvm/trunk/modules/core/src/test/java/org/jbpm/svc/jobexecutor/ContinuationTest.cfg.xml 2008-07-07 09:32:05 UTC (rev 1531) +++ pvm/trunk/modules/core/src/test/java/org/jbpm/svc/jobexecutor/ContinuationTest.cfg.xml 2008-07-07 15:26:54 UTC (rev 1532) @@ -33,7 +33,7 @@ <pvm-db-session /> <message-session /> - <job-session /> + <job-db-session /> </environment> Modified: pvm/trunk/modules/core/src/test/java/org/jbpm/svc/jobexecutor/ContinuationTest.java =================================================================== --- pvm/trunk/modules/core/src/test/java/org/jbpm/svc/jobexecutor/ContinuationTest.java 2008-07-07 09:32:05 UTC (rev 1531) +++ pvm/trunk/modules/core/src/test/java/org/jbpm/svc/jobexecutor/ContinuationTest.java 2008-07-07 15:26:54 UTC (rev 1532) @@ -33,8 +33,10 @@ import org.jbpm.pvm.env.Environment; import org.jbpm.pvm.env.EnvironmentFactory; import org.jbpm.pvm.env.PvmEnvironmentFactory; +import org.jbpm.pvm.internal.job.JobImpl; import org.jbpm.pvm.internal.jobexecutor.JobExecutor; import org.jbpm.pvm.internal.log.Log; +import org.jbpm.pvm.job.Job; import org.jbpm.pvm.model.ProcessDefinition; import org.jbpm.pvm.model.ProcessFactory; import org.jbpm.pvm.session.DbSession; @@ -149,7 +151,7 @@ Environment environment = environmentFactory.openEnvironment(); try { Session session = environment.get(Session.class); - Number jobs = (Number) session.createQuery("select count(*) from org.jbpm.env.session.Job").uniqueResult(); + Number jobs = (Number) session.createQuery("select count(*) from " + JobImpl.class.getName()).uniqueResult(); if (jobs!=null) { nbrOfJobsAvailable = jobs.intValue(); } |
From: <do-...@jb...> - 2008-07-07 09:32:14
|
Author: porcherg Date: 2008-07-07 05:32:05 -0400 (Mon, 07 Jul 2008) New Revision: 1531 Modified: pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/script/ExecutionEnvironment.java pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/spring/SpringEnvironment.java Log: remove method getTransaction() Modified: pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/script/ExecutionEnvironment.java =================================================================== --- pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/script/ExecutionEnvironment.java 2008-07-07 09:10:37 UTC (rev 1530) +++ pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/script/ExecutionEnvironment.java 2008-07-07 09:32:05 UTC (rev 1531) @@ -75,10 +75,6 @@ return null; } - public Transaction getTransaction() { - return null; - } - public String getUserId() { return null; } Modified: pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/spring/SpringEnvironment.java =================================================================== --- pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/spring/SpringEnvironment.java 2008-07-07 09:10:37 UTC (rev 1530) +++ pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/spring/SpringEnvironment.java 2008-07-07 09:32:05 UTC (rev 1531) @@ -143,10 +143,6 @@ return null; } - public Transaction getTransaction() { - return null; - } - public String getUserId() { return null; } |
From: <do-...@jb...> - 2008-07-07 09:10:46
|
Author: hei...@jb... Date: 2008-07-07 05:10:37 -0400 (Mon, 07 Jul 2008) New Revision: 1530 Modified: pvm/trunk/modules/core/pom.xml Log: Re-enable samples compilation and update exclude lists Modified: pvm/trunk/modules/core/pom.xml =================================================================== --- pvm/trunk/modules/core/pom.xml 2008-07-04 16:39:35 UTC (rev 1529) +++ pvm/trunk/modules/core/pom.xml 2008-07-07 09:10:37 UTC (rev 1530) @@ -98,14 +98,13 @@ <!-- Plugins --> <build> - <plugins> + <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <configuration> <showDeprecation>false</showDeprecation> <testExcludes> <!-- sample currently do not compile --> - <exclude>org/jbpm/pvm/samples/**/*.java</exclude> <exclude>org/jbpm/pvm/client/ExternalDecisionTest.java</exclude> <exclude>org/jbpm/pvm/client/PvmClientTests.java</exclude> </testExcludes> @@ -151,6 +150,10 @@ <exclude>org/jbpm/svc/jobexecutor/ContinuationTest.java</exclude> <exclude>org/jbpm/svc/hibernate/ExecutionTypeTest.java</exclude> <exclude>org/jbpm/pvm/internal/type/VariableAutoTypeResolutionTest.java</exclude> + <exclude>org/jbpm/pvm/samples/ex12/TimerTest.java</exclude> + <exclude>org/jbpm/pvm/samples/ex02/BasicProcessPersistenceTest.java</exclude> + <exclude>org/jbpm/pvm/samples/ex11/AsynchronousContinuationsTest.java</exclude> + <exclude>org/jbpm/pvm/samples/ex07/EventListenerTest.java</exclude> </excludes> </configuration> </plugin> @@ -209,4 +212,4 @@ </profiles> -</project> \ No newline at end of file +</project> |
From: <do-...@jb...> - 2008-07-04 16:39:38
|
Author: tho...@jb... Date: 2008-07-04 12:39:35 -0400 (Fri, 04 Jul 2008) New Revision: 1529 Modified: api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/activity/BasicActivity.java Log: javadoc Modified: api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/activity/BasicActivity.java =================================================================== --- api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/activity/BasicActivity.java 2008-07-04 16:20:03 UTC (rev 1528) +++ api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/activity/BasicActivity.java 2008-07-04 16:39:35 UTC (rev 1529) @@ -27,6 +27,12 @@ import org.jboss.bpm.process.Node; import org.jboss.bpm.runtime.Activity; +/** + * An Activity that adds an attachment to the execution context + * + * @author Tho...@jb... + * @since 04-Jul-2008 + */ public class BasicActivity implements Activity { public void execute(Node node, ExecutionContext ctx) |
From: <do-...@jb...> - 2008-07-04 16:32:22
|
Author: tho...@jb... Date: 2008-07-04 12:20:03 -0400 (Fri, 04 Jul 2008) New Revision: 1528 Added: jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/client/ProcessInstanceManagerImpl.java Removed: jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/client/ProcessInstanceFactoryImpl.java Modified: jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/client/ExecutionImpl.java jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/client/ExecutionManagerImpl.java jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/client/ProcessEngineImpl.java jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/runtime/ActivityWrapper.java jbpm3/trunk/modules/jpdl/core/src/main/resources/jbpm-beans.xml Log: Cleanup API Modified: jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/client/ExecutionImpl.java =================================================================== --- jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/client/ExecutionImpl.java 2008-07-04 16:19:53 UTC (rev 1527) +++ jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/client/ExecutionImpl.java 2008-07-04 16:20:03 UTC (rev 1528) @@ -28,10 +28,10 @@ import java.util.Iterator; import java.util.Set; -import org.jboss.bpm.client.Execution; -import org.jboss.bpm.client.ExecutionContext; import org.jboss.bpm.client.ProcessInstance; import org.jboss.bpm.client.internal.AbstractExecution; +import org.jboss.bpm.process.Execution; +import org.jboss.bpm.process.ExecutionContext; import org.jboss.bpm.process.Node; /** Modified: jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/client/ExecutionManagerImpl.java =================================================================== --- jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/client/ExecutionManagerImpl.java 2008-07-04 16:19:53 UTC (rev 1527) +++ jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/client/ExecutionManagerImpl.java 2008-07-04 16:20:03 UTC (rev 1528) @@ -23,10 +23,10 @@ // $Id$ -import org.jboss.bpm.client.Execution; import org.jboss.bpm.client.ExecutionManager; import org.jboss.bpm.client.ProcessEngine; import org.jboss.bpm.client.ProcessInstance; +import org.jboss.bpm.process.Execution; import org.jbpm.integration.def.ProcessDefinitionImpl; /** Modified: jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/client/ProcessEngineImpl.java =================================================================== --- jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/client/ProcessEngineImpl.java 2008-07-04 16:19:53 UTC (rev 1527) +++ jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/client/ProcessEngineImpl.java 2008-07-04 16:20:03 UTC (rev 1528) @@ -26,7 +26,7 @@ import org.jboss.bpm.client.ExecutionManager; import org.jboss.bpm.client.ProcessDefinitionManager; import org.jboss.bpm.client.ProcessEngine; -import org.jboss.bpm.client.ProcessInstanceFactory; +import org.jboss.bpm.client.ProcessInstanceManager; /** * A process engine with public access @@ -42,9 +42,9 @@ this.processDefinitionManager = processDefinitionManager; } - public void setProcessInstanceFactory(ProcessInstanceFactory processInstanceFactory) + public void setProcessInstanceManager(ProcessInstanceManager processInstanceManager) { - this.processInstanceFactory = processInstanceFactory; + this.processInstanceManager = processInstanceManager; } public void setExecutionManager(ExecutionManager executionManager) Deleted: jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/client/ProcessInstanceFactoryImpl.java =================================================================== --- jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/client/ProcessInstanceFactoryImpl.java 2008-07-04 16:19:53 UTC (rev 1527) +++ jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/client/ProcessInstanceFactoryImpl.java 2008-07-04 16:20:03 UTC (rev 1528) @@ -1,50 +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.integration.client; - -// $Id$ - -import org.jboss.bpm.client.ProcessEngine; -import org.jboss.bpm.client.ProcessInstance; -import org.jboss.bpm.client.ProcessInstanceFactory; -import org.jboss.bpm.process.ProcessDefinition; - -/** - * TODO - * - * @author tho...@jb... - * @since 18-Jun-2008 - */ -public class ProcessInstanceFactoryImpl extends ProcessInstanceFactory -{ - public void setProcessEngine(ProcessEngine engine) - { - this.engine = engine; - } - - @Override - protected ProcessInstance createProcessInstanceOverride(ProcessDefinition pdef) - { - ProcessInstance pinst = new ProcessInstanceImpl(pdef); - return pinst; - } -} Copied: jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/client/ProcessInstanceManagerImpl.java (from rev 1525, jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/client/ProcessInstanceFactoryImpl.java) =================================================================== --- jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/client/ProcessInstanceManagerImpl.java (rev 0) +++ jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/client/ProcessInstanceManagerImpl.java 2008-07-04 16:20:03 UTC (rev 1528) @@ -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.integration.client; + +// $Id$ + +import org.jboss.bpm.client.ProcessEngine; +import org.jboss.bpm.client.ProcessInstance; +import org.jboss.bpm.client.ProcessInstanceManager; +import org.jboss.bpm.process.ProcessDefinition; + +/** + * TODO + * + * @author tho...@jb... + * @since 18-Jun-2008 + */ +public class ProcessInstanceManagerImpl extends ProcessInstanceManager +{ + public void setProcessEngine(ProcessEngine engine) + { + this.engine = engine; + } + + @Override + protected ProcessInstance createProcessInstanceOverride(ProcessDefinition pdef) + { + ProcessInstance pinst = new ProcessInstanceImpl(pdef); + return pinst; + } +} Modified: jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/runtime/ActivityWrapper.java =================================================================== --- jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/runtime/ActivityWrapper.java 2008-07-04 16:19:53 UTC (rev 1527) +++ jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/runtime/ActivityWrapper.java 2008-07-04 16:20:03 UTC (rev 1528) @@ -23,7 +23,7 @@ // $Id$ -import org.jboss.bpm.client.Execution; +import org.jboss.bpm.process.Execution; import org.jboss.bpm.runtime.Activity; import org.jbpm.context.exe.ContextInstance; import org.jbpm.graph.def.Action; Modified: jbpm3/trunk/modules/jpdl/core/src/main/resources/jbpm-beans.xml =================================================================== --- jbpm3/trunk/modules/jpdl/core/src/main/resources/jbpm-beans.xml 2008-07-04 16:19:53 UTC (rev 1527) +++ jbpm3/trunk/modules/jpdl/core/src/main/resources/jbpm-beans.xml 2008-07-04 16:20:03 UTC (rev 1528) @@ -7,7 +7,7 @@ <!-- The process engine --> <bean name="jBPMProcessEngine" class="org.jbpm.integration.client.ProcessEngineImpl"> <property name="processDefinitionManager"><inject bean="jBPMProcessDefinitionManager"/></property> - <property name="processInstanceFactory"><inject bean="jBPMProcessInstanceFactory"/></property> + <property name="processInstanceManager"><inject bean="jBPMProcessInstanceManager"/></property> <property name="executionManager"><inject bean="jBPMExecutionManager"/></property> </bean> @@ -17,7 +17,7 @@ </bean> <!-- The process instance manager --> - <bean name="jBPMProcessInstanceFactory" class="org.jbpm.integration.client.ProcessInstanceFactoryImpl"> + <bean name="jBPMProcessInstanceManager" class="org.jbpm.integration.client.ProcessInstanceManagerImpl"> <property name="processEngine"><inject bean="jBPMProcessEngine" state="Instantiated"/></property> </bean> |
From: <do-...@jb...> - 2008-07-04 16:19:56
|
Author: tho...@jb... Date: 2008-07-04 12:19:53 -0400 (Fri, 04 Jul 2008) New Revision: 1527 Added: api/trunk/docs/VioletUML/APIClient.class.violet api/trunk/docs/VioletUML/APIClient.png api/trunk/docs/VioletUML/APIProcess.class.violet api/trunk/docs/VioletUML/APIProcess.png api/trunk/docs/VioletUML/APIRuntime.class.violet api/trunk/docs/VioletUML/APIRuntime.png api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessInstanceManager.java api/trunk/modules/api/src/main/java/org/jboss/bpm/process/Execution.java api/trunk/modules/api/src/main/java/org/jboss/bpm/process/ExecutionContext.java Removed: api/trunk/docs/VioletUML/ClientView.class.violet api/trunk/docs/VioletUML/ClientView.png api/trunk/docs/VioletUML/EngineAndManagers.class.violet api/trunk/docs/VioletUML/EngineAndManagers.png api/trunk/docs/VioletUML/RuntimeView.class.violet api/trunk/docs/VioletUML/RuntimeView.png api/trunk/modules/api/src/main/java/org/jboss/bpm/client/Execution.java api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ExecutionContext.java api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessInstanceFactory.java Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ExecutionManager.java api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessEngine.java api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessInstance.java api/trunk/modules/api/src/main/java/org/jboss/bpm/client/internal/AbstractExecution.java api/trunk/modules/api/src/main/java/org/jboss/bpm/client/internal/AbstractProcessInstance.java api/trunk/modules/api/src/main/java/org/jboss/bpm/process/ProcessDefinition.java api/trunk/modules/api/src/main/java/org/jboss/bpm/process/internal/AbstractProcessDefinition.java api/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Activity.java api/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/RuntimeExecution.java api/trunk/modules/api/src/test/java/org/jboss/bpm/client/MockProcessEngine.java api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/activity/BasicActivity.java api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/activity/BasicActivityTest.java api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/basic/BasicSequenceTest.java api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/context/ContextActivity.java api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/context/ExecutionContextTest.java Log: Cleanup API Added: api/trunk/docs/VioletUML/APIClient.class.violet =================================================================== --- api/trunk/docs/VioletUML/APIClient.class.violet (rev 0) +++ api/trunk/docs/VioletUML/APIClient.class.violet 2008-07-04 16:19:53 UTC (rev 1527) @@ -0,0 +1,232 @@ +<?xml version="1.0" encoding="UTF-8"?> +<java version="1.6.0_06" class="java.beans.XMLDecoder"> + <object class="com.horstmann.violet.ClassDiagramGraph"> + <void method="addNode"> + <object id="ClassNode0" class="com.horstmann.violet.ClassNode"> + <void property="attributes"> + <void property="text"> + <string>name</string> + </void> + </void> + <void property="name"> + <void property="text"> + <string>ProcessDefinition +</string> + </void> + </void> + </object> + <object class="java.awt.geom.Point2D$Double"> + <void method="setLocation"> + <double>520.0</double> + <double>151.0</double> + </void> + </object> + </void> + <void method="addNode"> + <object id="ClassNode1" class="com.horstmann.violet.ClassNode"> + <void property="methods"> + <void property="text"> + <string>prepareForShutdown +cancelShutdown</string> + </void> + </void> + <void property="name"> + <void property="text"> + <string>ProcessEngine</string> + </void> + </void> + </object> + <object class="java.awt.geom.Point2D$Double"> + <void method="setLocation"> + <double>12.0</double> + <double>281.0</double> + </void> + </object> + </void> + <void method="addNode"> + <object id="ClassNode2" class="com.horstmann.violet.ClassNode"> + <void property="methods"> + <void property="text"> + <string>createProcessDefinition +findProcessDefinition +removeProcessDefinition</string> + </void> + </void> + <void property="name"> + <void property="text"> + <string>ProcessDefinitionManager</string> + </void> + </void> + </object> + <object class="java.awt.geom.Point2D$Double"> + <void method="setLocation"> + <double>254.0</double> + <double>123.0</double> + </void> + </object> + </void> + <void method="addNode"> + <object id="ClassNode3" class="com.horstmann.violet.ClassNode"> + <void property="attributes"> + <void property="text"> + <string>name +metadata</string> + </void> + </void> + <void property="name"> + <void property="text"> + <string>ProcessInstance</string> + </void> + </void> + </object> + <object class="java.awt.geom.Point2D$Double"> + <void method="setLocation"> + <double>521.0</double> + <double>292.0</double> + </void> + </object> + </void> + <void method="addNode"> + <object id="ClassNode4" class="com.horstmann.violet.ClassNode"> + <void property="attributes"> + <void property="text"> + <string>name</string> + </void> + </void> + <void property="name"> + <void property="text"> + <string>Execution</string> + </void> + </void> + </object> + <object class="java.awt.geom.Point2D$Double"> + <void method="setLocation"> + <double>524.0</double> + <double>425.0</double> + </void> + </object> + </void> + <void method="addNode"> + <object id="ClassNode5" class="com.horstmann.violet.ClassNode"> + <void property="methods"> + <void property="text"> + <string>createProcessInstance +</string> + </void> + </void> + <void property="name"> + <void property="text"> + <string>ProcessInstanceManager</string> + </void> + </void> + </object> + <object class="java.awt.geom.Point2D$Double"> + <void method="setLocation"> + <double>253.0</double> + <double>288.0</double> + </void> + </object> + </void> + <void method="addNode"> + <object id="ClassNode6" class="com.horstmann.violet.ClassNode"> + <void property="methods"> + <void property="text"> + <string>createExecution</string> + </void> + </void> + <void property="name"> + <void property="text"> + <string>ExecutionManager</string> + </void> + </void> + </object> + <object class="java.awt.geom.Point2D$Double"> + <void method="setLocation"> + <double>250.0</double> + <double>416.0</double> + </void> + </object> + </void> + <void method="connect"> + <object class="com.horstmann.violet.ClassRelationshipEdge"> + <void property="bentStyle"> + <object class="com.horstmann.violet.BentStyle" field="HVH"/> + </void> + <void property="startArrowHead"> + <object class="com.horstmann.violet.ArrowHead" field="DIAMOND"/> + </void> + </object> + <object idref="ClassNode1"/> + <object idref="ClassNode2"/> + </void> + <void method="connect"> + <object class="com.horstmann.violet.ClassRelationshipEdge"> + <void property="bentStyle"> + <object class="com.horstmann.violet.BentStyle" field="HVH"/> + </void> + <void property="endArrowHead"> + <object class="com.horstmann.violet.ArrowHead" field="V"/> + </void> + <void property="endLabel"> + <string>0..*</string> + </void> + </object> + <object idref="ClassNode2"/> + <object idref="ClassNode0"/> + </void> + <void method="connect"> + <object class="com.horstmann.violet.ClassRelationshipEdge"> + <void property="bentStyle"> + <object class="com.horstmann.violet.BentStyle" field="HVH"/> + </void> + <void property="endLabel"> + <string>0..*</string> + </void> + <void property="startArrowHead"> + <object class="com.horstmann.violet.ArrowHead" field="DIAMOND"/> + </void> + </object> + <object idref="ClassNode0"/> + <object idref="ClassNode3"/> + </void> + <void method="connect"> + <object class="com.horstmann.violet.ClassRelationshipEdge"> + <void property="bentStyle"> + <object class="com.horstmann.violet.BentStyle" field="HVH"/> + </void> + <void property="endLabel"> + <string>0..*</string> + </void> + <void property="startArrowHead"> + <object class="com.horstmann.violet.ArrowHead" field="DIAMOND"/> + </void> + </object> + <object idref="ClassNode3"/> + <object idref="ClassNode4"/> + </void> + <void method="connect"> + <object class="com.horstmann.violet.ClassRelationshipEdge"> + <void property="bentStyle"> + <object class="com.horstmann.violet.BentStyle" field="HVH"/> + </void> + <void property="startArrowHead"> + <object class="com.horstmann.violet.ArrowHead" field="DIAMOND"/> + </void> + </object> + <object idref="ClassNode1"/> + <object idref="ClassNode5"/> + </void> + <void method="connect"> + <object class="com.horstmann.violet.ClassRelationshipEdge"> + <void property="bentStyle"> + <object class="com.horstmann.violet.BentStyle" field="HVH"/> + </void> + <void property="startArrowHead"> + <object class="com.horstmann.violet.ArrowHead" field="DIAMOND"/> + </void> + </object> + <object idref="ClassNode1"/> + <object idref="ClassNode6"/> + </void> + </object> +</java> Added: api/trunk/docs/VioletUML/APIClient.png =================================================================== (Binary files differ) Property changes on: api/trunk/docs/VioletUML/APIClient.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: api/trunk/docs/VioletUML/APIProcess.class.violet =================================================================== --- api/trunk/docs/VioletUML/APIProcess.class.violet (rev 0) +++ api/trunk/docs/VioletUML/APIProcess.class.violet 2008-07-04 16:19:53 UTC (rev 1527) @@ -0,0 +1,329 @@ +<?xml version="1.0" encoding="UTF-8"?> +<java version="1.6.0_06" class="java.beans.XMLDecoder"> + <object class="com.horstmann.violet.ClassDiagramGraph"> + <void method="addNode"> + <object id="ClassNode0" class="com.horstmann.violet.ClassNode"> + <void property="attributes"> + <void property="text"> + <string>name</string> + </void> + </void> + <void property="methods"> + <void property="text"> + <string>createProcessInstance +findProcessInstance +removeProcessInstance</string> + </void> + </void> + <void property="name"> + <void property="text"> + <string>ProcessDefinition +</string> + </void> + </void> + </object> + <object class="java.awt.geom.Point2D$Double"> + <void method="setLocation"> + <double>162.0</double> + <double>210.0</double> + </void> + </object> + </void> + <void method="addNode"> + <object id="ClassNode1" class="com.horstmann.violet.ClassNode"> + <void property="attributes"> + <void property="text"> + <string>name</string> + </void> + </void> + <void property="name"> + <void property="text"> + <string>Node</string> + </void> + </void> + </object> + <object class="java.awt.geom.Point2D$Double"> + <void method="setLocation"> + <double>394.0</double> + <double>232.0</double> + </void> + </object> + </void> + <void method="addNode"> + <object id="ClassNode2" class="com.horstmann.violet.ClassNode"> + <void property="name"> + <void property="text"> + <string>StartNode +</string> + </void> + </void> + </object> + <object class="java.awt.geom.Point2D$Double"> + <void method="setLocation"> + <double>304.0</double> + <double>69.0</double> + </void> + </object> + </void> + <void method="addNode"> + <object id="ClassNode3" class="com.horstmann.violet.ClassNode"> + <void property="name"> + <void property="text"> + <string>EndNode</string> + </void> + </void> + </object> + <object class="java.awt.geom.Point2D$Double"> + <void method="setLocation"> + <double>470.0</double> + <double>74.0</double> + </void> + </object> + </void> + <void method="addNode"> + <object id="ClassNode4" class="com.horstmann.violet.ClassNode"> + <void property="attributes"> + <void property="text"> + <string>name</string> + </void> + </void> + <void property="methods"> + <void property="text"> + <string>createExecution +findExecution +removeExecution</string> + </void> + </void> + <void property="name"> + <void property="text"> + <string>ProcessInstance</string> + </void> + </void> + </object> + <object class="java.awt.geom.Point2D$Double"> + <void method="setLocation"> + <double>170.0</double> + <double>362.0</double> + </void> + </object> + </void> + <void method="addNode"> + <object id="ClassNode5" class="com.horstmann.violet.ClassNode"> + <void property="attributes"> + <void property="text"> + <string>name</string> + </void> + </void> + <void property="methods"> + <void property="text"> + <string>signal()</string> + </void> + </void> + <void property="name"> + <void property="text"> + <string>Execution</string> + </void> + </void> + </object> + <object class="java.awt.geom.Point2D$Double"> + <void method="setLocation"> + <double>388.0</double> + <double>377.0</double> + </void> + </object> + </void> + <void method="addNode"> + <object id="NoteNode0" class="com.horstmann.violet.NoteNode"> + <void property="text"> + <void property="text"> + <string>The client signals the +Excecution without +parameters. </string> + </void> + </void> + </object> + <object class="java.awt.geom.Point2D$Double"> + <void method="setLocation"> + <double>437.0</double> + <double>491.0</double> + </void> + </object> + </void> + <void method="addNode"> + <object id="ClassNode6" class="com.horstmann.violet.ClassNode"> + <void property="name"> + <void property="text"> + <string>ExecutionContext</string> + </void> + </void> + </object> + <object class="java.awt.geom.Point2D$Double"> + <void method="setLocation"> + <double>547.0</double> + <double>375.0</double> + </void> + </object> + </void> + <void method="addNode"> + <object id="ClassNode7" class="com.horstmann.violet.ClassNode"> + <void property="name"> + <void property="text"> + <string>Attachments</string> + </void> + </void> + </object> + <object class="java.awt.geom.Point2D$Double"> + <void method="setLocation"> + <double>9.0</double> + <double>371.0</double> + </void> + </object> + </void> + <void method="addNode"> + <object id="ClassNode8" class="com.horstmann.violet.ClassNode"> + <void property="name"> + <void property="text"> + <string>Attachments</string> + </void> + </void> + </object> + <object class="java.awt.geom.Point2D$Double"> + <void method="setLocation"> + <double>550.0</double> + <double>270.0</double> + </void> + </object> + </void> + <void method="connect"> + <object class="com.horstmann.violet.ClassRelationshipEdge"> + <void property="bentStyle"> + <object class="com.horstmann.violet.BentStyle" field="HVH"/> + </void> + <void property="endLabel"> + <string>1..*</string> + </void> + <void property="startArrowHead"> + <object class="com.horstmann.violet.ArrowHead" field="DIAMOND"/> + </void> + </object> + <object idref="ClassNode0"/> + <object idref="ClassNode1"/> + </void> + <void method="connect"> + <object class="com.horstmann.violet.ClassRelationshipEdge"> + <void property="bentStyle"> + <object class="com.horstmann.violet.BentStyle" field="VHV"/> + </void> + <void property="endArrowHead"> + <object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/> + </void> + </object> + <object idref="ClassNode2"/> + <object idref="ClassNode1"/> + </void> + <void method="connect"> + <object class="com.horstmann.violet.ClassRelationshipEdge"> + <void property="bentStyle"> + <object class="com.horstmann.violet.BentStyle" field="VHV"/> + </void> + <void property="endArrowHead"> + <object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/> + </void> + </object> + <object idref="ClassNode3"/> + <object idref="ClassNode1"/> + </void> + <void method="connect"> + <object class="com.horstmann.violet.ClassRelationshipEdge"> + <void property="bentStyle"> + <object class="com.horstmann.violet.BentStyle" field="HVH"/> + </void> + <void property="endArrowHead"> + <object class="com.horstmann.violet.ArrowHead" field="V"/> + </void> + <void property="endLabel"> + <string>current</string> + </void> + </object> + <object idref="ClassNode5"/> + <object idref="ClassNode1"/> + </void> + <void method="connect"> + <object class="com.horstmann.violet.ClassRelationshipEdge"> + <void property="bentStyle"> + <object class="com.horstmann.violet.BentStyle" field="HVH"/> + </void> + <void property="endLabel"> + <string>0..*</string> + </void> + <void property="startArrowHead"> + <object class="com.horstmann.violet.ArrowHead" field="DIAMOND"/> + </void> + </object> + <object idref="ClassNode0"/> + <object idref="ClassNode4"/> + </void> + <void method="connect"> + <object class="com.horstmann.violet.ClassRelationshipEdge"> + <void property="bentStyle"> + <object class="com.horstmann.violet.BentStyle" field="HVH"/> + </void> + <void property="endLabel"> + <string>0..*</string> + </void> + <void property="startArrowHead"> + <object class="com.horstmann.violet.ArrowHead" field="DIAMOND"/> + </void> + </object> + <object idref="ClassNode4"/> + <object idref="ClassNode5"/> + </void> + <void method="connect"> + <object class="com.horstmann.violet.NoteEdge"/> + <object idref="ClassNode5"/> + <object idref="NoteNode0"/> + </void> + <void method="connect"> + <object class="com.horstmann.violet.ClassRelationshipEdge"> + <void property="bentStyle"> + <object class="com.horstmann.violet.BentStyle" field="VHV"/> + </void> + <void property="endArrowHead"> + <object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/> + </void> + <void property="lineStyle"> + <object class="com.horstmann.violet.LineStyle" field="DOTTED"/> + </void> + </object> + <object idref="ClassNode4"/> + <object idref="ClassNode7"/> + </void> + <void method="connect"> + <object class="com.horstmann.violet.ClassRelationshipEdge"> + <void property="bentStyle"> + <object class="com.horstmann.violet.BentStyle" field="HVH"/> + </void> + <void property="startArrowHead"> + <object class="com.horstmann.violet.ArrowHead" field="DIAMOND"/> + </void> + </object> + <object idref="ClassNode5"/> + <object idref="ClassNode6"/> + </void> + <void method="connect"> + <object class="com.horstmann.violet.ClassRelationshipEdge"> + <void property="bentStyle"> + <object class="com.horstmann.violet.BentStyle" field="VHV"/> + </void> + <void property="endArrowHead"> + <object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/> + </void> + <void property="lineStyle"> + <object class="com.horstmann.violet.LineStyle" field="DOTTED"/> + </void> + </object> + <object idref="ClassNode6"/> + <object idref="ClassNode8"/> + </void> + </object> +</java> Added: api/trunk/docs/VioletUML/APIProcess.png =================================================================== (Binary files differ) Property changes on: api/trunk/docs/VioletUML/APIProcess.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: api/trunk/docs/VioletUML/APIRuntime.class.violet =================================================================== --- api/trunk/docs/VioletUML/APIRuntime.class.violet (rev 0) +++ api/trunk/docs/VioletUML/APIRuntime.class.violet 2008-07-04 16:19:53 UTC (rev 1527) @@ -0,0 +1,330 @@ +<?xml version="1.0" encoding="UTF-8"?> +<java version="1.6.0_06" class="java.beans.XMLDecoder"> + <object class="com.horstmann.violet.ClassDiagramGraph"> + <void method="addNode"> + <object id="ClassNode0" class="com.horstmann.violet.ClassNode"> + <void property="attributes"> + <void property="text"> + <string>name</string> + </void> + </void> + <void property="methods"> + <void property="text"> + <string>signal(name)</string> + </void> + </void> + <void property="name"> + <void property="text"> + <string>RuntimeExecution</string> + </void> + </void> + </object> + <object class="java.awt.geom.Point2D$Double"> + <void method="setLocation"> + <double>172.0</double> + <double>355.0</double> + </void> + </object> + </void> + <void method="addNode"> + <object id="ClassNode1" class="com.horstmann.violet.ClassNode"> + <void property="attributes"> + <void property="text"> + <string>name</string> + </void> + </void> + <void property="name"> + <void property="text"> + <string>RuntimeNode</string> + </void> + </void> + </object> + <object class="java.awt.geom.Point2D$Double"> + <void method="setLocation"> + <double>171.0</double> + <double>243.0</double> + </void> + </object> + </void> + <void method="addNode"> + <object id="ClassNode2" class="com.horstmann.violet.ClassNode"> + <void property="attributes"> + <void property="text"> + <string>name</string> + </void> + </void> + <void property="name"> + <void property="text"> + <string>Transition</string> + </void> + </void> + </object> + <object class="java.awt.geom.Point2D$Double"> + <void method="setLocation"> + <double>12.0</double> + <double>241.0</double> + </void> + </object> + </void> + <void method="addNode"> + <object id="ClassNode3" class="com.horstmann.violet.ClassNode"> + <void property="methods"> + <void property="text"> + <string>execute</string> + </void> + </void> + <void property="name"> + <void property="text"> + <string>Activity</string> + </void> + </void> + </object> + <object class="java.awt.geom.Point2D$Double"> + <void method="setLocation"> + <double>397.0</double> + <double>209.0</double> + </void> + </object> + </void> + <void method="addNode"> + <object id="ClassNode4" class="com.horstmann.violet.ClassNode"> + <void property="methods"> + <void property="text"> + <string>choosePath</string> + </void> + </void> + <void property="name"> + <void property="text"> + <string>TransitionRouter</string> + </void> + </void> + </object> + <object class="java.awt.geom.Point2D$Double"> + <void method="setLocation"> + <double>395.0</double> + <double>297.0</double> + </void> + </object> + </void> + <void method="addNode"> + <object id="NoteNode0" class="com.horstmann.violet.NoteNode"> + <void property="text"> + <void property="text"> + <string>Executes business logic. +Has access to the execution +context, but not the definition.</string> + </void> + </void> + </object> + <object class="java.awt.geom.Point2D$Double"> + <void method="setLocation"> + <double>291.0</double> + <double>100.0</double> + </void> + </object> + </void> + <void method="addNode"> + <object id="NoteNode1" class="com.horstmann.violet.NoteNode"> + <void property="text"> + <void property="text"> + <string>Chooses the leaving +Transition.</string> + </void> + </void> + </object> + <object class="java.awt.geom.Point2D$Double"> + <void method="setLocation"> + <double>459.0</double> + <double>415.0</double> + </void> + </object> + </void> + <void method="addNode"> + <object id="ClassNode5" class="com.horstmann.violet.ClassNode"> + <void property="attributes"> + <void property="text"> + <string> +</string> + </void> + </void> + <void property="name"> + <void property="text"> + <string>ExecutionContext</string> + </void> + </void> + </object> + <object class="java.awt.geom.Point2D$Double"> + <void method="setLocation"> + <double>562.0</double> + <double>254.0</double> + </void> + </object> + </void> + <void method="addNode"> + <object id="ClassNode6" class="com.horstmann.violet.ClassNode"> + <void property="attributes"> + <void property="text"> + <string>name</string> + </void> + </void> + <void property="name"> + <void property="text"> + <string>Node</string> + </void> + </void> + </object> + <object class="java.awt.geom.Point2D$Double"> + <void method="setLocation"> + <double>559.0</double> + <double>163.0</double> + </void> + </object> + </void> + <void method="addNode"> + <object id="ClassNode7" class="com.horstmann.violet.ClassNode"> + <void property="attributes"> + <void property="text"> + <string>name</string> + </void> + </void> + <void property="methods"> + <void property="text"> + <string>signal()</string> + </void> + </void> + <void property="name"> + <void property="text"> + <string>Execution</string> + </void> + </void> + </object> + <object class="java.awt.geom.Point2D$Double"> + <void method="setLocation"> + <double>16.0</double> + <double>356.0</double> + </void> + </object> + </void> + <void method="connect"> + <object class="com.horstmann.violet.ClassRelationshipEdge"> + <void property="bentStyle"> + <object class="com.horstmann.violet.BentStyle" field="HVH"/> + </void> + <void property="endArrowHead"> + <object class="com.horstmann.violet.ArrowHead" field="V"/> + </void> + <void property="endLabel"> + <string>current</string> + </void> + </object> + <object idref="ClassNode0"/> + <object idref="ClassNode1"/> + </void> + <void method="connect"> + <object class="com.horstmann.violet.ClassRelationshipEdge"> + <void property="bentStyle"> + <object class="com.horstmann.violet.BentStyle" field="HVH"/> + </void> + <void property="endArrowHead"> + <object class="com.horstmann.violet.ArrowHead" field="V"/> + </void> + <void property="endLabel"> + <string>0..*</string> + </void> + </object> + <object idref="ClassNode1"/> + <object idref="ClassNode2"/> + </void> + <void method="connect"> + <object class="com.horstmann.violet.ClassRelationshipEdge"> + <void property="bentStyle"> + <object class="com.horstmann.violet.BentStyle" field="VHV"/> + </void> + <void property="endArrowHead"> + <object class="com.horstmann.violet.ArrowHead" field="V"/> + </void> + </object> + <object idref="ClassNode1"/> + <object idref="ClassNode3"/> + </void> + <void method="connect"> + <object class="com.horstmann.violet.ClassRelationshipEdge"> + <void property="bentStyle"> + <object class="com.horstmann.violet.BentStyle" field="HVH"/> + </void> + <void property="endArrowHead"> + <object class="com.horstmann.violet.ArrowHead" field="V"/> + </void> + </object> + <object idref="ClassNode1"/> + <object idref="ClassNode4"/> + </void> + <void method="connect"> + <object class="com.horstmann.violet.ClassRelationshipEdge"> + <void property="bentStyle"> + <object class="com.horstmann.violet.BentStyle" field="VH"/> + </void> + <void property="endArrowHead"> + <object class="com.horstmann.violet.ArrowHead" field="V"/> + </void> + <void property="lineStyle"> + <object class="com.horstmann.violet.LineStyle" field="DOTTED"/> + </void> + </object> + <object idref="ClassNode4"/> + <object idref="ClassNode0"/> + </void> + <void method="connect"> + <object class="com.horstmann.violet.NoteEdge"/> + <object idref="ClassNode3"/> + <object idref="NoteNode0"/> + </void> + <void method="connect"> + <object class="com.horstmann.violet.NoteEdge"/> + <object idref="ClassNode4"/> + <object idref="NoteNode1"/> + </void> + <void method="connect"> + <object class="com.horstmann.violet.ClassRelationshipEdge"> + <void property="bentStyle"> + <object class="com.horstmann.violet.BentStyle" field="HVH"/> + </void> + <void property="endArrowHead"> + <object class="com.horstmann.violet.ArrowHead" field="V"/> + </void> + <void property="lineStyle"> + <object class="com.horstmann.violet.LineStyle" field="DOTTED"/> + </void> + </object> + <object idref="ClassNode3"/> + <object idref="ClassNode5"/> + </void> + <void method="connect"> + <object class="com.horstmann.violet.ClassRelationshipEdge"> + <void property="bentStyle"> + <object class="com.horstmann.violet.BentStyle" field="HVH"/> + </void> + <void property="endArrowHead"> + <object class="com.horstmann.violet.ArrowHead" field="V"/> + </void> + <void property="lineStyle"> + <object class="com.horstmann.violet.LineStyle" field="DOTTED"/> + </void> + </object> + <object idref="ClassNode3"/> + <object idref="ClassNode6"/> + </void> + <void method="connect"> + <object class="com.horstmann.violet.ClassRelationshipEdge"> + <void property="bentStyle"> + <object class="com.horstmann.violet.BentStyle" field="VHV"/> + </void> + <void property="endArrowHead"> + <object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/> + </void> + </object> + <object idref="ClassNode0"/> + <object idref="ClassNode7"/> + </void> + </object> +</java> Added: api/trunk/docs/VioletUML/APIRuntime.png =================================================================== (Binary files differ) Property changes on: api/trunk/docs/VioletUML/APIRuntime.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Deleted: api/trunk/docs/VioletUML/ClientView.class.violet =================================================================== --- api/trunk/docs/VioletUML/ClientView.class.violet 2008-07-04 15:11:08 UTC (rev 1526) +++ api/trunk/docs/VioletUML/ClientView.class.violet 2008-07-04 16:19:53 UTC (rev 1527) @@ -1,371 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<java version="1.6.0_06" class="java.beans.XMLDecoder"> - <object class="com.horstmann.violet.ClassDiagramGraph"> - <void method="addNode"> - <object id="ClassNode0" class="com.horstmann.violet.ClassNode"> - <void property="attributes"> - <void property="text"> - <string>name</string> - </void> - </void> - <void property="methods"> - <void property="text"> - <string>createProcessInstance -findProcessInstance -removeProcessInstance</string> - </void> - </void> - <void property="name"> - <void property="text"> - <string>ProcessDefinition -</string> - </void> - </void> - </object> - <object class="java.awt.geom.Point2D$Double"> - <void method="setLocation"> - <double>201.0</double> - <double>202.0</double> - </void> - </object> - </void> - <void method="addNode"> - <object id="ClassNode1" class="com.horstmann.violet.ClassNode"> - <void property="attributes"> - <void property="text"> - <string>name</string> - </void> - </void> - <void property="name"> - <void property="text"> - <string>Node</string> - </void> - </void> - </object> - <object class="java.awt.geom.Point2D$Double"> - <void method="setLocation"> - <double>433.0</double> - <double>224.0</double> - </void> - </object> - </void> - <void method="addNode"> - <object id="ClassNode2" class="com.horstmann.violet.ClassNode"> - <void property="name"> - <void property="text"> - <string>StartNode -</string> - </void> - </void> - </object> - <object class="java.awt.geom.Point2D$Double"> - <void method="setLocation"> - <double>441.0</double> - <double>61.0</double> - </void> - </object> - </void> - <void method="addNode"> - <object id="ClassNode3" class="com.horstmann.violet.ClassNode"> - <void property="name"> - <void property="text"> - <string>EndNode</string> - </void> - </void> - </object> - <object class="java.awt.geom.Point2D$Double"> - <void method="setLocation"> - <double>598.0</double> - <double>57.0</double> - </void> - </object> - </void> - <void method="addNode"> - <object id="ClassNode4" class="com.horstmann.violet.ClassNode"> - <void property="attributes"> - <void property="text"> - <string>name</string> - </void> - </void> - <void property="methods"> - <void property="text"> - <string>createExecution -findExecution -removeExecution</string> - </void> - </void> - <void property="name"> - <void property="text"> - <string>ProcessInstance</string> - </void> - </void> - </object> - <object class="java.awt.geom.Point2D$Double"> - <void method="setLocation"> - <double>209.0</double> - <double>354.0</double> - </void> - </object> - </void> - <void method="addNode"> - <object id="ClassNode5" class="com.horstmann.violet.ClassNode"> - <void property="attributes"> - <void property="text"> - <string>name</string> - </void> - </void> - <void property="methods"> - <void property="text"> - <string>signal()</string> - </void> - </void> - <void property="name"> - <void property="text"> - <string>Execution</string> - </void> - </void> - </object> - <object class="java.awt.geom.Point2D$Double"> - <void method="setLocation"> - <double>444.0</double> - <double>366.0</double> - </void> - </object> - </void> - <void method="addNode"> - <object class="com.horstmann.violet.PackageNode"> - <void property="contents"> - <void property="text"> - <string>The client view of the BPM model</string> - </void> - </void> - <void property="name"> - <string>org.jboss.bpm.client</string> - </void> - </object> - <object class="java.awt.geom.Point2D$Double"> - <void method="setLocation"> - <double>24.0</double> - <double>493.0</double> - </void> - </object> - </void> - <void method="addNode"> - <object id="ClassNode6" class="com.horstmann.violet.ClassNode"> - <void property="name"> - <void property="text"> - <string>ProcessNode</string> - </void> - </void> - </object> - <object class="java.awt.geom.Point2D$Double"> - <void method="setLocation"> - <double>241.0</double> - <double>63.0</double> - </void> - </object> - </void> - <void method="addNode"> - <object id="NoteNode0" class="com.horstmann.violet.NoteNode"> - <void property="text"> - <void property="text"> - <string>The client signals the -Excecution without -parameters. </string> - </void> - </void> - </object> - <object class="java.awt.geom.Point2D$Double"> - <void method="setLocation"> - <double>476.0</double> - <double>483.0</double> - </void> - </object> - </void> - <void method="addNode"> - <object id="ClassNode7" class="com.horstmann.violet.ClassNode"> - <void property="attributes"> - <void property="text"> - <string>attachments -properties</string> - </void> - </void> - <void property="name"> - <void property="text"> - <string>Context</string> - </void> - </void> - </object> - <object class="java.awt.geom.Point2D$Double"> - <void method="setLocation"> - <double>607.0</double> - <double>358.0</double> - </void> - </object> - </void> - <void method="addNode"> - <object id="ClassNode8" class="com.horstmann.violet.ClassNode"> - <void property="attributes"> - <void property="text"> - <string>attachments -properties</string> - </void> - </void> - <void property="name"> - <void property="text"> - <string>Context</string> - </void> - </void> - </object> - <object class="java.awt.geom.Point2D$Double"> - <void method="setLocation"> - <double>48.0</double> - <double>363.0</double> - </void> - </object> - </void> - <void method="connect"> - <object class="com.horstmann.violet.ClassRelationshipEdge"> - <void property="bentStyle"> - <object class="com.horstmann.violet.BentStyle" field="HVH"/> - </void> - <void property="endLabel"> - <string>1..*</string> - </void> - <void property="startArrowHead"> - <object class="com.horstmann.violet.ArrowHead" field="DIAMOND"/> - </void> - </object> - <object idref="ClassNode0"/> - <object idref="ClassNode1"/> - </void> - <void method="connect"> - <object class="com.horstmann.violet.ClassRelationshipEdge"> - <void property="bentStyle"> - <object class="com.horstmann.violet.BentStyle" field="VHV"/> - </void> - <void property="endArrowHead"> - <object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/> - </void> - </object> - <object idref="ClassNode2"/> - <object idref="ClassNode1"/> - </void> - <void method="connect"> - <object class="com.horstmann.violet.ClassRelationshipEdge"> - <void property="bentStyle"> - <object class="com.horstmann.violet.BentStyle" field="VHV"/> - </void> - <void property="endArrowHead"> - <object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/> - </void> - </object> - <object idref="ClassNode3"/> - <object idref="ClassNode1"/> - </void> - <void method="connect"> - <object class="com.horstmann.violet.ClassRelationshipEdge"> - <void property="bentStyle"> - <object class="com.horstmann.violet.BentStyle" field="HVH"/> - </void> - <void property="endArrowHead"> - <object class="com.horstmann.violet.ArrowHead" field="V"/> - </void> - <void property="endLabel"> - <string>current</string> - </void> - </object> - <object idref="ClassNode5"/> - <object idref="ClassNode1"/> - </void> - <void method="connect"> - <object class="com.horstmann.violet.ClassRelationshipEdge"> - <void property="bentStyle"> - <object class="com.horstmann.violet.BentStyle" field="VHV"/> - </void> - <void property="endArrowHead"> - <object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/> - </void> - </object> - <object idref="ClassNode6"/> - <object idref="ClassNode1"/> - </void> - <void method="connect"> - <object class="com.horstmann.violet.ClassRelationshipEdge"> - <void property="bentStyle"> - <object class="com.horstmann.violet.BentStyle" field="HVH"/> - </void> - <void property="endArrowHead"> - <object class="com.horstmann.violet.ArrowHead" field="V"/> - </void> - </object> - <object idref="ClassNode6"/> - <object idref="ClassNode0"/> - </void> - <void method="connect"> - <object class="com.horstmann.violet.ClassRelationshipEdge"> - <void property="bentStyle"> - <object class="com.horstmann.violet.BentStyle" field="HVH"/> - </void> - <void property="endLabel"> - <string>0..*</string> - </void> - <void property="startArrowHead"> - <object class="com.horstmann.violet.ArrowHead" field="DIAMOND"/> - </void> - </object> - <object idref="ClassNode0"/> - <object idref="ClassNode4"/> - </void> - <void method="connect"> - <object class="com.horstmann.violet.ClassRelationshipEdge"> - <void property="bentStyle"> - <object class="com.horstmann.violet.BentStyle" field="HVH"/> - </void> - <void property="endLabel"> - <string>0..*</string> - </void> - <void property="startArrowHead"> - <object class="com.horstmann.violet.ArrowHead" field="DIAMOND"/> - </void> - </object> - <object idref="ClassNode4"/> - <object idref="ClassNode5"/> - </void> - <void method="connect"> - <object class="com.horstmann.violet.NoteEdge"/> - <object idref="ClassNode5"/> - <object idref="NoteNode0"/> - </void> - <void method="connect"> - <object class="com.horstmann.violet.ClassRelationshipEdge"> - <void property="bentStyle"> - <object class="com.horstmann.violet.BentStyle" field="VHV"/> - </void> - <void property="endArrowHead"> - <object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/> - </void> - <void property="lineStyle"> - <object class="com.horstmann.violet.LineStyle" field="DOTTED"/> - </void> - </object> - <object idref="ClassNode5"/> - <object idref="ClassNode7"/> - </void> - <void method="connect"> - <object class="com.horstmann.violet.ClassRelationshipEdge"> - <void property="bentStyle"> - <object class="com.horstmann.violet.BentStyle" field="VHV"/> - </void> - <void property="endArrowHead"> - <object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/> - </void> - <void property="lineStyle"> - <object class="com.horstmann.violet.LineStyle" field="DOTTED"/> - </void> - </object> - <object idref="ClassNode4"/> - <object idref="ClassNode8"/> - </void> - </object> -</java> Deleted: api/trunk/docs/VioletUML/ClientView.png =================================================================== (Binary files differ) Deleted: api/trunk/docs/VioletUML/EngineAndManagers.class.violet =================================================================== --- api/trunk/docs/VioletUML/EngineAndManagers.class.violet 2008-07-04 15:11:08 UTC (rev 1526) +++ api/trunk/docs/VioletUML/EngineAndManagers.class.violet 2008-07-04 16:19:53 UTC (rev 1527) @@ -1,250 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<java version="1.6.0_06" class="java.beans.XMLDecoder"> - <object class="com.horstmann.violet.ClassDiagramGraph"> - <void method="addNode"> - <object id="ClassNode0" class="com.horstmann.violet.ClassNode"> - <void property="attributes"> - <void property="text"> - <string>name</string> - </void> - </void> - <void property="name"> - <void property="text"> - <string>ProcessDefinition -</string> - </void> - </void> - </object> - <object class="java.awt.geom.Point2D$Double"> - <void method="setLocation"> - <double>591.0</double> - <double>136.0</double> - </void> - </object> - </void> - <void method="addNode"> - <object id="ClassNode1" class="com.horstmann.violet.ClassNode"> - <void property="methods"> - <void property="text"> - <string>prepareForShutdown -cancelShutdown</string> - </void> - </void> - <void property="name"> - <void property="text"> - <string>ProcessEngine</string> - </void> - </void> - </object> - <object class="java.awt.geom.Point2D$Double"> - <void method="setLocation"> - <double>78.0</double> - <double>264.0</double> - </void> - </object> - </void> - <void method="addNode"> - <object id="ClassNode2" class="com.horstmann.violet.ClassNode"> - <void property="methods"> - <void property="text"> - <string>createProcessDefinition -findProcessDefinition -removeProcessDefinition</string> - </void> - </void> - <void property="name"> - <void property="text"> - <string>ProcessDefinitionManager</string> - </void> - </void> - </object> - <object class="java.awt.geom.Point2D$Double"> - <void method="setLocation"> - <double>320.0</double> - <double>106.0</double> - </void> - </object> - </void> - <void method="addNode"> - <object id="ClassNode3" class="com.horstmann.violet.ClassNode"> - <void property="attributes"> - <void property="text"> - <string>name -metadata</string> - </void> - </void> - <void property="name"> - <void property="text"> - <string>ProcessInstance</string> - </void> - </void> - </object> - <object class="java.awt.geom.Point2D$Double"> - <void method="setLocation"> - <double>588.0</double> - <double>284.0</double> - </void> - </object> - </void> - <void method="addNode"> - <object id="ClassNode4" class="com.horstmann.violet.ClassNode"> - <void property="attributes"> - <void property="text"> - <string>name</string> - </void> - </void> - <void property="name"> - <void property="text"> - <string>Execution</string> - </void> - </void> - </object> - <object class="java.awt.geom.Point2D$Double"> - <void method="setLocation"> - <double>602.0</double> - <double>437.0</double> - </void> - </object> - </void> - <void method="addNode"> - <object class="com.horstmann.violet.PackageNode"> - <void property="contents"> - <void property="text"> - <string>The BPM engine</string> - </void> - </void> - <void property="name"> - <string>org.jboss.bpm.client</string> - </void> - </object> - <object class="java.awt.geom.Point2D$Double"> - <void method="setLocation"> - <double>24.0</double> - <double>493.0</double> - </void> - </object> - </void> - <void method="addNode"> - <object id="ClassNode5" class="com.horstmann.violet.ClassNode"> - <void property="methods"> - <void property="text"> - <string>createProcessInstance -</string> - </void> - </void> - <void property="name"> - <void property="text"> - <string>ProcessInstanceFactory</string> - </void> - </void> - </object> - <object class="java.awt.geom.Point2D$Double"> - <void method="setLocation"> - <double>319.0</double> - <double>271.0</double> - </void> - </object> - </void> - <void method="addNode"> - <object id="ClassNode6" class="com.horstmann.violet.ClassNode"> - <void property="methods"> - <void property="text"> - <string>createExecution</string> - </void> - </void> - <void property="name"> - <void property="text"> - <string>ExecutionFactory</string> - </void> - </void> - </object> - <object class="java.awt.geom.Point2D$Double"> - <void method="setLocation"> - <double>316.0</double> - <double>399.0</double> - </void> - </object> - </void> - <void method="connect"> - <object class="com.horstmann.violet.ClassRelationshipEdge"> - <void property="bentStyle"> - <object class="com.horstmann.violet.BentStyle" field="HVH"/> - </void> - <void property="startArrowHead"> - <object class="com.horstmann.violet.ArrowHead" field="DIAMOND"/> - </void> - </object> - <object idref="ClassNode1"/> - <object idref="ClassNode2"/> - </void> - <void method="connect"> - <object class="com.horstmann.violet.ClassRelationshipEdge"> - <void property="bentStyle"> - <object class="com.horstmann.violet.BentStyle" field="HVH"/> - </void> - <void property="endArrowHead"> - <object class="com.horstmann.violet.ArrowHead" field="V"/> - </void> - <void property="endLabel"> - <string>0..*</string> - </void> - </object> - <object idref="ClassNode2"/> - <object idref="ClassNode0"/> - </void> - <void method="connect"> - <object class="com.horstmann.violet.ClassRelationshipEdge"> - <void property="bentStyle"> - <object class="com.horstmann.violet.BentStyle" field="HVH"/> - </void> - <void property="endLabel"> - <string>0..*</string> - </void> - <void property="startArrowHead"> - <object class="com.horstmann.violet.ArrowHead" field="DIAMOND"/> - </void> - </object> - <object idref="ClassNode0"/> - <object idref="ClassNode3"/> - </void> - <void method="connect"> - <object class="com.horstmann.violet.ClassRelationshipEdge"> - <void property="bentStyle"> - <object class="com.horstmann.violet.BentStyle" field="HVH"/> - </void> - <void property="endLabel"> - <string>0..*</string> - </void> - <void property="startArrowHead"> - <object class="com.horstmann.violet.ArrowHead" field="DIAMOND"/> - </void> - </object> - <object idref="ClassNode3"/> - <object idref="ClassNode4"/> - </void> - <void method="connect"> - <object class="com.horstmann.violet.ClassRelationshipEdge"> - <void property="bentStyle"> - <object class="com.horstmann.violet.BentStyle" field="HVH"/> - </void> - <void property="startArrowHead"> - <object class="com.horstmann.violet.ArrowHead" field="DIAMOND"/> - </void> - </object> - <object idref="ClassNode1"/> - <object idref="ClassNode5"/> - </void> - <void method="connect"> - <object class="com.horstmann.violet.ClassRelationshipEdge"> - <void property="bentStyle"> - <object class="com.horstmann.violet.BentStyle" field="HVH"/> - </void> - <void property="startArrowHead"> - <object class="com.horstmann.violet.ArrowHead" field="DIAMOND"/> - </void> - </object> - <object idref="ClassNode1"/> - <object idref="ClassNode6"/> - </void> - </object> -</java> Deleted: api/trunk/docs/VioletUML/EngineAndManagers.png =================================================================== (Binary files differ) Deleted: api/trunk/docs/VioletUML/RuntimeView.class.violet =================================================================== --- api/trunk/docs/VioletUML/RuntimeView.class.violet 2008-07-04 15:11:08 UTC (rev 1526) +++ api/trunk/docs/VioletUML/RuntimeView.class.violet 2008-07-04 16:19:53 UTC (rev 1527) @@ -1,303 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<java version="1.6.0_06" class="java.beans.XMLDecoder"> - <object class="com.horstmann.violet.ClassDiagramGraph"> - <void method="addNode"> - <object class="com.horstmann.violet.PackageNode"> - <void property="contents"> - <void property="text"> - <string>The runtime view of the BPM model</string> - </void> - </void> - <void property="name"> - <string>org.jboss.bpm.runtime</string> - </void> - </object> - <object class="java.awt.geom.Point2D$Double"> - <void method="setLocation"> - <double>15.0</double> - <double>500.0</double> - </void> - </object> - </void> - <void method="addNode"> - <object id="ClassNode0" class="com.horstmann.violet.ClassNode"> - <void property="attributes"> - <void property="text"> - <string>name</string> - </void> - </void> - <void property="methods"> - <void property="text"> - <string>signal</string> - </void> - </void> - <void property="name"> - <void property="text"> - <string>RExecution</string> - </void> - </void> - </object> - <object class="java.awt.geom.Point2D$Double"> - <void method="setLocation"> - <double>277.0</double> - <double>296.0</double> - </void> - </object> - </void> - <void method="addNode"> - <object id="ClassNode1" class="com.horstmann.violet.ClassNode"> - <void property="attributes"> - <void property="text"> - <string>name</string> - </void> - </void> - <void property="name"> - <void property="text"> - <string>RNode</string> - </void> - </void> - </object> - <object class="java.awt.geom.Point2D$Double"> - <void method="setLocation"> - <double>276.0</double> - <double>184.0</double> - </void> - </object> - </void> - <void method="addNode"> - <object id="ClassNode2" class="com.horstmann.violet.ClassNode"> - <void property="attributes"> - <void property="text"> - <string>name</string> - </void> - </void> - <void property="name"> - <void property="text"> - <string>Transition</string> - </void> - </void> - </object> - <object class="java.awt.geom.Point2D$Double"> - <void method="setLocation"> - <double>117.0</double> - <double>182.0</double> - </void> - </object> - </void> - <void method="addNode"> - <object id="ClassNode3" class="com.horstmann.violet.ClassNode"> - <void property="methods"> - <void property="text"> - <string>execute</string> - </void> - </void> - <void property="name"> - <void property="text"> - <string>Activity</string> - </void> - </void> - </object> - <object class="java.awt.geom.Point2D$Double"> - <void method="setLocation"> - <double>502.0</double> - <double>150.0</double> - </void> - </object> - </void> - <void method="addNode"> - <object id="ClassNode4" class="com.horstmann.violet.ClassNode"> - <void property="methods"> - <void property="text"> - <string>choosePath</string> - </void> - </void> - <void property="name"> - <void property="text"> - <string>TransitionRouter</string> - </void> - </void> - </object> - <object class="java.awt.geom.Point2D$Double"> - <void method="setLocation"> - <double>500.0</double> - <double>238.0</double> - </void> - </object> - </void> - <void method="addNode"> - <object id="ClassNode5" class="com.horstmann.violet.ClassNode"> - <void property="attributes"> - <void property="text"> - <string>attachments -</string> - </void> - </void> - <void property="name"> - <void property="text"> - <string>ProcessState</string> - </void> - </void> - </object> - <object class="java.awt.geom.Point2D$Double"> - <void method="setLocation"> - <double>279.0</double> - <double>406.0</double> - </void> - </object> - </void> - <void method="addNode"> - <object id="NoteNode0" class="com.horstmann.violet.NoteNode"> - <void property="text"> - <void property="text"> - <string>Executes business logic. -Has access to the state, -but not the definition.</string> - </void> - </void> - </object> - <object class="java.awt.geom.Point2D$Double"> - <void method="setLocation"> - <double>553.0</double> - <double>47.0</double> - </void> - </object> - </void> - <void method="addNode"> - <object id="NoteNode1" class="com.horstmann.violet.NoteNode"> - <void property="text"> - <void property="text"> - <string>Chooses the leaving -Transition.</string> - </void> - </void> - </object> - <object class="java.awt.geom.Point2D$Double"> - <void method="setLocation"> - <double>589.0</double> - <double>352.0</double> - </void> - </object> - </void> - <void method="addNode"> - <object id="ClassNode6" class="com.horstmann.violet.ClassNode"> - <void property="attributes"> - <void property="text"> - <string>attachments -</string> - </void> - </void> - <void property="name"> - <void property="text"> - <string>ProcessState</string> - </void> - </void> - </object> - <object class="java.awt.geom.Point2D$Double"> - <void method="setLocation"> - <double>663.0</double> - <double>152.0</double> - </void> - </object> - </void> - <void method="connect"> - <object class="com.horstmann.violet.ClassRelationshipEdge"> - <void property="bentStyle"> - <object class="com.horstmann.violet.BentStyle" field="HVH"/> - </void> - <void property="endArrowHead"> - <object class="com.horstmann.violet.ArrowHead" field="V"/> - </void> - <void property="endLabel"> - <string>current</string> - </void> - </object> - <object idref="ClassNode0"/> - <object idref="ClassNode1"/> - </void> - <void method="connect"> - <object class="com.horstmann.violet.ClassRelationshipEdge"> - <void property="bentStyle"> - <object class="com.horstmann.violet.BentStyle" field="HVH"/> - </void> - <void property="endArrowHead"> - <object class="com.horstmann.violet.ArrowHead" field="V"/> - </void> - </object> - <object idref="ClassNode1"/> - <object idref="ClassNode2"/> - </void> - <void method="connect"> - <object class="com.horstmann.violet.ClassRelationshipEdge"> - <void property="bentStyle"> - <object class="com.horstmann.violet.BentStyle" field="VHV"/> - </void> - <void property="endArrowHead"> - <object class="com.horstmann.violet.ArrowHead" field="V"/> - </void> - </object> - <object idref="ClassNode1"/> - <object idref="ClassNode3"/> - </void> - <void method="connect"> - <object class="com.horstmann.violet.ClassRelationshipEdge"> - <void property="bentStyle"> - <object class="com.horstmann.violet.BentStyle" field="HVH"/> - </void> - <void property="endArrowHead"> - <object class="com.horstmann.violet.ArrowHead" field="V"/> - </void> - </object> - <object idref="ClassNode1"/> - <object idref="ClassNode4"/> - </void> - <void method="connect"> - <object class="com.horstmann.violet.ClassRelationshipEdge"> - <void property="bentStyle"> - <object class="com.horstmann.violet.BentStyle" field="VH"/> - </void> - <void property="endArrowHead"> - <object class="com.horstmann.violet.ArrowHead" field="V"/> - </void> - <void property="lineStyle"> - <object class="com.horstmann.violet.LineStyle" field="DOTTED"/> - </void> - </object> - <object idref="ClassNode4"/> - <object idref="ClassNode0"/> - </void> - <void method="connect"> - <object class="com.horstmann.violet.NoteEdge"/> - <object idref="ClassNode3"/> - <object idref="NoteNode0"/> - </void> - <void method="connect"> - <object class="com.horstmann.violet.ClassRelationshipEdge"> - <void property="bentStyle"> - <object class="com.horstmann.violet.BentStyle" field="VHV"/> - </void> - <void property="startArrowHead"> - <object class="com.horstmann.violet.ArrowHead" field="DIAMOND"/> - </void> - </object> - <object idref="ClassNode0"/> - <object idref="ClassNode5"/> - </void> - <void method="connect"> - <object class="com.horstmann.violet.NoteEdge"/> - <object idref="ClassNode4"/> - <object idref="NoteNode1"/> - </void> - <void method="connect"> - <object class="com.horstmann.violet.ClassRelationshipEdge"> - <void property="endArrowHead"> - <object class="com.horstmann.violet.ArrowHead" field="V"/> - </void> - <void property="lineStyle"> - <object class="com.horstmann.violet.LineStyle" field="DOTTED"/> - </void> - </object> - <object idref="ClassNode3"/> - <object idref="ClassNode6"/> - </void> - </object> -</java> Deleted: api/trunk/docs/VioletUML/RuntimeView.png =================================================================== (Binary files differ) Deleted: api/trunk/modules/api/src/main/java/org/jboss/bpm/client/Execution.java =================================================================== --- api/trunk/modules/api/src/main/java/org/jb... [truncated message content] |
From: <do-...@jb...> - 2008-07-04 15:11:10
|
Author: tho...@jb... Date: 2008-07-04 11:11:08 -0400 (Fri, 04 Jul 2008) New Revision: 1526 Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/client/Attachments.java Log: javadoc Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/client/Attachments.java =================================================================== --- api/trunk/modules/api/src/main/java/org/jboss/bpm/client/Attachments.java 2008-07-04 14:56:56 UTC (rev 1525) +++ api/trunk/modules/api/src/main/java/org/jboss/bpm/client/Attachments.java 2008-07-04 15:11:08 UTC (rev 1526) @@ -26,7 +26,7 @@ import java.util.Collection; /** - * An interface for general Attachments + * An interface for general Attachments * * @author Tho...@jb... * @since 20-Apr-2007 @@ -72,7 +72,7 @@ private String name; /** - * Construct the key with optional class and name + * Construct the key with optional class and name */ public Key(Class<?> clazz, String name) { @@ -80,8 +80,9 @@ this.name = name; } - /** + /** * Get the class part for this key + * * @return maybe null */ public Class<?> getClassPart() @@ -89,8 +90,9 @@ return clazz; } - /** + /** * Get the name part for this key + * * @return maybe null */ public String getNamePart() @@ -98,7 +100,9 @@ return name; } - @Override + /** + * Two keys are equal if their {@link #toString()} is equal + */ public boolean equals(Object obj) { if (!(obj instanceof Key)) @@ -108,13 +112,20 @@ return obj.toString().equals(toString()); } - @Override + /** + * Two keys have the same hashCode if their {@link #toString()} is equal + */ public int hashCode() { return toString().hashCode(); } - @Override + /** + * Returns the String repesentation of this Key. <p/> + * <pre> + * "[" + clazz + "," + name + "]" + * </pre> + */ public String toString() { return "[" + (clazz != null ? clazz.getName() : null) + "," + name + "]"; |
From: <do-...@jb...> - 2008-07-04 14:57:01
|
Author: tho...@jb... Date: 2008-07-04 10:56:56 -0400 (Fri, 04 Jul 2008) New Revision: 1525 Added: jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/client/ProcessInstanceFactoryImpl.java Removed: jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/client/ProcessInstanceManagerImpl.java Modified: jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/client/ExecutionImpl.java jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/client/ExecutionManagerImpl.java jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/client/ProcessDefinitionManagerImpl.java jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/client/ProcessEngineImpl.java jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/client/ProcessInstanceImpl.java jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/def/EndNodeImpl.java jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/def/NodeImpl.java jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/def/ProcessDefinitionAdapter.java jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/def/ProcessDefinitionImpl.java jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/def/StartNodeImpl.java jbpm3/trunk/modules/jpdl/core/src/main/resources/jbpm-beans.xml Log: Cleanup API TODOs Modified: jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/client/ExecutionImpl.java =================================================================== --- jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/client/ExecutionImpl.java 2008-07-04 14:56:45 UTC (rev 1524) +++ jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/client/ExecutionImpl.java 2008-07-04 14:56:56 UTC (rev 1525) @@ -28,11 +28,11 @@ import java.util.Iterator; import java.util.Set; -import org.jboss.bpm.Context; import org.jboss.bpm.client.Execution; +import org.jboss.bpm.client.ExecutionContext; import org.jboss.bpm.client.ProcessInstance; import org.jboss.bpm.client.internal.AbstractExecution; -import org.jboss.bpm.def.Node; +import org.jboss.bpm.process.Node; /** * Represents an execution of a process instance. @@ -43,7 +43,7 @@ public class ExecutionImpl extends AbstractExecution { private org.jbpm.graph.exe.Execution oldEx; - private Context context = new ContextImpl(); + private ExecutionContext context = new ContextImpl(); ExecutionImpl(ProcessInstance pi, org.jbpm.graph.exe.Execution oldEx) { @@ -80,12 +80,12 @@ } @Override - public Context getContext() + public ExecutionContext getContext() { return context; } - private class ContextImpl extends Context + private class ContextImpl extends ExecutionContext { @SuppressWarnings("unchecked") public <T> T addAttachment(Class<T> clazz, Object value) @@ -135,7 +135,7 @@ return (T)value; } - public Collection<Key> getAttachments() + public Collection<Key> getAttachmentKeys() { Set<Key> keys = new HashSet<Key>(); Iterator<?> itKeys = oldEx.getContextInstance().getTransientVariables().keySet().iterator(); Modified: jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/client/ExecutionManagerImpl.java =================================================================== --- jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/client/ExecutionManagerImpl.java 2008-07-04 14:56:45 UTC (rev 1524) +++ jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/client/ExecutionManagerImpl.java 2008-07-04 14:56:56 UTC (rev 1525) @@ -24,7 +24,7 @@ // $Id$ import org.jboss.bpm.client.Execution; -import org.jboss.bpm.client.ExecutionFactory; +import org.jboss.bpm.client.ExecutionManager; import org.jboss.bpm.client.ProcessEngine; import org.jboss.bpm.client.ProcessInstance; import org.jbpm.integration.def.ProcessDefinitionImpl; @@ -35,7 +35,7 @@ * @author tho...@jb... * @since 18-Jun-2008 */ -public class ExecutionManagerImpl extends ExecutionFactory +public class ExecutionManagerImpl extends ExecutionManager { public void setProcessEngine(ProcessEngine engine) Modified: jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/client/ProcessDefinitionManagerImpl.java =================================================================== --- jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/client/ProcessDefinitionManagerImpl.java 2008-07-04 14:56:45 UTC (rev 1524) +++ jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/client/ProcessDefinitionManagerImpl.java 2008-07-04 14:56:56 UTC (rev 1525) @@ -29,7 +29,7 @@ import org.jboss.bpm.InvalidProcessDefinitionException; import org.jboss.bpm.client.ProcessDefinitionManager; import org.jboss.bpm.client.ProcessEngine; -import org.jboss.bpm.def.ProcessDefinition; +import org.jboss.bpm.process.ProcessDefinition; import org.jbpm.integration.def.ProcessDefinitionAdapter; import org.jbpm.jpdl.JpdlException; Modified: jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/client/ProcessEngineImpl.java =================================================================== --- jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/client/ProcessEngineImpl.java 2008-07-04 14:56:45 UTC (rev 1524) +++ jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/client/ProcessEngineImpl.java 2008-07-04 14:56:56 UTC (rev 1525) @@ -23,7 +23,7 @@ //$Id$ -import org.jboss.bpm.client.ExecutionFactory; +import org.jboss.bpm.client.ExecutionManager; import org.jboss.bpm.client.ProcessDefinitionManager; import org.jboss.bpm.client.ProcessEngine; import org.jboss.bpm.client.ProcessInstanceFactory; @@ -34,17 +34,21 @@ * @author tho...@jb... * @since 18-Jun-2008 */ -public class ProcessEngineImpl extends ProcessEngine { +public class ProcessEngineImpl extends ProcessEngine +{ - public void setProcessDefinitionManager(ProcessDefinitionManager processDefinitionManager) { + public void setProcessDefinitionManager(ProcessDefinitionManager processDefinitionManager) + { this.processDefinitionManager = processDefinitionManager; } - public void setProcessInstanceManager(ProcessInstanceFactory processInstanceManager) { - this.processInstanceFactory = processInstanceManager; + public void setProcessInstanceFactory(ProcessInstanceFactory processInstanceFactory) + { + this.processInstanceFactory = processInstanceFactory; } - public void setExecutionManager(ExecutionFactory executionManager) { - this.executionFactory = executionManager; + public void setExecutionManager(ExecutionManager executionManager) + { + this.executionManager = executionManager; } } Copied: jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/client/ProcessInstanceFactoryImpl.java (from rev 1504, jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/client/ProcessInstanceManagerImpl.java) =================================================================== --- jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/client/ProcessInstanceFactoryImpl.java (rev 0) +++ jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/client/ProcessInstanceFactoryImpl.java 2008-07-04 14:56:56 UTC (rev 1525) @@ -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.integration.client; + +// $Id$ + +import org.jboss.bpm.client.ProcessEngine; +import org.jboss.bpm.client.ProcessInstance; +import org.jboss.bpm.client.ProcessInstanceFactory; +import org.jboss.bpm.process.ProcessDefinition; + +/** + * TODO + * + * @author tho...@jb... + * @since 18-Jun-2008 + */ +public class ProcessInstanceFactoryImpl extends ProcessInstanceFactory +{ + public void setProcessEngine(ProcessEngine engine) + { + this.engine = engine; + } + + @Override + protected ProcessInstance createProcessInstanceOverride(ProcessDefinition pdef) + { + ProcessInstance pinst = new ProcessInstanceImpl(pdef); + return pinst; + } +} Modified: jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/client/ProcessInstanceImpl.java =================================================================== --- jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/client/ProcessInstanceImpl.java 2008-07-04 14:56:45 UTC (rev 1524) +++ jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/client/ProcessInstanceImpl.java 2008-07-04 14:56:56 UTC (rev 1525) @@ -24,7 +24,7 @@ //$Id$ import org.jboss.bpm.client.internal.AbstractProcessInstance; -import org.jboss.bpm.def.ProcessDefinition; +import org.jboss.bpm.process.ProcessDefinition; /** * TODO Deleted: jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/client/ProcessInstanceManagerImpl.java =================================================================== --- jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/client/ProcessInstanceManagerImpl.java 2008-07-04 14:56:45 UTC (rev 1524) +++ jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/client/ProcessInstanceManagerImpl.java 2008-07-04 14:56:56 UTC (rev 1525) @@ -1,48 +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.integration.client; - -// $Id$ - -import org.jboss.bpm.client.ProcessEngine; -import org.jboss.bpm.client.ProcessInstance; -import org.jboss.bpm.client.ProcessInstanceFactory; -import org.jboss.bpm.def.ProcessDefinition; - -/** - * TODO - * - * @author tho...@jb... - * @since 18-Jun-2008 - */ -public class ProcessInstanceManagerImpl extends ProcessInstanceFactory { - - public void setProcessEngine(ProcessEngine engine) { - this.engine = engine; - } - - @Override - protected ProcessInstance createProcessInstanceOverride(ProcessDefinition pdef) { - ProcessInstance pinst = new ProcessInstanceImpl(pdef); - return pinst; - } -} Modified: jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/def/EndNodeImpl.java =================================================================== --- jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/def/EndNodeImpl.java 2008-07-04 14:56:45 UTC (rev 1524) +++ jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/def/EndNodeImpl.java 2008-07-04 14:56:56 UTC (rev 1525) @@ -23,8 +23,8 @@ // $Id$ -import org.jboss.bpm.def.EndNode; -import org.jboss.bpm.def.ProcessDefinition; +import org.jboss.bpm.process.EndNode; +import org.jboss.bpm.process.ProcessDefinition; /** * TODO Modified: jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/def/NodeImpl.java =================================================================== --- jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/def/NodeImpl.java 2008-07-04 14:56:45 UTC (rev 1524) +++ jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/def/NodeImpl.java 2008-07-04 14:56:56 UTC (rev 1525) @@ -23,8 +23,8 @@ //$Id$ -import org.jboss.bpm.def.ProcessDefinition; -import org.jboss.bpm.def.internal.AbstractNode; +import org.jboss.bpm.process.ProcessDefinition; +import org.jboss.bpm.process.internal.AbstractNode; /** * TODO Modified: jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/def/ProcessDefinitionAdapter.java =================================================================== --- jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/def/ProcessDefinitionAdapter.java 2008-07-04 14:56:45 UTC (rev 1524) +++ jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/def/ProcessDefinitionAdapter.java 2008-07-04 14:56:56 UTC (rev 1525) @@ -25,8 +25,8 @@ import java.util.List; -import org.jboss.bpm.def.Node; -import org.jboss.bpm.def.ProcessDefinition; +import org.jboss.bpm.process.Node; +import org.jboss.bpm.process.ProcessDefinition; import org.jbpm.graph.node.EndState; import org.jbpm.graph.node.StartState; import org.jbpm.integration.def.EndNodeImpl; Modified: jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/def/ProcessDefinitionImpl.java =================================================================== --- jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/def/ProcessDefinitionImpl.java 2008-07-04 14:56:45 UTC (rev 1524) +++ jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/def/ProcessDefinitionImpl.java 2008-07-04 14:56:56 UTC (rev 1525) @@ -23,8 +23,8 @@ //$Id$ -import org.jboss.bpm.def.Node; -import org.jboss.bpm.def.internal.AbstractProcessDefinition; +import org.jboss.bpm.process.Node; +import org.jboss.bpm.process.internal.AbstractProcessDefinition; /** * A jBPM3 implementation of a process definition Modified: jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/def/StartNodeImpl.java =================================================================== --- jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/def/StartNodeImpl.java 2008-07-04 14:56:45 UTC (rev 1524) +++ jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/def/StartNodeImpl.java 2008-07-04 14:56:56 UTC (rev 1525) @@ -23,8 +23,8 @@ //$Id$ -import org.jboss.bpm.def.ProcessDefinition; -import org.jboss.bpm.def.StartNode; +import org.jboss.bpm.process.ProcessDefinition; +import org.jboss.bpm.process.StartNode; /** * TODO Modified: jbpm3/trunk/modules/jpdl/core/src/main/resources/jbpm-beans.xml =================================================================== --- jbpm3/trunk/modules/jpdl/core/src/main/resources/jbpm-beans.xml 2008-07-04 14:56:45 UTC (rev 1524) +++ jbpm3/trunk/modules/jpdl/core/src/main/resources/jbpm-beans.xml 2008-07-04 14:56:56 UTC (rev 1525) @@ -7,7 +7,7 @@ <!-- The process engine --> <bean name="jBPMProcessEngine" class="org.jbpm.integration.client.ProcessEngineImpl"> <property name="processDefinitionManager"><inject bean="jBPMProcessDefinitionManager"/></property> - <property name="processInstanceManager"><inject bean="jBPMProcessInstanceManager"/></property> + <property name="processInstanceFactory"><inject bean="jBPMProcessInstanceFactory"/></property> <property name="executionManager"><inject bean="jBPMExecutionManager"/></property> </bean> @@ -17,7 +17,7 @@ </bean> <!-- The process instance manager --> - <bean name="jBPMProcessInstanceManager" class="org.jbpm.integration.client.ProcessInstanceManagerImpl"> + <bean name="jBPMProcessInstanceFactory" class="org.jbpm.integration.client.ProcessInstanceFactoryImpl"> <property name="processEngine"><inject bean="jBPMProcessEngine" state="Instantiated"/></property> </bean> |
From: <do-...@jb...> - 2008-07-04 14:56:48
|
Author: tho...@jb... Date: 2008-07-04 10:56:45 -0400 (Fri, 04 Jul 2008) New Revision: 1524 Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/client/Attachments.java api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ExecutionContext.java api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ExecutionManager.java api/trunk/modules/api/src/main/java/org/jboss/bpm/client/internal/EmbeddedBeansDeployer.java api/trunk/modules/api/src/main/java/org/jboss/bpm/client/internal/ProcessInstanceContext.java api/trunk/modules/api/src/main/java/org/jboss/bpm/process/ api/trunk/modules/api/src/main/java/org/jboss/bpm/process/EndNode.java api/trunk/modules/api/src/main/java/org/jboss/bpm/process/Node.java api/trunk/modules/api/src/main/java/org/jboss/bpm/process/ProcessDefinition.java api/trunk/modules/api/src/main/java/org/jboss/bpm/process/StartNode.java api/trunk/modules/api/src/main/java/org/jboss/bpm/process/internal/ api/trunk/modules/api/src/main/java/org/jboss/bpm/process/internal/AbstractNode.java api/trunk/modules/api/src/main/java/org/jboss/bpm/process/internal/AbstractProcessDefinition.java Removed: api/trunk/modules/api/src/main/java/org/jboss/bpm/Context.java api/trunk/modules/api/src/main/java/org/jboss/bpm/client/EmbeddedBeansDeployer.java api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ExecutionFactory.java api/trunk/modules/api/src/main/java/org/jboss/bpm/client/internal/DefaultContext.java api/trunk/modules/api/src/main/java/org/jboss/bpm/def/ api/trunk/modules/api/src/main/java/org/jboss/bpm/process/internal/AbstractNode.java api/trunk/modules/api/src/main/java/org/jboss/bpm/process/internal/AbstractProcessDefinition.java Modified: api/trunk/eclipse/jBPMCodeStyle.xml api/trunk/modules/api/src/main/java/org/jboss/bpm/client/Execution.java api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessDefinitionManager.java api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessEngine.java api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessEngineLocator.java api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessInstance.java api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessInstanceFactory.java api/trunk/modules/api/src/main/java/org/jboss/bpm/client/internal/AbstractExecution.java api/trunk/modules/api/src/main/java/org/jboss/bpm/client/internal/AbstractProcessInstance.java api/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Activity.java api/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/RuntimeExecution.java api/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/TransitionRouter.java api/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/internal/AbstractRuntimeNode.java api/trunk/modules/api/src/main/java/org/jboss/bpm/test/AbstractAPITestCase.java api/trunk/modules/api/src/test/java/org/jboss/bpm/client/MockProcessEngine.java api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/client/ProcessDefinitionTest.java api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/activity/BasicActivity.java api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/activity/BasicActivityTest.java api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/basic/BasicSequenceTest.java api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/context/ContextActivity.java api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/context/ExecutionContextTest.java api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/engine/EngineShutdownTest.java Log: Cleanup API TODOs Modified: api/trunk/eclipse/jBPMCodeStyle.xml =================================================================== --- api/trunk/eclipse/jBPMCodeStyle.xml 2008-07-04 14:48:41 UTC (rev 1523) +++ api/trunk/eclipse/jBPMCodeStyle.xml 2008-07-04 14:56:45 UTC (rev 1524) @@ -19,7 +19,7 @@ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/> <setting id="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value="true"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/> @@ -69,7 +69,7 @@ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="true"/> +<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="false"/> <setting id="org.eclipse.jdt.core.formatter.lineSplit" value="168"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/> @@ -139,7 +139,7 @@ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="true"/> +<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="false"/> <setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value="insert"/> Deleted: api/trunk/modules/api/src/main/java/org/jboss/bpm/Context.java =================================================================== --- api/trunk/modules/api/src/main/java/org/jboss/bpm/Context.java 2008-07-04 14:48:41 UTC (rev 1523) +++ api/trunk/modules/api/src/main/java/org/jboss/bpm/Context.java 2008-07-04 14:56:45 UTC (rev 1524) @@ -1,114 +0,0 @@ -/* - * JBoss, Home of Professional Open Source - * Copyright 2005, JBoss Inc., and individual contributors as indicated - * by the @authors tag. See the copyright.txt in the distribution for a - * full listing of individual contributors. - * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. - * - * This software is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this software; if not, write to the Free - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. - */ -package org.jboss.bpm; - -//$Id$ - -import java.util.Collection; - -/** - * A general extendible artifact - * - * @author Tho...@jb... - * @since 20-Apr-2007 - */ -public abstract class Context -{ - // Hide public constructor - protected Context() - { - } - - /** Get arbitrary attachments */ - public abstract Collection<Key> getAttachments(); - - /** Add arbitrary attachment */ - public abstract <T> T addAttachment(Class<T> clazz, Object value); - - /** Add arbitrary attachment with name */ - public abstract <T> T addAttachment(Class<T> clazz, String name, Object value); - - /** Add arbitrary attachment with name */ - public abstract <T> T addAttachment(String name, Object value); - - /** Get an arbitrary attachment */ - public abstract <T> T getAttachment(Class<T> clazz); - - /** Get an arbitrary attachment */ - public abstract <T> T getAttachment(Class<T> clazz, String name); - - /** Get an arbitrary attachment */ - public abstract <T> T getAttachment(String name); - - /** Remove arbitrary attachments */ - public abstract <T> T removeAttachment(Class<T> clazz); - - /** Remove arbitrary attachments */ - public abstract <T> T removeAttachment(Class<T> clazz, String name); - - /** Remove arbitrary attachments */ - public abstract <T> T removeAttachment(String name); - - public static class Key - { - Class<?> clazz; - String name; - - public Key(Class<?> clazz, String name) - { - this.clazz = clazz; - this.name = name; - } - - public Class<?> getClazz() - { - return clazz; - } - - public String getName() - { - return name; - } - - @Override - public boolean equals(Object obj) - { - if (!(obj instanceof Key)) - return false; - if (obj == this) - return true; - return obj.toString().equals(toString()); - } - - @Override - public int hashCode() - { - return toString().hashCode(); - } - - @Override - public String toString() - { - return "[" + clazz.getName() + "," + name + "]"; - } - } -} \ No newline at end of file Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/client/Attachments.java =================================================================== --- api/trunk/modules/api/src/main/java/org/jboss/bpm/client/Attachments.java (rev 0) +++ api/trunk/modules/api/src/main/java/org/jboss/bpm/client/Attachments.java 2008-07-04 14:56:45 UTC (rev 1524) @@ -0,0 +1,123 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2005, JBoss Inc., and individual contributors as indicated + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.jboss.bpm.client; + +//$Id$ + +import java.util.Collection; + +/** + * An interface for general Attachments + * + * @author Tho...@jb... + * @since 20-Apr-2007 + */ +public interface Attachments +{ + /** Get attachment keys */ + Collection<Key> getAttachmentKeys(); + + /** Add arbitrary attachment */ + <T> T addAttachment(Class<T> clazz, Object value); + + /** Add arbitrary attachment with name */ + <T> T addAttachment(Class<T> clazz, String name, Object value); + + /** Add arbitrary attachment with name */ + <T> T addAttachment(String name, Object value); + + /** Get an arbitrary attachment */ + <T> T getAttachment(Class<T> clazz); + + /** Get an arbitrary attachment */ + <T> T getAttachment(Class<T> clazz, String name); + + /** Get an arbitrary attachment */ + <T> T getAttachment(String name); + + /** Remove arbitrary attachments */ + <T> T removeAttachment(Class<T> clazz); + + /** Remove arbitrary attachments */ + <T> T removeAttachment(Class<T> clazz, String name); + + /** Remove arbitrary attachments */ + <T> T removeAttachment(String name); + + /** + * A key for attachements + */ + public static class Key + { + private Class<?> clazz; + private String name; + + /** + * Construct the key with optional class and name + */ + public Key(Class<?> clazz, String name) + { + this.clazz = clazz; + this.name = name; + } + + /** + * Get the class part for this key + * @return maybe null + */ + public Class<?> getClassPart() + { + return clazz; + } + + /** + * Get the name part for this key + * @return maybe null + */ + public String getNamePart() + { + return name; + } + + @Override + public boolean equals(Object obj) + { + if (!(obj instanceof Key)) + return false; + if (obj == this) + return true; + return obj.toString().equals(toString()); + } + + @Override + public int hashCode() + { + return toString().hashCode(); + } + + @Override + public String toString() + { + return "[" + (clazz != null ? clazz.getName() : null) + "," + name + "]"; + } + } +} \ No newline at end of file Property changes on: api/trunk/modules/api/src/main/java/org/jboss/bpm/client/Attachments.java ___________________________________________________________________ Name: svn:keywords + Id Revision Name: svn:eol-style + LF Deleted: api/trunk/modules/api/src/main/java/org/jboss/bpm/client/EmbeddedBeansDeployer.java =================================================================== --- api/trunk/modules/api/src/main/java/org/jboss/bpm/client/EmbeddedBeansDeployer.java 2008-07-04 14:48:41 UTC (rev 1523) +++ api/trunk/modules/api/src/main/java/org/jboss/bpm/client/EmbeddedBeansDeployer.java 2008-07-04 14:56:45 UTC (rev 1524) @@ -1,109 +0,0 @@ -/* - * JBoss, Home of Professional Open Source - * Copyright 2005, JBoss Inc., and individual contributors as indicated - * by the @authors tag. See the copyright.txt in the distribution for a - * full listing of individual contributors. - * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. - * - * This software is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this software; if not, write to the Free - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. - */ -package org.jboss.bpm.client; - -// $Id$ - -import java.net.URL; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.jboss.bpm.JBPMException; -import org.jboss.kernel.Kernel; -import org.jboss.kernel.plugins.bootstrap.basic.BasicBootstrap; -import org.jboss.kernel.plugins.deployment.xml.BasicXMLDeployer; -import org.jboss.kernel.plugins.util.KernelLocator; - -/** - * Boostrap the Microcontainer - * - * @author tho...@jb... - * @since 27-Jun-2008 - */ -public class EmbeddedBeansDeployer extends BasicBootstrap -{ - // provide logging - private static final Log log = LogFactory.getLog(EmbeddedBeansDeployer.class); - - private Kernel kernel; - private BasicXMLDeployer deployer; - - public EmbeddedBeansDeployer() - { - // Get or bootstrap the kernel - kernel = KernelLocator.getKernel(); - if (kernel == null) - { - try - { - super.bootstrap(); - kernel = super.getKernel(); - log.debug("bootstrap kernel: " + kernel); - } - catch (Throwable e) - { - throw new JBPMException("Cannot bootstrap kernel", e); - } - } - deployer = new BasicXMLDeployer(kernel); - } - - /** - * Deploy MC beans from URL - */ - public void deploy(URL url) - { - log.debug("deploy: " + url); - - // Deploy the beans - try - { - deployer.deploy(url); - deployer.validate(); - - // The KernelLocator is expected to get deployed as a bean - if (KernelLocator.getKernel() == null) - throw new JBPMException("KernelLocator not deployed as MC bean"); - - } - catch (Throwable e) - { - throw new JBPMException("Cannot deploy beans from: " + url, e); - } - } - - /** - * Undeploy MC beans from URL - */ - public void undeploy(URL url) - { - log.debug("undeploy: " + url); - try - { - deployer.undeploy(url); - } - catch (Throwable e) - { - throw new JBPMException("Cannot undeploy beans from: " + url, e); - } - } -} \ No newline at end of file Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/client/Execution.java =================================================================== --- api/trunk/modules/api/src/main/java/org/jboss/bpm/client/Execution.java 2008-07-04 14:48:41 UTC (rev 1523) +++ api/trunk/modules/api/src/main/java/org/jboss/bpm/client/Execution.java 2008-07-04 14:56:45 UTC (rev 1524) @@ -23,8 +23,7 @@ //$Id$ -import org.jboss.bpm.Context; -import org.jboss.bpm.def.Node; +import org.jboss.bpm.process.Node; /** * Represents an execution of a process instance. @@ -50,7 +49,7 @@ /** * Get the context for this execution */ - Context getContext(); + ExecutionContext getContext(); /** * Get the current node for this execution Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ExecutionContext.java =================================================================== --- api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ExecutionContext.java (rev 0) +++ api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ExecutionContext.java 2008-07-04 14:56:45 UTC (rev 1524) @@ -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.jboss.bpm.client; + +//$Id$ + +/** + * An execution context that can take attachments. + * + * @author Tho...@jb... + * @since 20-Apr-2007 + */ +public abstract class ExecutionContext implements Attachments +{ + // Hide public constructor + protected ExecutionContext() + { + } +} \ No newline at end of file Property changes on: api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ExecutionContext.java ___________________________________________________________________ Name: svn:keywords + Id Revision Name: svn:eol-style + LF Deleted: api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ExecutionFactory.java =================================================================== --- api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ExecutionFactory.java 2008-07-04 14:48:41 UTC (rev 1523) +++ api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ExecutionFactory.java 2008-07-04 14:56:45 UTC (rev 1524) @@ -1,91 +0,0 @@ -/* - * JBoss, Home of Professional Open Source - * Copyright 2005, JBoss Inc., and individual contributors as indicated - * by the @authors tag. See the copyright.txt in the distribution for a - * full listing of individual contributors. - * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. - * - * This software is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this software; if not, write to the Free - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. - */ -package org.jboss.bpm.client; - -// $Id$ - -import org.jboss.bpm.Context; -import org.jboss.bpm.EngineShutdownException; -import org.jboss.bpm.Context.Key; - -/** - * The execution manager is the entry point to create, find and otherwise manage process executions. - * - * @author tho...@jb... - * @since 18-Jun-2008 - */ -public abstract class ExecutionFactory -{ - // Injected through the MC - protected ProcessEngine engine; - - // Hide public constructor - protected ExecutionFactory() - { - } - - /** - * Get the associated process engine - */ - public ProcessEngine getProcessEngine() - { - if (engine == null) - throw new IllegalStateException("ProcessEngine not available through kernel configuration"); - - return engine; - } - - /** - * Locate the execution manager - */ - public static ExecutionFactory locateExecutionFactory() - { - ProcessEngine engine = ProcessEngineLocator.locateProcessEngine(); - return engine.getExecutionFactory(); - } - - /** - * Create an execution for a given process instance. - * The process instance context is copied to the execution context. - * Note, that this is a shallow copy. Mutable objects should generally not be put into the context. - */ - public final Execution createExecution(ProcessInstance pinst) - { - // TODO: test this - if (engine.isPrepareForShutdown()) - throw new EngineShutdownException("Cannot create new Execution while engine is shutting down"); - - // Copy the instance context to the execution context - Context context = pinst.getContext(); - Execution ex = createExecutionOverride(pinst); - for (Key key : context.getAttachments()) - { - Object att = context.getAttachment(key.getClazz(), key.getName()); - ex.getContext().addAttachment(key.getClazz(), key.getName(), att); - } - - return ex; - } - - // Override to implement execution creation - protected abstract Execution createExecutionOverride(ProcessInstance pinst); -} \ No newline at end of file Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ExecutionManager.java (from rev 1520, api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ExecutionFactory.java) =================================================================== --- api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ExecutionManager.java (rev 0) +++ api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ExecutionManager.java 2008-07-04 14:56:45 UTC (rev 1524) @@ -0,0 +1,90 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2005, JBoss Inc., and individual contributors as indicated + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.jboss.bpm.client; + +// $Id$ + +import org.jboss.bpm.EngineShutdownException; +import org.jboss.bpm.client.Attachments.Key; + +/** + * The execution manager is the entry point to create, find and otherwise manage process executions. + * + * @author tho...@jb... + * @since 18-Jun-2008 + */ +public abstract class ExecutionManager +{ + // Injected through the MC + protected ProcessEngine engine; + + // Hide public constructor + protected ExecutionManager() + { + } + + /** + * Get the associated process engine + */ + public ProcessEngine getProcessEngine() + { + if (engine == null) + throw new IllegalStateException("ProcessEngine not available through kernel configuration"); + + return engine; + } + + /** + * Locate the execution manager + */ + public static ExecutionManager locateExecutionManager() + { + ProcessEngine engine = ProcessEngineLocator.locateProcessEngine(); + return engine.getExecutionManager(); + } + + /** + * Create an execution for a given process instance. + * The process instance context is copied to the execution context. + * Note, that this is a shallow copy. Mutable objects should generally not be put into the context. + */ + public final Execution createExecution(ProcessInstance pinst) + { + // TODO: test this + if (engine.isPrepareForShutdown()) + throw new EngineShutdownException("Cannot create new Execution while engine is shutting down"); + + // Copy the instance context to the execution context + Attachments context = pinst.getAttachments(); + Execution ex = createExecutionOverride(pinst); + for (Key key : context.getAttachmentKeys()) + { + Object att = context.getAttachment(key.getClassPart(), key.getNamePart()); + ex.getContext().addAttachment(key.getClassPart(), key.getNamePart(), att); + } + + return ex; + } + + // Override to implement execution creation + protected abstract Execution createExecutionOverride(ProcessInstance pinst); +} \ No newline at end of file Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessDefinitionManager.java =================================================================== --- api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessDefinitionManager.java 2008-07-04 14:48:41 UTC (rev 1523) +++ api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessDefinitionManager.java 2008-07-04 14:56:45 UTC (rev 1524) @@ -30,7 +30,7 @@ import java.util.Set; import org.jboss.bpm.EngineShutdownException; -import org.jboss.bpm.def.ProcessDefinition; +import org.jboss.bpm.process.ProcessDefinition; /** * The process definition manager is the entry point to create, find and otherwise manage process definitions. Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessEngine.java =================================================================== --- api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessEngine.java 2008-07-04 14:48:41 UTC (rev 1523) +++ api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessEngine.java 2008-07-04 14:56:45 UTC (rev 1524) @@ -29,19 +29,19 @@ * @author tho...@jb... * @since 18-Jun-2008 */ -public class ProcessEngine { - +public class ProcessEngine +{ /** The process engine bean name - jBPMEngine */ public static final String BEAN_NAME_JBPMENGINE = "jBPMProcessEngine"; /** The default bean config: jbpm-beans.xml */ public static final String JBPM_ENGINE_CONFIG = "jbpm-beans.xml"; - + // Injected through the MC protected ProcessDefinitionManager processDefinitionManager; // Injected through the MC protected ProcessInstanceFactory processInstanceFactory; // Injected through the MC - protected ExecutionFactory executionFactory; + protected ExecutionManager executionManager; // Flag to indicate that the Engine is shutting down private boolean prepareForShutdown; @@ -49,16 +49,15 @@ protected ProcessEngine() { } - + /** - * Prepare the engine for shutdown. - * During shutdown the creation of new processes is disallowed. + * Prepare the engine for shutdown. During shutdown the creation of new processes is disallowed. */ public void prepareForShutdown() { prepareForShutdown = true; } - + /** * True, if engine is preparing for shutdown. */ @@ -66,7 +65,7 @@ { return prepareForShutdown; } - + /** * Cancel the prepare for shutdown request */ @@ -74,37 +73,43 @@ { prepareForShutdown = false; } - + /** * Get the configured instance of the process definition manager + * * @return The process definition manager */ - public ProcessDefinitionManager getProcessDefinitionManager() { + public ProcessDefinitionManager getProcessDefinitionManager() + { if (processDefinitionManager == null) throw new IllegalStateException("ProcessDefinitionManager not available through kernel configuration"); - + return processDefinitionManager; } /** * Get the configured instance of the process instance manager + * * @return The process instance manager */ - public ProcessInstanceFactory getProcessInstanceFactory() { + public ProcessInstanceFactory getProcessInstanceFactory() + { if (processInstanceFactory == null) throw new IllegalStateException("ProcessInstanceManager not available through kernel configuration"); - + return processInstanceFactory; } /** * Get the configured instance of the execution manager + * * @return The execution manager */ - public ExecutionFactory getExecutionFactory() { - if (executionFactory == null) + public ExecutionManager getExecutionManager() + { + if (executionManager == null) throw new IllegalStateException("ExecutionManager not available through kernel configuration"); - - return executionFactory; + + return executionManager; } } \ No newline at end of file Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessEngineLocator.java =================================================================== --- api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessEngineLocator.java 2008-07-04 14:48:41 UTC (rev 1523) +++ api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessEngineLocator.java 2008-07-04 14:56:45 UTC (rev 1524) @@ -26,6 +26,7 @@ import java.net.URL; import org.jboss.bpm.JBPMException; +import org.jboss.bpm.client.internal.EmbeddedBeansDeployer; import org.jboss.kernel.Kernel; import org.jboss.kernel.plugins.util.KernelLocator; import org.jboss.kernel.spi.registry.KernelRegistryEntry; Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessInstance.java =================================================================== --- api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessInstance.java 2008-07-04 14:48:41 UTC (rev 1523) +++ api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessInstance.java 2008-07-04 14:56:45 UTC (rev 1524) @@ -25,8 +25,7 @@ import java.util.Set; -import org.jboss.bpm.Context; -import org.jboss.bpm.def.ProcessDefinition; +import org.jboss.bpm.process.ProcessDefinition; /** * Represents an instance of a BPM process. @@ -49,9 +48,9 @@ String getName(); /** - * Get the context for this execution + * Get the attachments for this process instance */ - Context getContext(); + Attachments getAttachments(); /** * Create an execution for this process instance Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessInstanceFactory.java =================================================================== --- api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessInstanceFactory.java 2008-07-04 14:48:41 UTC (rev 1523) +++ api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessInstanceFactory.java 2008-07-04 14:56:45 UTC (rev 1524) @@ -24,11 +24,10 @@ //$Id$ import org.jboss.bpm.EngineShutdownException; -import org.jboss.bpm.def.ProcessDefinition; +import org.jboss.bpm.process.ProcessDefinition; /** - * The process instance manager is the entry point to create, find and otherwise - * manage process instances. + * The process instance factory is the entry point to create process instances. * * @author tho...@jb... * @since 18-Jun-2008 @@ -42,8 +41,10 @@ protected ProcessInstanceFactory() { } - - /* Get the associated process engine */ + + /** + * Get the associated process engine + */ public ProcessEngine getProcessEngine() { if (engine == null) @@ -52,18 +53,19 @@ return engine; } - /* Locate the process instance manager */ - public static ProcessInstanceFactory locateProcessInstanceManager() + /** + * Locate the process instance factory + */ + public static ProcessInstanceFactory locateProcessInstanceFactory() { ProcessEngine engine = ProcessEngineLocator.locateProcessEngine(); return engine.getProcessInstanceFactory(); } - /* + /** * Create a process instance for a given process definition * - * @param pd The process definition - * + * @param pdef the process definition * @return A process instance */ public final ProcessInstance createProcessInstance(ProcessDefinition pdef) @@ -71,14 +73,12 @@ // TODO: test this if (engine.isPrepareForShutdown()) throw new EngineShutdownException("Cannot create new ProcessInstance while engine is shutting down"); - + ProcessInstance pinst = createProcessInstanceOverride(pdef); return pinst; } - /* - * Override to implement process instance creation - */ + // Override to implement process instance creation protected abstract ProcessInstance createProcessInstanceOverride(ProcessDefinition pdef); } Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/client/internal/AbstractExecution.java =================================================================== --- api/trunk/modules/api/src/main/java/org/jboss/bpm/client/internal/AbstractExecution.java 2008-07-04 14:48:41 UTC (rev 1523) +++ api/trunk/modules/api/src/main/java/org/jboss/bpm/client/internal/AbstractExecution.java 2008-07-04 14:56:45 UTC (rev 1524) @@ -23,10 +23,10 @@ //$Id$ -import org.jboss.bpm.Context; import org.jboss.bpm.client.Execution; +import org.jboss.bpm.client.ExecutionContext; import org.jboss.bpm.client.ProcessInstance; -import org.jboss.bpm.def.Node; +import org.jboss.bpm.process.Node; /** * Represents an execution of a process instance. @@ -85,7 +85,7 @@ /** * Get the context for this execution */ - public abstract Context getContext(); + public abstract ExecutionContext getContext(); // Set the name for the execution protected abstract void setName(String name); Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/client/internal/AbstractProcessInstance.java =================================================================== --- api/trunk/modules/api/src/main/java/org/jboss/bpm/client/internal/AbstractProcessInstance.java 2008-07-04 14:48:41 UTC (rev 1523) +++ api/trunk/modules/api/src/main/java/org/jboss/bpm/client/internal/AbstractProcessInstance.java 2008-07-04 14:56:45 UTC (rev 1524) @@ -27,11 +27,11 @@ import java.util.HashSet; import java.util.Set; -import org.jboss.bpm.Context; +import org.jboss.bpm.client.Attachments; import org.jboss.bpm.client.Execution; -import org.jboss.bpm.client.ExecutionFactory; +import org.jboss.bpm.client.ExecutionManager; import org.jboss.bpm.client.ProcessInstance; -import org.jboss.bpm.def.ProcessDefinition; +import org.jboss.bpm.process.ProcessDefinition; /** * Represents an instance of a BPM process. @@ -50,7 +50,7 @@ // The map of executions private Set<Execution> execs = new HashSet<Execution>(); // The meta data for this process instance - private Context context = new DefaultContext(); + private Attachments attachments = new ProcessInstanceContext(); // Construct a process instance with a given process definition protected AbstractProcessInstance(ProcessDefinition pdef) @@ -96,9 +96,9 @@ /** * Get the context for this process instance */ - public Context getContext() + public Attachments getAttachments() { - return context; + return attachments; } /** @@ -106,7 +106,7 @@ */ public Execution createExecution() { - ExecutionFactory exm = ExecutionFactory.locateExecutionFactory(); + ExecutionManager exm = ExecutionManager.locateExecutionManager(); return exm.createExecution(this); } Deleted: api/trunk/modules/api/src/main/java/org/jboss/bpm/client/internal/DefaultContext.java =================================================================== --- api/trunk/modules/api/src/main/java/org/jboss/bpm/client/internal/DefaultContext.java 2008-07-04 14:48:41 UTC (rev 1523) +++ api/trunk/modules/api/src/main/java/org/jboss/bpm/client/internal/DefaultContext.java 2008-07-04 14:56:45 UTC (rev 1524) @@ -1,100 +0,0 @@ -/* - * JBoss, Home of Professional Open Source - * Copyright 2005, JBoss Inc., and individual contributors as indicated - * by the @authors tag. See the copyright.txt in the distribution for a - * full listing of individual contributors. - * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. - * - * This software is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this software; if not, write to the Free - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. - */ -package org.jboss.bpm.client.internal; - -//$Id$ - -import java.util.Collection; -import java.util.HashMap; -import java.util.Map; - -import org.jboss.bpm.Context; - -/** - * A general extendible artifact - * - * @author Tho...@jb... - * @since 20-Apr-2007 - */ -public class DefaultContext extends Context -{ - private Map<Key, Object> attachments = new HashMap<Key, Object>(); - - public Collection<Key> getAttachments() - { - return attachments.keySet(); - } - - @SuppressWarnings("unchecked") - public <T> T getAttachment(Class<T> clazz) - { - return (T)attachments.get(new Key(clazz, null)); - } - - @SuppressWarnings("unchecked") - public <T> T getAttachment(Class<T> clazz, String name) - { - return (T)attachments.get(new Key(clazz, name)); - } - - @SuppressWarnings("unchecked") - public <T> T getAttachment(String name) - { - return (T)attachments.get(new Key(Object.class, name)); - } - - @SuppressWarnings("unchecked") - public <T> T addAttachment(Class<T> clazz, Object obj) - { - return (T)attachments.put(new Key(clazz, null), obj); - } - - @SuppressWarnings("unchecked") - public <T> T addAttachment(Class<T> clazz, String name, Object obj) - { - return (T)attachments.put(new Key(clazz, name), obj); - } - - @SuppressWarnings("unchecked") - public <T> T addAttachment(String name, Object obj) - { - return (T)attachments.put(new Key(Object.class, name), obj); - } - - @SuppressWarnings("unchecked") - public <T> T removeAttachment(Class<T> clazz) - { - return (T)attachments.remove(new Key(clazz, null)); - } - - @SuppressWarnings("unchecked") - public <T> T removeAttachment(Class<T> clazz, String name) - { - return (T)attachments.remove(new Key(clazz, name)); - } - - @SuppressWarnings("unchecked") - public <T> T removeAttachment(String name) - { - return (T)attachments.remove(new Key(Object.class, name)); - } -} Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/client/internal/EmbeddedBeansDeployer.java (from rev 1504, api/trunk/modules/api/src/main/java/org/jboss/bpm/client/EmbeddedBeansDeployer.java) =================================================================== --- api/trunk/modules/api/src/main/java/org/jboss/bpm/client/internal/EmbeddedBeansDeployer.java (rev 0) +++ api/trunk/modules/api/src/main/java/org/jboss/bpm/client/internal/EmbeddedBeansDeployer.java 2008-07-04 14:56:45 UTC (rev 1524) @@ -0,0 +1,109 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2005, JBoss Inc., and individual contributors as indicated + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.jboss.bpm.client.internal; + +// $Id$ + +import java.net.URL; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.jboss.bpm.JBPMException; +import org.jboss.kernel.Kernel; +import org.jboss.kernel.plugins.bootstrap.basic.BasicBootstrap; +import org.jboss.kernel.plugins.deployment.xml.BasicXMLDeployer; +import org.jboss.kernel.plugins.util.KernelLocator; + +/** + * Boostrap the Microcontainer + * + * @author tho...@jb... + * @since 27-Jun-2008 + */ +public class EmbeddedBeansDeployer extends BasicBootstrap +{ + // provide logging + private static final Log log = LogFactory.getLog(EmbeddedBeansDeployer.class); + + private Kernel kernel; + private BasicXMLDeployer deployer; + + public EmbeddedBeansDeployer() + { + // Get or bootstrap the kernel + kernel = KernelLocator.getKernel(); + if (kernel == null) + { + try + { + super.bootstrap(); + kernel = super.getKernel(); + log.debug("bootstrap kernel: " + kernel); + } + catch (Throwable e) + { + throw new JBPMException("Cannot bootstrap kernel", e); + } + } + deployer = new BasicXMLDeployer(kernel); + } + + /** + * Deploy MC beans from URL + */ + public void deploy(URL url) + { + log.debug("deploy: " + url); + + // Deploy the beans + try + { + deployer.deploy(url); + deployer.validate(); + + // The KernelLocator is expected to get deployed as a bean + if (KernelLocator.getKernel() == null) + throw new JBPMException("KernelLocator not deployed as MC bean"); + + } + catch (Throwable e) + { + throw new JBPMException("Cannot deploy beans from: " + url, e); + } + } + + /** + * Undeploy MC beans from URL + */ + public void undeploy(URL url) + { + log.debug("undeploy: " + url); + try + { + deployer.undeploy(url); + } + catch (Throwable e) + { + throw new JBPMException("Cannot undeploy beans from: " + url, e); + } + } +} \ No newline at end of file Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/client/internal/ProcessInstanceContext.java (from rev 1505, api/trunk/modules/api/src/main/java/org/jboss/bpm/client/internal/DefaultContext.java) =================================================================== --- api/trunk/modules/api/src/main/java/org/jboss/bpm/client/internal/ProcessInstanceContext.java (rev 0) +++ api/trunk/modules/api/src/main/java/org/jboss/bpm/client/internal/ProcessInstanceContext.java 2008-07-04 14:56:45 UTC (rev 1524) @@ -0,0 +1,100 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2005, JBoss Inc., and individual contributors as indicated + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.jboss.bpm.client.internal; + +//$Id$ + +import java.util.Collection; +import java.util.HashMap; +import java.util.Map; + +import org.jboss.bpm.client.Attachments; + +/** + * An process instance context that can take attachments. + * + * @author Tho...@jb... + * @since 20-Apr-2007 + */ +public class ProcessInstanceContext implements Attachments +{ + private Map<Key, Object> attachments = new HashMap<Key, Object>(); + + public Collection<Key> getAttachmentKeys() + { + return attachments.keySet(); + } + + @SuppressWarnings("unchecked") + public <T> T getAttachment(Class<T> clazz) + { + return (T)attachments.get(new Key(clazz, null)); + } + + @SuppressWarnings("unchecked") + public <T> T getAttachment(Class<T> clazz, String name) + { + return (T)attachments.get(new Key(clazz, name)); + } + + @SuppressWarnings("unchecked") + public <T> T getAttachment(String name) + { + return (T)attachments.get(new Key(null, name)); + } + + @SuppressWarnings("unchecked") + public <T> T addAttachment(Class<T> clazz, Object obj) + { + return (T)attachments.put(new Key(clazz, null), obj); + } + + @SuppressWarnings("unchecked") + public <T> T addAttachment(Class<T> clazz, String name, Object obj) + { + return (T)attachments.put(new Key(clazz, name), obj); + } + + @SuppressWarnings("unchecked") + public <T> T addAttachment(String name, Object obj) + { + return (T)attachments.put(new Key(null, name), obj); + } + + @SuppressWarnings("unchecked") + public <T> T removeAttachment(Class<T> clazz) + { + return (T)attachments.remove(new Key(clazz, null)); + } + + @SuppressWarnings("unchecked") + public <T> T removeAttachment(Class<T> clazz, String name) + { + return (T)attachments.remove(new Key(clazz, name)); + } + + @SuppressWarnings("unchecked") + public <T> T removeAttachment(String name) + { + return (T)attachments.remove(new Key(null, name)); + } +} Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/process/EndNode.java (from rev 1504, api/trunk/modules/api/src/main/java/org/jboss/bpm/def/EndNode.java) =================================================================== --- api/trunk/modules/api/src/main/java/org/jboss/bpm/process/EndNode.java (rev 0) +++ api/trunk/modules/api/src/main/java/org/jboss/bpm/process/EndNode.java 2008-07-04 14:56:45 UTC (rev 1524) @@ -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.jboss.bpm.process; + + +// $Id$ + +/** + * Represents an end node in the process definition. + * + * @author tho...@jb... + * @since 18-Jun-2008 + */ +public interface EndNode extends Node +{ +} \ No newline at end of file Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/process/Node.java (from rev 1504, api/trunk/modules/api/src/main/java/org/jboss/bpm/def/Node.java) =================================================================== --- api/trunk/modules/api/src/main/java/org/jboss/bpm/process/Node.java (rev 0) +++ api/trunk/modules/api/src/main/java/org/jboss/bpm/process/Node.java 2008-07-04 14:56:45 UTC (rev 1524) @@ -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.jboss.bpm.process; + +// $Id$ + +/** + * Represents a node in the process definition. + * + * The Node is an immutable object. + * + * @author tho...@jb... + * @since 18-Jun-2008 + */ +public interface Node +{ + /** + * Get the associated process instance + */ + ProcessDefinition getProcessDefinition(); + + /** + * Get the node name + */ + String getName(); +} \ No newline at end of file Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/process/ProcessDefinition.java (from rev 1505, api/trunk/modules/api/src/main/java/org/jboss/bpm/def/ProcessDefinition.java) =================================================================== --- api/trunk/modules/api/src/main/java/org/jboss/bpm/process/ProcessDefinition.java (rev 0) +++ api/trunk/modules/api/src/main/java/org/jboss/bpm/process/ProcessDefinition.java 2008-07-04 14:56:45 UTC (rev 1524) @@ -0,0 +1,98 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2005, JBoss Inc., and individual contributors as indicated + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.jboss.bpm.process; + +// $Id$ + +import java.util.List; +import java.util.Set; + +import org.jboss.bpm.client.Execution; +import org.jboss.bpm.client.ProcessInstance; + +/** + * Represents the structural definition of a BPM process + * + * @author tho...@jb... + * @since 18-Jun-2008 + */ +public interface ProcessDefinition +{ + /** + * Get the name + */ + String getName(); + + /** + * Get an unmutable list of node objects + */ + List<Node> getNodes(); + + /** + * Find a node for a given name + * + * @return null if the node is not defined + */ + Node findNode(String name); + + /** + * Get the start node for this process definition + * + * @return The start node + */ + StartNode getStartNode(); + + /** + * Get the set of end nodes + * + * @return an emty set if + */ + Set<EndNode> getEndNodes(); + + /** + * Create an instance of this process definition. + */ + ProcessInstance createProcessInstance(); + + /** + * Get the set of registered process instances + */ + Set<ProcessInstance> getProcessInstances(); + + /** + * Find a ProcessInstance for a given name + * + * @return null if it cannot be found + */ + ProcessInstance findProcessInstance(String name); + + /** + * Remove a ProcessInstance for a given name + */ + void removeProcessInstance(String name); + + /** + * Create an execution for this process definition. Note, that this will automatically create a new process instance. + */ + Execution createExecution(); + +} \ No newline at end of file Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/process/StartNode.java (from rev 1504, api/trunk/modules/api/src/main/java/org/jboss/bpm/def/StartNode.java) =================================================================== --- api/trunk/modules/api/src/main/java/org/jboss/bpm/process/StartNode.java (rev 0) +++ api/trunk/modules/api/src/main/java/org/jboss/bpm/process/StartNode.java 2008-07-04 14:56:45 UTC (rev 1524) @@ -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.jboss.bpm.process; + + +// $Id$ + +/** + * Represents the root node in the process definition. + * + * @author tho...@jb... + * @since 18-Jun-2008 + */ +public interface StartNode extends Node +{ +} \ No newline at end of file Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/process/internal (from rev 1504, api/trunk/modules/api/src/main/java/org/jboss/bpm/def/internal) Deleted: api/trunk/modules/api/src/main/java/org/jboss/bpm/process/internal/AbstractNode.java =================================================================== --- api/trunk/modules/api/src/main/java/org/jboss/bpm/def/internal/AbstractNode.java 2008-07-03 21:44:42 UTC (rev 1504) +++ api/trunk/modules/api/src/main/java/org/jboss/bpm/process/internal/AbstractNode.java 2008-07-04 14:56:45 UTC (rev 1524) @@ -1,92 +0,0 @@ -/* - * JBoss, Home of Professional Open Source - * Copyright 2005, JBoss Inc., and individual contributors as indicated - * by the @authors tag. See the copyright.txt in the distribution for a - * full listing of individual contributors. - * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. - * - * This software is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this software; if not, write to the Free - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. - */ -package org.jboss.bpm.def.internal; - -import org.jboss.bpm.def.Node; -import org.jboss.bpm.def.ProcessDefinition; - - -// $Id$ - -/** - * Represents a node in the process definition. A node is an immutable object. The name of a node is unique in the scope of the process definition. - * - * @author tho...@jb... - * @since 18-Jun-2008 - */ -public abstract class AbstractNode implements Node -{ - // The associated process definition - private ProcessDefinition pdef; - - // Construct the node - protected AbstractNode(ProcessDefinition pdef) - { - if (pdef == null) - throw new IllegalArgumentException("Process definition cannot be null"); - - this.pdef = pdef; - } - - // Construct the node from a copy - protected AbstractNode(Node node) - { - this(node.getProcessDefinition()); - } - - // Call to initialize fully - protected void init(String name) - { - if (name == null) - { - name = "AnonymousNode#" + pdef.getNodes().size(); - setName(name); - } - } - - /** - * Get the associated process instance - */ - public ProcessDefinition getProcessDefinition() - { - return pdef; - } - - /** - * Get the node name - */ - public abstract String getName(); - - // Set the node name - protected abstract void setName(String name); - - /* (non-Javadoc) - * @see org.jboss.bpm.def.Node#toString() - */ - /* (non-Javadoc) - * @see org.jboss.bpm.def.internal.Node#toString() - */ - public String toString() - { - return "Node[" + getName() + "]"; - } -} \ No newline at end of file Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/process/internal/AbstractNode.java (from rev 1523, api/trunk/modules/api/src/main/java/org/jboss/bpm/def/internal/AbstractNode.java) =================================================================== --- api/trunk/modules/api/src/main/java/org/jboss/bpm/process/internal/AbstractNode.java ... [truncated message content] |
From: <do-...@jb...> - 2008-07-04 14:48:44
|
Author: porcherg Date: 2008-07-04 10:48:41 -0400 (Fri, 04 Jul 2008) New Revision: 1523 Modified: pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex01/BasicProcessExecutionTest.java pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex02/BasicProcessPersistenceTest.java pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex03/VariablesTest.java pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex04/ExternalDecisionTest.java pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex05/InternalDecisionTest.java pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex06/HumanTaskTest.java pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex06/Task.java pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex07/EventListenerTest.java pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex08/SequenceTest.java pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex09/EventPropagationTest.java pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex11/AsynchronousContinuationsTest.java pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex12/TimerTest.java pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex13/EnvironmentTest.java Log: reimport examples from ant pvm version. Modified: pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex01/BasicProcessExecutionTest.java =================================================================== --- pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex01/BasicProcessExecutionTest.java 2008-07-04 14:44:05 UTC (rev 1522) +++ pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex01/BasicProcessExecutionTest.java 2008-07-04 14:48:41 UTC (rev 1523) @@ -23,11 +23,11 @@ import junit.framework.TestCase; -import org.jbpm.pvm.Execution; +import org.jbpm.pvm.client.ClientProcessDefinition; +import org.jbpm.pvm.client.ClientProcessInstance; +import org.jbpm.pvm.model.ProcessFactory; import org.jbpm.pvm.samples.activities.AutomaticActivity; import org.jbpm.pvm.samples.activities.WaitState; -import org.jbpm.pvm.model.ProcessDefinition; -import org.jbpm.pvm.model.ProcessFactory; /** * @author Tom Baeyens @@ -35,7 +35,7 @@ public class BasicProcessExecutionTest extends TestCase { public void testBasicProcessExecution() { - ProcessDefinition processDefinition = ProcessFactory.build("basic") + ClientProcessDefinition processDefinition = ProcessFactory.build("basic") .node("a").initial().behaviour(WaitState.class) .transition().to("b") .node("b").behaviour(WaitState.class) @@ -47,7 +47,7 @@ .node("e").behaviour(WaitState.class) .done(); - Execution execution = processDefinition.startExecution(); + ClientProcessInstance execution = processDefinition.beginProcessInstance(); assertEquals("a", execution.getNode().getName()); Modified: pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex02/BasicProcessPersistenceTest.java =================================================================== --- pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex02/BasicProcessPersistenceTest.java 2008-07-04 14:44:05 UTC (rev 1522) +++ pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex02/BasicProcessPersistenceTest.java 2008-07-04 14:48:41 UTC (rev 1523) @@ -24,13 +24,13 @@ import junit.framework.TestCase; import org.jbpm.pvm.Execution; -import org.jbpm.pvm.samples.ExamplesConfiguration; import org.jbpm.pvm.ExecutionService; import org.jbpm.pvm.ProcessService; +import org.jbpm.pvm.client.ClientProcessDefinition; +import org.jbpm.pvm.model.ProcessFactory; +import org.jbpm.pvm.samples.ExamplesConfiguration; import org.jbpm.pvm.samples.activities.AutomaticActivity; import org.jbpm.pvm.samples.activities.WaitState; -import org.jbpm.pvm.model.ProcessDefinition; -import org.jbpm.pvm.model.ProcessFactory; /** @@ -39,7 +39,7 @@ public class BasicProcessPersistenceTest extends TestCase { public void testWaitStates() { - ProcessDefinition processDefinition = ProcessFactory.build("basic") + ClientProcessDefinition processDefinition = ProcessFactory.build("basic") .node("a").initial().behaviour(WaitState.class) .transition().to("b") .node("b").behaviour(WaitState.class) @@ -60,14 +60,14 @@ Execution execution = executionService.startExecution("basic", "one"); - assertEquals("a", execution.getNode().getName()); + assertEquals("a", execution.getNodeName()); execution = executionService.signalExecution("basic", "one"); - assertEquals("b", execution.getNode().getName()); + assertEquals("b", execution.getNodeName()); execution = executionService.signalExecution("basic", "one"); - assertEquals("e", execution.getNode().getName()); + assertEquals("e", execution.getNodeName()); } } Modified: pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex03/VariablesTest.java =================================================================== --- pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex03/VariablesTest.java 2008-07-04 14:44:05 UTC (rev 1522) +++ pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex03/VariablesTest.java 2008-07-04 14:48:41 UTC (rev 1523) @@ -26,10 +26,10 @@ import junit.framework.TestCase; -import org.jbpm.pvm.Execution; +import org.jbpm.pvm.client.ClientProcessDefinition; +import org.jbpm.pvm.client.ClientProcessInstance; +import org.jbpm.pvm.model.ProcessFactory; import org.jbpm.pvm.samples.activities.WaitState; -import org.jbpm.pvm.model.ProcessDefinition; -import org.jbpm.pvm.model.ProcessFactory; /** @@ -38,7 +38,7 @@ public class VariablesTest extends TestCase { public void testVariables() { - ProcessDefinition processDefinition = ProcessFactory.build("expenses") + ClientProcessDefinition processDefinition = ProcessFactory.build("expenses") .node("evaluate").initial().behaviour(WaitState.class) .transition().to("pay back") .node("pay back").behaviour(WaitState.class) @@ -47,7 +47,10 @@ Map<String, Object> variables = new HashMap<String, Object>(); variables.put("reason", "business trip"); variables.put("total amount", "$1500"); - Execution execution = processDefinition.startExecution(variables); + + ClientProcessInstance execution = processDefinition.createProcessInstance(); + execution.setVariables(variables); + execution.begin(); assertEquals("business trip", execution.getVariable("reason")); assertEquals("$1500", execution.getVariable("total amount")); Modified: pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex04/ExternalDecisionTest.java =================================================================== --- pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex04/ExternalDecisionTest.java 2008-07-04 14:44:05 UTC (rev 1522) +++ pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex04/ExternalDecisionTest.java 2008-07-04 14:48:41 UTC (rev 1523) @@ -26,6 +26,8 @@ import org.jbpm.pvm.Execution; import org.jbpm.pvm.samples.activities.AutomaticActivity; import org.jbpm.pvm.samples.activities.WaitState; +import org.jbpm.pvm.client.ClientProcessDefinition; +import org.jbpm.pvm.client.ClientProcessInstance; import org.jbpm.pvm.model.ProcessDefinition; import org.jbpm.pvm.model.ProcessFactory; @@ -35,7 +37,7 @@ */ public class ExternalDecisionTest extends TestCase { - public static ProcessDefinition createCreditProcess() { + public static ClientProcessDefinition createCreditProcess() { return ProcessFactory.build() .node("initial").initial().behaviour(new AutomaticActivity()) .transition().to("creditRate?") @@ -50,27 +52,27 @@ } public void testGoodRating() { - ProcessDefinition processDefinition = createCreditProcess(); + ClientProcessDefinition processDefinition = createCreditProcess(); - Execution execution = processDefinition.startExecution(); + ClientProcessInstance execution = processDefinition.beginProcessInstance(); execution.signal("good"); assertEquals("priority delivery", execution.getNode().getName()); } public void testAverageRating() { - ProcessDefinition processDefinition = createCreditProcess(); + ClientProcessDefinition processDefinition = createCreditProcess(); - Execution execution = processDefinition.startExecution(); + ClientProcessInstance execution = processDefinition.beginProcessInstance(); execution.signal("average"); assertEquals("bulk delivery", execution.getNode().getName()); } public void testBadRating() { - ProcessDefinition processDefinition = createCreditProcess(); + ClientProcessDefinition processDefinition = createCreditProcess(); - Execution execution = processDefinition.startExecution(); + ClientProcessInstance execution = processDefinition.beginProcessInstance(); execution.signal("bad"); assertEquals("payment upfront", execution.getNode().getName()); Modified: pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex05/InternalDecisionTest.java =================================================================== --- pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex05/InternalDecisionTest.java 2008-07-04 14:44:05 UTC (rev 1522) +++ pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex05/InternalDecisionTest.java 2008-07-04 14:48:41 UTC (rev 1523) @@ -25,6 +25,8 @@ import org.jbpm.pvm.Execution; import org.jbpm.pvm.samples.activities.WaitState; +import org.jbpm.pvm.client.ClientProcessDefinition; +import org.jbpm.pvm.client.ClientProcessInstance; import org.jbpm.pvm.model.ProcessDefinition; import org.jbpm.pvm.model.ProcessFactory; @@ -34,7 +36,7 @@ */ public class InternalDecisionTest extends TestCase { - public static ProcessDefinition createCreditProcess() { + public static ClientProcessDefinition createCreditProcess() { return ProcessFactory.build() .node("get credit rate").initial().behaviour(WaitState.class) .transition().to("creditRate?") @@ -49,9 +51,9 @@ } public void testGoodRating() { - ProcessDefinition processDefinition = createCreditProcess(); + ClientProcessDefinition processDefinition = createCreditProcess(); - Execution execution = processDefinition.startExecution(); + ClientProcessInstance execution = processDefinition.beginProcessInstance(); execution.setVariable("creditRate", 7); execution.signal(); @@ -59,9 +61,9 @@ } public void testAverageRating() { - ProcessDefinition processDefinition = createCreditProcess(); + ClientProcessDefinition processDefinition = createCreditProcess(); - Execution execution = processDefinition.startExecution(); + ClientProcessInstance execution = processDefinition.beginProcessInstance(); execution.setVariable("creditRate", 2); execution.signal(); @@ -69,9 +71,9 @@ } public void testBadRating() { - ProcessDefinition processDefinition = createCreditProcess(); + ClientProcessDefinition processDefinition = createCreditProcess(); - Execution execution = processDefinition.startExecution(); + ClientProcessInstance execution = processDefinition.beginProcessInstance(); execution.setVariable("creditRate", -9); execution.signal(); Modified: pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex06/HumanTaskTest.java =================================================================== --- pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex06/HumanTaskTest.java 2008-07-04 14:44:05 UTC (rev 1522) +++ pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex06/HumanTaskTest.java 2008-07-04 14:48:41 UTC (rev 1523) @@ -24,10 +24,10 @@ import junit.framework.TestCase; -import org.jbpm.pvm.Execution; +import org.jbpm.pvm.client.ClientProcessDefinition; +import org.jbpm.pvm.client.ClientProcessInstance; +import org.jbpm.pvm.model.ProcessFactory; import org.jbpm.pvm.samples.activities.WaitState; -import org.jbpm.pvm.model.ProcessDefinition; -import org.jbpm.pvm.model.ProcessFactory; /** @@ -36,13 +36,13 @@ public class HumanTaskTest extends TestCase { public void testHumanTask() { - ProcessDefinition processDefinition = ProcessFactory.build("task") + ClientProcessDefinition processDefinition = ProcessFactory.build("task") .node("shred evidence").initial().behaviour(new TaskActivity()) .transition().to("business as usual") .node("business as usual").behaviour(new WaitState()) .done(); - Execution execution = processDefinition.startExecution(); + ClientProcessInstance execution = processDefinition.beginProcessInstance(); assertEquals("shred evidence", execution.getNode().getName()); Modified: pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex06/Task.java =================================================================== --- pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex06/Task.java 2008-07-04 14:44:05 UTC (rev 1522) +++ pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex06/Task.java 2008-07-04 14:48:41 UTC (rev 1523) @@ -22,17 +22,18 @@ package org.jbpm.pvm.samples.ex06; import org.jbpm.pvm.Execution; +import org.jbpm.pvm.client.ClientExecution; public class Task { public String userId; public String taskName; - public Execution execution; + public ClientExecution execution; public Task(String userId, String taskName, Execution execution) { this.userId = userId; this.taskName = taskName; - this.execution = execution; + this.execution = (ClientExecution) execution; } public void complete() { Modified: pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex07/EventListenerTest.java =================================================================== --- pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex07/EventListenerTest.java 2008-07-04 14:44:05 UTC (rev 1522) +++ pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex07/EventListenerTest.java 2008-07-04 14:48:41 UTC (rev 1523) @@ -27,6 +27,7 @@ import org.jbpm.pvm.samples.activities.Console; import org.jbpm.pvm.samples.activities.Display; import org.jbpm.pvm.samples.activities.WaitState; +import org.jbpm.pvm.client.ClientProcessDefinition; import org.jbpm.pvm.model.ProcessDefinition; import org.jbpm.pvm.model.ProcessFactory; @@ -41,7 +42,7 @@ } public void testEventAction() { - ProcessDefinition processDefinition = ProcessFactory.build() + ClientProcessDefinition processDefinition = ProcessFactory.build() .node("a").initial().behaviour(new AutomaticActivity()) .event("node-leave") .listener(new Display("leaving a")) @@ -53,7 +54,7 @@ .listener(new Display("entering b")) .done(); - processDefinition.startExecution(); + processDefinition.beginProcessInstance(); assertEquals( "leaving a" + "\n" + Modified: pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex08/SequenceTest.java =================================================================== --- pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex08/SequenceTest.java 2008-07-04 14:44:05 UTC (rev 1522) +++ pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex08/SequenceTest.java 2008-07-04 14:48:41 UTC (rev 1523) @@ -23,11 +23,11 @@ import junit.framework.TestCase; -import org.jbpm.pvm.Execution; -import org.jbpm.pvm.activities.Display; +import org.jbpm.pvm.client.ClientProcessDefinition; +import org.jbpm.pvm.client.ClientProcessInstance; +import org.jbpm.pvm.model.ProcessFactory; +import org.jbpm.pvm.samples.activities.Display; import org.jbpm.pvm.samples.activities.WaitState; -import org.jbpm.pvm.model.ProcessDefinition; -import org.jbpm.pvm.model.ProcessFactory; /** @@ -36,7 +36,7 @@ public class SequenceTest extends TestCase { public void testSequence() { - ProcessDefinition processDefinition = ProcessFactory.build("sequence") + ClientProcessDefinition processDefinition = ProcessFactory.build("sequence") .compositeNode("sequence").initial().behaviour(new Sequence()) .needsPrevious() .node("one").behaviour(new Display("one")) @@ -45,7 +45,7 @@ .compositeEnd() .done(); - Execution execution = processDefinition.startExecution(); + ClientProcessInstance execution = processDefinition.beginProcessInstance(); execution.signal(); assertTrue(execution.isEnded()); assertEquals("sequence", execution.getNode().getName()); Modified: pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex09/EventPropagationTest.java =================================================================== --- pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex09/EventPropagationTest.java 2008-07-04 14:44:05 UTC (rev 1522) +++ pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex09/EventPropagationTest.java 2008-07-04 14:48:41 UTC (rev 1523) @@ -23,11 +23,11 @@ import junit.framework.TestCase; -import org.jbpm.pvm.Execution; +import org.jbpm.pvm.client.ClientProcessDefinition; +import org.jbpm.pvm.client.ClientProcessInstance; +import org.jbpm.pvm.model.Event; +import org.jbpm.pvm.model.ProcessFactory; import org.jbpm.pvm.samples.activities.WaitState; -import org.jbpm.pvm.model.Node; -import org.jbpm.pvm.model.ProcessDefinition; -import org.jbpm.pvm.model.ProcessFactory; /** * @author Tom Baeyens @@ -35,9 +35,9 @@ public class EventPropagationTest extends TestCase { public void testPropagationProcess(){ - ProcessDefinition processDefinition = ProcessFactory.build("propagate") + ClientProcessDefinition processDefinition = ProcessFactory.build("propagate") .compositeNode("composite") - .event(Node.EVENT_NODE_LEAVE) + .event(Event.NODE_END) .listener(new DisplaySource()) .node("a").initial().behaviour(new WaitState()) .transition().to("b") @@ -47,15 +47,15 @@ .node("c").behaviour(new WaitState()) .done(); - Execution execution = processDefinition.startExecution(); + ClientProcessInstance execution = processDefinition.beginProcessInstance(); execution.signal(); execution.signal(); } public void testPropagationDisabledProcess(){ - ProcessDefinition processDefinition = ProcessFactory.build("propagate") + ClientProcessDefinition processDefinition = ProcessFactory.build("propagate") .compositeNode("composite") - .event(Node.EVENT_NODE_LEAVE) + .event(Event.NODE_END) .listener(new DisplaySource()) .propagationDisabled() .node("a").initial().behaviour(new WaitState()) @@ -66,7 +66,7 @@ .node("c").behaviour(new WaitState()) .done(); - Execution execution = processDefinition.startExecution(); + ClientProcessInstance execution = processDefinition.beginProcessInstance(); execution.signal(); execution.signal(); } Modified: pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex11/AsynchronousContinuationsTest.java =================================================================== --- pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex11/AsynchronousContinuationsTest.java 2008-07-04 14:44:05 UTC (rev 1522) +++ pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex11/AsynchronousContinuationsTest.java 2008-07-04 14:48:41 UTC (rev 1523) @@ -24,15 +24,15 @@ import junit.framework.TestCase; import org.jbpm.pvm.Execution; -import org.jbpm.pvm.ExamplesConfiguration; import org.jbpm.pvm.ExecutionService; import org.jbpm.pvm.ProcessService; -import org.jbpm.pvm.activities.AutomaticActivity; -import org.jbpm.pvm.samples.activities.WaitState; +import org.jbpm.pvm.client.ClientProcessDefinition; import org.jbpm.pvm.env.EnvironmentFactory; import org.jbpm.pvm.job.JobTestHelper; -import org.jbpm.pvm.model.ProcessDefinition; import org.jbpm.pvm.model.ProcessFactory; +import org.jbpm.pvm.samples.ExamplesConfiguration; +import org.jbpm.pvm.samples.activities.AutomaticActivity; +import org.jbpm.pvm.samples.activities.WaitState; /** * @author Tom Baeyens @@ -40,7 +40,7 @@ public class AsynchronousContinuationsTest extends TestCase { public void testWaitStates() { - ProcessDefinition processDefinition = ProcessFactory.build("async") + ClientProcessDefinition processDefinition = ProcessFactory.build("async") .node("a").initial().behaviour(AutomaticActivity.class) .transition().to("b") .node("b").behaviour(AutomaticActivity.class) @@ -60,7 +60,7 @@ Execution execution = executionService.startExecution("async"); assertTrue(execution.isLocked()); - assertEquals("b", execution.getNode().getName()); + assertEquals("b", execution.getNodeName()); // In a real environment, the JobExecutor will pick up this message // and executes it in another thread. @@ -70,6 +70,6 @@ JobTestHelper jobTestHelper = environmentFactory.get(JobTestHelper.class); execution = jobTestHelper.executeMessage(execution.getDbid()); - assertEquals("d", execution.getNode().getName()); + assertEquals("d", execution.getNodeName()); } } Modified: pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex12/TimerTest.java =================================================================== --- pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex12/TimerTest.java 2008-07-04 14:44:05 UTC (rev 1522) +++ pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex12/TimerTest.java 2008-07-04 14:48:41 UTC (rev 1523) @@ -28,15 +28,10 @@ import org.jbpm.pvm.Execution; import org.jbpm.pvm.ExecutionService; import org.jbpm.pvm.ProcessService; -import org.jbpm.pvm.ExamplesConfiguration; -import org.jbpm.pvm.samples.activities.WaitState; -import org.jbpm.pvm.env.EnvironmentFactory; -import org.jbpm.pvm.job.JobTestHelper; -import org.jbpm.pvm.job.Timer; -import org.jbpm.pvm.model.ActivityInstance; -import org.jbpm.pvm.model.Node; import org.jbpm.pvm.model.ProcessDefinition; import org.jbpm.pvm.model.ProcessFactory; +import org.jbpm.pvm.samples.ExamplesConfiguration; +import org.jbpm.pvm.samples.activities.WaitState; /** @@ -66,10 +61,10 @@ Execution execution = executionService.startExecution("timed"); - ActivityInstance activityInstance = execution.getActivityInstance(); - Node node = activityInstance.getNode(); + /* TODO Fix after refactoring + Node node = execution.getNode(); assertEquals("get input", node.getName()); - Timer timer = activityInstance + Timer timer = execution .getTimers() .iterator() .next(); @@ -81,5 +76,6 @@ execution = jobTestHelper.executeTimer(timer.getDbid()); assertEquals("manager decision", execution.getNode().getName()); + */ } } Modified: pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex13/EnvironmentTest.java =================================================================== --- pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex13/EnvironmentTest.java 2008-07-04 14:44:05 UTC (rev 1522) +++ pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex13/EnvironmentTest.java 2008-07-04 14:48:41 UTC (rev 1523) @@ -35,7 +35,7 @@ static EnvironmentFactory environmentFactory = PvmEnvironmentFactory.parseXmlString( "<contexts>" + " <environment-factory>" + - " <object name='book' class='org.jbpm.pvm.ex13.Book' />" + + " <object name='book' class='org.jbpm.pvm.samples.ex13.Book' />" + " </environment-factory>" + "</contexts>" ); |
From: <do-...@jb...> - 2008-07-04 14:44:07
|
Author: porcherg Date: 2008-07-04 10:44:05 -0400 (Fri, 04 Jul 2008) New Revision: 1522 Modified: pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/env/Environment.java pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/env/DefaultEnvironment.java pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/job/TimerImpl.java pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/jobexecutor/ExecuteJobCommand.java pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExceptionHandler.java pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/ExceptionHandlerImpl.java pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/svc/TransactionInterceptor.java pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/descriptor/TransactionRefDescriptor.java pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/operation/EnlistOperation.java pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/tx/TransactionApiTest.java pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/tx/TransactionResourcesSetRollbackOnlyTest.java pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/spring2/PojoEnvironment.java Log: change environment.getTransaction() into environment.get(Transaction.class); (JBPM-1230) Modified: pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/env/Environment.java =================================================================== --- pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/env/Environment.java 2008-07-04 14:00:18 UTC (rev 1521) +++ pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/env/Environment.java 2008-07-04 14:44:05 UTC (rev 1522) @@ -145,9 +145,6 @@ */ public abstract <T> T get(Class<T> type); - /** convenience method for finding the {@link Transaction}. */ - public abstract Transaction getTransaction(); - /** get the authenticated user id */ public abstract String getUserId(); Modified: pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/env/DefaultEnvironment.java =================================================================== --- pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/env/DefaultEnvironment.java 2008-07-04 14:00:18 UTC (rev 1521) +++ pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/env/DefaultEnvironment.java 2008-07-04 14:44:05 UTC (rev 1522) @@ -180,18 +180,6 @@ } return null; } - - public Transaction getTransaction() { - // optimisation: search the block context first, only if that fails, use the default search order - Context blockContext = contexts.get(CONTEXTNAME_ENVIRONMENT); - if (blockContext!=null) { - Transaction transaction = blockContext.get(Transaction.class); - if (transaction!=null) { - return transaction; - } - } - return get(Transaction.class); - } // exception //////////////////////////////////////////////////////////////// Modified: pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/job/TimerImpl.java =================================================================== --- pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/job/TimerImpl.java 2008-07-04 14:00:18 UTC (rev 1521) +++ pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/job/TimerImpl.java 2008-07-04 14:44:05 UTC (rev 1522) @@ -143,7 +143,7 @@ // notify the jobExecutor at the end of the transaction JobExecutor jobExecutor = environment.get(JobExecutor.class); if (jobExecutor!=null) { - Transaction transaction = environment.getTransaction(); + Transaction transaction = environment.get(Transaction.class); if (transaction!=null) { throw new PvmException("no transaction in environment"); } Modified: pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/jobexecutor/ExecuteJobCommand.java =================================================================== --- pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/jobexecutor/ExecuteJobCommand.java 2008-07-04 14:00:18 UTC (rev 1521) +++ pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/jobexecutor/ExecuteJobCommand.java 2008-07-04 14:44:05 UTC (rev 1522) @@ -91,7 +91,7 @@ * released). Then the command will update the JobImpl with the exception details in a separate * transaction. */ protected void handleJobExecutionException(Environment environment, JobImpl<?> job, Throwable exception) { - Transaction transaction = environment.getTransaction(); + Transaction transaction = environment.get(Transaction.class); transaction.setRollbackOnly(); CommandService commandService = (CommandService) environment.get(CommandService.class); Modified: pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExceptionHandler.java =================================================================== --- pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExceptionHandler.java 2008-07-04 14:00:18 UTC (rev 1521) +++ pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExceptionHandler.java 2008-07-04 14:44:05 UTC (rev 1522) @@ -79,7 +79,7 @@ job.setLockExpirationTime(null); // notify the jobImpl executor after the transaction is completed - Transaction transaction = environment.getTransaction(); + Transaction transaction = environment.get(Transaction.class); JobExecutor jobExecutor = environment.get(JobExecutor.class); if ( (transaction!=null) && (jobExecutor!=null) Modified: pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/ExceptionHandlerImpl.java =================================================================== --- pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/ExceptionHandlerImpl.java 2008-07-04 14:00:18 UTC (rev 1521) +++ pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/ExceptionHandlerImpl.java 2008-07-04 14:44:05 UTC (rev 1522) @@ -122,7 +122,7 @@ public void handle(ExecutionImpl execution, Exception exception) { if (isTransactional) { Environment environment = Environment.getCurrent(); - Transaction transaction = (environment!=null ? environment.getTransaction() : null); + Transaction transaction = (environment!=null ? environment.get(Transaction.class) : null); if (transaction!=null) { log.trace("registering exception handler to "+transaction); AfterTxCompletionListener afterTxCompletionListener = new AfterTxCompletionListener( Modified: pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/svc/TransactionInterceptor.java =================================================================== --- pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/svc/TransactionInterceptor.java 2008-07-04 14:00:18 UTC (rev 1521) +++ pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/svc/TransactionInterceptor.java 2008-07-04 14:44:05 UTC (rev 1522) @@ -39,7 +39,7 @@ if (environment==null) { throw new PvmException("no environment for verifying authorization"); } - Transaction transaction = environment.getTransaction(); + Transaction transaction = environment.get(Transaction.class); if (transaction==null) { throw new PvmException("no transaction in environment"); } Modified: pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/descriptor/TransactionRefDescriptor.java =================================================================== --- pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/descriptor/TransactionRefDescriptor.java 2008-07-04 14:00:18 UTC (rev 1521) +++ pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/descriptor/TransactionRefDescriptor.java 2008-07-04 14:44:05 UTC (rev 1522) @@ -22,6 +22,7 @@ package org.jbpm.pvm.internal.wire.descriptor; import org.jbpm.pvm.env.Environment; +import org.jbpm.pvm.env.Transaction; import org.jbpm.pvm.internal.wire.WireContext; /** @@ -32,7 +33,7 @@ private static final long serialVersionUID = 1L; public Object construct(WireContext wireContext) { - return Environment.getCurrent().getTransaction(); + return Environment.getCurrent().get(Transaction.class); } } Modified: pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/operation/EnlistOperation.java =================================================================== --- pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/operation/EnlistOperation.java 2008-07-04 14:00:18 UTC (rev 1521) +++ pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/operation/EnlistOperation.java 2008-07-04 14:44:05 UTC (rev 1522) @@ -42,7 +42,7 @@ if (transactionName!=null) { object = wireContext.get(transactionName); } else { - object = wireContext.getEnvironment().getTransaction(); + object = wireContext.getEnvironment().get(Transaction.class); } if ( (object==null) Modified: pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/tx/TransactionApiTest.java =================================================================== --- pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/tx/TransactionApiTest.java 2008-07-04 14:00:18 UTC (rev 1521) +++ pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/tx/TransactionApiTest.java 2008-07-04 14:44:05 UTC (rev 1522) @@ -59,9 +59,9 @@ assertSame(StandardTransaction.STATE_COMMITTED, standardTransaction.getState()); - assertTrue(environment.getTransaction().isCommitted()); - assertFalse(environment.getTransaction().isRollbackOnly()); - assertFalse(environment.getTransaction().isRolledBack()); + assertTrue(environment.get(Transaction.class).isCommitted()); + assertFalse(environment.get(Transaction.class).isRollbackOnly()); + assertFalse(environment.get(Transaction.class).isRolledBack()); } public void testRollback() { @@ -92,7 +92,7 @@ } assertSame(StandardTransaction.STATE_ROLLEDBACK, standardTransaction.getState()); - Transaction transaction = environment.getTransaction(); + Transaction transaction = environment.get(Transaction.class); assertFalse(transaction.isCommitted()); assertTrue(transaction.isRollbackOnly()); assertTrue(transaction.isRolledBack()); @@ -139,9 +139,9 @@ } assertSame(StandardTransaction.STATE_ROLLEDBACK, standardTransaction.getState()); - assertFalse(environment.getTransaction().isCommitted()); - assertTrue(environment.getTransaction().isRollbackOnly()); - assertTrue(environment.getTransaction().isRolledBack()); + assertFalse(environment.get(Transaction.class).isCommitted()); + assertTrue(environment.get(Transaction.class).isRollbackOnly()); + assertTrue(environment.get(Transaction.class).isRolledBack()); } // don't ever try this at home ! :-) @@ -187,9 +187,9 @@ } assertSame(StandardTransaction.STATE_ROLLEDBACK, standardTransaction.getState()); - assertFalse(environment.getTransaction().isCommitted()); - assertTrue(environment.getTransaction().isRollbackOnly()); - assertTrue(environment.getTransaction().isRolledBack()); + assertFalse(environment.get(Transaction.class).isCommitted()); + assertTrue(environment.get(Transaction.class).isRollbackOnly()); + assertTrue(environment.get(Transaction.class).isRolledBack()); } public static class UserCheckedException extends Exception { @@ -237,8 +237,8 @@ } assertSame(StandardTransaction.STATE_ROLLEDBACK, standardTransaction.getState()); - assertFalse(environment.getTransaction().isCommitted()); - assertTrue(environment.getTransaction().isRollbackOnly()); - assertTrue(environment.getTransaction().isRolledBack()); + assertFalse(environment.get(Transaction.class).isCommitted()); + assertTrue(environment.get(Transaction.class).isRollbackOnly()); + assertTrue(environment.get(Transaction.class).isRolledBack()); } } Modified: pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/tx/TransactionResourcesSetRollbackOnlyTest.java =================================================================== --- pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/tx/TransactionResourcesSetRollbackOnlyTest.java 2008-07-04 14:00:18 UTC (rev 1521) +++ pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/tx/TransactionResourcesSetRollbackOnlyTest.java 2008-07-04 14:44:05 UTC (rev 1522) @@ -23,6 +23,7 @@ import org.jbpm.pvm.test.base.JbpmTestCase; import org.jbpm.pvm.env.Environment; +import org.jbpm.pvm.env.Transaction; import org.jbpm.pvm.internal.tx.StandardTransaction; @@ -49,7 +50,7 @@ try { resourceOne = (TestResource) environment.get("resourceOne"); - environment.getTransaction().setRollbackOnly(); + environment.get(Transaction.class).setRollbackOnly(); assertFalse(resourceOne.isPrepared); assertFalse(resourceOne.isCommitted); @@ -94,7 +95,7 @@ assertFalse(resourceOne.isCommitted); assertFalse(resourceOne.isRolledBack); - environment.getTransaction().setRollbackOnly(); + environment.get(Transaction.class).setRollbackOnly(); resourceTwo = (TestResource) environment.get("resourceTwo"); assertFalse(resourceTwo.isPrepared); @@ -151,7 +152,7 @@ assertFalse(resourceTwo.isCommitted); assertFalse(resourceTwo.isRolledBack); - environment.getTransaction().setRollbackOnly(); + environment.get(Transaction.class).setRollbackOnly(); assertEquals(1, environment.get(StandardTransaction.class).resources.size()); Modified: pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/spring2/PojoEnvironment.java =================================================================== --- pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/spring2/PojoEnvironment.java 2008-07-04 14:00:18 UTC (rev 1521) +++ pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/spring2/PojoEnvironment.java 2008-07-04 14:44:05 UTC (rev 1522) @@ -103,15 +103,6 @@ } @Override - public Transaction getTransaction() { - return this.transaction; - } - - public void setTransaction(Transaction transaction){ - this.transaction = transaction; - } - - @Override public String getUserId() { // if the authenticated user was explicitely set if (userId!=null) { |
From: <do-...@jb...> - 2008-07-04 14:00:23
|
Author: tho...@jb... Date: 2008-07-04 10:00:18 -0400 (Fri, 04 Jul 2008) New Revision: 1521 Modified: jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/SerializabilityTest.java Log: Exclude org.jbpm.integration Modified: jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/SerializabilityTest.java =================================================================== --- jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/SerializabilityTest.java 2008-07-04 13:26:28 UTC (rev 1520) +++ jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/SerializabilityTest.java 2008-07-04 14:00:18 UTC (rev 1521) @@ -34,10 +34,11 @@ import org.jbpm.file.def.FileDefinitionFileSystemConfigTest; import org.jbpm.util.ClassLoaderUtil; -public class SerializabilityTest extends TestCase { +public class SerializabilityTest extends TestCase +{ String testRootDir = FileDefinitionFileSystemConfigTest.class.getProtectionDomain().getCodeSource().getLocation().getFile().toString(); - + static Set excusedClasses = new HashSet(Arrays.asList(new String[] { "org.jbpm.ant.DeployProcessTask", "org.jbpm.ant.JbpmSchemaTask", @@ -68,6 +69,7 @@ "org.jbpm.instantiation.FieldInstantiator", "org.jbpm.instantiation.ProcessClassLoader", "org.jbpm.instantiation.XmlInstantiator", + "org.jbpm.integration", "org.jbpm.JbpmConfiguration", "org.jbpm.jmx.JbpmService", "org.jbpm.job.executor.JobExecutorThread", @@ -119,50 +121,55 @@ "org.jbpm.JbpmContextTestHelper" })); - public void testForNonSerializableClasses() { - File jbpmRoot = new File(testRootDir+"../classes/"); + public void testForNonSerializableClasses() + { + File jbpmRoot = new File(testRootDir + "../classes/"); scanForClasses(jbpmRoot, ""); } - - private void scanForClasses(File rootClassDir, String packageDir) { - File packageDirFile = new File(rootClassDir.getPath()+"/"+packageDir); + + private void scanForClasses(File rootClassDir, String packageDir) + { + File packageDirFile = new File(rootClassDir.getPath() + "/" + packageDir); File[] files = packageDirFile.listFiles(); - for (int i=0; i<files.length; i++) { - if (files[i].isDirectory()) { - String newPackageDir = ( "".equals(packageDir) ? files[i].getName() : packageDir+"/"+files[i].getName() ); + for (int i = 0; i < files.length; i++) + { + if (files[i].isDirectory()) + { + String newPackageDir = ("".equals(packageDir) ? files[i].getName() : packageDir + "/" + files[i].getName()); // log.debug("descending into directory "+newPackageDir); scanForClasses(rootClassDir, newPackageDir); - - } else if ( (files[i].isFile()) - && (files[i].getName().endsWith(".class")) - ) { + + } + else if ((files[i].isFile()) && (files[i].getName().endsWith(".class"))) + { // log.debug("found class file "+files[i].getName()); - String classFilePath = packageDir+"/"+files[i].getName(); + String classFilePath = packageDir + "/" + files[i].getName(); String className = classFilePath.replace('/', '.'); - className = className.substring(0, className.length()-6); + className = className.substring(0, className.length() - 6); assertSerializabilityOfClass(className); } } } - private void assertSerializabilityOfClass(String className) { + private void assertSerializabilityOfClass(String className) + { Class clazz = ClassLoaderUtil.loadClass(className); - - if ( ! ( (Serializable.class.isAssignableFrom(clazz)) - || (Modifier.isAbstract(clazz.getModifiers())) - || (isExcused(className)) - ) - ) { - fail(className+" is NOT Serializable"); + + if (!((Serializable.class.isAssignableFrom(clazz)) || (Modifier.isAbstract(clazz.getModifiers())) || (isExcused(className)))) + { + fail(className + " is NOT Serializable"); } } - boolean isExcused(String className) { + boolean isExcused(String className) + { boolean isExcused = false; Iterator iter = excusedClasses.iterator(); - while (iter.hasNext() && !isExcused) { - String excusedClassName = (String) iter.next(); - if (className.startsWith(excusedClassName)) { + while (iter.hasNext() && !isExcused) + { + String excusedClassName = (String)iter.next(); + if (className.startsWith(excusedClassName)) + { isExcused = true; } } |
From: <do-...@jb...> - 2008-07-04 13:26:31
|
Author: tho...@jb... Date: 2008-07-04 09:26:28 -0400 (Fri, 04 Jul 2008) New Revision: 1520 Modified: api/trunk/modules/api/pom.xml api/trunk/modules/api/src/main/java/org/jboss/bpm/Context.java api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ExecutionFactory.java api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessDefinitionManager.java api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessEngine.java api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessInstanceFactory.java api/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Transition.java Log: javadoc Modified: api/trunk/modules/api/pom.xml =================================================================== --- api/trunk/modules/api/pom.xml 2008-07-04 12:58:42 UTC (rev 1519) +++ api/trunk/modules/api/pom.xml 2008-07-04 13:26:28 UTC (rev 1520) @@ -56,7 +56,7 @@ <artifactId>maven-javadoc-plugin</artifactId> <configuration> <show>public</show> - <excludePackageNames>*.internal</excludePackageNames> + <excludePackageNames>*.internal:*.incubation:*.test</excludePackageNames> </configuration> </plugin> </plugins> Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/Context.java =================================================================== --- api/trunk/modules/api/src/main/java/org/jboss/bpm/Context.java 2008-07-04 12:58:42 UTC (rev 1519) +++ api/trunk/modules/api/src/main/java/org/jboss/bpm/Context.java 2008-07-04 13:26:28 UTC (rev 1520) @@ -33,6 +33,11 @@ */ public abstract class Context { + // Hide public constructor + protected Context() + { + } + /** Get arbitrary attachments */ public abstract Collection<Key> getAttachments(); Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ExecutionFactory.java =================================================================== --- api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ExecutionFactory.java 2008-07-04 12:58:42 UTC (rev 1519) +++ api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ExecutionFactory.java 2008-07-04 13:26:28 UTC (rev 1520) @@ -38,6 +38,11 @@ // Injected through the MC protected ProcessEngine engine; + // Hide public constructor + protected ExecutionFactory() + { + } + /** * Get the associated process engine */ Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessDefinitionManager.java =================================================================== --- api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessDefinitionManager.java 2008-07-04 12:58:42 UTC (rev 1519) +++ api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessDefinitionManager.java 2008-07-04 13:26:28 UTC (rev 1520) @@ -40,12 +40,16 @@ */ public abstract class ProcessDefinitionManager { - // Injected through the MC protected ProcessEngine engine; // The set of process definitions private Set<ProcessDefinition> pdefs = new HashSet<ProcessDefinition>(); + // Hide public constructor + protected ProcessDefinitionManager() + { + } + /* Get the associated process engine */ public ProcessEngine getProcessEngine() { Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessEngine.java =================================================================== --- api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessEngine.java 2008-07-04 12:58:42 UTC (rev 1519) +++ api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessEngine.java 2008-07-04 13:26:28 UTC (rev 1520) @@ -45,16 +45,31 @@ // Flag to indicate that the Engine is shutting down private boolean prepareForShutdown; + // Hide public constructor + protected ProcessEngine() + { + } + + /** + * Prepare the engine for shutdown. + * During shutdown the creation of new processes is disallowed. + */ public void prepareForShutdown() { prepareForShutdown = true; } + /** + * True, if engine is preparing for shutdown. + */ public boolean isPrepareForShutdown() { return prepareForShutdown; } + /** + * Cancel the prepare for shutdown request + */ public void cancelShutdown() { prepareForShutdown = false; Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessInstanceFactory.java =================================================================== --- api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessInstanceFactory.java 2008-07-04 12:58:42 UTC (rev 1519) +++ api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessInstanceFactory.java 2008-07-04 13:26:28 UTC (rev 1520) @@ -35,10 +35,14 @@ */ public abstract class ProcessInstanceFactory { - // Injected through the MC protected ProcessEngine engine; + // Hide public constructor + protected ProcessInstanceFactory() + { + } + /* Get the associated process engine */ public ProcessEngine getProcessEngine() { Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Transition.java =================================================================== --- api/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Transition.java 2008-07-04 12:58:42 UTC (rev 1519) +++ api/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Transition.java 2008-07-04 13:26:28 UTC (rev 1520) @@ -31,6 +31,11 @@ */ public abstract class Transition { + // Hide public constructor + protected Transition() + { + } + /** * Get the name for this transition */ |
From: <do-...@jb...> - 2008-07-04 12:58:44
|
Author: tho...@jb... Date: 2008-07-04 08:58:42 -0400 (Fri, 04 Jul 2008) New Revision: 1519 Modified: jbpm3/trunk/pom.xml Log: Fix site-deploy Modified: jbpm3/trunk/pom.xml =================================================================== --- jbpm3/trunk/pom.xml 2008-07-04 12:58:30 UTC (rev 1518) +++ jbpm3/trunk/pom.xml 2008-07-04 12:58:42 UTC (rev 1519) @@ -356,14 +356,6 @@ </plugins> </build> - <!-- DistributionManagement --> - <distributionManagement> - <site> - <id>jbws.dyndns.org</id> - <url>file:///home/tdiesler/workspace/jbpm-site</url> - </site> - </distributionManagement> - <!-- Profiles --> <profiles> |
From: <do-...@jb...> - 2008-07-04 12:58:32
|
Author: tho...@jb... Date: 2008-07-04 08:58:30 -0400 (Fri, 04 Jul 2008) New Revision: 1518 Modified: api/trunk/modules/api/pom.xml api/trunk/pom.xml Log: Fix site-deploy Modified: api/trunk/modules/api/pom.xml =================================================================== --- api/trunk/modules/api/pom.xml 2008-07-04 12:21:34 UTC (rev 1517) +++ api/trunk/modules/api/pom.xml 2008-07-04 12:58:30 UTC (rev 1518) @@ -56,6 +56,7 @@ <artifactId>maven-javadoc-plugin</artifactId> <configuration> <show>public</show> + <excludePackageNames>*.internal</excludePackageNames> </configuration> </plugin> </plugins> Modified: api/trunk/pom.xml =================================================================== --- api/trunk/pom.xml 2008-07-04 12:21:34 UTC (rev 1517) +++ api/trunk/pom.xml 2008-07-04 12:58:30 UTC (rev 1518) @@ -58,4 +58,23 @@ </dependencies> </dependencyManagement> + <!-- DistributionManagement --> + <distributionManagement> + <!-- + Add this to your ~/.m2/settings.xml + <servers> + <server> + <id>jbpm.dyndns.org</id> + <username>yourname</username> + <privateKey>/home/yourname/.ssh/id_rsa</privateKey> + <passphrase>yourpass</passphrase> + </server> + </servers> + --> + <site> + <id>jbpm.dyndns.org</id> + <url>scp://jbpm.dyndns.org/var/www/html/jbpm-site</url> + </site> + </distributionManagement> + </project> \ No newline at end of file |
From: <do-...@jb...> - 2008-07-04 12:21:37
|
Author: porcherg Date: 2008-07-04 08:21:34 -0400 (Fri, 04 Jul 2008) New Revision: 1517 Added: pvm/trunk/.classpath pvm/trunk/.project Log: eclipse project configuration Added: pvm/trunk/.classpath =================================================================== --- pvm/trunk/.classpath (rev 0) +++ pvm/trunk/.classpath 2008-07-04 12:21:34 UTC (rev 1517) @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="modules/core/src/main/java"/> + <classpathentry kind="src" path="modules/core/src/main/resources"/> + <classpathentry kind="src" path="modules/core/src/test/java"/> + <classpathentry kind="src" path="modules/core/src/test/resources"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/> + <classpathentry kind="output" path="target/classes"/> +</classpath> Added: pvm/trunk/.project =================================================================== --- pvm/trunk/.project (rev 0) +++ pvm/trunk/.project 2008-07-04 12:21:34 UTC (rev 1517) @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>pvm</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.maven.ide.eclipse.maven2Builder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + <nature>org.maven.ide.eclipse.maven2Nature</nature> + </natures> +</projectDescription> |
From: <do-...@jb...> - 2008-07-04 11:20:21
|
Author: tho...@jb... Date: 2008-07-04 07:20:17 -0400 (Fri, 04 Jul 2008) New Revision: 1515 Added: api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/activity/BasicActivity.java api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/context/ api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/context/ContextActivity.java api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/context/ContextValue.java api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/context/ExecutionContextTest.java Removed: api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/activity/MyActivity.java Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Activity.java api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/activity/BasicActivityTest.java Log: [JBPM-1255] Execution Context Variables Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Activity.java =================================================================== --- api/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Activity.java 2008-07-04 10:50:40 UTC (rev 1514) +++ api/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Activity.java 2008-07-04 11:20:17 UTC (rev 1515) @@ -40,6 +40,7 @@ { /** * Execute business logic associated with a Node + * @param node The node this activity is associated with * @param ctx The execution context */ void execute(Node node, Context ctx); Copied: api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/activity/BasicActivity.java (from rev 1509, api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/activity/MyActivity.java) =================================================================== --- api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/activity/BasicActivity.java (rev 0) +++ api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/activity/BasicActivity.java 2008-07-04 11:20:17 UTC (rev 1515) @@ -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.jboss.bpm.samples.activity; + +// $Id$ + +import org.jboss.bpm.Context; +import org.jboss.bpm.def.Node; +import org.jboss.bpm.runtime.Activity; + +public class BasicActivity implements Activity +{ + public void execute(Node node, Context ctx) + { + String name = node.getName(); + ctx.addAttachment(String.class, "Activity on: " + name); + } +} Modified: api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/activity/BasicActivityTest.java =================================================================== --- api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/activity/BasicActivityTest.java 2008-07-04 10:50:40 UTC (rev 1514) +++ api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/activity/BasicActivityTest.java 2008-07-04 11:20:17 UTC (rev 1515) @@ -43,7 +43,7 @@ " </start-state>" + " <state name='stateA'>" + " <event type='node-enter'>" + - " <action class='org.jboss.bpm.samples.activity.MyActivity' />" + + " <action class='org.jboss.bpm.samples.activity.BasicActivity' />" + " </event>" + " <transition to='end'/>" + " </state>" + Deleted: api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/activity/MyActivity.java =================================================================== --- api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/activity/MyActivity.java 2008-07-04 10:50:40 UTC (rev 1514) +++ api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/activity/MyActivity.java 2008-07-04 11:20:17 UTC (rev 1515) @@ -1,37 +0,0 @@ -/* - * JBoss, Home of Professional Open Source - * Copyright 2005, JBoss Inc., and individual contributors as indicated - * by the @authors tag. See the copyright.txt in the distribution for a - * full listing of individual contributors. - * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. - * - * This software is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this software; if not, write to the Free - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. - */ -package org.jboss.bpm.samples.activity; - -// $Id$ - -import org.jboss.bpm.Context; -import org.jboss.bpm.def.Node; -import org.jboss.bpm.runtime.Activity; - -public class MyActivity implements Activity -{ - public void execute(Node node, Context ctx) - { - String name = node.getName(); - ctx.addAttachment(String.class, "Activity on: " + name); - } -} Added: api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/context/ContextActivity.java =================================================================== --- api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/context/ContextActivity.java (rev 0) +++ api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/context/ContextActivity.java 2008-07-04 11:20:17 UTC (rev 1515) @@ -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.jboss.bpm.samples.context; + +// $Id$ + +import org.jboss.bpm.Context; +import org.jboss.bpm.def.Node; +import org.jboss.bpm.runtime.Activity; + +public class ContextActivity implements Activity +{ + public void execute(Node node, Context ctx) + { + String name = node.getName(); + ctx.addAttachment(String.class, "ActivityMessage", "Activity on '" + name + "' has: " + ctx.getAttachments()); + ctx.addAttachment(ContextValue.class, "ActivityAttachment", new ContextValue("bar")); + } +} Property changes on: api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/context/ContextActivity.java ___________________________________________________________________ Name: svn:keywords + Id Revision Name: svn:eol-style + LF Added: api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/context/ContextValue.java =================================================================== --- api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/context/ContextValue.java (rev 0) +++ api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/context/ContextValue.java 2008-07-04 11:20:17 UTC (rev 1515) @@ -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.jboss.bpm.samples.context; + +// $Id$ + +class ContextValue +{ + private String msg; + public ContextValue(String msg) + { + this.msg = msg; + } + public String getMsg() + { + return msg; + } +} \ No newline at end of file Property changes on: api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/context/ContextValue.java ___________________________________________________________________ Name: svn:keywords + Id Revision Name: svn:eol-style + LF Added: api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/context/ExecutionContextTest.java =================================================================== --- api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/context/ExecutionContextTest.java (rev 0) +++ api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/context/ExecutionContextTest.java 2008-07-04 11:20:17 UTC (rev 1515) @@ -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.jboss.bpm.samples.context; + +// $Id$ + +import org.jboss.bpm.client.Execution; +import org.jboss.bpm.client.ProcessDefinitionManager; +import org.jboss.bpm.def.ProcessDefinition; +import org.jboss.bpm.test.DefaultEngineTestCase; + +/** + * Test that the execution context + * + * @author tho...@jb... + * @since 03-Jul-2008 + */ +public class ExecutionContextTest extends DefaultEngineTestCase +{ + String jpdl = + "<process-definition>" + + " <start-state>" + + " <transition to='stateA' />" + + " </start-state>" + + " <state name='stateA'>" + + " <event type='node-enter'>" + + " <action class='org.jboss.bpm.samples.context.ContextActivity' />" + + " </event>" + + " <transition to='end'/>" + + " </state>" + + " <end-state name='end' />" + + "</process-definition>"; + + /** + * Test that the execution context variables + */ + public void testTransientValues() throws Exception + { + // Create an Execution through the ProcessDefinition + ProcessDefinitionManager pdm = ProcessDefinitionManager.locateProcessDefinitionManager(); + ProcessDefinition pd = pdm.createProcessDefinition(jpdl); + Execution ex = pd.createExecution(); + + // Set a context variable + ex.getContext().addAttachment(ContextValue.class, new ContextValue("foo")); + + // Signal the execution + ex.signal(); + + // Verify context variables + String msg = ex.getContext().getAttachment(String.class, "ActivityMessage"); + assertEquals("Activity on 'stateA' has: [[org.jboss.bpm.samples.context.ContextValue,null]]", msg); + + // Validate original attachement + ContextValue att1 = ex.getContext().getAttachment(ContextValue.class); + assertEquals("foo", att1.getMsg()); + + // Validate activity attachement + ContextValue att2 = ex.getContext().getAttachment(ContextValue.class, "ActivityAttachment"); + assertEquals("bar", att2.getMsg()); + } +} Property changes on: api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/context/ExecutionContextTest.java ___________________________________________________________________ Name: svn:keywords + Id Revision Name: svn:eol-style + LF |
From: <do-...@jb...> - 2008-07-04 10:50:43
|
Author: tho...@jb... Date: 2008-07-04 06:50:40 -0400 (Fri, 04 Jul 2008) New Revision: 1514 Added: api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/engine/ api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/engine/EngineShutdownTest.java Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ExecutionFactory.java api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessInstance.java api/trunk/modules/api/src/main/java/org/jboss/bpm/client/internal/AbstractProcessInstance.java api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/basic/BasicSequenceTest.java Log: [JBPM-1324] Add support for Engine Shutdown Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ExecutionFactory.java =================================================================== --- api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ExecutionFactory.java 2008-07-04 10:50:25 UTC (rev 1513) +++ api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ExecutionFactory.java 2008-07-04 10:50:40 UTC (rev 1514) @@ -52,7 +52,7 @@ /** * Locate the execution manager */ - public static ExecutionFactory locateExecutionManager() + public static ExecutionFactory locateExecutionFactory() { ProcessEngine engine = ProcessEngineLocator.locateProcessEngine(); return engine.getExecutionFactory(); Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessInstance.java =================================================================== --- api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessInstance.java 2008-07-04 10:50:25 UTC (rev 1513) +++ api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessInstance.java 2008-07-04 10:50:40 UTC (rev 1514) @@ -26,7 +26,6 @@ import java.util.Set; import org.jboss.bpm.Context; -import org.jboss.bpm.client.internal.AbstractExecution; import org.jboss.bpm.def.ProcessDefinition; /** @@ -39,36 +38,41 @@ */ public interface ProcessInstance { - /* + /** * Get the associated process definition */ - public abstract ProcessDefinition getProcessDefinition(); + ProcessDefinition getProcessDefinition(); - /* + /** * Get the name of this process instance */ - public abstract String getName(); + String getName(); - /* + /** * Get the context for this execution */ - public abstract Context getContext(); + Context getContext(); - /* + /** + * Create an execution for this process instance + */ + Execution createExecution(); + + /** * Get the set of registered executions */ - public abstract Set<AbstractExecution> getExecutions(); + Set<Execution> getExecutions(); - /* + /** * Find an execution for a given name * * @return null if it cannot be found */ - public abstract Execution findExecution(String name); + Execution findExecution(String name); - /* + /** * Remove an execution for a given name */ - public abstract void removeExecution(String name); + void removeExecution(String name); } \ No newline at end of file Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/client/internal/AbstractProcessInstance.java =================================================================== --- api/trunk/modules/api/src/main/java/org/jboss/bpm/client/internal/AbstractProcessInstance.java 2008-07-04 10:50:25 UTC (rev 1513) +++ api/trunk/modules/api/src/main/java/org/jboss/bpm/client/internal/AbstractProcessInstance.java 2008-07-04 10:50:40 UTC (rev 1514) @@ -29,6 +29,7 @@ import org.jboss.bpm.Context; import org.jboss.bpm.client.Execution; +import org.jboss.bpm.client.ExecutionFactory; import org.jboss.bpm.client.ProcessInstance; import org.jboss.bpm.def.ProcessDefinition; @@ -47,7 +48,7 @@ // The name private String name; // The map of executions - private Set<AbstractExecution> execs = new HashSet<AbstractExecution>(); + private Set<Execution> execs = new HashSet<Execution>(); // The meta data for this process instance private Context context = new DefaultContext(); @@ -70,28 +71,23 @@ } } - /* + /** * Get the associated process definition */ - /* (non-Javadoc) - * @see org.jboss.bpm.client.internal.ProcessInstance#getProcessDefinition() - */ public ProcessDefinition getProcessDefinition() { return pdef; } - /* + /** * Get the name of this process instance */ - /* (non-Javadoc) - * @see org.jboss.bpm.client.internal.ProcessInstance#getName() - */ public String getName() { return name; } + // This is private and MUST NOT leak into the public API private void setName(String name) { this.name = name; @@ -105,25 +101,28 @@ return context; } - /* + /** + * Create an execution for this process instance + */ + public Execution createExecution() + { + ExecutionFactory exm = ExecutionFactory.locateExecutionFactory(); + return exm.createExecution(this); + } + + /** * Get the set of registered executions */ - /* (non-Javadoc) - * @see org.jboss.bpm.client.internal.ProcessInstance#getExecutions() - */ - public Set<AbstractExecution> getExecutions() + public Set<Execution> getExecutions() { return Collections.unmodifiableSet(execs); } - /* + /** * Find an execution for a given name * * @return null if it cannot be found */ - /* (non-Javadoc) - * @see org.jboss.bpm.client.internal.ProcessInstance#findExecution(java.lang.String) - */ public Execution findExecution(String name) { for (Execution ex : execs) @@ -134,12 +133,9 @@ return null; } - /* + /** * Remove an execution for a given name */ - /* (non-Javadoc) - * @see org.jboss.bpm.client.internal.ProcessInstance#removeExecution(java.lang.String) - */ public void removeExecution(String name) { for (Execution ex : execs) Modified: api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/basic/BasicSequenceTest.java =================================================================== --- api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/basic/BasicSequenceTest.java 2008-07-04 10:50:25 UTC (rev 1513) +++ api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/basic/BasicSequenceTest.java 2008-07-04 10:50:40 UTC (rev 1514) @@ -31,6 +31,7 @@ import org.jboss.bpm.client.ProcessInstance; import org.jboss.bpm.client.ProcessInstanceFactory; import org.jboss.bpm.def.ProcessDefinition; +import org.jboss.bpm.test.DefaultEngineTestCase; /** * Test the basic execution sequence @@ -38,7 +39,7 @@ * @author tho...@jb... * @since 03-Jul-2008 */ -public class BasicSequenceTest extends org.jboss.bpm.test.DefaultEngineTestCase +public class BasicSequenceTest extends DefaultEngineTestCase { String jpdl = "<process-definition>" + Added: api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/engine/EngineShutdownTest.java =================================================================== --- api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/engine/EngineShutdownTest.java (rev 0) +++ api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/engine/EngineShutdownTest.java 2008-07-04 10:50:40 UTC (rev 1514) @@ -0,0 +1,129 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2005, JBoss Inc., and individual contributors as indicated + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.jboss.bpm.samples.engine; + +// $Id$ + +import org.jboss.bpm.EngineShutdownException; +import org.jboss.bpm.client.ProcessDefinitionManager; +import org.jboss.bpm.client.ProcessEngine; +import org.jboss.bpm.client.ProcessEngineLocator; +import org.jboss.bpm.client.ProcessInstance; +import org.jboss.bpm.def.ProcessDefinition; +import org.jboss.bpm.test.DefaultEngineTestCase; + +/** + * Test the engine shutdown + * + * @author tho...@jb... + * @since 03-Jul-2008 + */ +public class EngineShutdownTest extends DefaultEngineTestCase +{ + private ProcessEngine engine; + + String jpdl = + "<process-definition>" + + " <start-state>" + + " <transition to='stateA' />" + + " </start-state>" + + " <state name='stateA'>" + + " <transition to='end' />" + + " </state>" + + " <end-state name='end' />" + + "</process-definition>"; + + @Override + protected void setUp() throws Exception + { + super.setUp(); + + engine = ProcessEngineLocator.locateProcessEngine(); + engine.cancelShutdown(); + } + + /** + * Try to create a ProcessDefinition during shutdown + */ + public void testCreateProcessDefinition() throws Exception + { + // Create a ProcessDefinition through the ProcessDefinitionManager + ProcessDefinitionManager pdm = ProcessDefinitionManager.locateProcessDefinitionManager(); + assertNotNull("ProcessDefinition expected", pdm.createProcessDefinition(jpdl)); + + // Try to create a ProcessDefinition during shutdown + try + { + engine.prepareForShutdown(); + pdm.createProcessDefinition(jpdl); + } + catch (EngineShutdownException ex) + { + assertEquals("Cannot create new ProcessDefinition while engine is shutting down", ex.getMessage()); + } + } + + /** + * Try to create a ProcessInstance during shutdown + */ + public void testCreateProcessInstance() throws Exception + { + // Create a ProcessDefinition through the ProcessDefinitionManager + ProcessDefinitionManager pdm = ProcessDefinitionManager.locateProcessDefinitionManager(); + ProcessDefinition pd = pdm.createProcessDefinition(jpdl); + assertNotNull("ProcessInstance expected", pd.createProcessInstance()); + + // Try to create a ProcessInstance during shutdown + try + { + engine.prepareForShutdown(); + pd.createProcessInstance(); + } + catch (EngineShutdownException ex) + { + assertEquals("Cannot create new ProcessInstance while engine is shutting down", ex.getMessage()); + } + } + + /** + * Try to create a Execution during shutdown + */ + public void testCreateExecution() throws Exception + { + // Create a ProcessDefinition through the ProcessDefinitionManager + ProcessDefinitionManager pdm = ProcessDefinitionManager.locateProcessDefinitionManager(); + ProcessDefinition pd = pdm.createProcessDefinition(jpdl); + assertNotNull("Execution expected", pd.createExecution()); + + // Try to create a Execution during shutdown + try + { + ProcessInstance pinst = pd.createProcessInstance(); + engine.prepareForShutdown(); + pinst.createExecution(); + } + catch (EngineShutdownException ex) + { + assertEquals("Cannot create new Execution while engine is shutting down", ex.getMessage()); + } + } +} Property changes on: api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/engine/EngineShutdownTest.java ___________________________________________________________________ Name: svn:keywords + Id Revision Name: svn:eol-style + LF |
From: <do-...@jb...> - 2008-07-04 10:50:30
|
Author: tho...@jb... Date: 2008-07-04 06:50:25 -0400 (Fri, 04 Jul 2008) New Revision: 1513 Modified: jbpm3/trunk/pom.xml Log: [JBPM-1324] Add support for Engine Shutdown Modified: jbpm3/trunk/pom.xml =================================================================== --- jbpm3/trunk/pom.xml 2008-07-04 10:29:25 UTC (rev 1512) +++ jbpm3/trunk/pom.xml 2008-07-04 10:50:25 UTC (rev 1513) @@ -353,12 +353,6 @@ <plugin> <artifactId>maven-javadoc-plugin</artifactId> </plugin> - <plugin> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <failIfNoTests>false</failIfNoTests> - </configuration> - </plugin> </plugins> </build> |
From: <do-...@jb...> - 2008-07-04 10:29:27
|
Author: tho...@jb... Date: 2008-07-04 06:29:25 -0400 (Fri, 04 Jul 2008) New Revision: 1512 Modified: maven/parent/trunk/pom.xml Log: JBoss jBPM - Parent Modified: maven/parent/trunk/pom.xml =================================================================== --- maven/parent/trunk/pom.xml 2008-07-04 10:28:24 UTC (rev 1511) +++ maven/parent/trunk/pom.xml 2008-07-04 10:29:25 UTC (rev 1512) @@ -2,7 +2,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> - <name>JBoss jBPM</name> + <name>JBoss jBPM - Parent</name> <groupId>org.jboss.jbpm</groupId> <artifactId>jbpm-parent</artifactId> <packaging>pom</packaging> |
From: <do-...@jb...> - 2008-07-04 10:28:28
|
Author: tho...@jb... Date: 2008-07-04 06:28:24 -0400 (Fri, 04 Jul 2008) New Revision: 1511 Modified: maven/parent/trunk/pom.xml Log: failIfNoTests=false Modified: maven/parent/trunk/pom.xml =================================================================== --- maven/parent/trunk/pom.xml 2008-07-04 10:26:34 UTC (rev 1510) +++ maven/parent/trunk/pom.xml 2008-07-04 10:28:24 UTC (rev 1511) @@ -100,6 +100,7 @@ <plugin> <artifactId>maven-surefire-plugin</artifactId> <configuration> + <failIfNoTests>false</failIfNoTests> <systemProperties> <property> <name>log4j.output.dir</name> |
From: <do-...@jb...> - 2008-07-04 10:26:39
|
Author: tho...@jb... Date: 2008-07-04 06:26:34 -0400 (Fri, 04 Jul 2008) New Revision: 1510 Added: maven/parent/ Removed: maven/jbpm-parent/ Log: Move jbpm-parent to parent Copied: maven/parent (from rev 1509, maven/jbpm-parent) |
From: <do-...@jb...> - 2008-07-04 10:10:13
|
Author: tho...@jb... Date: 2008-07-04 06:10:11 -0400 (Fri, 04 Jul 2008) New Revision: 1509 Modified: api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/activity/BasicActivityTest.java api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/activity/MyActivity.java api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/basic/BasicSequenceTest.java Log: [JBPM-1253] Add support for Basic Activity Modified: api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/activity/BasicActivityTest.java =================================================================== --- api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/activity/BasicActivityTest.java 2008-07-04 10:10:04 UTC (rev 1508) +++ api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/activity/BasicActivityTest.java 2008-07-04 10:10:11 UTC (rev 1509) @@ -50,6 +50,10 @@ " <end-state name='end' />" + "</process-definition>"; + /** + * Test that the execution context variables set by the Activity + * are visible to the client. + */ public void testBasicActivity() throws Exception { // Create a ProcessDefinition through the ProcessDefinitionManager @@ -63,6 +67,10 @@ // Signal the execution ex.signal(); assertEquals(pd.findNode("stateA"), ex.getNode()); + + // Verify context variables + String msg = ex.getContext().getAttachment(String.class); + assertEquals("Activity on: stateA", msg); // Signal the execution ex.signal(); Modified: api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/activity/MyActivity.java =================================================================== --- api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/activity/MyActivity.java 2008-07-04 10:10:04 UTC (rev 1508) +++ api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/activity/MyActivity.java 2008-07-04 10:10:11 UTC (rev 1509) @@ -31,7 +31,7 @@ { public void execute(Node node, Context ctx) { - //String name = node.getName(); - //ctx.addAttachment(String.class, "Activity on: " + name); + String name = node.getName(); + ctx.addAttachment(String.class, "Activity on: " + name); } } Modified: api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/basic/BasicSequenceTest.java =================================================================== --- api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/basic/BasicSequenceTest.java 2008-07-04 10:10:04 UTC (rev 1508) +++ api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/basic/BasicSequenceTest.java 2008-07-04 10:10:11 UTC (rev 1509) @@ -54,7 +54,7 @@ /** * Test basic sequence doing it the long way */ - public void testBasicSequence() throws Exception + public void testBasicSequenceLong() throws Exception { // Locate the ProcessEngine @@ -86,8 +86,8 @@ /** * Test basic sequence doing it the short way */ - public void testBasicSequenceShortcut() throws Exception { - + public void testBasicSequence() throws Exception + { // Create a ProcessDefinition through the ProcessDefinitionManager ProcessDefinitionManager pdm = ProcessDefinitionManager.locateProcessDefinitionManager(); ProcessDefinition pd = pdm.createProcessDefinition(jpdl); |