JBoss JBPM SVN: r1745 - in jbossbpm/impl/jbpm3/trunk/modules: console and 21 other directories.
by do-not-reply@jboss.org
Author: heiko.braun(a)jboss.com
Date: 2008-07-29 05:49:33 -0400 (Tue, 29 Jul 2008)
New Revision: 1745
Added:
jbossbpm/impl/jbpm3/trunk/modules/console/src/main/java/
jbossbpm/impl/jbpm3/trunk/modules/console/src/main/java/org/
jbossbpm/impl/jbpm3/trunk/modules/console/src/main/java/org/jbpm/
jbossbpm/impl/jbpm3/trunk/modules/console/src/main/java/org/jbpm/web/
jbossbpm/impl/jbpm3/trunk/modules/console/src/main/java/org/jbpm/web/ProcessUploadServlet.java
jbossbpm/impl/jbpm3/trunk/modules/distribution/scripts/antrun-jbpm-config.xml
jbossbpm/impl/jbpm3/trunk/modules/jpdl/core/scripts/antrun-jbpm-config.xml
jbossbpm/impl/jbpm3/trunk/modules/jpdl/core/src/main/resources/hibernate.cache.xml
jbossbpm/impl/jbpm3/trunk/modules/jpdl/core/src/main/resources/hibernate.mapping.xml
jbossbpm/impl/jbpm3/trunk/modules/jpdl/core/src/main/resources/hibernate.properties.xml
jbossbpm/impl/jbpm3/trunk/modules/jpdl/identity/src/main/resources/hibernate.mapping.xml
jbossbpm/impl/jbpm3/trunk/modules/jpdl/identity/src/main/scripts/
jbossbpm/impl/jbpm3/trunk/modules/jpdl/identity/src/main/scripts/antrun-jbpm-config.xml
jbossbpm/impl/jbpm3/trunk/modules/jpdl/identity/src/main/scripts/assembly-config.xml
Removed:
jbossbpm/impl/jbpm3/trunk/modules/bamconsole/ear/src/main/resources/hibernate.cfg.xml
jbossbpm/impl/jbpm3/trunk/modules/bamconsole/ear/src/main/resources/jbpm.cfg.xml
jbossbpm/impl/jbpm3/trunk/modules/console/src/main/resources/hibernate.cfg.xml
jbossbpm/impl/jbpm3/trunk/modules/console/src/main/resources/jbpm.cfg.xml
jbossbpm/impl/jbpm3/trunk/modules/enterprise/src/main/config/jbpm.cfg.xml
jbossbpm/impl/jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/web/ProcessUploadServlet.java
jbossbpm/impl/jbpm3/trunk/modules/jpdl/core/src/main/resources/hibernate.cfg.xml
jbossbpm/impl/jbpm3/trunk/modules/jpdl/examples/src/test/resources/assignment/hibernate.cfg.xml
jbossbpm/impl/jbpm3/trunk/modules/jpdl/examples/src/test/resources/assignment/jbpm.cfg.xml
jbossbpm/impl/jbpm3/trunk/modules/jpdl/examples/src/test/resources/rulesaction/hibernate.cfg.xml
jbossbpm/impl/jbpm3/trunk/modules/jpdl/examples/src/test/resources/rulesaction/jbpm.cfg.xml
jbossbpm/impl/jbpm3/trunk/modules/jpdl/identity/src/test/resources/hibernate.cfg.xml
jbossbpm/impl/jbpm3/trunk/modules/jpdl/identity/src/test/resources/jbpm.cfg.xml
jbossbpm/impl/jbpm3/trunk/modules/jpdl/ws/src/main/resources/hibernate.cfg.xml
jbossbpm/impl/jbpm3/trunk/modules/jpdl/ws/src/main/resources/jbpm.cfg.xml
Modified:
jbossbpm/impl/jbpm3/trunk/modules/console/pom.xml
jbossbpm/impl/jbpm3/trunk/modules/distribution/pom.xml
jbossbpm/impl/jbpm3/trunk/modules/distribution/scripts/assembly-deploy-artifacts.xml
jbossbpm/impl/jbpm3/trunk/modules/distribution/scripts/install-definition.xml
jbossbpm/impl/jbpm3/trunk/modules/jpdl/core/pom.xml
jbossbpm/impl/jbpm3/trunk/modules/jpdl/core/scripts/assembly-config.xml
jbossbpm/impl/jbpm3/trunk/modules/jpdl/identity/pom.xml
Log:
JBPM-1410: Revisit overall product configuration
Deleted: jbossbpm/impl/jbpm3/trunk/modules/bamconsole/ear/src/main/resources/hibernate.cfg.xml
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/bamconsole/ear/src/main/resources/hibernate.cfg.xml 2008-07-29 09:44:52 UTC (rev 1744)
+++ jbossbpm/impl/jbpm3/trunk/modules/bamconsole/ear/src/main/resources/hibernate.cfg.xml 2008-07-29 09:49:33 UTC (rev 1745)
@@ -1,211 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-
-<!DOCTYPE hibernate-configuration PUBLIC
- "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
- "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
-
-<hibernate-configuration>
- <session-factory>
- <property name="show_sql">true</property>
- <property name="connection.datasource">
- java:/bamconsoleDatasource
- </property>
- <property name="transaction.factory_class">
- org.hibernate.transaction.JTATransactionFactory
- </property>
- <property name="transaction.manager_lookup_class">
- org.hibernate.transaction.JBossTransactionManagerLookup
- </property>
- <property name="cache.provider_class">
- org.hibernate.cache.HashtableCacheProvider
- </property>
- <property name="hbm2ddl.auto">update</property>
- <property name="transaction.flush_before_completion">
- true
- </property>
-
- <!-- ############################################ -->
- <!-- # mapping files with external dependencies # -->
- <!-- ############################################ -->
-
- <!-- following mapping file has a dependendy on -->
- <!-- 'bsh-{version}.jar'. -->
- <!-- uncomment this if you don't have bsh on your -->
- <!-- classpath. you won't be able to use the -->
- <!-- script element in process definition files -->
- <mapping resource="org/jbpm/graph/action/Script.hbm.xml" />
-
- <!-- following mapping files have a dependendy on -->
- <!-- 'jbpm-identity.jar', mapping files -->
- <!-- of the pluggable jbpm identity component. -->
- <!-- Uncomment the following 3 lines if you -->
- <!-- want to use the jBPM identity mgmgt -->
- <!-- component. -->
- <!-- identity mappings (begin) -->
- <mapping resource="org/jbpm/identity/User.hbm.xml" />
- <mapping resource="org/jbpm/identity/Group.hbm.xml" />
- <mapping resource="org/jbpm/identity/Membership.hbm.xml" />
- <!-- identity mappings (end) -->
-
- <!-- following mapping files have a dependendy on -->
- <!-- the JCR API -->
- <!-- jcr mappings (begin) -->
- <!--
- <mapping resource="org/jbpm/context/exe/variableinstance/JcrNodeInstance.hbm.xml" />
- -->
- <!-- jcr mappings (end) -->
- <!-- ###################### -->
- <!-- # jbpm mapping files # -->
- <!-- ###################### -->
-
- <!-- hql queries and type defs -->
- <mapping resource="org/jbpm/db/hibernate.queries.hbm.xml" />
-
- <!-- graph.action mapping files -->
- <mapping resource="org/jbpm/graph/action/MailAction.hbm.xml" />
-
- <!-- graph.def mapping files -->
- <mapping
- resource="org/jbpm/graph/def/ProcessDefinition.hbm.xml" />
- <mapping resource="org/jbpm/graph/def/Node.hbm.xml" />
- <mapping resource="org/jbpm/graph/def/Transition.hbm.xml" />
- <mapping resource="org/jbpm/graph/def/Event.hbm.xml" />
- <mapping resource="org/jbpm/graph/def/Action.hbm.xml" />
- <mapping resource="org/jbpm/graph/def/SuperState.hbm.xml" />
- <mapping resource="org/jbpm/graph/def/ExceptionHandler.hbm.xml" />
- <mapping resource="org/jbpm/instantiation/Delegation.hbm.xml" />
-
- <!-- graph.node mapping files -->
- <mapping resource="org/jbpm/graph/node/StartState.hbm.xml" />
- <mapping resource="org/jbpm/graph/node/EndState.hbm.xml" />
- <mapping resource="org/jbpm/graph/node/ProcessState.hbm.xml" />
- <mapping resource="org/jbpm/graph/node/Decision.hbm.xml" />
- <mapping resource="org/jbpm/graph/node/Fork.hbm.xml" />
- <mapping resource="org/jbpm/graph/node/Join.hbm.xml" />
- <mapping resource="org/jbpm/graph/node/MailNode.hbm.xml" />
- <mapping resource="org/jbpm/graph/node/State.hbm.xml" />
- <mapping resource="org/jbpm/graph/node/TaskNode.hbm.xml" />
-
- <!-- context.def mapping files -->
- <mapping
- resource="org/jbpm/context/def/ContextDefinition.hbm.xml" />
- <mapping resource="org/jbpm/context/def/VariableAccess.hbm.xml" />
-
- <!-- taskmgmt.def mapping files -->
- <mapping
- resource="org/jbpm/taskmgmt/def/TaskMgmtDefinition.hbm.xml" />
- <mapping resource="org/jbpm/taskmgmt/def/Swimlane.hbm.xml" />
- <mapping resource="org/jbpm/taskmgmt/def/Task.hbm.xml" />
- <mapping
- resource="org/jbpm/taskmgmt/def/TaskController.hbm.xml" />
-
- <!-- module.def mapping files -->
- <mapping
- resource="org/jbpm/module/def/ModuleDefinition.hbm.xml" />
-
- <!-- bytes mapping files -->
- <mapping resource="org/jbpm/bytes/ByteArray.hbm.xml" />
-
- <!-- file.def mapping files -->
- <mapping resource="org/jbpm/file/def/FileDefinition.hbm.xml" />
-
- <!-- scheduler.def mapping files -->
- <mapping
- resource="org/jbpm/scheduler/def/CreateTimerAction.hbm.xml" />
- <mapping
- resource="org/jbpm/scheduler/def/CancelTimerAction.hbm.xml" />
-
- <!-- graph.exe mapping files -->
- <mapping resource="org/jbpm/graph/exe/Comment.hbm.xml" />
- <mapping resource="org/jbpm/graph/exe/ProcessInstance.hbm.xml" />
- <mapping resource="org/jbpm/graph/exe/Token.hbm.xml" />
- <mapping resource="org/jbpm/graph/exe/RuntimeAction.hbm.xml" />
-
- <!-- module.exe mapping files -->
- <mapping resource="org/jbpm/module/exe/ModuleInstance.hbm.xml" />
-
- <!-- context.exe mapping files -->
- <mapping
- resource="org/jbpm/context/exe/ContextInstance.hbm.xml" />
- <mapping
- resource="org/jbpm/context/exe/TokenVariableMap.hbm.xml" />
- <mapping
- resource="org/jbpm/context/exe/VariableInstance.hbm.xml" />
- <mapping
- resource="org/jbpm/context/exe/variableinstance/ByteArrayInstance.hbm.xml" />
- <mapping
- resource="org/jbpm/context/exe/variableinstance/DateInstance.hbm.xml" />
- <mapping
- resource="org/jbpm/context/exe/variableinstance/DoubleInstance.hbm.xml" />
- <mapping
- resource="org/jbpm/context/exe/variableinstance/HibernateLongInstance.hbm.xml" />
- <mapping
- resource="org/jbpm/context/exe/variableinstance/HibernateStringInstance.hbm.xml" />
- <mapping
- resource="org/jbpm/context/exe/variableinstance/LongInstance.hbm.xml" />
- <mapping
- resource="org/jbpm/context/exe/variableinstance/NullInstance.hbm.xml" />
- <mapping
- resource="org/jbpm/context/exe/variableinstance/StringInstance.hbm.xml" />
-
- <!-- job mapping files -->
- <mapping resource="org/jbpm/job/Job.hbm.xml" />
- <mapping resource="org/jbpm/job/Timer.hbm.xml" />
- <mapping resource="org/jbpm/job/ExecuteNodeJob.hbm.xml" />
- <mapping resource="org/jbpm/job/ExecuteActionJob.hbm.xml" />
-
- <!-- taskmgmt.exe mapping files -->
- <mapping
- resource="org/jbpm/taskmgmt/exe/TaskMgmtInstance.hbm.xml" />
- <mapping resource="org/jbpm/taskmgmt/exe/TaskInstance.hbm.xml" />
- <mapping resource="org/jbpm/taskmgmt/exe/PooledActor.hbm.xml" />
- <mapping
- resource="org/jbpm/taskmgmt/exe/SwimlaneInstance.hbm.xml" />
-
- <!-- logging mapping files -->
- <mapping resource="org/jbpm/logging/log/ProcessLog.hbm.xml" />
- <mapping resource="org/jbpm/logging/log/MessageLog.hbm.xml" />
- <mapping resource="org/jbpm/logging/log/CompositeLog.hbm.xml" />
- <mapping resource="org/jbpm/graph/log/ActionLog.hbm.xml" />
- <mapping resource="org/jbpm/graph/log/NodeLog.hbm.xml" />
- <mapping
- resource="org/jbpm/graph/log/ProcessInstanceCreateLog.hbm.xml" />
- <mapping
- resource="org/jbpm/graph/log/ProcessInstanceEndLog.hbm.xml" />
- <mapping resource="org/jbpm/graph/log/ProcessStateLog.hbm.xml" />
- <mapping resource="org/jbpm/graph/log/SignalLog.hbm.xml" />
- <mapping resource="org/jbpm/graph/log/TokenCreateLog.hbm.xml" />
- <mapping resource="org/jbpm/graph/log/TokenEndLog.hbm.xml" />
- <mapping resource="org/jbpm/graph/log/TransitionLog.hbm.xml" />
- <mapping resource="org/jbpm/context/log/VariableLog.hbm.xml" />
- <mapping
- resource="org/jbpm/context/log/VariableCreateLog.hbm.xml" />
- <mapping
- resource="org/jbpm/context/log/VariableDeleteLog.hbm.xml" />
- <mapping
- resource="org/jbpm/context/log/VariableUpdateLog.hbm.xml" />
- <mapping
- resource="org/jbpm/context/log/variableinstance/ByteArrayUpdateLog.hbm.xml" />
- <mapping
- resource="org/jbpm/context/log/variableinstance/DateUpdateLog.hbm.xml" />
- <mapping
- resource="org/jbpm/context/log/variableinstance/DoubleUpdateLog.hbm.xml" />
- <mapping
- resource="org/jbpm/context/log/variableinstance/HibernateLongUpdateLog.hbm.xml" />
- <mapping
- resource="org/jbpm/context/log/variableinstance/HibernateStringUpdateLog.hbm.xml" />
- <mapping
- resource="org/jbpm/context/log/variableinstance/LongUpdateLog.hbm.xml" />
- <mapping
- resource="org/jbpm/context/log/variableinstance/StringUpdateLog.hbm.xml" />
- <mapping resource="org/jbpm/taskmgmt/log/TaskLog.hbm.xml" />
- <mapping resource="org/jbpm/taskmgmt/log/TaskCreateLog.hbm.xml" />
- <mapping resource="org/jbpm/taskmgmt/log/TaskAssignLog.hbm.xml" />
- <mapping resource="org/jbpm/taskmgmt/log/TaskEndLog.hbm.xml" />
- <mapping resource="org/jbpm/taskmgmt/log/SwimlaneLog.hbm.xml" />
- <mapping
- resource="org/jbpm/taskmgmt/log/SwimlaneCreateLog.hbm.xml" />
- <mapping
- resource="org/jbpm/taskmgmt/log/SwimlaneAssignLog.hbm.xml" />
- </session-factory>
-</hibernate-configuration>
Deleted: jbossbpm/impl/jbpm3/trunk/modules/bamconsole/ear/src/main/resources/jbpm.cfg.xml
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/bamconsole/ear/src/main/resources/jbpm.cfg.xml 2008-07-29 09:44:52 UTC (rev 1744)
+++ jbossbpm/impl/jbpm3/trunk/modules/bamconsole/ear/src/main/resources/jbpm.cfg.xml 2008-07-29 09:49:33 UTC (rev 1745)
@@ -1,23 +0,0 @@
-<jbpm-configuration>
- <jbpm-context>
- <service name="persistence">
- <factory>
- <bean
- class="org.jbpm.persistence.db.DbPersistenceServiceFactory">
- <field name="isTransactionEnabled">
- <false />
- </field>
- </bean>
- </factory>
- </service>
- <service name="tx" factory="org.jbpm.tx.TxServiceFactory" />
- <service name="message"
- factory="org.jbpm.msg.db.DbMessageServiceFactory" />
- <service name="scheduler"
- factory="org.jbpm.scheduler.db.DbSchedulerServiceFactory" />
- <service name="logging"
- factory="org.jbpm.logging.db.DbLoggingServiceFactory" />
- <service name="authentication"
- factory="org.jbpm.security.authentication.DefaultAuthenticationServiceFactory" />
- </jbpm-context>
-</jbpm-configuration>
Modified: jbossbpm/impl/jbpm3/trunk/modules/console/pom.xml
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/console/pom.xml 2008-07-29 09:44:52 UTC (rev 1744)
+++ jbossbpm/impl/jbpm3/trunk/modules/console/pom.xml 2008-07-29 09:49:33 UTC (rev 1745)
@@ -63,6 +63,11 @@
<groupId>org.jboss.gravel</groupId>
<artifactId>gravel</artifactId>
</dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
</dependencies>
</project>
\ No newline at end of file
Added: jbossbpm/impl/jbpm3/trunk/modules/console/src/main/java/org/jbpm/web/ProcessUploadServlet.java
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/console/src/main/java/org/jbpm/web/ProcessUploadServlet.java (rev 0)
+++ jbossbpm/impl/jbpm3/trunk/modules/console/src/main/java/org/jbpm/web/ProcessUploadServlet.java 2008-07-29 09:49:33 UTC (rev 1745)
@@ -0,0 +1,107 @@
+/*
+ * 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.web;
+
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.List;
+import java.util.zip.ZipInputStream;
+import org.apache.commons.fileupload.DiskFileUpload;
+import org.apache.commons.fileupload.FileItem;
+import org.apache.commons.fileupload.FileUpload;
+import org.apache.commons.fileupload.FileUploadException;
+import org.jbpm.JbpmConfiguration;
+import org.jbpm.JbpmContext;
+import org.jbpm.graph.def.ProcessDefinition;
+
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+public class ProcessUploadServlet extends HttpServlet {
+
+ private static final long serialVersionUID = 1L;
+
+ static JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance();
+
+ public static final String UPLOAD_TYPE_DEFINITION = "definition";
+ public static final String UPLOAD_TYPE_ARCHIVE = "archive";
+
+ public void service(HttpServletRequest request, HttpServletResponse response) throws IOException {
+ //upload from gpd has url mapping: /upload
+
+ JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
+ try {
+ response.setContentType("text/html");
+ response.getWriter().println(handleRequest(request));
+ } finally {
+ jbpmContext.close();
+ }
+ }
+
+ private String handleRequest(HttpServletRequest request) {
+ //check if request is multipart content
+ log.debug("Handling upload request");
+ if (!FileUpload.isMultipartContent(request)) {
+ log.debug("Not a multipart request");
+ return "Not a multipart request";
+ }
+
+ try {
+ DiskFileUpload fileUpload = new DiskFileUpload();
+ List list = fileUpload.parseRequest(request);
+ log.debug("Upload from GPD");
+ Iterator iterator = list.iterator();
+ if (!iterator.hasNext()) {
+ log.debug("No process file in the request");
+ return "No process file in the request";
+ }
+ FileItem fileItem = (FileItem) iterator.next();
+ if (fileItem.getContentType().indexOf("application/x-zip-compressed") == -1) {
+ log.debug("Not a process archive");
+ return "Not a process archive";
+ }
+ try {
+ log.debug("Deploying process archive " + fileItem.getName());
+ ZipInputStream zipInputStream = new ZipInputStream(fileItem.getInputStream());
+ JbpmContext jbpmContext = JbpmContext.getCurrentJbpmContext();
+ log.debug("Preparing to parse process archive");
+ ProcessDefinition processDefinition = ProcessDefinition.parseParZipInputStream(zipInputStream);
+ log.debug("Created a processdefinition : " + processDefinition.getName());
+ jbpmContext.deployProcessDefinition(processDefinition);
+ zipInputStream.close();
+ return "Deployed archive " + processDefinition.getName() + " successfully";
+ } catch (IOException e) {
+ log.debug("Failed to read process archive", e);
+ return "IOException";
+ }
+ } catch (FileUploadException e) {
+ log.debug("Failed to parse HTTP request", e);
+ return "FileUploadException";
+ }
+ }
+
+ private static final Log log = LogFactory.getLog(ProcessUploadServlet.class);
+}
\ No newline at end of file
Property changes on: jbossbpm/impl/jbpm3/trunk/modules/console/src/main/java/org/jbpm/web/ProcessUploadServlet.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted: jbossbpm/impl/jbpm3/trunk/modules/console/src/main/resources/hibernate.cfg.xml
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/console/src/main/resources/hibernate.cfg.xml 2008-07-29 09:44:52 UTC (rev 1744)
+++ jbossbpm/impl/jbpm3/trunk/modules/console/src/main/resources/hibernate.cfg.xml 2008-07-29 09:49:33 UTC (rev 1745)
@@ -1,335 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-
-<!DOCTYPE hibernate-configuration PUBLIC
- "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
- "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
-
-<hibernate-configuration>
- <session-factory>
-
- <!-- hibernate dialect -->
- <property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
-
- <!-- JDBC connection properties (begin) ===
- <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
- <property name="hibernate.connection.url">jdbc:hsqldb:mem:jbpm</property>
- <property name="hibernate.connection.username">sa</property>
- <property name="hibernate.connection.password"></property>
- ==== JDBC connection properties (end) -->
-
- <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
-
- <!-- DataSource properties (begin) -->
- <property name="hibernate.connection.datasource">java:comp/env/jdbc/JbpmDataSource</property>
-
- <property name="hibernate.hbm2ddl.auto">create</property>
-
- <!-- DataSource properties (end) -->
-
- <!-- JTA transaction properties (begin) ===
- <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
- <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
- ==== JTA transaction properties (end) -->
-
- <!-- CMT transaction properties (begin) ===
- <property name="hibernate.transaction.factory_class">org.hibernate.transaction.CMTTransactionFactory</property>
- <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
- ==== CMT transaction properties (end) -->
-
- <!-- logging properties (begin) ===
- <property name="hibernate.show_sql">true</property>
- <property name="hibernate.format_sql">true</property>
- <property name="hibernate.use_sql_comments">true</property>
- ==== logging properties (end) -->
-
- <!-- ############################################ -->
- <!-- # mapping files with external dependencies # -->
- <!-- ############################################ -->
-
- <!-- following mapping files have a dependency on -->
- <!-- 'jbpm-identity.jar', mapping files -->
- <!-- of the pluggable jbpm identity component. -->
- <!-- Uncomment the following 3 lines if you -->
- <!-- want to use the jBPM identity mgmgt -->
- <!-- component. -->
- <!-- identity mappings (begin) -->
- <mapping resource="org/jbpm/identity/User.hbm.xml"/>
- <mapping resource="org/jbpm/identity/Group.hbm.xml"/>
- <mapping resource="org/jbpm/identity/Membership.hbm.xml"/>
- <!-- identity mappings (end) -->
-
- <!-- following mapping files have a dependency on -->
- <!-- the JCR API -->
- <!-- jcr mappings (begin) ===
- <mapping resource="org/jbpm/context/exe/variableinstance/JcrNodeInstance.hbm.xml"/>
- ==== jcr mappings (end) -->
-
-
- <!-- ###################### -->
- <!-- # jbpm mapping files # -->
- <!-- ###################### -->
-
- <!-- hql queries and type defs -->
- <mapping resource="org/jbpm/db/hibernate.queries.hbm.xml" />
- <!-- hql queries used in simulation for querying historical data
- uncomment if you want to use the GetSimulationInputCommand
- or maybe you also want to use the queries yourself
- be patient: the queries need the stddev function to be enabled in your dialect
- more information on this can be found here: http://www.camunda.com/business_process_simulation_news/mysql_and_stddev.... -->
- <!--
- <mapping resource="org/jbpm/sim/bam/hibernate.queries.hbm.xml" />
- -->
-
- <!-- graph.action mapping files -->
- <mapping resource="org/jbpm/graph/action/MailAction.hbm.xml"/>
-
- <!-- graph.def mapping files -->
- <mapping resource="org/jbpm/graph/def/ProcessDefinition.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/Node.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/Transition.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/Event.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/Action.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/SuperState.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/ExceptionHandler.hbm.xml"/>
- <mapping resource="org/jbpm/instantiation/Delegation.hbm.xml"/>
-
- <!-- ############################################ -->
- <!-- # another mapping file with external dependencies # -->
- <!-- ############################################ -->
- <!-- following mapping file has a dependency on -->
- <!-- 'bsh-{version}.jar'. -->
- <!-- uncomment this if you don't have bsh on your -->
- <!-- classpath. you won't be able to use the -->
- <!-- script element in process definition files -->
- <!-- has to be defined below org/jbpm/graph/def/Action.hbm.xml -->
- <!-- due to the inline collection-cache elements below -->
- <mapping resource="org/jbpm/graph/action/Script.hbm.xml"/>
-
- <!-- graph.node mapping files -->
- <mapping resource="org/jbpm/graph/node/StartState.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/EndState.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/ProcessState.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/Decision.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/Fork.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/Join.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/MailNode.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/State.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/TaskNode.hbm.xml"/>
-
- <!-- context.def mapping files -->
- <mapping resource="org/jbpm/context/def/ContextDefinition.hbm.xml"/>
- <mapping resource="org/jbpm/context/def/VariableAccess.hbm.xml"/>
-
- <!-- bytes mapping files -->
- <mapping resource="org/jbpm/bytes/ByteArray.hbm.xml"/>
-
- <!-- module.def mapping files -->
- <mapping resource="org/jbpm/module/def/ModuleDefinition.hbm.xml"/>
-
- <!-- file.def mapping files -->
- <mapping resource="org/jbpm/file/def/FileDefinition.hbm.xml"/>
-
- <!-- taskmgmt.def mapping files -->
- <mapping resource="org/jbpm/taskmgmt/def/TaskMgmtDefinition.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/def/Swimlane.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/def/Task.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/def/TaskController.hbm.xml"/>
-
- <!-- scheduler.def mapping files -->
- <mapping resource="org/jbpm/scheduler/def/CreateTimerAction.hbm.xml"/>
- <mapping resource="org/jbpm/scheduler/def/CancelTimerAction.hbm.xml"/>
-
- <!-- graph.exe mapping files -->
- <mapping resource="org/jbpm/graph/exe/Comment.hbm.xml"/>
- <mapping resource="org/jbpm/graph/exe/ProcessInstance.hbm.xml"/>
- <mapping resource="org/jbpm/graph/exe/Token.hbm.xml"/>
- <mapping resource="org/jbpm/graph/exe/RuntimeAction.hbm.xml"/>
-
- <!-- module.exe mapping files -->
- <mapping resource="org/jbpm/module/exe/ModuleInstance.hbm.xml"/>
-
- <!-- context.exe mapping files -->
- <mapping resource="org/jbpm/context/exe/ContextInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/TokenVariableMap.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/VariableInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/ByteArrayInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/DateInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/DoubleInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/HibernateLongInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/HibernateStringInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/LongInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/NullInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/StringInstance.hbm.xml"/>
-
- <!-- job mapping files -->
- <mapping resource="org/jbpm/job/Job.hbm.xml"/>
- <mapping resource="org/jbpm/job/Timer.hbm.xml"/>
- <mapping resource="org/jbpm/job/ExecuteNodeJob.hbm.xml"/>
- <mapping resource="org/jbpm/job/ExecuteActionJob.hbm.xml"/>
-
- <!-- taskmgmt.exe mapping files -->
- <mapping resource="org/jbpm/taskmgmt/exe/TaskMgmtInstance.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/exe/TaskInstance.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/exe/PooledActor.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/exe/SwimlaneInstance.hbm.xml"/>
-
- <!-- logging mapping files -->
- <mapping resource="org/jbpm/logging/log/ProcessLog.hbm.xml"/>
- <mapping resource="org/jbpm/logging/log/MessageLog.hbm.xml"/>
- <mapping resource="org/jbpm/logging/log/CompositeLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/ActionLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/NodeLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/ProcessInstanceCreateLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/ProcessInstanceEndLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/ProcessStateLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/SignalLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/TokenCreateLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/TokenEndLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/TransitionLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/VariableLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/VariableCreateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/VariableDeleteLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/VariableUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/ByteArrayUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/DateUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/DoubleUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/HibernateLongUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/HibernateStringUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/LongUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/StringUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/TaskLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/TaskCreateLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/TaskAssignLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/TaskEndLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/SwimlaneLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/SwimlaneCreateLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/SwimlaneAssignLog.hbm.xml"/>
-
- <!-- ################################### -->
- <!-- # cache settings # -->
- <!-- # strategy="nonstrict-read-write" # -->
- <!-- # can be used with hibernate.cache.provider_class=org.hibernate.cache.HashtableCacheProvider # -->
- <!-- ################################### -->
-
- <class-cache class="org.jbpm.context.def.VariableAccess" usage="nonstrict-read-write" />
-
- <collection-cache collection="org.jbpm.file.def.FileDefinition.processFiles" usage="nonstrict-read-write" />
-
- <collection-cache collection="org.jbpm.graph.action.Script.variableAccesses" usage="nonstrict-read-write" />
-
- <class-cache class="org.jbpm.graph.def.Action" usage="nonstrict-read-write" />
-
- <class-cache class="org.jbpm.graph.def.Event" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.Event.actions" usage="nonstrict-read-write" />
-
- <class-cache class="org.jbpm.graph.def.ExceptionHandler" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.ExceptionHandler.actions" usage="nonstrict-read-write" />
-
- <class-cache class="org.jbpm.graph.def.Node" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.Node.events" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.Node.exceptionHandlers" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.Node.leavingTransitions" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.Node.arrivingTransitions" usage="nonstrict-read-write" />
-
- <class-cache class="org.jbpm.graph.def.ProcessDefinition" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.events" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.exceptionHandlers" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.nodes" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.actions" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.definitions" usage="nonstrict-read-write" />
-
- <collection-cache collection="org.jbpm.graph.def.SuperState.nodes" usage="nonstrict-read-write" />
-
- <class-cache class="org.jbpm.graph.def.Transition" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.Transition.events" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.Transition.exceptionHandlers" usage="nonstrict-read-write" />
-
- <collection-cache collection="org.jbpm.graph.node.Decision.decisionConditions" usage="nonstrict-read-write" />
-
- <collection-cache collection="org.jbpm.graph.node.ProcessState.variableAccesses" usage="nonstrict-read-write" />
-
- <collection-cache collection="org.jbpm.graph.node.TaskNode.tasks" usage="nonstrict-read-write" />
-
- <class-cache class="org.jbpm.instantiation.Delegation" usage="nonstrict-read-write" />
-
- <class-cache class="org.jbpm.module.def.ModuleDefinition" usage="nonstrict-read-write" />
-
- <collection-cache collection="org.jbpm.taskmgmt.def.Swimlane.tasks" usage="nonstrict-read-write" />
-
- <class-cache class="org.jbpm.taskmgmt.def.TaskController" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.taskmgmt.def.TaskController.variableAccesses" usage="nonstrict-read-write" />
-
- <class-cache class="org.jbpm.taskmgmt.def.Task" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.taskmgmt.def.Task.events" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.taskmgmt.def.Task.exceptionHandlers" usage="nonstrict-read-write" />
-
- <collection-cache collection="org.jbpm.taskmgmt.def.TaskMgmtDefinition.swimlanes" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.taskmgmt.def.TaskMgmtDefinition.tasks" usage="nonstrict-read-write" />
-
- <!-- ############################ -->
- <!-- # cache settings # -->
- <!-- # strategy="transactional" # -->
- <!-- # can be used with hibernate.cache.provider_class=org.hibernate.cache.TreeCacheProvider # -->
- <!-- ############################ -->
-
- <!--
-
- <class-cache class="org.jbpm.context.def.VariableAccess" usage="transactional" />
-
- <collection-cache collection="org.jbpm.file.def.FileDefinition.processFiles" usage="transactional" />
-
- <collection-cache collection="org.jbpm.graph.action.Script.variableAccesses" usage="transactional" />
-
- <class-cache class="org.jbpm.graph.def.Action" usage="transactional" />
-
- <class-cache class="org.jbpm.graph.def.Event" usage="transactional" />
- <collection-cache collection="org.jbpm.graph.def.Event.actions" usage="transactional" />
-
- <class-cache class="org.jbpm.graph.def.ExceptionHandler" usage="transactional" />
- <collection-cache collection="org.jbpm.graph.def.ExceptionHandler.actions" usage="transactional" />
-
- <class-cache class="org.jbpm.graph.def.Node" usage="transactional" />
- <collection-cache collection="org.jbpm.graph.def.Node.events" usage="transactional" />
- <collection-cache collection="org.jbpm.graph.def.Node.exceptionHandlers" usage="transactional" />
- <collection-cache collection="org.jbpm.graph.def.Node.leavingTransitions" usage="transactional" />
- <collection-cache collection="org.jbpm.graph.def.Node.arrivingTransitions" usage="transactional" />
-
- <class-cache class="org.jbpm.graph.def.ProcessDefinition" usage="transactional" />
- <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.events" usage="transactional" />
- <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.exceptionHandlers" usage="transactional" />
- <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.nodes" usage="transactional" />
- <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.actions" usage="transactional" />
- <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.definitions" usage="transactional" />
-
- <collection-cache collection="org.jbpm.graph.def.SuperState.nodes" usage="transactional" />
-
- <class-cache class="org.jbpm.graph.def.Transition" usage="transactional" />
- <collection-cache collection="org.jbpm.graph.def.Transition.events" usage="transactional" />
- <collection-cache collection="org.jbpm.graph.def.Transition.exceptionHandlers" usage="transactional" />
-
- <collection-cache collection="org.jbpm.graph.node.Decision.decisionConditions" usage="transactional" />
-
- <collection-cache collection="org.jbpm.graph.node.ProcessState.variableAccesses" usage="transactional" />
-
- <collection-cache collection="org.jbpm.graph.node.TaskNode.tasks" usage="transactional" />
-
- <class-cache class="org.jbpm.instantiation.Delegation" usage="transactional" />
-
- <class-cache class="org.jbpm.module.def.ModuleDefinition" usage="transactional" />
-
- <collection-cache collection="org.jbpm.taskmgmt.def.Swimlane.tasks" usage="transactional" />
-
- <class-cache class="org.jbpm.taskmgmt.def.TaskController" usage="transactional" />
- <collection-cache collection="org.jbpm.taskmgmt.def.TaskController.variableAccesses" usage="transactional" />
-
- <class-cache class="org.jbpm.taskmgmt.def.Task" usage="transactional" />
- <collection-cache collection="org.jbpm.taskmgmt.def.Task.events" usage="transactional" />
- <collection-cache collection="org.jbpm.taskmgmt.def.Task.exceptionHandlers" usage="transactional" />
-
- <collection-cache collection="org.jbpm.taskmgmt.def.TaskMgmtDefinition.swimlanes" usage="transactional" />
- <collection-cache collection="org.jbpm.taskmgmt.def.TaskMgmtDefinition.tasks" usage="transactional" />
-
- -->
-
- </session-factory>
-</hibernate-configuration>
Deleted: jbossbpm/impl/jbpm3/trunk/modules/console/src/main/resources/jbpm.cfg.xml
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/console/src/main/resources/jbpm.cfg.xml 2008-07-29 09:44:52 UTC (rev 1744)
+++ jbossbpm/impl/jbpm3/trunk/modules/console/src/main/resources/jbpm.cfg.xml 2008-07-29 09:49:33 UTC (rev 1745)
@@ -1,9 +0,0 @@
-<jbpm-configuration>
-
- <!--
- The default configurations can be found in org/jbpm/default.jbpm.cfg.xml
- Those configurations can be overwritten by putting this file called
- jbpm.cfg.xml on the root of the classpath and put in the customized values.
- -->
-
-</jbpm-configuration>
Modified: jbossbpm/impl/jbpm3/trunk/modules/distribution/pom.xml
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/distribution/pom.xml 2008-07-29 09:44:52 UTC (rev 1744)
+++ jbossbpm/impl/jbpm3/trunk/modules/distribution/pom.xml 2008-07-29 09:49:33 UTC (rev 1745)
@@ -12,99 +12,155 @@
<!-- $Id$ -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
+ 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 - Distribution</name>
- <groupId>org.jboss.jbpm</groupId>
- <artifactId>jbpm-distribution</artifactId>
- <packaging>pom</packaging>
+ <name>JBoss jBPM - Distribution</name>
+ <groupId>org.jboss.jbpm</groupId>
+ <artifactId>jbpm-distribution</artifactId>
+ <packaging>pom</packaging>
- <!-- Parent -->
- <parent>
- <groupId>org.jboss.jbpm</groupId>
- <artifactId>jbpm</artifactId>
- <version>3.3.0-SNAPSHOT</version>
- </parent>
-
- <!-- Dependencies -->
- <dependencies>
- <dependency>
+ <!-- Parent -->
+ <parent>
<groupId>org.jboss.jbpm</groupId>
- <artifactId>jbpm-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.jbpm</groupId>
- <artifactId>jbpm-bam-console-ear</artifactId>
- <version>${version}</version>
- <type>ear</type>
- </dependency>
- <dependency>
- <groupId>org.jboss.jbpm</groupId>
- <artifactId>jbpm-console</artifactId>
- <version>${version}</version>
- <type>war</type>
- </dependency>
- <dependency>
- <groupId>org.jboss.jbpm</groupId>
- <artifactId>jbpm-jpdl-identity</artifactId>
- <version>${version}</version>
- </dependency>
- <dependency>
- <groupId>izpack</groupId>
- <artifactId>standalone-compiler</artifactId>
- </dependency>
- </dependencies>
+ <artifactId>jbpm</artifactId>
+ <version>3.3.0-SNAPSHOT</version>
+ </parent>
- <!-- Plugins -->
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <executions>
- <execution>
- <id>make-assembly</id>
- <phase>package</phase>
- <goals>
- <goal>directory-single</goal>
- </goals>
- <configuration>
- <finalName>deploy-artifacts</finalName>
- <ignoreDirFormatExtensions>true</ignoreDirFormatExtensions>
- <appendAssemblyId>false</appendAssemblyId>
- <descriptors>
- <descriptor>scripts/assembly-deploy-artifacts.xml</descriptor>
- </descriptors>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>installer</id>
- <phase>package</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <tasks>
- <property name="maven.runtime.classpath" refid="maven.runtime.classpath" />
- <property name="product.name" value="${project.name}" />
- <property name="product.short.name" value="${artifactId}" />
- <property name="product.version" value="${project.version}" />
- <property name="jboss421.home" value="${jboss421.home}" />
- <property name="jboss422.home" value="${jboss422.home}" />
- <property name="jboss500.home" value="${jboss500.home}" />
- <property name="jboss501.home" value="${jboss501.home}" />
- <ant antfile="scripts/antrun-installer.xml" target="installer" />
- </tasks>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
+ <!-- Dependencies -->
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.jbpm</groupId>
+ <artifactId>jbpm-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.jbpm</groupId>
+ <artifactId>jbpm-bam-console-ear</artifactId>
+ <version>${version}</version>
+ <type>ear</type>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.jbpm</groupId>
+ <artifactId>jbpm-jpdl-core</artifactId>
+ <classifier>config</classifier>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.jbpm</groupId>
+ <artifactId>jbpm-console</artifactId>
+ <version>${version}</version>
+ <type>war</type>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.jbpm</groupId>
+ <artifactId>jbpm-jpdl-identity</artifactId>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.jbpm</groupId>
+ <artifactId>jbpm-jpdl-identity</artifactId>
+ <classifier>config</classifier>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
+ <groupId>izpack</groupId>
+ <artifactId>standalone-compiler</artifactId>
+ </dependency>
+ </dependencies>
+ <!-- Plugins -->
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>make-assembly</id>
+ <phase>package</phase>
+ <goals>
+ <goal>directory-single</goal>
+ </goals>
+ <configuration>
+ <finalName>deploy-artifacts</finalName>
+ <ignoreDirFormatExtensions>true</ignoreDirFormatExtensions>
+ <appendAssemblyId>false</appendAssemblyId>
+ <descriptors>
+ <descriptor>scripts/assembly-deploy-artifacts.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>jbpm config</id>
+ <phase>package</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <ant antfile="scripts/antrun-jbpm-config.xml"/>
+ </tasks>
+ </configuration>
+ </execution>
+ <execution>
+ <id>installer</id>
+ <phase>package</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <property name="maven.runtime.classpath" refid="maven.runtime.classpath" />
+ <property name="product.name" value="${project.name}" />
+ <property name="product.short.name" value="${artifactId}" />
+ <property name="product.version" value="${project.version}" />
+ <property name="jboss421.home" value="${jboss421.home}" />
+ <property name="jboss422.home" value="${jboss422.home}" />
+ <property name="jboss500.home" value="${jboss500.home}" />
+ <property name="jboss501.home" value="${jboss501.home}" />
+ <ant antfile="scripts/antrun-installer.xml" target="installer" />
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-dependencies</id>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>unpack</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.jboss.jbpm</groupId>
+ <artifactId>jbpm-jpdl-core</artifactId>
+ <version>${version}</version>
+ <classifier>config</classifier>
+ <type>jar</type>
+ <outputDirectory>${project.build.directory}/resources/jbpm-jpdl-core</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.jboss.jbpm</groupId>
+ <artifactId>jbpm-jpdl-identity</artifactId>
+ <version>${version}</version>
+ <classifier>config</classifier>
+ <type>jar</type>
+ <outputDirectory>${project.build.directory}/resources/jbpm-jpdl-identity</outputDirectory>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
</project>
Added: jbossbpm/impl/jbpm3/trunk/modules/distribution/scripts/antrun-jbpm-config.xml
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/distribution/scripts/antrun-jbpm-config.xml (rev 0)
+++ jbossbpm/impl/jbpm3/trunk/modules/distribution/scripts/antrun-jbpm-config.xml 2008-07-29 09:49:33 UTC (rev 1745)
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ====================================================================== -->
+<!-- -->
+<!-- JBoss, the OpenSource J2EE webOS -->
+<!-- -->
+<!-- Distributable under LGPL license. -->
+<!-- See terms of license at http://www.gnu.org. -->
+<!-- -->
+<!-- ====================================================================== -->
+
+<!-- $Id$ -->
+
+<project default="main">
+
+ <property name="project.resources.directory" value="${basedir}/src/main/resources"/>
+ <property name="project.build.directory" value="${basedir}/target"/>
+ <property name="project.build.resources.directory" value="${project.build.directory}/resources"/>
+ <property name="project.build.classes.directory" value="${project.build.directory}/classes"/>
+
+ <property name="thirdparty.dir" value="${project.build.directory}/thirdparty"/>
+
+ <!-- ================================================================== -->
+ <!-- Initialization -->
+ <!-- ================================================================== -->
+
+ <target name="init">
+ </target>
+
+ <!-- Compile resource files -->
+ <target name="main" depends="init">
+
+ <!--
+
+ jBPM Hibernate configuration. Will be concatenated from
+ various module contributions:
+
+ - hibernate.cfg.xml
+
+ -->
+
+ <echo>==================</echo>
+ <echo message="Concat ${project.build.classes.directory}/hibernate.cfg.xml"/>
+ <echo>==================</echo>
+
+ <concat destfile="${project.build.classes.directory}/hibernate.cfg.xml">
+ <header trimleading="yes"><?xml version='1.0' encoding='utf-8'?>
+
+ <!DOCTYPE hibernate-configuration PUBLIC
+ "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
+
+ <hibernate-configuration>
+ <session-factory>
+ </header>
+ <fileset file="${project.build.resources.directory}/jbpm-jpdl-core/hibernate.properties.xml"/>
+ <fileset file="${project.build.resources.directory}/jbpm-jpdl-core/hibernate.mapping.xml"/>
+ <fileset file="${project.build.resources.directory}/jbpm-jpdl-identity/hibernate.mapping.xml"/>
+ <fileset file="${project.build.resources.directory}/jbpm-jpdl-core/hibernate.cache.xml"/>
+ <footer trimleading="yes">
+ </session-factory>
+ </hibernate-configuration>
+ </footer>
+ </concat>
+
+ <!--
+ Remaining JBPM configuration:
+
+ - jbpm.cfg.xml
+ - jbpm.mail.templates.xml
+ - log4j.xml
+ -->
+
+ <copy todir="${project.build.classes.directory}">
+ <fileset dir="${project.build.resources.directory}/jbpm-jpdl-core">
+ <include name="jbpm.cfg.xml"/>
+ <include name="jbpm.mail.templates.xml"/>
+ <include name="log4j.xml"/>
+ </fileset>
+ </copy>
+
+ <!--
+
+ Create a config jar directory, so that files stay editable:
+
+ - jbpm-config.jar
+
+ -->
+
+ <mkdir dir="${project.build.directory}/deploy-artifacts/lib/jbpm-config.jar"/>
+ <copy todir="${project.build.directory}/deploy-artifacts/lib/jbpm-config.jar">
+ <fileset dir="${project.build.classes.directory}">
+ <include name="*.xml"/>
+ </fileset>
+ </copy>
+
+ </target>
+
+</project>
Property changes on: jbossbpm/impl/jbpm3/trunk/modules/distribution/scripts/antrun-jbpm-config.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbossbpm/impl/jbpm3/trunk/modules/distribution/scripts/assembly-deploy-artifacts.xml
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/distribution/scripts/assembly-deploy-artifacts.xml 2008-07-29 09:44:52 UTC (rev 1744)
+++ jbossbpm/impl/jbpm3/trunk/modules/distribution/scripts/assembly-deploy-artifacts.xml 2008-07-29 09:49:33 UTC (rev 1745)
@@ -15,7 +15,7 @@
<useStrictFiltering>true</useStrictFiltering>
<unpack>false</unpack>
<excludes>
- <exclude>org.jboss.jbpm:jbpm-console:war</exclude>
+ <exclude>org.jboss.jbpm:jbpm-console:war</exclude>
</excludes>
</dependencySet>
<dependencySet>
Modified: jbossbpm/impl/jbpm3/trunk/modules/distribution/scripts/install-definition.xml
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/distribution/scripts/install-definition.xml 2008-07-29 09:44:52 UTC (rev 1744)
+++ jbossbpm/impl/jbpm3/trunk/modules/distribution/scripts/install-definition.xml 2008-07-29 09:49:33 UTC (rev 1745)
@@ -1,87 +1,96 @@
<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>
<installation version="1.0">
- <!-- Ant properties in this file can be referenced with @{},
- otherwise use variables below in installer files with ${} -->
- <info>
- <appname>@{product.name}</appname>
- <appversion>@{product.version}</appversion>
- <uninstaller name="remove.task" write="yes" />
- </info>
+ <!-- Ant properties in this file can be referenced with @{},
+otherwise use variables below in installer files with ${} -->
+ <info>
+ <appname>@{product.name}</appname>
+ <appversion>@{product.version}</appversion>
+ <uninstaller name="remove.task" write="yes" />
+ </info>
- <guiprefs width="600" height="480" resizable="no">
- <laf name="kunststoff">
- <os family="unix" />
- </laf>
- <!--
- <modifier key="useHeadingPanel" value="yes" />
- <modifier key="useHeadingForSummary" value="yes" />
- <modifier key="headingImageOnLeft" value="yes" />
- <modifier key="headingLineCount" value="2" />
- <modifier key="headingFontSize" value="1.5" />
- <modifier key="headingBackgroundColor" value="0x00ffffff" />
- <modifier key="headingPanelCounter" value="text" />
- <modifier key="headingPanelCounterPos" value="inHeading" />
- -->
- </guiprefs>
+ <guiprefs width="600" height="480" resizable="no">
+ <laf name="kunststoff">
+ <os family="unix" />
+ </laf>
+ <!--
+ <modifier key="useHeadingPanel" value="yes" />
+ <modifier key="useHeadingForSummary" value="yes" />
+ <modifier key="headingImageOnLeft" value="yes" />
+ <modifier key="headingLineCount" value="2" />
+ <modifier key="headingFontSize" value="1.5" />
+ <modifier key="headingBackgroundColor" value="0x00ffffff" />
+ <modifier key="headingPanelCounter" value="text" />
+ <modifier key="headingPanelCounterPos" value="inHeading" />
+ -->
+ </guiprefs>
- <locale>
- <langpack iso3="eng" />
- </locale>
+ <locale>
+ <langpack iso3="eng" />
+ </locale>
- <!-- Need to define ant properties we want to use during install as variables -->
- <variables>
- <variable name="UserPathPanelVariable" value="@{jboss422.home}" />
- </variables>
+ <!-- Need to define ant properties we want to use during install as variables -->
+ <variables>
+ <variable name="UserPathPanelVariable" value="@{jboss422.home}" />
+ </variables>
- <resources>
- <res id="TargetPanel.dir" src="@{filtered.resources.dir}/target-panel-dir.txt"/>
- </resources>
+ <resources>
+ <res id="TargetPanel.dir" src="@{filtered.resources.dir}/target-panel-dir.txt"/>
+ </resources>
- <panels>
- <panel classname="HelloPanel" />
- <panel classname="TargetPanel" />
- <panel classname="TreePacksPanel" />
- <panel classname="SummaryPanel" />
- <panel classname="InstallPanel" />
- <panel classname="FinishPanel" />
- </panels>
+ <panels>
+ <panel classname="HelloPanel" />
+ <panel classname="TargetPanel" />
+ <panel classname="TreePacksPanel" />
+ <panel classname="SummaryPanel" />
+ <panel classname="InstallPanel" />
+ <panel classname="FinishPanel" />
+ </panels>
- <packs>
- <!-- jBPM Main Components -->
- <pack name="jBPM3" required="yes" installGroups="Main">
- <description>The jBPM Main Components</description>
- <fileset dir="@{deploy.artifacts.dir}/lib" targetdir="$INSTALL_PATH/server/(a){jboss.server.instance}/deploy/jbpm" >
- <include name="jbpm-api.jar"/>
- <include name="jbpm-jbpm4jsf.jar"/>
- <include name="jbpm-jpdl-core.jar"/>
- <include name="jbpm-jpdl-identity.jar"/>
- <include name="jbpm-jpdl-integration.jar"/>
- </fileset>
- </pack>
-
- <!-- jBPM Console -->
- <pack name="jBPM3 Console" required="no" installGroups="Main">
- <description>The jBPM Console</description>
- <file src="@{deploy.artifacts.dir}/lib/jbpm-console.war" targetdir="$INSTALL_PATH/server/(a){jboss.server.instance}/deploy/jbpm" />
- </pack>
-
- <!-- jBPM BAM Console -->
- <pack name="jBPM3 BAM Console" required="no" installGroups="Main">
- <description>The jBPM BAM Console</description>
- <file src="@{deploy.artifacts.dir}/lib/jbpm-bam-console.ear" targetdir="$INSTALL_PATH/server/(a){jboss.server.instance}/deploy/jbpm" />
- </pack>
-
- <!-- jBPM Hypersonic Database -->
- <pack name="jBPM3 Hypersonic Database Scripts" required="no" installGroups="Main">
- <description>The Hypersonic Database Scripts</description>
- <fileset dir="@{resources.dir}/database/hypersonic" targetdir="$INSTALL_PATH/server/(a){jboss.server.instance}/data" >
- <include name="hypersonic/**"/>
- </fileset>
- <fileset dir="@{resources.dir}/database/hypersonic" targetdir="$INSTALL_PATH/server/(a){jboss.server.instance}/deploy/jbpm" >
- <include name="jbpm-ds.xml"/>
- </fileset>
- </pack>
- </packs>
+ <packs>
+ <!-- jBPM Main Components -->
+ <pack name="jBPM3" required="yes" installGroups="Main">
+ <description>The jBPM Main Components</description>
+ <fileset dir="@{deploy.artifacts.dir}/lib" targetdir="$INSTALL_PATH/server/(a){jboss.server.instance}/deploy/jbpm" >
+ <include name="jbpm-api.jar"/>
+ <include name="jbpm-jbpm4jsf.jar"/>
+ <include name="jbpm-jpdl-core.jar"/>
+ <include name="jbpm-jpdl-identity.jar"/>
+ <include name="jbpm-jpdl-integration.jar"/>
+ </fileset>
+ </pack>
+ <!-- jBPM Distro config -->
+ <pack name="jBPM3 Config" required="yes" installGroups="Main">
+ <description>The jBPM default configuration</description>
+ <file src="@{deploy.artifacts.dir}/lib/jbpm-config.jar"
+ targetdir="$INSTALL_PATH/server/(a){jboss.server.instance}/deploy/jbpm">
+ <include>hibernate.cfg.xml</include>
+ </file>
+ </pack>
+
+ <!-- jBPM Console -->
+ <pack name="jBPM3 Console" required="no" installGroups="Main">
+ <description>The jBPM Console</description>
+ <file src="@{deploy.artifacts.dir}/lib/jbpm-console.war" targetdir="$INSTALL_PATH/server/(a){jboss.server.instance}/deploy/jbpm" />
+ </pack>
+
+ <!-- jBPM BAM Console -->
+ <pack name="jBPM3 BAM Console" required="no" installGroups="Main">
+ <description>The jBPM BAM Console</description>
+ <file src="@{deploy.artifacts.dir}/lib/jbpm-bam-console.ear" targetdir="$INSTALL_PATH/server/(a){jboss.server.instance}/deploy/jbpm" />
+ </pack>
+
+ <!-- jBPM Hypersonic Database -->
+ <pack name="jBPM3 Hypersonic Database Scripts" required="no" installGroups="Main">
+ <description>The Hypersonic Database Scripts</description>
+ <fileset dir="@{resources.dir}/database/hypersonic" targetdir="$INSTALL_PATH/server/(a){jboss.server.instance}/data" >
+ <include name="hypersonic/**"/>
+ </fileset>
+ <fileset dir="@{resources.dir}/database/hypersonic" targetdir="$INSTALL_PATH/server/(a){jboss.server.instance}/deploy/jbpm" >
+ <include name="jbpm-ds.xml"/>
+ </fileset>
+ </pack>
+ </packs>
+
</installation>
Deleted: jbossbpm/impl/jbpm3/trunk/modules/enterprise/src/main/config/jbpm.cfg.xml
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/enterprise/src/main/config/jbpm.cfg.xml 2008-07-29 09:44:52 UTC (rev 1744)
+++ jbossbpm/impl/jbpm3/trunk/modules/enterprise/src/main/config/jbpm.cfg.xml 2008-07-29 09:49:33 UTC (rev 1745)
@@ -1,34 +0,0 @@
-<jbpm-configuration>
-
- <jbpm-context>
- <service name="persistence" factory="org.jbpm.persistence.jta.JtaDbPersistenceServiceFactory" />
- <service name="message" factory="org.jbpm.msg.jms.JmsMessageServiceFactoryImpl" />
- <service name="scheduler" factory="org.jbpm.scheduler.ejbtimer.EntitySchedulerServiceFactory" />
- <service name="tx" factory="org.jbpm.tx.TxServiceFactory" />
- <service name="logging" factory="org.jbpm.logging.db.DbLoggingServiceFactory" />
- <service name="authentication" factory="org.jbpm.security.authentication.DefaultAuthenticationServiceFactory" />
- </jbpm-context>
-
- <!-- configuration property used by persistence service impl org.jbpm.persistence.db.DbPersistenceServiceFactory -->
- <string name="resource.hibernate.cfg.xml" value="hibernate.cfg.xml" />
-
- <!-- configuration resource files pointing to default configuration files in jbpm-jpdl.jar -->
- <string name="resource.business.calendar" value="org/jbpm/calendar/jbpm.business.calendar.properties" />
- <string name="resource.default.modules" value="org/jbpm/graph/def/jbpm.default.modules.properties" />
- <string name="resource.converter" value="org/jbpm/db/hibernate/jbpm.converter.properties" />
- <string name="resource.action.types" value="org/jbpm/graph/action/action.types.xml" />
- <string name="resource.node.types" value="org/jbpm/graph/node/node.types.xml" />
- <string name="resource.parsers" value="org/jbpm/jpdl/par/jbpm.parsers.xml" />
- <string name="resource.varmapping" value="org/jbpm/context/exe/jbpm.varmapping.xml" />
- <string name="resource.mail.templates" value="jbpm.mail.templates.xml" />
-
- <int name="jbpm.byte.block.size" value="1024" singleton="true" />
- <string name="jbpm.mail.smtp.host" value="localhost" />
- <bean name="jbpm.task.instance.factory" class="org.jbpm.taskmgmt.impl.DefaultTaskInstanceFactoryImpl" singleton="true" />
- <bean name="jbpm.variable.resolver" class="org.jbpm.jpdl.el.impl.JbpmVariableResolver" singleton="true" />
- <bean name="jbpm.mail.address.resolver" class="org.jbpm.identity.mail.IdentityAddressResolver" singleton="true" />
-
- <!-- note that the default job executor needs to be overwritten with a null value -->
- <null name="jbpm.job.executor" />
-
-</jbpm-configuration>
Modified: jbossbpm/impl/jbpm3/trunk/modules/jpdl/core/pom.xml
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/jpdl/core/pom.xml 2008-07-29 09:44:52 UTC (rev 1744)
+++ jbossbpm/impl/jbpm3/trunk/modules/jpdl/core/pom.xml 2008-07-29 09:49:33 UTC (rev 1745)
@@ -12,186 +12,215 @@
<!-- $Id$ -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <name>JBoss jBPM - jPDL Core</name>
- <groupId>org.jboss.jbpm</groupId>
- <artifactId>jbpm-jpdl-core</artifactId>
- <packaging>jar</packaging>
-
- <!-- Parent -->
- <parent>
- <groupId>org.jboss.jbpm</groupId>
- <artifactId>jbpm-jpdl</artifactId>
- <version>3.3.0-SNAPSHOT</version>
- </parent>
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
- <!-- Dependencies -->
- <dependencies>
- <!-- jBPM Dependencies -->
- <!-- dependency>
+ <name>JBoss jBPM - jPDL Core</name>
+ <groupId>org.jboss.jbpm</groupId>
+ <artifactId>jbpm-jpdl-core</artifactId>
+ <packaging>jar</packaging>
+
+ <!-- Parent -->
+ <parent>
<groupId>org.jboss.jbpm</groupId>
- <artifactId>jbpm-api</artifactId>
- <version>${version}</version>
- </dependency-->
-
- <!-- Compile Dependencies -->
- <dependency>
- <groupId>bsh</groupId>
- <artifactId>bsh</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-fileupload</groupId>
- <artifactId>commons-fileupload</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </dependency>
- <dependency>
- <groupId>dom4j</groupId>
- <artifactId>dom4j</artifactId>
- </dependency>
- <dependency>
- <groupId>javax.jcr</groupId>
- <artifactId>jcr</artifactId>
- </dependency>
- <dependency>
- <groupId>javax.mail</groupId>
- <artifactId>mail</artifactId>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.ant</groupId>
- <artifactId>ant</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.jackrabbit</groupId>
- <artifactId>jackrabbit-core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate</artifactId>
- </dependency>
-
- <!-- Test Dependencies -->
- <dependency>
- <groupId>dumbster</groupId>
- <artifactId>dumbster</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>hsqldb</groupId>
- <artifactId>hsqldb</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>jaxen</groupId>
- <artifactId>jaxen</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <!-- Plugins -->
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>single</goal>
- </goals>
+ <artifactId>jbpm-jpdl</artifactId>
+ <version>3.3.0-SNAPSHOT</version>
+ </parent>
+
+ <!-- Dependencies -->
+ <dependencies>
+ <!-- jBPM Dependencies -->
+ <!-- dependency>
+ <groupId>org.jboss.jbpm</groupId>
+ <artifactId>jbpm-api</artifactId>
+ <version>${version}</version>
+ </dependency-->
+
+ <!-- Compile Dependencies -->
+ <dependency>
+ <groupId>bsh</groupId>
+ <artifactId>bsh</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-fileupload</groupId>
+ <artifactId>commons-fileupload</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>dom4j</groupId>
+ <artifactId>dom4j</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.jcr</groupId>
+ <artifactId>jcr</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.mail</groupId>
+ <artifactId>mail</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.jackrabbit</groupId>
+ <artifactId>jackrabbit-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate</artifactId>
+ </dependency>
+
+ <!-- Test Dependencies -->
+ <dependency>
+ <groupId>dumbster</groupId>
+ <artifactId>dumbster</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>hsqldb</groupId>
+ <artifactId>hsqldb</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>jaxen</groupId>
+ <artifactId>jaxen</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <!-- Plugins -->
+ <build>
+ <resources>
+ <resource>
+ <targetPath>/</targetPath>
+ <filtering>false</filtering>
+ <directory>${basedir}/src/main/resources</directory>
+ <excludes>
+ <exclude>hibernate.*.xml</exclude>
+ </excludes>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <finalName>${project.build.finalName}</finalName>
+ <appendAssemblyId>true</appendAssemblyId>
+ <descriptors>
+ <descriptor>scripts/assembly-config.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
<configuration>
- <finalName>${project.build.finalName}</finalName>
- <appendAssemblyId>true</appendAssemblyId>
- <descriptors>
- <descriptor>scripts/assembly-config.xml</descriptor>
- </descriptors>
+ <showDeprecation>false</showDeprecation>
</configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <showDeprecation>false</showDeprecation>
- </configuration>
- </plugin>
- <plugin>
- <artifactId>maven-jar-plugin</artifactId>
- <configuration>
- <!--excludes>
- <exclude>hibernate.cfg.xml</exclude>
- <exclude>jbpm.cfg.xml</exclude>
- <exclude>jbpm.mail.templates.xml</exclude>
- </excludes-->
- </configuration>
- </plugin>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <excludes>
- <exclude>org/jbpm/mail/MailTest.java</exclude>
- <exclude>org/jbpm/mail/TaskMailTest.java</exclude>
-
- <!--
- Cleanup stale tests from the testsuite
- http://jira.jboss.org/jira/browse/JBPM-1205
- -->
- <exclude>org/jbpm/context/exe/VariableQueryDbTest.java</exclude>
- <exclude>org/jbpm/db/ContextSessionDbTest.java</exclude>
- <exclude>org/jbpm/DefaultConfigurationTest.java</exclude>
- <exclude>org/jbpm/graph/def/ExceptionHandlerDbTest.java</exclude>
- <exclude>org/jbpm/graph/def/TransitionDbTest.java</exclude>
- <exclude>org/jbpm/graph/exe/StateDbTest.java</exclude>
- <exclude>org/jbpm/graph/exe/SubProcessCancellationTest.java</exclude>
- <exclude>org/jbpm/graph/exe/SuperStateActionExecutionDbTest.java</exclude>
- <exclude>org/jbpm/graph/log/NodeLogTest.java</exclude>
- <exclude>org/jbpm/instantiation/UserCodeInterceptorTest.java</exclude>
- <exclude>org/jbpm/JbpmDefaultConfigTest.java</exclude>
- <exclude>org/jbpm/jcr/JcrDbTest.java</exclude>
- <exclude>org/jbpm/job/executor/ConcurrencyTest.java</exclude>
- <exclude>org/jbpm/job/executor/JobExecutorDbTest.java</exclude>
- <exclude>org/jbpm/job/executor/JobLoadJoinTest.java</exclude>
- <exclude>org/jbpm/job/executor/JobLoadSubProcessTest.java</exclude>
- <exclude>org/jbpm/jpdl/convert/ConversionTestCase.java</exclude>
- <exclude>org/jbpm/jpdl/xml/SchemaTest.java</exclude>
- <exclude>org/jbpm/logging/exe/LoggingConfigDbTest.java</exclude>
- <exclude>org/jbpm/logging/exe/LogLogTest.java</exclude>
- <exclude>org/jbpm/mail/RealServerMailTestCase.java</exclude>
- <exclude>org/jbpm/mock/JdbcProxyTest.java</exclude>
- <exclude>org/jbpm/perf/PerfWithoutDbTest.java</exclude>
- <exclude>org/jbpm/perf/StateUpdateTest.java</exclude>
- <exclude>org/jbpm/perf/TasklistEagerLoadingTest.java</exclude>
- <exclude>org/jbpm/perf/TaskWithVariablesTest.java</exclude>
- <exclude>org/jbpm/persistence/db/PersistenceConfigurationTest.java</exclude>
- <exclude>org/jbpm/scheduler/exe/UnsafeSessionUsageTest.java</exclude>
- <exclude>org/jbpm/seam/SeamPageFlowTest.java</exclude>
- <exclude>org/jbpm/job/executor/TimerOnTimerDbTest.java</exclude>
- </excludes>
- </configuration>
- </plugin>
- </plugins>
- </build>
+ </plugin>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <excludes>
+ <exclude>hibernate.properties.xml</exclude>
+ <exclude>hibernate.mapping.xml</exclude>
+ <exclude>hibernate.cache.xml</exclude>
+ <exclude>jbpm.cfg.xml</exclude>
+ <exclude>jbpm.mail.templates.xml</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <excludes>
+ <exclude>org/jbpm/mail/MailTest.java</exclude>
+ <exclude>org/jbpm/mail/TaskMailTest.java</exclude>
+
+ <!--
+ Cleanup stale tests from the testsuite
+ http://jira.jboss.org/jira/browse/JBPM-1205
+ -->
+ <exclude>org/jbpm/context/exe/VariableQueryDbTest.java</exclude>
+ <exclude>org/jbpm/db/ContextSessionDbTest.java</exclude>
+ <exclude>org/jbpm/DefaultConfigurationTest.java</exclude>
+ <exclude>org/jbpm/graph/def/ExceptionHandlerDbTest.java</exclude>
+ <exclude>org/jbpm/graph/def/TransitionDbTest.java</exclude>
+ <exclude>org/jbpm/graph/exe/StateDbTest.java</exclude>
+ <exclude>org/jbpm/graph/exe/SubProcessCancellationTest.java</exclude>
+ <exclude>org/jbpm/graph/exe/SuperStateActionExecutionDbTest.java</exclude>
+ <exclude>org/jbpm/graph/log/NodeLogTest.java</exclude>
+ <exclude>org/jbpm/instantiation/UserCodeInterceptorTest.java</exclude>
+ <exclude>org/jbpm/JbpmDefaultConfigTest.java</exclude>
+ <exclude>org/jbpm/jcr/JcrDbTest.java</exclude>
+ <exclude>org/jbpm/job/executor/ConcurrencyTest.java</exclude>
+ <exclude>org/jbpm/job/executor/JobExecutorDbTest.java</exclude>
+ <exclude>org/jbpm/job/executor/JobLoadJoinTest.java</exclude>
+ <exclude>org/jbpm/job/executor/JobLoadSubProcessTest.java</exclude>
+ <exclude>org/jbpm/jpdl/convert/ConversionTestCase.java</exclude>
+ <exclude>org/jbpm/jpdl/xml/SchemaTest.java</exclude>
+ <exclude>org/jbpm/logging/exe/LoggingConfigDbTest.java</exclude>
+ <exclude>org/jbpm/logging/exe/LogLogTest.java</exclude>
+ <exclude>org/jbpm/mail/RealServerMailTestCase.java</exclude>
+ <exclude>org/jbpm/mock/JdbcProxyTest.java</exclude>
+ <exclude>org/jbpm/perf/PerfWithoutDbTest.java</exclude>
+ <exclude>org/jbpm/perf/StateUpdateTest.java</exclude>
+ <exclude>org/jbpm/perf/TasklistEagerLoadingTest.java</exclude>
+ <exclude>org/jbpm/perf/TaskWithVariablesTest.java</exclude>
+ <exclude>org/jbpm/persistence/db/PersistenceConfigurationTest.java</exclude>
+ <exclude>org/jbpm/scheduler/exe/UnsafeSessionUsageTest.java</exclude>
+ <exclude>org/jbpm/seam/SeamPageFlowTest.java</exclude>
+ <exclude>org/jbpm/job/executor/TimerOnTimerDbTest.java</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <ant antfile="scripts/antrun-jbpm-config.xml"/>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
</project>
Added: jbossbpm/impl/jbpm3/trunk/modules/jpdl/core/scripts/antrun-jbpm-config.xml
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/jpdl/core/scripts/antrun-jbpm-config.xml (rev 0)
+++ jbossbpm/impl/jbpm3/trunk/modules/jpdl/core/scripts/antrun-jbpm-config.xml 2008-07-29 09:49:33 UTC (rev 1745)
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ====================================================================== -->
+<!-- -->
+<!-- JBoss, the OpenSource J2EE webOS -->
+<!-- -->
+<!-- Distributable under LGPL license. -->
+<!-- See terms of license at http://www.gnu.org. -->
+<!-- -->
+<!-- ====================================================================== -->
+
+<!-- $Id$ -->
+
+<project default="main">
+
+ <property name="project.resources.directory" value="${basedir}/src/main/resources"/>
+ <property name="project.build.directory" value="${basedir}/target"/>
+ <property name="project.build.resources.directory" value="${project.build.directory}/resources"/>
+ <property name="project.build.classes.directory" value="${project.build.directory}/classes"/>
+
+ <property name="thirdparty.dir" value="${project.build.directory}/thirdparty"/>
+
+ <!-- ================================================================== -->
+ <!-- Initialization -->
+ <!-- ================================================================== -->
+
+ <target name="init">
+ </target>
+
+ <!-- Compile resource files -->
+ <target name="main" depends="init">
+
+ <!-- Concat hibernate.cfg.xml -->
+ <echo>==================</echo>
+ <echo message="Concat ${project.build.classes.directory}/hibernate.cfg.xml"/>
+ <echo>==================</echo>
+
+ <concat destfile="${project.build.classes.directory}/hibernate.cfg.xml">
+ <header trimleading="yes"><?xml version='1.0' encoding='utf-8'?>
+
+ <!DOCTYPE hibernate-configuration PUBLIC
+ "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
+
+ <hibernate-configuration>
+ <session-factory>
+ </header>
+ <!--fileset file="${project.build.resources.directory}/jbpm-jpdl-core/hibernate.cfg.xml"/-->
+ <fileset file="${project.resources.directory}/hibernate.properties.xml"/>
+ <fileset file="${project.resources.directory}/hibernate.mapping.xml"/>
+ <fileset file="${project.resources.directory}/hibernate.cache.xml"/>
+ <footer trimleading="yes">
+ </session-factory>
+ </hibernate-configuration>
+ </footer>
+ </concat>
+
+ </target>
+
+</project>
Property changes on: jbossbpm/impl/jbpm3/trunk/modules/jpdl/core/scripts/antrun-jbpm-config.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbossbpm/impl/jbpm3/trunk/modules/jpdl/core/scripts/assembly-config.xml
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/jpdl/core/scripts/assembly-config.xml 2008-07-29 09:44:52 UTC (rev 1744)
+++ jbossbpm/impl/jbpm3/trunk/modules/jpdl/core/scripts/assembly-config.xml 2008-07-29 09:49:33 UTC (rev 1745)
@@ -1,26 +1,28 @@
<assembly xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/assembly-1.1.0-SNAPSHOT.xsd">
- <id>config</id>
- <formats>
- <format>jar</format>
- </formats>
- <includeBaseDirectory>false</includeBaseDirectory>
- <fileSets>
- <fileSet>
- <directory>src/main/resources</directory>
- <outputDirectory>/</outputDirectory>
- <includes>
- <include>hibernate.cfg.xml</include>
- <include>jbpm.cfg.xml</include>
- <include>jbpm.mail.templates.xml</include>
- </includes>
- </fileSet>
- <fileSet>
- <directory>src/test/resources</directory>
- <outputDirectory>/</outputDirectory>
- <includes>
- <include>log4j.xml</include>
- </includes>
- </fileSet>
- </fileSets>
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/assembly-1.1.0-SNAPSHOT.xsd">
+ <id>config</id>
+ <formats>
+ <format>jar</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <fileSets>
+ <fileSet>
+ <directory>src/main/resources</directory>
+ <outputDirectory>/</outputDirectory>
+ <includes>
+ <include>hibernate.properties.xml</include>
+ <include>hibernate.mapping.xml</include>
+ <include>hibernate.cache.xml</include>
+ <include>jbpm.cfg.xml</include>
+ <include>jbpm.mail.templates.xml</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>src/test/resources</directory>
+ <outputDirectory>/</outputDirectory>
+ <includes>
+ <include>log4j.xml</include>
+ </includes>
+ </fileSet>
+ </fileSets>
</assembly>
\ No newline at end of file
Deleted: jbossbpm/impl/jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/web/ProcessUploadServlet.java
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/web/ProcessUploadServlet.java 2008-07-29 09:44:52 UTC (rev 1744)
+++ jbossbpm/impl/jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/web/ProcessUploadServlet.java 2008-07-29 09:49:33 UTC (rev 1745)
@@ -1,107 +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.web;
-
-import java.io.IOException;
-import java.util.Iterator;
-import java.util.List;
-import java.util.zip.ZipInputStream;
-import org.apache.commons.fileupload.DiskFileUpload;
-import org.apache.commons.fileupload.FileItem;
-import org.apache.commons.fileupload.FileUpload;
-import org.apache.commons.fileupload.FileUploadException;
-import org.jbpm.JbpmConfiguration;
-import org.jbpm.JbpmContext;
-import org.jbpm.graph.def.ProcessDefinition;
-
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-public class ProcessUploadServlet extends HttpServlet {
-
- private static final long serialVersionUID = 1L;
-
- static JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance();
-
- public static final String UPLOAD_TYPE_DEFINITION = "definition";
- public static final String UPLOAD_TYPE_ARCHIVE = "archive";
-
- public void service(HttpServletRequest request, HttpServletResponse response) throws IOException {
- //upload from gpd has url mapping: /upload
-
- JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
- try {
- response.setContentType("text/html");
- response.getWriter().println(handleRequest(request));
- } finally {
- jbpmContext.close();
- }
- }
-
- private String handleRequest(HttpServletRequest request) {
- //check if request is multipart content
- log.debug("Handling upload request");
- if (!FileUpload.isMultipartContent(request)) {
- log.debug("Not a multipart request");
- return "Not a multipart request";
- }
-
- try {
- DiskFileUpload fileUpload = new DiskFileUpload();
- List list = fileUpload.parseRequest(request);
- log.debug("Upload from GPD");
- Iterator iterator = list.iterator();
- if (!iterator.hasNext()) {
- log.debug("No process file in the request");
- return "No process file in the request";
- }
- FileItem fileItem = (FileItem) iterator.next();
- if (fileItem.getContentType().indexOf("application/x-zip-compressed") == -1) {
- log.debug("Not a process archive");
- return "Not a process archive";
- }
- try {
- log.debug("Deploying process archive " + fileItem.getName());
- ZipInputStream zipInputStream = new ZipInputStream(fileItem.getInputStream());
- JbpmContext jbpmContext = JbpmContext.getCurrentJbpmContext();
- log.debug("Preparing to parse process archive");
- ProcessDefinition processDefinition = ProcessDefinition.parseParZipInputStream(zipInputStream);
- log.debug("Created a processdefinition : " + processDefinition.getName());
- jbpmContext.deployProcessDefinition(processDefinition);
- zipInputStream.close();
- return "Deployed archive " + processDefinition.getName() + " successfully";
- } catch (IOException e) {
- log.debug("Failed to read process archive", e);
- return "IOException";
- }
- } catch (FileUploadException e) {
- log.debug("Failed to parse HTTP request", e);
- return "FileUploadException";
- }
- }
-
- private static final Log log = LogFactory.getLog(ProcessUploadServlet.class);
-}
\ No newline at end of file
Added: jbossbpm/impl/jbpm3/trunk/modules/jpdl/core/src/main/resources/hibernate.cache.xml
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/jpdl/core/src/main/resources/hibernate.cache.xml (rev 0)
+++ jbossbpm/impl/jbpm3/trunk/modules/jpdl/core/src/main/resources/hibernate.cache.xml 2008-07-29 09:49:33 UTC (rev 1745)
@@ -0,0 +1,131 @@
+<!-- ################################### -->
+ <!-- # cache settings # -->
+ <!-- # strategy="nonstrict-read-write" # -->
+ <!-- # can be used with hibernate.cache.provider_class=org.hibernate.cache.HashtableCacheProvider # -->
+ <!-- ################################### -->
+
+ <class-cache class="org.jbpm.context.def.VariableAccess" usage="nonstrict-read-write" />
+
+ <collection-cache collection="org.jbpm.file.def.FileDefinition.processFiles" usage="nonstrict-read-write" />
+
+ <collection-cache collection="org.jbpm.graph.action.Script.variableAccesses" usage="nonstrict-read-write" />
+
+ <class-cache class="org.jbpm.graph.def.Action" usage="nonstrict-read-write" />
+
+ <class-cache class="org.jbpm.graph.def.Event" usage="nonstrict-read-write" />
+ <collection-cache collection="org.jbpm.graph.def.Event.actions" usage="nonstrict-read-write" />
+
+ <class-cache class="org.jbpm.graph.def.ExceptionHandler" usage="nonstrict-read-write" />
+ <collection-cache collection="org.jbpm.graph.def.ExceptionHandler.actions" usage="nonstrict-read-write" />
+
+ <class-cache class="org.jbpm.graph.def.Node" usage="nonstrict-read-write" />
+ <collection-cache collection="org.jbpm.graph.def.Node.events" usage="nonstrict-read-write" />
+ <collection-cache collection="org.jbpm.graph.def.Node.exceptionHandlers" usage="nonstrict-read-write" />
+ <collection-cache collection="org.jbpm.graph.def.Node.leavingTransitions" usage="nonstrict-read-write" />
+ <collection-cache collection="org.jbpm.graph.def.Node.arrivingTransitions" usage="nonstrict-read-write" />
+
+ <class-cache class="org.jbpm.graph.def.ProcessDefinition" usage="nonstrict-read-write" />
+ <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.events" usage="nonstrict-read-write" />
+ <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.exceptionHandlers" usage="nonstrict-read-write" />
+ <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.nodes" usage="nonstrict-read-write" />
+ <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.actions" usage="nonstrict-read-write" />
+ <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.definitions" usage="nonstrict-read-write" />
+
+ <collection-cache collection="org.jbpm.graph.def.SuperState.nodes" usage="nonstrict-read-write" />
+
+ <class-cache class="org.jbpm.graph.def.Transition" usage="nonstrict-read-write" />
+ <collection-cache collection="org.jbpm.graph.def.Transition.events" usage="nonstrict-read-write" />
+ <collection-cache collection="org.jbpm.graph.def.Transition.exceptionHandlers" usage="nonstrict-read-write" />
+
+ <collection-cache collection="org.jbpm.graph.node.Decision.decisionConditions" usage="nonstrict-read-write" />
+
+ <collection-cache collection="org.jbpm.graph.node.ProcessState.variableAccesses" usage="nonstrict-read-write" />
+
+ <collection-cache collection="org.jbpm.graph.node.TaskNode.tasks" usage="nonstrict-read-write" />
+
+ <class-cache class="org.jbpm.instantiation.Delegation" usage="nonstrict-read-write" />
+
+ <class-cache class="org.jbpm.module.def.ModuleDefinition" usage="nonstrict-read-write" />
+
+ <collection-cache collection="org.jbpm.taskmgmt.def.Swimlane.tasks" usage="nonstrict-read-write" />
+
+ <class-cache class="org.jbpm.taskmgmt.def.TaskController" usage="nonstrict-read-write" />
+ <collection-cache collection="org.jbpm.taskmgmt.def.TaskController.variableAccesses" usage="nonstrict-read-write" />
+
+ <class-cache class="org.jbpm.taskmgmt.def.Task" usage="nonstrict-read-write" />
+ <collection-cache collection="org.jbpm.taskmgmt.def.Task.events" usage="nonstrict-read-write" />
+ <collection-cache collection="org.jbpm.taskmgmt.def.Task.exceptionHandlers" usage="nonstrict-read-write" />
+
+ <collection-cache collection="org.jbpm.taskmgmt.def.TaskMgmtDefinition.swimlanes" usage="nonstrict-read-write" />
+ <collection-cache collection="org.jbpm.taskmgmt.def.TaskMgmtDefinition.tasks" usage="nonstrict-read-write" />
+
+ <!-- ############################ -->
+ <!-- # cache settings # -->
+ <!-- # strategy="transactional" # -->
+ <!-- # can be used with hibernate.cache.provider_class=org.hibernate.cache.TreeCacheProvider # -->
+ <!-- ############################ -->
+
+ <!--
+
+ <class-cache class="org.jbpm.context.def.VariableAccess" usage="transactional" />
+
+ <collection-cache collection="org.jbpm.file.def.FileDefinition.processFiles" usage="transactional" />
+
+ <collection-cache collection="org.jbpm.graph.action.Script.variableAccesses" usage="transactional" />
+
+ <class-cache class="org.jbpm.graph.def.Action" usage="transactional" />
+
+ <class-cache class="org.jbpm.graph.def.Event" usage="transactional" />
+ <collection-cache collection="org.jbpm.graph.def.Event.actions" usage="transactional" />
+
+ <class-cache class="org.jbpm.graph.def.ExceptionHandler" usage="transactional" />
+ <collection-cache collection="org.jbpm.graph.def.ExceptionHandler.actions" usage="transactional" />
+
+ <class-cache class="org.jbpm.graph.def.Node" usage="transactional" />
+ <collection-cache collection="org.jbpm.graph.def.Node.events" usage="transactional" />
+ <collection-cache collection="org.jbpm.graph.def.Node.exceptionHandlers" usage="transactional" />
+ <collection-cache collection="org.jbpm.graph.def.Node.leavingTransitions" usage="transactional" />
+ <collection-cache collection="org.jbpm.graph.def.Node.arrivingTransitions" usage="transactional" />
+
+ <class-cache class="org.jbpm.graph.def.ProcessDefinition" usage="transactional" />
+ <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.events" usage="transactional" />
+ <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.exceptionHandlers" usage="transactional" />
+ <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.nodes" usage="transactional" />
+ <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.actions" usage="transactional" />
+ <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.definitions" usage="transactional" />
+
+ <collection-cache collection="org.jbpm.graph.def.SuperState.nodes" usage="transactional" />
+
+ <class-cache class="org.jbpm.graph.def.Transition" usage="transactional" />
+ <collection-cache collection="org.jbpm.graph.def.Transition.events" usage="transactional" />
+ <collection-cache collection="org.jbpm.graph.def.Transition.exceptionHandlers" usage="transactional" />
+
+ <collection-cache collection="org.jbpm.graph.node.Decision.decisionConditions" usage="transactional" />
+
+ <collection-cache collection="org.jbpm.graph.node.ProcessState.variableAccesses" usage="transactional" />
+
+ <collection-cache collection="org.jbpm.graph.node.TaskNode.tasks" usage="transactional" />
+
+ <class-cache class="org.jbpm.instantiation.Delegation" usage="transactional" />
+
+ <class-cache class="org.jbpm.module.def.ModuleDefinition" usage="transactional" />
+
+ <collection-cache collection="org.jbpm.taskmgmt.def.Swimlane.tasks" usage="transactional" />
+
+ <class-cache class="org.jbpm.taskmgmt.def.TaskController" usage="transactional" />
+ <collection-cache collection="org.jbpm.taskmgmt.def.TaskController.variableAccesses" usage="transactional" />
+
+ <class-cache class="org.jbpm.taskmgmt.def.Task" usage="transactional" />
+ <collection-cache collection="org.jbpm.taskmgmt.def.Task.events" usage="transactional" />
+ <collection-cache collection="org.jbpm.taskmgmt.def.Task.exceptionHandlers" usage="transactional" />
+
+ <collection-cache collection="org.jbpm.taskmgmt.def.TaskMgmtDefinition.swimlanes" usage="transactional" />
+ <collection-cache collection="org.jbpm.taskmgmt.def.TaskMgmtDefinition.tasks" usage="transactional" />
+
+ -->
+
+ <!--
+ ==================================================================================
+ END org.jboss.jbpm:jbpm-jpdl-core hibernate.cfg.xml
+ ==================================================================================
+ -->
Property changes on: jbossbpm/impl/jbpm3/trunk/modules/jpdl/core/src/main/resources/hibernate.cache.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted: jbossbpm/impl/jbpm3/trunk/modules/jpdl/core/src/main/resources/hibernate.cfg.xml
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/jpdl/core/src/main/resources/hibernate.cfg.xml 2008-07-29 09:44:52 UTC (rev 1744)
+++ jbossbpm/impl/jbpm3/trunk/modules/jpdl/core/src/main/resources/hibernate.cfg.xml 2008-07-29 09:49:33 UTC (rev 1745)
@@ -1,334 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-
-<!DOCTYPE hibernate-configuration PUBLIC
- "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
- "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
-
-<hibernate-configuration>
- <session-factory>
-
- <!-- hibernate dialect -->
- <property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
-
- <!-- JDBC connection properties (begin) -->
- <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
- <property name="hibernate.connection.url">jdbc:hsqldb:mem:jbpm</property>
- <property name="hibernate.connection.username">sa</property>
- <property name="hibernate.connection.password"></property>
- <!-- JDBC connection properties (end) -->
-
- <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
-
- <property name="hibernate.hbm2ddl.auto">create</property>
-
- <!-- DataSource properties (begin) ===
- <property name="hibernate.connection.datasource">java:comp/env/jdbc/JbpmDataSource</property>
- ==== DataSource properties (end) -->
-
- <!-- JTA transaction properties (begin) ===
- <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
- <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
- ==== JTA transaction properties (end) -->
-
- <!-- CMT transaction properties (begin) ===
- <property name="hibernate.transaction.factory_class">org.hibernate.transaction.CMTTransactionFactory</property>
- <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
- ==== CMT transaction properties (end) -->
-
- <!-- logging properties (begin) ===
- <property name="hibernate.show_sql">true</property>
- <property name="hibernate.format_sql">true</property>
- <property name="hibernate.use_sql_comments">true</property>
- ==== logging properties (end) -->
-
- <!-- ############################################ -->
- <!-- # mapping files with external dependencies # -->
- <!-- ############################################ -->
-
- <!-- following mapping files have a dependency on -->
- <!-- 'jbpm-identity.jar', mapping files -->
- <!-- of the pluggable jbpm identity component. -->
- <!-- Uncomment the following 3 lines if you -->
- <!-- want to use the jBPM identity mgmgt -->
- <!-- component. -->
- <!-- identity mappings (begin) ===
- <mapping resource="org/jbpm/identity/User.hbm.xml"/>
- <mapping resource="org/jbpm/identity/Group.hbm.xml"/>
- <mapping resource="org/jbpm/identity/Membership.hbm.xml"/>
- ==== identity mappings (end) -->
-
- <!-- following mapping files have a dependency on -->
- <!-- the JCR API -->
- <!-- jcr mappings (begin) ===
- <mapping resource="org/jbpm/context/exe/variableinstance/JcrNodeInstance.hbm.xml"/>
- ==== jcr mappings (end) -->
-
-
- <!-- ###################### -->
- <!-- # jbpm mapping files # -->
- <!-- ###################### -->
-
- <!-- hql queries and type defs -->
- <mapping resource="org/jbpm/db/hibernate.queries.hbm.xml" />
- <!-- hql queries used in simulation for querying historical data
- uncomment if you want to use the GetSimulationInputCommand
- or maybe you also want to use the queries yourself
- be patient: the queries need the stddev function to be enabled in your dialect
- more information on this can be found here: http://www.camunda.com/business_process_simulation_news/mysql_and_stddev.... -->
- <!--
- <mapping resource="org/jbpm/sim/bam/hibernate.queries.hbm.xml" />
- -->
-
- <!-- graph.action mapping files -->
- <mapping resource="org/jbpm/graph/action/MailAction.hbm.xml"/>
-
- <!-- graph.def mapping files -->
- <mapping resource="org/jbpm/graph/def/ProcessDefinition.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/Node.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/Transition.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/Event.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/Action.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/SuperState.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/ExceptionHandler.hbm.xml"/>
- <mapping resource="org/jbpm/instantiation/Delegation.hbm.xml"/>
-
- <!-- ############################################ -->
- <!-- # another mapping file with external dependencies # -->
- <!-- ############################################ -->
- <!-- following mapping file has a dependency on -->
- <!-- 'bsh-{version}.jar'. -->
- <!-- uncomment this if you don't have bsh on your -->
- <!-- classpath. you won't be able to use the -->
- <!-- script element in process definition files -->
- <!-- has to be defined below org/jbpm/graph/def/Action.hbm.xml -->
- <!-- due to the inline collection-cache elements below -->
- <mapping resource="org/jbpm/graph/action/Script.hbm.xml"/>
-
- <!-- graph.node mapping files -->
- <mapping resource="org/jbpm/graph/node/StartState.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/EndState.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/ProcessState.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/Decision.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/Fork.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/Join.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/MailNode.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/State.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/TaskNode.hbm.xml"/>
-
- <!-- context.def mapping files -->
- <mapping resource="org/jbpm/context/def/ContextDefinition.hbm.xml"/>
- <mapping resource="org/jbpm/context/def/VariableAccess.hbm.xml"/>
-
- <!-- bytes mapping files -->
- <mapping resource="org/jbpm/bytes/ByteArray.hbm.xml"/>
-
- <!-- module.def mapping files -->
- <mapping resource="org/jbpm/module/def/ModuleDefinition.hbm.xml"/>
-
- <!-- file.def mapping files -->
- <mapping resource="org/jbpm/file/def/FileDefinition.hbm.xml"/>
-
- <!-- taskmgmt.def mapping files -->
- <mapping resource="org/jbpm/taskmgmt/def/TaskMgmtDefinition.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/def/Swimlane.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/def/Task.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/def/TaskController.hbm.xml"/>
-
- <!-- scheduler.def mapping files -->
- <mapping resource="org/jbpm/scheduler/def/CreateTimerAction.hbm.xml"/>
- <mapping resource="org/jbpm/scheduler/def/CancelTimerAction.hbm.xml"/>
-
- <!-- graph.exe mapping files -->
- <mapping resource="org/jbpm/graph/exe/Comment.hbm.xml"/>
- <mapping resource="org/jbpm/graph/exe/ProcessInstance.hbm.xml"/>
- <mapping resource="org/jbpm/graph/exe/Token.hbm.xml"/>
- <mapping resource="org/jbpm/graph/exe/RuntimeAction.hbm.xml"/>
-
- <!-- module.exe mapping files -->
- <mapping resource="org/jbpm/module/exe/ModuleInstance.hbm.xml"/>
-
- <!-- context.exe mapping files -->
- <mapping resource="org/jbpm/context/exe/ContextInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/TokenVariableMap.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/VariableInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/ByteArrayInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/DateInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/DoubleInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/HibernateLongInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/HibernateStringInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/LongInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/NullInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/StringInstance.hbm.xml"/>
-
- <!-- job mapping files -->
- <mapping resource="org/jbpm/job/Job.hbm.xml"/>
- <mapping resource="org/jbpm/job/Timer.hbm.xml"/>
- <mapping resource="org/jbpm/job/ExecuteNodeJob.hbm.xml"/>
- <mapping resource="org/jbpm/job/ExecuteActionJob.hbm.xml"/>
-
- <!-- taskmgmt.exe mapping files -->
- <mapping resource="org/jbpm/taskmgmt/exe/TaskMgmtInstance.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/exe/TaskInstance.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/exe/PooledActor.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/exe/SwimlaneInstance.hbm.xml"/>
-
- <!-- logging mapping files -->
- <mapping resource="org/jbpm/logging/log/ProcessLog.hbm.xml"/>
- <mapping resource="org/jbpm/logging/log/MessageLog.hbm.xml"/>
- <mapping resource="org/jbpm/logging/log/CompositeLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/ActionLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/NodeLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/ProcessInstanceCreateLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/ProcessInstanceEndLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/ProcessStateLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/SignalLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/TokenCreateLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/TokenEndLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/TransitionLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/VariableLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/VariableCreateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/VariableDeleteLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/VariableUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/ByteArrayUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/DateUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/DoubleUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/HibernateLongUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/HibernateStringUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/LongUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/StringUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/TaskLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/TaskCreateLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/TaskAssignLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/TaskEndLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/SwimlaneLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/SwimlaneCreateLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/SwimlaneAssignLog.hbm.xml"/>
-
- <!-- ################################### -->
- <!-- # cache settings # -->
- <!-- # strategy="nonstrict-read-write" # -->
- <!-- # can be used with hibernate.cache.provider_class=org.hibernate.cache.HashtableCacheProvider # -->
- <!-- ################################### -->
-
- <class-cache class="org.jbpm.context.def.VariableAccess" usage="nonstrict-read-write" />
-
- <collection-cache collection="org.jbpm.file.def.FileDefinition.processFiles" usage="nonstrict-read-write" />
-
- <collection-cache collection="org.jbpm.graph.action.Script.variableAccesses" usage="nonstrict-read-write" />
-
- <class-cache class="org.jbpm.graph.def.Action" usage="nonstrict-read-write" />
-
- <class-cache class="org.jbpm.graph.def.Event" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.Event.actions" usage="nonstrict-read-write" />
-
- <class-cache class="org.jbpm.graph.def.ExceptionHandler" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.ExceptionHandler.actions" usage="nonstrict-read-write" />
-
- <class-cache class="org.jbpm.graph.def.Node" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.Node.events" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.Node.exceptionHandlers" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.Node.leavingTransitions" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.Node.arrivingTransitions" usage="nonstrict-read-write" />
-
- <class-cache class="org.jbpm.graph.def.ProcessDefinition" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.events" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.exceptionHandlers" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.nodes" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.actions" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.definitions" usage="nonstrict-read-write" />
-
- <collection-cache collection="org.jbpm.graph.def.SuperState.nodes" usage="nonstrict-read-write" />
-
- <class-cache class="org.jbpm.graph.def.Transition" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.Transition.events" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.Transition.exceptionHandlers" usage="nonstrict-read-write" />
-
- <collection-cache collection="org.jbpm.graph.node.Decision.decisionConditions" usage="nonstrict-read-write" />
-
- <collection-cache collection="org.jbpm.graph.node.ProcessState.variableAccesses" usage="nonstrict-read-write" />
-
- <collection-cache collection="org.jbpm.graph.node.TaskNode.tasks" usage="nonstrict-read-write" />
-
- <class-cache class="org.jbpm.instantiation.Delegation" usage="nonstrict-read-write" />
-
- <class-cache class="org.jbpm.module.def.ModuleDefinition" usage="nonstrict-read-write" />
-
- <collection-cache collection="org.jbpm.taskmgmt.def.Swimlane.tasks" usage="nonstrict-read-write" />
-
- <class-cache class="org.jbpm.taskmgmt.def.TaskController" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.taskmgmt.def.TaskController.variableAccesses" usage="nonstrict-read-write" />
-
- <class-cache class="org.jbpm.taskmgmt.def.Task" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.taskmgmt.def.Task.events" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.taskmgmt.def.Task.exceptionHandlers" usage="nonstrict-read-write" />
-
- <collection-cache collection="org.jbpm.taskmgmt.def.TaskMgmtDefinition.swimlanes" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.taskmgmt.def.TaskMgmtDefinition.tasks" usage="nonstrict-read-write" />
-
- <!-- ############################ -->
- <!-- # cache settings # -->
- <!-- # strategy="transactional" # -->
- <!-- # can be used with hibernate.cache.provider_class=org.hibernate.cache.TreeCacheProvider # -->
- <!-- ############################ -->
-
- <!--
-
- <class-cache class="org.jbpm.context.def.VariableAccess" usage="transactional" />
-
- <collection-cache collection="org.jbpm.file.def.FileDefinition.processFiles" usage="transactional" />
-
- <collection-cache collection="org.jbpm.graph.action.Script.variableAccesses" usage="transactional" />
-
- <class-cache class="org.jbpm.graph.def.Action" usage="transactional" />
-
- <class-cache class="org.jbpm.graph.def.Event" usage="transactional" />
- <collection-cache collection="org.jbpm.graph.def.Event.actions" usage="transactional" />
-
- <class-cache class="org.jbpm.graph.def.ExceptionHandler" usage="transactional" />
- <collection-cache collection="org.jbpm.graph.def.ExceptionHandler.actions" usage="transactional" />
-
- <class-cache class="org.jbpm.graph.def.Node" usage="transactional" />
- <collection-cache collection="org.jbpm.graph.def.Node.events" usage="transactional" />
- <collection-cache collection="org.jbpm.graph.def.Node.exceptionHandlers" usage="transactional" />
- <collection-cache collection="org.jbpm.graph.def.Node.leavingTransitions" usage="transactional" />
- <collection-cache collection="org.jbpm.graph.def.Node.arrivingTransitions" usage="transactional" />
-
- <class-cache class="org.jbpm.graph.def.ProcessDefinition" usage="transactional" />
- <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.events" usage="transactional" />
- <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.exceptionHandlers" usage="transactional" />
- <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.nodes" usage="transactional" />
- <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.actions" usage="transactional" />
- <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.definitions" usage="transactional" />
-
- <collection-cache collection="org.jbpm.graph.def.SuperState.nodes" usage="transactional" />
-
- <class-cache class="org.jbpm.graph.def.Transition" usage="transactional" />
- <collection-cache collection="org.jbpm.graph.def.Transition.events" usage="transactional" />
- <collection-cache collection="org.jbpm.graph.def.Transition.exceptionHandlers" usage="transactional" />
-
- <collection-cache collection="org.jbpm.graph.node.Decision.decisionConditions" usage="transactional" />
-
- <collection-cache collection="org.jbpm.graph.node.ProcessState.variableAccesses" usage="transactional" />
-
- <collection-cache collection="org.jbpm.graph.node.TaskNode.tasks" usage="transactional" />
-
- <class-cache class="org.jbpm.instantiation.Delegation" usage="transactional" />
-
- <class-cache class="org.jbpm.module.def.ModuleDefinition" usage="transactional" />
-
- <collection-cache collection="org.jbpm.taskmgmt.def.Swimlane.tasks" usage="transactional" />
-
- <class-cache class="org.jbpm.taskmgmt.def.TaskController" usage="transactional" />
- <collection-cache collection="org.jbpm.taskmgmt.def.TaskController.variableAccesses" usage="transactional" />
-
- <class-cache class="org.jbpm.taskmgmt.def.Task" usage="transactional" />
- <collection-cache collection="org.jbpm.taskmgmt.def.Task.events" usage="transactional" />
- <collection-cache collection="org.jbpm.taskmgmt.def.Task.exceptionHandlers" usage="transactional" />
-
- <collection-cache collection="org.jbpm.taskmgmt.def.TaskMgmtDefinition.swimlanes" usage="transactional" />
- <collection-cache collection="org.jbpm.taskmgmt.def.TaskMgmtDefinition.tasks" usage="transactional" />
-
- -->
-
- </session-factory>
-</hibernate-configuration>
Added: jbossbpm/impl/jbpm3/trunk/modules/jpdl/core/src/main/resources/hibernate.mapping.xml
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/jpdl/core/src/main/resources/hibernate.mapping.xml (rev 0)
+++ jbossbpm/impl/jbpm3/trunk/modules/jpdl/core/src/main/resources/hibernate.mapping.xml 2008-07-29 09:49:33 UTC (rev 1745)
@@ -0,0 +1,162 @@
+<!-- ############################################ -->
+ <!-- # mapping files with external dependencies # -->
+ <!-- ############################################ -->
+
+ <!-- following mapping files have a dependency on -->
+ <!-- 'jbpm-identity.jar', mapping files -->
+ <!-- of the pluggable jbpm identity component. -->
+ <!-- Uncomment the following 3 lines if you -->
+ <!-- want to use the jBPM identity mgmgt -->
+ <!-- component. -->
+ <!-- identity mappings (begin) ===
+ <mapping resource="org/jbpm/identity/User.hbm.xml"/>
+ <mapping resource="org/jbpm/identity/Group.hbm.xml"/>
+ <mapping resource="org/jbpm/identity/Membership.hbm.xml"/>
+ ==== identity mappings (end) -->
+
+ <!-- following mapping files have a dependency on -->
+ <!-- the JCR API -->
+ <!-- jcr mappings (begin) ===
+ <mapping resource="org/jbpm/context/exe/variableinstance/JcrNodeInstance.hbm.xml"/>
+ ==== jcr mappings (end) -->
+
+
+ <!-- ###################### -->
+ <!-- # jbpm mapping files # -->
+ <!-- ###################### -->
+
+ <!-- hql queries and type defs -->
+ <mapping resource="org/jbpm/db/hibernate.queries.hbm.xml" />
+ <!-- hql queries used in simulation for querying historical data
+ uncomment if you want to use the GetSimulationInputCommand
+ or maybe you also want to use the queries yourself
+ be patient: the queries need the stddev function to be enabled in your dialect
+ more information on this can be found here: http://www.camunda.com/business_process_simulation_news/mysql_and_stddev.... -->
+ <!--
+ <mapping resource="org/jbpm/sim/bam/hibernate.queries.hbm.xml" />
+ -->
+
+ <!-- graph.action mapping files -->
+ <mapping resource="org/jbpm/graph/action/MailAction.hbm.xml"/>
+
+ <!-- graph.def mapping files -->
+ <mapping resource="org/jbpm/graph/def/ProcessDefinition.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/def/Node.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/def/Transition.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/def/Event.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/def/Action.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/def/SuperState.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/def/ExceptionHandler.hbm.xml"/>
+ <mapping resource="org/jbpm/instantiation/Delegation.hbm.xml"/>
+
+ <!-- ############################################ -->
+ <!-- # another mapping file with external dependencies # -->
+ <!-- ############################################ -->
+ <!-- following mapping file has a dependency on -->
+ <!-- 'bsh-{version}.jar'. -->
+ <!-- uncomment this if you don't have bsh on your -->
+ <!-- classpath. you won't be able to use the -->
+ <!-- script element in process definition files -->
+ <!-- has to be defined below org/jbpm/graph/def/Action.hbm.xml -->
+ <!-- due to the inline collection-cache elements below -->
+ <mapping resource="org/jbpm/graph/action/Script.hbm.xml"/>
+
+ <!-- graph.node mapping files -->
+ <mapping resource="org/jbpm/graph/node/StartState.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/node/EndState.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/node/ProcessState.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/node/Decision.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/node/Fork.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/node/Join.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/node/MailNode.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/node/State.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/node/TaskNode.hbm.xml"/>
+
+ <!-- context.def mapping files -->
+ <mapping resource="org/jbpm/context/def/ContextDefinition.hbm.xml"/>
+ <mapping resource="org/jbpm/context/def/VariableAccess.hbm.xml"/>
+
+ <!-- bytes mapping files -->
+ <mapping resource="org/jbpm/bytes/ByteArray.hbm.xml"/>
+
+ <!-- module.def mapping files -->
+ <mapping resource="org/jbpm/module/def/ModuleDefinition.hbm.xml"/>
+
+ <!-- file.def mapping files -->
+ <mapping resource="org/jbpm/file/def/FileDefinition.hbm.xml"/>
+
+ <!-- taskmgmt.def mapping files -->
+ <mapping resource="org/jbpm/taskmgmt/def/TaskMgmtDefinition.hbm.xml"/>
+ <mapping resource="org/jbpm/taskmgmt/def/Swimlane.hbm.xml"/>
+ <mapping resource="org/jbpm/taskmgmt/def/Task.hbm.xml"/>
+ <mapping resource="org/jbpm/taskmgmt/def/TaskController.hbm.xml"/>
+
+ <!-- scheduler.def mapping files -->
+ <mapping resource="org/jbpm/scheduler/def/CreateTimerAction.hbm.xml"/>
+ <mapping resource="org/jbpm/scheduler/def/CancelTimerAction.hbm.xml"/>
+
+ <!-- graph.exe mapping files -->
+ <mapping resource="org/jbpm/graph/exe/Comment.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/exe/ProcessInstance.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/exe/Token.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/exe/RuntimeAction.hbm.xml"/>
+
+ <!-- module.exe mapping files -->
+ <mapping resource="org/jbpm/module/exe/ModuleInstance.hbm.xml"/>
+
+ <!-- context.exe mapping files -->
+ <mapping resource="org/jbpm/context/exe/ContextInstance.hbm.xml"/>
+ <mapping resource="org/jbpm/context/exe/TokenVariableMap.hbm.xml"/>
+ <mapping resource="org/jbpm/context/exe/VariableInstance.hbm.xml"/>
+ <mapping resource="org/jbpm/context/exe/variableinstance/ByteArrayInstance.hbm.xml"/>
+ <mapping resource="org/jbpm/context/exe/variableinstance/DateInstance.hbm.xml"/>
+ <mapping resource="org/jbpm/context/exe/variableinstance/DoubleInstance.hbm.xml"/>
+ <mapping resource="org/jbpm/context/exe/variableinstance/HibernateLongInstance.hbm.xml"/>
+ <mapping resource="org/jbpm/context/exe/variableinstance/HibernateStringInstance.hbm.xml"/>
+ <mapping resource="org/jbpm/context/exe/variableinstance/LongInstance.hbm.xml"/>
+ <mapping resource="org/jbpm/context/exe/variableinstance/NullInstance.hbm.xml"/>
+ <mapping resource="org/jbpm/context/exe/variableinstance/StringInstance.hbm.xml"/>
+
+ <!-- job mapping files -->
+ <mapping resource="org/jbpm/job/Job.hbm.xml"/>
+ <mapping resource="org/jbpm/job/Timer.hbm.xml"/>
+ <mapping resource="org/jbpm/job/ExecuteNodeJob.hbm.xml"/>
+ <mapping resource="org/jbpm/job/ExecuteActionJob.hbm.xml"/>
+
+ <!-- taskmgmt.exe mapping files -->
+ <mapping resource="org/jbpm/taskmgmt/exe/TaskMgmtInstance.hbm.xml"/>
+ <mapping resource="org/jbpm/taskmgmt/exe/TaskInstance.hbm.xml"/>
+ <mapping resource="org/jbpm/taskmgmt/exe/PooledActor.hbm.xml"/>
+ <mapping resource="org/jbpm/taskmgmt/exe/SwimlaneInstance.hbm.xml"/>
+
+ <!-- logging mapping files -->
+ <mapping resource="org/jbpm/logging/log/ProcessLog.hbm.xml"/>
+ <mapping resource="org/jbpm/logging/log/MessageLog.hbm.xml"/>
+ <mapping resource="org/jbpm/logging/log/CompositeLog.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/log/ActionLog.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/log/NodeLog.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/log/ProcessInstanceCreateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/log/ProcessInstanceEndLog.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/log/ProcessStateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/log/SignalLog.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/log/TokenCreateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/log/TokenEndLog.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/log/TransitionLog.hbm.xml"/>
+ <mapping resource="org/jbpm/context/log/VariableLog.hbm.xml"/>
+ <mapping resource="org/jbpm/context/log/VariableCreateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/context/log/VariableDeleteLog.hbm.xml"/>
+ <mapping resource="org/jbpm/context/log/VariableUpdateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/context/log/variableinstance/ByteArrayUpdateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/context/log/variableinstance/DateUpdateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/context/log/variableinstance/DoubleUpdateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/context/log/variableinstance/HibernateLongUpdateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/context/log/variableinstance/HibernateStringUpdateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/context/log/variableinstance/LongUpdateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/context/log/variableinstance/StringUpdateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/taskmgmt/log/TaskLog.hbm.xml"/>
+ <mapping resource="org/jbpm/taskmgmt/log/TaskCreateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/taskmgmt/log/TaskAssignLog.hbm.xml"/>
+ <mapping resource="org/jbpm/taskmgmt/log/TaskEndLog.hbm.xml"/>
+ <mapping resource="org/jbpm/taskmgmt/log/SwimlaneLog.hbm.xml"/>
+ <mapping resource="org/jbpm/taskmgmt/log/SwimlaneCreateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/taskmgmt/log/SwimlaneAssignLog.hbm.xml"/>
Property changes on: jbossbpm/impl/jbpm3/trunk/modules/jpdl/core/src/main/resources/hibernate.mapping.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbossbpm/impl/jbpm3/trunk/modules/jpdl/core/src/main/resources/hibernate.properties.xml
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/jpdl/core/src/main/resources/hibernate.properties.xml (rev 0)
+++ jbossbpm/impl/jbpm3/trunk/modules/jpdl/core/src/main/resources/hibernate.properties.xml 2008-07-29 09:49:33 UTC (rev 1745)
@@ -0,0 +1,38 @@
+<!--
+ ==================================================================================
+ START org.jboss.jbpm:jbpm-jpdl-core src/main/resources/hibernate.cfg.xml
+ ==================================================================================
+-->
+ <!-- hibernate dialect -->
+ <property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
+
+ <!-- JDBC connection properties (begin) -->
+ <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
+ <property name="hibernate.connection.url">jdbc:hsqldb:mem:jbpm</property>
+ <property name="hibernate.connection.username">sa</property>
+ <property name="hibernate.connection.password"></property>
+ <!-- JDBC connection properties (end) -->
+
+ <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
+
+ <property name="hibernate.hbm2ddl.auto">create</property>
+
+ <!-- DataSource properties (begin) ===
+ <property name="hibernate.connection.datasource">java:comp/env/jdbc/JbpmDataSource</property>
+ ==== DataSource properties (end) -->
+
+ <!-- JTA transaction properties (begin) ===
+ <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
+ <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
+ ==== JTA transaction properties (end) -->
+
+ <!-- CMT transaction properties (begin) ===
+ <property name="hibernate.transaction.factory_class">org.hibernate.transaction.CMTTransactionFactory</property>
+ <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
+ ==== CMT transaction properties (end) -->
+
+ <!-- logging properties (begin) ===
+ <property name="hibernate.show_sql">true</property>
+ <property name="hibernate.format_sql">true</property>
+ <property name="hibernate.use_sql_comments">true</property>
+ ==== logging properties (end) -->
\ No newline at end of file
Property changes on: jbossbpm/impl/jbpm3/trunk/modules/jpdl/core/src/main/resources/hibernate.properties.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted: jbossbpm/impl/jbpm3/trunk/modules/jpdl/examples/src/test/resources/assignment/hibernate.cfg.xml
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/jpdl/examples/src/test/resources/assignment/hibernate.cfg.xml 2008-07-29 09:44:52 UTC (rev 1744)
+++ jbossbpm/impl/jbpm3/trunk/modules/jpdl/examples/src/test/resources/assignment/hibernate.cfg.xml 2008-07-29 09:49:33 UTC (rev 1745)
@@ -1,193 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-
-<!DOCTYPE hibernate-configuration PUBLIC
- "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
- "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
-
-<hibernate-configuration>
- <session-factory>
-
- <!-- hibernate dialect -->
- <property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
-
- <!-- JDBC connection properties (begin) -->
- <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
- <property name="hibernate.connection.url">jdbc:hsqldb:mem:jbpm</property>
- <property name="hibernate.connection.username">sa</property>
- <property name="hibernate.connection.password"></property>
- <!-- JDBC connection properties (end) -->
-
- <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
-
- <!-- DataSource properties (begin) ===
- <property name="hibernate.connection.datasource">java:/JbpmDS</property>
- ==== DataSource properties (end) -->
-
- <!-- JTA transaction properties (begin) ===
- <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
- <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
- ==== JTA transaction properties (end) -->
-
- <!-- CMT transaction properties (begin) ===
- <property name="hibernate.transaction.factory_class">org.hibernate.transaction.CMTTransactionFactory</property>
- <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
- ==== CMT transaction properties (end) -->
-
- <!-- logging properties (begin) ===
- <property name="hibernate.show_sql">true</property>
- <property name="hibernate.format_sql">true</property>
- <property name="hibernate.use_sql_comments">true</property>
- ==== logging properties (end) -->
-
- <!-- ############################################ -->
- <!-- # mapping files with external dependencies # -->
- <!-- ############################################ -->
-
- <!-- following mapping file has a dependendy on -->
- <!-- 'bsh-{version}.jar'. -->
- <!-- uncomment this if you don't have bsh on your -->
- <!-- classpath. you won't be able to use the -->
- <!-- script element in process definition files -->
- <mapping resource="org/jbpm/graph/action/Script.hbm.xml"/>
-
- <!-- following mapping files have a dependendy on -->
- <!-- 'jbpm-identity.jar', mapping files -->
- <!-- of the pluggable jbpm identity component. -->
- <!-- Uncomment the following 3 lines if you -->
- <!-- want to use the jBPM identity mgmgt -->
- <!-- component. -->
- <!-- identity mappings (begin) -->
- <mapping resource="org/jbpm/identity/User.hbm.xml"/>
- <mapping resource="org/jbpm/identity/Group.hbm.xml"/>
- <mapping resource="org/jbpm/identity/Membership.hbm.xml"/>
- <!-- identity mappings (end) -->
-
- <!-- following mapping files have a dependendy on -->
- <!-- the JCR API -->
- <!-- jcr mappings (begin) ===
- <mapping resource="org/jbpm/context/exe/variableinstance/JcrNodeInstance.hbm.xml"/>
- ==== jcr mappings (end) -->
-
-
- <!-- ###################### -->
- <!-- # jbpm mapping files # -->
- <!-- ###################### -->
-
- <!-- hql queries and type defs -->
- <mapping resource="org/jbpm/db/hibernate.queries.hbm.xml" />
-
- <!-- graph.action mapping files -->
- <mapping resource="org/jbpm/graph/action/MailAction.hbm.xml"/>
-
- <!-- graph.def mapping files -->
- <mapping resource="org/jbpm/graph/def/ProcessDefinition.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/Node.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/Transition.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/Event.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/Action.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/SuperState.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/ExceptionHandler.hbm.xml"/>
- <mapping resource="org/jbpm/instantiation/Delegation.hbm.xml"/>
-
- <!-- graph.node mapping files -->
- <mapping resource="org/jbpm/graph/node/StartState.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/EndState.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/ProcessState.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/Decision.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/Fork.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/Join.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/MailNode.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/State.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/TaskNode.hbm.xml"/>
-
- <!-- context.def mapping files -->
- <mapping resource="org/jbpm/context/def/ContextDefinition.hbm.xml"/>
- <mapping resource="org/jbpm/context/def/VariableAccess.hbm.xml"/>
-
- <!-- taskmgmt.def mapping files -->
- <mapping resource="org/jbpm/taskmgmt/def/TaskMgmtDefinition.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/def/Swimlane.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/def/Task.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/def/TaskController.hbm.xml"/>
-
- <!-- module.def mapping files -->
- <mapping resource="org/jbpm/module/def/ModuleDefinition.hbm.xml"/>
-
- <!-- bytes mapping files -->
- <mapping resource="org/jbpm/bytes/ByteArray.hbm.xml"/>
-
- <!-- file.def mapping files -->
- <mapping resource="org/jbpm/file/def/FileDefinition.hbm.xml"/>
-
- <!-- scheduler.def mapping files -->
- <mapping resource="org/jbpm/scheduler/def/CreateTimerAction.hbm.xml"/>
- <mapping resource="org/jbpm/scheduler/def/CancelTimerAction.hbm.xml"/>
-
- <!-- graph.exe mapping files -->
- <mapping resource="org/jbpm/graph/exe/Comment.hbm.xml"/>
- <mapping resource="org/jbpm/graph/exe/ProcessInstance.hbm.xml"/>
- <mapping resource="org/jbpm/graph/exe/Token.hbm.xml"/>
- <mapping resource="org/jbpm/graph/exe/RuntimeAction.hbm.xml"/>
-
- <!-- module.exe mapping files -->
- <mapping resource="org/jbpm/module/exe/ModuleInstance.hbm.xml"/>
-
- <!-- context.exe mapping files -->
- <mapping resource="org/jbpm/context/exe/ContextInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/TokenVariableMap.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/VariableInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/ByteArrayInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/DateInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/DoubleInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/HibernateLongInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/HibernateStringInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/LongInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/NullInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/StringInstance.hbm.xml"/>
-
- <!-- job mapping files -->
- <mapping resource="org/jbpm/job/Job.hbm.xml"/>
- <mapping resource="org/jbpm/job/Timer.hbm.xml"/>
- <mapping resource="org/jbpm/job/ExecuteNodeJob.hbm.xml"/>
- <mapping resource="org/jbpm/job/ExecuteActionJob.hbm.xml"/>
-
- <!-- taskmgmt.exe mapping files -->
- <mapping resource="org/jbpm/taskmgmt/exe/TaskMgmtInstance.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/exe/TaskInstance.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/exe/PooledActor.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/exe/SwimlaneInstance.hbm.xml"/>
-
- <!-- logging mapping files -->
- <mapping resource="org/jbpm/logging/log/ProcessLog.hbm.xml"/>
- <mapping resource="org/jbpm/logging/log/MessageLog.hbm.xml"/>
- <mapping resource="org/jbpm/logging/log/CompositeLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/ActionLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/NodeLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/ProcessInstanceCreateLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/ProcessInstanceEndLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/ProcessStateLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/SignalLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/TokenCreateLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/TokenEndLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/TransitionLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/VariableLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/VariableCreateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/VariableDeleteLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/VariableUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/ByteArrayUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/DateUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/DoubleUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/HibernateLongUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/HibernateStringUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/LongUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/StringUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/TaskLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/TaskCreateLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/TaskAssignLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/TaskEndLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/SwimlaneLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/SwimlaneCreateLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/SwimlaneAssignLog.hbm.xml"/>
-
- </session-factory>
-</hibernate-configuration>
Deleted: jbossbpm/impl/jbpm3/trunk/modules/jpdl/examples/src/test/resources/assignment/jbpm.cfg.xml
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/jpdl/examples/src/test/resources/assignment/jbpm.cfg.xml 2008-07-29 09:44:52 UTC (rev 1744)
+++ jbossbpm/impl/jbpm3/trunk/modules/jpdl/examples/src/test/resources/assignment/jbpm.cfg.xml 2008-07-29 09:49:33 UTC (rev 1745)
@@ -1,9 +0,0 @@
-<jbpm-configuration>
-
- <!--
- The default configurations can be found in org/jbpm/default.jbpm.cfg.xml
- Those configurations can be overwritten by putting this file called
- jbpm.cfg.xml on the root of the classpath and put in the customized values.
- -->
-
-</jbpm-configuration>
Deleted: jbossbpm/impl/jbpm3/trunk/modules/jpdl/examples/src/test/resources/rulesaction/hibernate.cfg.xml
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/jpdl/examples/src/test/resources/rulesaction/hibernate.cfg.xml 2008-07-29 09:44:52 UTC (rev 1744)
+++ jbossbpm/impl/jbpm3/trunk/modules/jpdl/examples/src/test/resources/rulesaction/hibernate.cfg.xml 2008-07-29 09:49:33 UTC (rev 1745)
@@ -1,193 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-
-<!DOCTYPE hibernate-configuration PUBLIC
- "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
- "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
-
-<hibernate-configuration>
- <session-factory>
-
- <!-- hibernate dialect -->
- <property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
-
- <!-- JDBC connection properties (begin) -->
- <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
- <property name="hibernate.connection.url">jdbc:hsqldb:mem:jbpm</property>
- <property name="hibernate.connection.username">sa</property>
- <property name="hibernate.connection.password"></property>
- <!-- JDBC connection properties (end) -->
-
- <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
-
- <!-- DataSource properties (begin) ===
- <property name="hibernate.connection.datasource">java:/JbpmDS</property>
- ==== DataSource properties (end) -->
-
- <!-- JTA transaction properties (begin) ===
- <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
- <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
- ==== JTA transaction properties (end) -->
-
- <!-- CMT transaction properties (begin) ===
- <property name="hibernate.transaction.factory_class">org.hibernate.transaction.CMTTransactionFactory</property>
- <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
- ==== CMT transaction properties (end) -->
-
- <!-- logging properties (begin) ===
- <property name="hibernate.show_sql">true</property>
- <property name="hibernate.format_sql">true</property>
- <property name="hibernate.use_sql_comments">true</property>
- ==== logging properties (end) -->
-
- <!-- ############################################ -->
- <!-- # mapping files with external dependencies # -->
- <!-- ############################################ -->
-
- <!-- following mapping file has a dependendy on -->
- <!-- 'bsh-{version}.jar'. -->
- <!-- uncomment this if you don't have bsh on your -->
- <!-- classpath. you won't be able to use the -->
- <!-- script element in process definition files -->
- <mapping resource="org/jbpm/graph/action/Script.hbm.xml"/>
-
- <!-- following mapping files have a dependendy on -->
- <!-- 'jbpm-identity.jar', mapping files -->
- <!-- of the pluggable jbpm identity component. -->
- <!-- Uncomment the following 3 lines if you -->
- <!-- want to use the jBPM identity mgmgt -->
- <!-- component. -->
- <!-- identity mappings (begin) -->
- <mapping resource="org/jbpm/identity/User.hbm.xml"/>
- <mapping resource="org/jbpm/identity/Group.hbm.xml"/>
- <mapping resource="org/jbpm/identity/Membership.hbm.xml"/>
- <!-- identity mappings (end) -->
-
- <!-- following mapping files have a dependendy on -->
- <!-- the JCR API -->
- <!-- jcr mappings (begin) ===
- <mapping resource="org/jbpm/context/exe/variableinstance/JcrNodeInstance.hbm.xml"/>
- ==== jcr mappings (end) -->
-
-
- <!-- ###################### -->
- <!-- # jbpm mapping files # -->
- <!-- ###################### -->
-
- <!-- hql queries and type defs -->
- <mapping resource="org/jbpm/db/hibernate.queries.hbm.xml" />
-
- <!-- graph.action mapping files -->
- <mapping resource="org/jbpm/graph/action/MailAction.hbm.xml"/>
-
- <!-- graph.def mapping files -->
- <mapping resource="org/jbpm/graph/def/ProcessDefinition.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/Node.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/Transition.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/Event.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/Action.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/SuperState.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/ExceptionHandler.hbm.xml"/>
- <mapping resource="org/jbpm/instantiation/Delegation.hbm.xml"/>
-
- <!-- graph.node mapping files -->
- <mapping resource="org/jbpm/graph/node/StartState.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/EndState.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/ProcessState.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/Decision.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/Fork.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/Join.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/MailNode.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/State.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/TaskNode.hbm.xml"/>
-
- <!-- context.def mapping files -->
- <mapping resource="org/jbpm/context/def/ContextDefinition.hbm.xml"/>
- <mapping resource="org/jbpm/context/def/VariableAccess.hbm.xml"/>
-
- <!-- taskmgmt.def mapping files -->
- <mapping resource="org/jbpm/taskmgmt/def/TaskMgmtDefinition.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/def/Swimlane.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/def/Task.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/def/TaskController.hbm.xml"/>
-
- <!-- module.def mapping files -->
- <mapping resource="org/jbpm/module/def/ModuleDefinition.hbm.xml"/>
-
- <!-- bytes mapping files -->
- <mapping resource="org/jbpm/bytes/ByteArray.hbm.xml"/>
-
- <!-- file.def mapping files -->
- <mapping resource="org/jbpm/file/def/FileDefinition.hbm.xml"/>
-
- <!-- scheduler.def mapping files -->
- <mapping resource="org/jbpm/scheduler/def/CreateTimerAction.hbm.xml"/>
- <mapping resource="org/jbpm/scheduler/def/CancelTimerAction.hbm.xml"/>
-
- <!-- graph.exe mapping files -->
- <mapping resource="org/jbpm/graph/exe/Comment.hbm.xml"/>
- <mapping resource="org/jbpm/graph/exe/ProcessInstance.hbm.xml"/>
- <mapping resource="org/jbpm/graph/exe/Token.hbm.xml"/>
- <mapping resource="org/jbpm/graph/exe/RuntimeAction.hbm.xml"/>
-
- <!-- module.exe mapping files -->
- <mapping resource="org/jbpm/module/exe/ModuleInstance.hbm.xml"/>
-
- <!-- context.exe mapping files -->
- <mapping resource="org/jbpm/context/exe/ContextInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/TokenVariableMap.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/VariableInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/ByteArrayInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/DateInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/DoubleInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/HibernateLongInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/HibernateStringInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/LongInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/NullInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/StringInstance.hbm.xml"/>
-
- <!-- job mapping files -->
- <mapping resource="org/jbpm/job/Job.hbm.xml"/>
- <mapping resource="org/jbpm/job/Timer.hbm.xml"/>
- <mapping resource="org/jbpm/job/ExecuteNodeJob.hbm.xml"/>
- <mapping resource="org/jbpm/job/ExecuteActionJob.hbm.xml"/>
-
- <!-- taskmgmt.exe mapping files -->
- <mapping resource="org/jbpm/taskmgmt/exe/TaskMgmtInstance.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/exe/TaskInstance.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/exe/PooledActor.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/exe/SwimlaneInstance.hbm.xml"/>
-
- <!-- logging mapping files -->
- <mapping resource="org/jbpm/logging/log/ProcessLog.hbm.xml"/>
- <mapping resource="org/jbpm/logging/log/MessageLog.hbm.xml"/>
- <mapping resource="org/jbpm/logging/log/CompositeLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/ActionLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/NodeLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/ProcessInstanceCreateLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/ProcessInstanceEndLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/ProcessStateLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/SignalLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/TokenCreateLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/TokenEndLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/TransitionLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/VariableLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/VariableCreateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/VariableDeleteLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/VariableUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/ByteArrayUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/DateUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/DoubleUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/HibernateLongUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/HibernateStringUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/LongUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/StringUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/TaskLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/TaskCreateLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/TaskAssignLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/TaskEndLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/SwimlaneLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/SwimlaneCreateLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/SwimlaneAssignLog.hbm.xml"/>
-
- </session-factory>
-</hibernate-configuration>
Deleted: jbossbpm/impl/jbpm3/trunk/modules/jpdl/examples/src/test/resources/rulesaction/jbpm.cfg.xml
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/jpdl/examples/src/test/resources/rulesaction/jbpm.cfg.xml 2008-07-29 09:44:52 UTC (rev 1744)
+++ jbossbpm/impl/jbpm3/trunk/modules/jpdl/examples/src/test/resources/rulesaction/jbpm.cfg.xml 2008-07-29 09:49:33 UTC (rev 1745)
@@ -1,9 +0,0 @@
-<jbpm-configuration>
-
- <!--
- The default configurations can be found in org/jbpm/default.jbpm.cfg.xml
- Those configurations can be overwritten by putting this file called
- jbpm.cfg.xml on the root of the classpath and put in the customized values.
- -->
-
-</jbpm-configuration>
Modified: jbossbpm/impl/jbpm3/trunk/modules/jpdl/identity/pom.xml
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/jpdl/identity/pom.xml 2008-07-29 09:44:52 UTC (rev 1744)
+++ jbossbpm/impl/jbpm3/trunk/modules/jpdl/identity/pom.xml 2008-07-29 09:49:33 UTC (rev 1745)
@@ -12,66 +12,144 @@
<!-- $Id$ -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <name>JBoss jBPM - jPDL Identity</name>
- <groupId>org.jboss.jbpm</groupId>
- <artifactId>jbpm-jpdl-identity</artifactId>
- <packaging>jar</packaging>
-
- <!-- Parent -->
- <parent>
- <groupId>org.jboss.jbpm</groupId>
- <artifactId>jbpm-jpdl</artifactId>
- <version>3.3.0-SNAPSHOT</version>
- </parent>
-
- <!-- Dependencies -->
- <dependencies>
- <!-- jBPM Dependencies -->
- <dependency>
+ 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 - jPDL Identity</name>
+ <groupId>org.jboss.jbpm</groupId>
+ <artifactId>jbpm-jpdl-identity</artifactId>
+ <packaging>jar</packaging>
+
+ <!-- Parent -->
+ <parent>
<groupId>org.jboss.jbpm</groupId>
- <artifactId>jbpm-jpdl-core</artifactId>
- <version>${version}</version>
- </dependency>
-
- <!-- Test Dependencies -->
- <dependency>
- <groupId>hsqldb</groupId>
- <artifactId>hsqldb</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <!-- Plugins -->
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <showDeprecation>false</showDeprecation>
- </configuration>
- </plugin>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <excludes>
- <!-- Tests not part of AllTests -->
- <exclude>org/jbpm/identity/IdentityDbTestCase.java</exclude>
- </excludes>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </project>
\ No newline at end of file
+ <artifactId>jbpm-jpdl</artifactId>
+ <version>3.3.0-SNAPSHOT</version>
+ </parent>
+
+ <!-- Dependencies -->
+ <dependencies>
+ <!-- jBPM Dependencies -->
+ <dependency>
+ <groupId>org.jboss.jbpm</groupId>
+ <artifactId>jbpm-jpdl-core</artifactId>
+ <version>${version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.jbpm</groupId>
+ <artifactId>jbpm-jpdl-core</artifactId>
+ <classifier>config</classifier>
+ <version>${version}</version>
+ </dependency>
+
+ <!-- Test Dependencies -->
+ <dependency>
+ <groupId>hsqldb</groupId>
+ <artifactId>hsqldb</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <!-- Plugins -->
+ <build>
+ <resources>
+ <resource>
+ <targetPath>/</targetPath>
+ <filtering>false</filtering>
+ <directory>${basedir}/src/main/resources</directory>
+ <excludes>
+ <exclude>hibernate.mapping.xml</exclude>
+ </excludes>
+ </resource>
+ </resources>
+
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <finalName>${project.build.finalName}</finalName>
+ <appendAssemblyId>true</appendAssemblyId>
+ <descriptors>
+ <descriptor>src/main/scripts/assembly-config.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <showDeprecation>false</showDeprecation>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <excludes>
+ <!-- Tests not part of AllTests -->
+ <exclude>org/jbpm/identity/IdentityDbTestCase.java</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-dependencies</id>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>unpack</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.jboss.jbpm</groupId>
+ <artifactId>jbpm-jpdl-core</artifactId>
+ <version>${version}</version>
+ <classifier>config</classifier>
+ <type>jar</type>
+ <outputDirectory>${project.build.directory}/resources/jbpm-jpdl-core</outputDirectory>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <ant antfile="src/main/scripts/antrun-jbpm-config.xml"/>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Added: jbossbpm/impl/jbpm3/trunk/modules/jpdl/identity/src/main/resources/hibernate.mapping.xml
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/jpdl/identity/src/main/resources/hibernate.mapping.xml (rev 0)
+++ jbossbpm/impl/jbpm3/trunk/modules/jpdl/identity/src/main/resources/hibernate.mapping.xml 2008-07-29 09:49:33 UTC (rev 1745)
@@ -0,0 +1,16 @@
+<!--
+ ==================================================================================
+ START org.jboss.jbpm:jbpm-jpdl-identity src/main/resources/hibernate.cfg.xml
+ ==================================================================================
+-->
+
+ <!-- identity mappings -->
+ <mapping resource="org/jbpm/identity/User.hbm.xml"/>
+ <mapping resource="org/jbpm/identity/Group.hbm.xml"/>
+ <mapping resource="org/jbpm/identity/Membership.hbm.xml"/>
+
+<!--
+ ==================================================================================
+ END org.jboss.jbpm:jbpm-jpdl-identity src/main/resources/hibernate.cfg.xml
+ ==================================================================================
+ -->
\ No newline at end of file
Property changes on: jbossbpm/impl/jbpm3/trunk/modules/jpdl/identity/src/main/resources/hibernate.mapping.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbossbpm/impl/jbpm3/trunk/modules/jpdl/identity/src/main/scripts/antrun-jbpm-config.xml
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/jpdl/identity/src/main/scripts/antrun-jbpm-config.xml (rev 0)
+++ jbossbpm/impl/jbpm3/trunk/modules/jpdl/identity/src/main/scripts/antrun-jbpm-config.xml 2008-07-29 09:49:33 UTC (rev 1745)
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ====================================================================== -->
+<!-- -->
+<!-- JBoss, the OpenSource J2EE webOS -->
+<!-- -->
+<!-- Distributable under LGPL license. -->
+<!-- See terms of license at http://www.gnu.org. -->
+<!-- -->
+<!-- ====================================================================== -->
+
+<!-- $Id$ -->
+
+<project default="main">
+
+ <property name="project.resources.directory" value="${basedir}/src/main/resources"/>
+ <property name="project.build.directory" value="${basedir}/target"/>
+ <property name="project.build.resources.directory" value="${project.build.directory}/resources"/>
+ <property name="project.build.classes.directory" value="${project.build.directory}/classes"/>
+
+ <property name="thirdparty.dir" value="${project.build.directory}/thirdparty"/>
+
+ <!-- ================================================================== -->
+ <!-- Initialization -->
+ <!-- ================================================================== -->
+
+ <target name="init">
+ </target>
+
+ <!-- Compile resource files -->
+ <target name="main" depends="init">
+
+ <!-- Concat hibernate.cfg.xml -->
+ <echo>==================</echo>
+ <echo message="Concat ${project.build.classes.directory}/hibernate.cfg.xml"/>
+ <echo>==================</echo>
+
+ <concat destfile="${project.build.classes.directory}/hibernate.cfg.xml">
+ <header trimleading="yes"><?xml version='1.0' encoding='utf-8'?>
+
+ <!DOCTYPE hibernate-configuration PUBLIC
+ "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
+
+ <hibernate-configuration>
+ <session-factory>
+ </header>
+ <fileset file="${project.build.resources.directory}/jbpm-jpdl-core/hibernate.properties.xml"/>
+ <fileset file="${project.build.resources.directory}/jbpm-jpdl-core/hibernate.mapping.xml"/>
+ <fileset file="${project.resources.directory}/hibernate.mapping.xml"/>
+ <fileset file="${project.build.resources.directory}/jbpm-jpdl-core/hibernate.cache.xml"/>
+ <footer trimleading="yes">
+ </session-factory>
+ </hibernate-configuration>
+ </footer>
+ </concat>
+
+ </target>
+
+</project>
Property changes on: jbossbpm/impl/jbpm3/trunk/modules/jpdl/identity/src/main/scripts/antrun-jbpm-config.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbossbpm/impl/jbpm3/trunk/modules/jpdl/identity/src/main/scripts/assembly-config.xml
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/jpdl/identity/src/main/scripts/assembly-config.xml (rev 0)
+++ jbossbpm/impl/jbpm3/trunk/modules/jpdl/identity/src/main/scripts/assembly-config.xml 2008-07-29 09:49:33 UTC (rev 1745)
@@ -0,0 +1,17 @@
+<assembly xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/assembly-1.1.0-SNAPSHOT.xsd">
+ <id>config</id>
+ <formats>
+ <format>jar</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <fileSets>
+ <fileSet>
+ <directory>src/main/resources</directory>
+ <outputDirectory>/</outputDirectory>
+ <includes>
+ <include>hibernate.mapping.xml</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+</assembly>
\ No newline at end of file
Property changes on: jbossbpm/impl/jbpm3/trunk/modules/jpdl/identity/src/main/scripts/assembly-config.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted: jbossbpm/impl/jbpm3/trunk/modules/jpdl/identity/src/test/resources/hibernate.cfg.xml
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/jpdl/identity/src/test/resources/hibernate.cfg.xml 2008-07-29 09:44:52 UTC (rev 1744)
+++ jbossbpm/impl/jbpm3/trunk/modules/jpdl/identity/src/test/resources/hibernate.cfg.xml 2008-07-29 09:49:33 UTC (rev 1745)
@@ -1,332 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-
-<!DOCTYPE hibernate-configuration PUBLIC
- "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
- "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
-
-<hibernate-configuration>
- <session-factory>
-
- <!-- hibernate dialect -->
- <property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
-
- <!-- JDBC connection properties (begin) -->
- <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
- <property name="hibernate.connection.url">jdbc:hsqldb:mem:jbpm</property>
- <property name="hibernate.connection.username">sa</property>
- <property name="hibernate.connection.password"></property>
- <!-- JDBC connection properties (end) -->
-
- <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
-
- <!-- DataSource properties (begin) ===
- <property name="hibernate.connection.datasource">java:comp/env/jdbc/JbpmDataSource</property>
- ==== DataSource properties (end) -->
-
- <!-- JTA transaction properties (begin) ===
- <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
- <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
- ==== JTA transaction properties (end) -->
-
- <!-- CMT transaction properties (begin) ===
- <property name="hibernate.transaction.factory_class">org.hibernate.transaction.CMTTransactionFactory</property>
- <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
- ==== CMT transaction properties (end) -->
-
- <!-- logging properties (begin) ===
- <property name="hibernate.show_sql">true</property>
- <property name="hibernate.format_sql">true</property>
- <property name="hibernate.use_sql_comments">true</property>
- ==== logging properties (end) -->
-
- <!-- ############################################ -->
- <!-- # mapping files with external dependencies # -->
- <!-- ############################################ -->
-
- <!-- following mapping files have a dependency on -->
- <!-- 'jbpm-identity.jar', mapping files -->
- <!-- of the pluggable jbpm identity component. -->
- <!-- Uncomment the following 3 lines if you -->
- <!-- want to use the jBPM identity mgmgt -->
- <!-- component. -->
- <!-- identity mappings (begin) -->
- <mapping resource="org/jbpm/identity/User.hbm.xml"/>
- <mapping resource="org/jbpm/identity/Group.hbm.xml"/>
- <mapping resource="org/jbpm/identity/Membership.hbm.xml"/>
- <!-- identity mappings (end) -->
-
- <!-- following mapping files have a dependency on -->
- <!-- the JCR API -->
- <!-- jcr mappings (begin) ===
- <mapping resource="org/jbpm/context/exe/variableinstance/JcrNodeInstance.hbm.xml"/>
- ==== jcr mappings (end) -->
-
-
- <!-- ###################### -->
- <!-- # jbpm mapping files # -->
- <!-- ###################### -->
-
- <!-- hql queries and type defs -->
- <mapping resource="org/jbpm/db/hibernate.queries.hbm.xml" />
- <!-- hql queries used in simulation for querying historical data
- uncomment if you want to use the GetSimulationInputCommand
- or maybe you also want to use the queries yourself
- be patient: the queries need the stddev function to be enabled in your dialect
- more information on this can be found here: http://www.camunda.com/business_process_simulation_news/mysql_and_stddev.... -->
- <!--
- <mapping resource="org/jbpm/sim/bam/hibernate.queries.hbm.xml" />
- -->
-
- <!-- graph.action mapping files -->
- <mapping resource="org/jbpm/graph/action/MailAction.hbm.xml"/>
-
- <!-- graph.def mapping files -->
- <mapping resource="org/jbpm/graph/def/ProcessDefinition.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/Node.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/Transition.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/Event.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/Action.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/SuperState.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/ExceptionHandler.hbm.xml"/>
- <mapping resource="org/jbpm/instantiation/Delegation.hbm.xml"/>
-
- <!-- ############################################ -->
- <!-- # another mapping file with external dependencies # -->
- <!-- ############################################ -->
- <!-- following mapping file has a dependency on -->
- <!-- 'bsh-{version}.jar'. -->
- <!-- uncomment this if you don't have bsh on your -->
- <!-- classpath. you won't be able to use the -->
- <!-- script element in process definition files -->
- <!-- has to be defined below org/jbpm/graph/def/Action.hbm.xml -->
- <!-- due to the inline collection-cache elements below -->
- <mapping resource="org/jbpm/graph/action/Script.hbm.xml"/>
-
- <!-- graph.node mapping files -->
- <mapping resource="org/jbpm/graph/node/StartState.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/EndState.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/ProcessState.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/Decision.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/Fork.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/Join.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/MailNode.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/State.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/TaskNode.hbm.xml"/>
-
- <!-- context.def mapping files -->
- <mapping resource="org/jbpm/context/def/ContextDefinition.hbm.xml"/>
- <mapping resource="org/jbpm/context/def/VariableAccess.hbm.xml"/>
-
- <!-- bytes mapping files -->
- <mapping resource="org/jbpm/bytes/ByteArray.hbm.xml"/>
-
- <!-- module.def mapping files -->
- <mapping resource="org/jbpm/module/def/ModuleDefinition.hbm.xml"/>
-
- <!-- file.def mapping files -->
- <mapping resource="org/jbpm/file/def/FileDefinition.hbm.xml"/>
-
- <!-- taskmgmt.def mapping files -->
- <mapping resource="org/jbpm/taskmgmt/def/TaskMgmtDefinition.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/def/Swimlane.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/def/Task.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/def/TaskController.hbm.xml"/>
-
- <!-- scheduler.def mapping files -->
- <mapping resource="org/jbpm/scheduler/def/CreateTimerAction.hbm.xml"/>
- <mapping resource="org/jbpm/scheduler/def/CancelTimerAction.hbm.xml"/>
-
- <!-- graph.exe mapping files -->
- <mapping resource="org/jbpm/graph/exe/Comment.hbm.xml"/>
- <mapping resource="org/jbpm/graph/exe/ProcessInstance.hbm.xml"/>
- <mapping resource="org/jbpm/graph/exe/Token.hbm.xml"/>
- <mapping resource="org/jbpm/graph/exe/RuntimeAction.hbm.xml"/>
-
- <!-- module.exe mapping files -->
- <mapping resource="org/jbpm/module/exe/ModuleInstance.hbm.xml"/>
-
- <!-- context.exe mapping files -->
- <mapping resource="org/jbpm/context/exe/ContextInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/TokenVariableMap.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/VariableInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/ByteArrayInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/DateInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/DoubleInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/HibernateLongInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/HibernateStringInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/LongInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/NullInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/StringInstance.hbm.xml"/>
-
- <!-- job mapping files -->
- <mapping resource="org/jbpm/job/Job.hbm.xml"/>
- <mapping resource="org/jbpm/job/Timer.hbm.xml"/>
- <mapping resource="org/jbpm/job/ExecuteNodeJob.hbm.xml"/>
- <mapping resource="org/jbpm/job/ExecuteActionJob.hbm.xml"/>
-
- <!-- taskmgmt.exe mapping files -->
- <mapping resource="org/jbpm/taskmgmt/exe/TaskMgmtInstance.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/exe/TaskInstance.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/exe/PooledActor.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/exe/SwimlaneInstance.hbm.xml"/>
-
- <!-- logging mapping files -->
- <mapping resource="org/jbpm/logging/log/ProcessLog.hbm.xml"/>
- <mapping resource="org/jbpm/logging/log/MessageLog.hbm.xml"/>
- <mapping resource="org/jbpm/logging/log/CompositeLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/ActionLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/NodeLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/ProcessInstanceCreateLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/ProcessInstanceEndLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/ProcessStateLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/SignalLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/TokenCreateLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/TokenEndLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/TransitionLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/VariableLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/VariableCreateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/VariableDeleteLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/VariableUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/ByteArrayUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/DateUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/DoubleUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/HibernateLongUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/HibernateStringUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/LongUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/StringUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/TaskLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/TaskCreateLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/TaskAssignLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/TaskEndLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/SwimlaneLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/SwimlaneCreateLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/SwimlaneAssignLog.hbm.xml"/>
-
- <!-- ################################### -->
- <!-- # cache settings # -->
- <!-- # strategy="nonstrict-read-write" # -->
- <!-- # can be used with hibernate.cache.provider_class=org.hibernate.cache.HashtableCacheProvider # -->
- <!-- ################################### -->
-
- <class-cache class="org.jbpm.context.def.VariableAccess" usage="nonstrict-read-write" />
-
- <collection-cache collection="org.jbpm.file.def.FileDefinition.processFiles" usage="nonstrict-read-write" />
-
- <collection-cache collection="org.jbpm.graph.action.Script.variableAccesses" usage="nonstrict-read-write" />
-
- <class-cache class="org.jbpm.graph.def.Action" usage="nonstrict-read-write" />
-
- <class-cache class="org.jbpm.graph.def.Event" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.Event.actions" usage="nonstrict-read-write" />
-
- <class-cache class="org.jbpm.graph.def.ExceptionHandler" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.ExceptionHandler.actions" usage="nonstrict-read-write" />
-
- <class-cache class="org.jbpm.graph.def.Node" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.Node.events" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.Node.exceptionHandlers" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.Node.leavingTransitions" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.Node.arrivingTransitions" usage="nonstrict-read-write" />
-
- <class-cache class="org.jbpm.graph.def.ProcessDefinition" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.events" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.exceptionHandlers" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.nodes" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.actions" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.definitions" usage="nonstrict-read-write" />
-
- <collection-cache collection="org.jbpm.graph.def.SuperState.nodes" usage="nonstrict-read-write" />
-
- <class-cache class="org.jbpm.graph.def.Transition" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.Transition.events" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.Transition.exceptionHandlers" usage="nonstrict-read-write" />
-
- <collection-cache collection="org.jbpm.graph.node.Decision.decisionConditions" usage="nonstrict-read-write" />
-
- <collection-cache collection="org.jbpm.graph.node.ProcessState.variableAccesses" usage="nonstrict-read-write" />
-
- <collection-cache collection="org.jbpm.graph.node.TaskNode.tasks" usage="nonstrict-read-write" />
-
- <class-cache class="org.jbpm.instantiation.Delegation" usage="nonstrict-read-write" />
-
- <class-cache class="org.jbpm.module.def.ModuleDefinition" usage="nonstrict-read-write" />
-
- <collection-cache collection="org.jbpm.taskmgmt.def.Swimlane.tasks" usage="nonstrict-read-write" />
-
- <class-cache class="org.jbpm.taskmgmt.def.TaskController" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.taskmgmt.def.TaskController.variableAccesses" usage="nonstrict-read-write" />
-
- <class-cache class="org.jbpm.taskmgmt.def.Task" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.taskmgmt.def.Task.events" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.taskmgmt.def.Task.exceptionHandlers" usage="nonstrict-read-write" />
-
- <collection-cache collection="org.jbpm.taskmgmt.def.TaskMgmtDefinition.swimlanes" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.taskmgmt.def.TaskMgmtDefinition.tasks" usage="nonstrict-read-write" />
-
- <!-- ############################ -->
- <!-- # cache settings # -->
- <!-- # strategy="transactional" # -->
- <!-- # can be used with hibernate.cache.provider_class=org.hibernate.cache.TreeCacheProvider # -->
- <!-- ############################ -->
-
- <!--
-
- <class-cache class="org.jbpm.context.def.VariableAccess" usage="transactional" />
-
- <collection-cache collection="org.jbpm.file.def.FileDefinition.processFiles" usage="transactional" />
-
- <collection-cache collection="org.jbpm.graph.action.Script.variableAccesses" usage="transactional" />
-
- <class-cache class="org.jbpm.graph.def.Action" usage="transactional" />
-
- <class-cache class="org.jbpm.graph.def.Event" usage="transactional" />
- <collection-cache collection="org.jbpm.graph.def.Event.actions" usage="transactional" />
-
- <class-cache class="org.jbpm.graph.def.ExceptionHandler" usage="transactional" />
- <collection-cache collection="org.jbpm.graph.def.ExceptionHandler.actions" usage="transactional" />
-
- <class-cache class="org.jbpm.graph.def.Node" usage="transactional" />
- <collection-cache collection="org.jbpm.graph.def.Node.events" usage="transactional" />
- <collection-cache collection="org.jbpm.graph.def.Node.exceptionHandlers" usage="transactional" />
- <collection-cache collection="org.jbpm.graph.def.Node.leavingTransitions" usage="transactional" />
- <collection-cache collection="org.jbpm.graph.def.Node.arrivingTransitions" usage="transactional" />
-
- <class-cache class="org.jbpm.graph.def.ProcessDefinition" usage="transactional" />
- <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.events" usage="transactional" />
- <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.exceptionHandlers" usage="transactional" />
- <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.nodes" usage="transactional" />
- <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.actions" usage="transactional" />
- <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.definitions" usage="transactional" />
-
- <collection-cache collection="org.jbpm.graph.def.SuperState.nodes" usage="transactional" />
-
- <class-cache class="org.jbpm.graph.def.Transition" usage="transactional" />
- <collection-cache collection="org.jbpm.graph.def.Transition.events" usage="transactional" />
- <collection-cache collection="org.jbpm.graph.def.Transition.exceptionHandlers" usage="transactional" />
-
- <collection-cache collection="org.jbpm.graph.node.Decision.decisionConditions" usage="transactional" />
-
- <collection-cache collection="org.jbpm.graph.node.ProcessState.variableAccesses" usage="transactional" />
-
- <collection-cache collection="org.jbpm.graph.node.TaskNode.tasks" usage="transactional" />
-
- <class-cache class="org.jbpm.instantiation.Delegation" usage="transactional" />
-
- <class-cache class="org.jbpm.module.def.ModuleDefinition" usage="transactional" />
-
- <collection-cache collection="org.jbpm.taskmgmt.def.Swimlane.tasks" usage="transactional" />
-
- <class-cache class="org.jbpm.taskmgmt.def.TaskController" usage="transactional" />
- <collection-cache collection="org.jbpm.taskmgmt.def.TaskController.variableAccesses" usage="transactional" />
-
- <class-cache class="org.jbpm.taskmgmt.def.Task" usage="transactional" />
- <collection-cache collection="org.jbpm.taskmgmt.def.Task.events" usage="transactional" />
- <collection-cache collection="org.jbpm.taskmgmt.def.Task.exceptionHandlers" usage="transactional" />
-
- <collection-cache collection="org.jbpm.taskmgmt.def.TaskMgmtDefinition.swimlanes" usage="transactional" />
- <collection-cache collection="org.jbpm.taskmgmt.def.TaskMgmtDefinition.tasks" usage="transactional" />
-
- -->
-
- </session-factory>
-</hibernate-configuration>
Deleted: jbossbpm/impl/jbpm3/trunk/modules/jpdl/identity/src/test/resources/jbpm.cfg.xml
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/jpdl/identity/src/test/resources/jbpm.cfg.xml 2008-07-29 09:44:52 UTC (rev 1744)
+++ jbossbpm/impl/jbpm3/trunk/modules/jpdl/identity/src/test/resources/jbpm.cfg.xml 2008-07-29 09:49:33 UTC (rev 1745)
@@ -1,9 +0,0 @@
-<jbpm-configuration>
-
- <!--
- The default configurations can be found in org/jbpm/default.jbpm.cfg.xml
- Those configurations can be overwritten by putting this file called
- jbpm.cfg.xml on the root of the classpath and put in the customized values.
- -->
-
-</jbpm-configuration>
Deleted: jbossbpm/impl/jbpm3/trunk/modules/jpdl/ws/src/main/resources/hibernate.cfg.xml
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/jpdl/ws/src/main/resources/hibernate.cfg.xml 2008-07-29 09:44:52 UTC (rev 1744)
+++ jbossbpm/impl/jbpm3/trunk/modules/jpdl/ws/src/main/resources/hibernate.cfg.xml 2008-07-29 09:49:33 UTC (rev 1745)
@@ -1,336 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-
-<!DOCTYPE hibernate-configuration PUBLIC
- "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
- "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
-
-<hibernate-configuration>
- <session-factory>
-
- <!-- hibernate dialect -->
- <property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
-
- <!-- JDBC connection properties (begin) ===
- <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
- <property name="hibernate.connection.url">jdbc:hsqldb:mem:jbpm</property>
- <property name="hibernate.connection.username">sa</property>
- <property name="hibernate.connection.password"></property>
- ==== JDBC connection properties (end) -->
-
- <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
-
- <!-- DataSource properties (begin) -->
- <property name="hibernate.connection.datasource">java:JbpmDS</property>
- <!-- DataSource properties (end) -->
-
- <!-- JTA transaction properties (begin) ===
- <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
- <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
- ==== JTA transaction properties (end) -->
-
- <!-- CMT transaction properties (begin) ===
- <property name="hibernate.transaction.factory_class">org.hibernate.transaction.CMTTransactionFactory</property>
- <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
- ==== CMT transaction properties (end) -->
-
- <!-- logging properties (begin) ===
- <property name="hibernate.show_sql">true</property>
- <property name="hibernate.format_sql">true</property>
- <property name="hibernate.use_sql_comments">true</property>
- ==== logging properties (end) -->
-
- <!-- ############################################ -->
- <!-- # mapping files with external dependencies # -->
- <!-- ############################################ -->
-
- <!-- following mapping files have a dependendy on -->
- <!-- 'jbpm-identity.jar', mapping files -->
- <!-- of the pluggable jbpm identity component. -->
- <!-- Uncomment the following 3 lines if you -->
- <!-- want to use the jBPM identity mgmgt -->
- <!-- component. -->
- <!-- identity mappings (begin) -->
- <mapping resource="org/jbpm/identity/User.hbm.xml"/>
- <mapping resource="org/jbpm/identity/Group.hbm.xml"/>
- <mapping resource="org/jbpm/identity/Membership.hbm.xml"/>
- <!-- identity mappings (end) -->
-
- <!-- following mapping files have a dependendy on -->
- <!-- the JCR API -->
- <!-- jcr mappings (begin) ===
- <mapping resource="org/jbpm/context/exe/variableinstance/JcrNodeInstance.hbm.xml"/>
- ==== jcr mappings (end) -->
-
-
- <!-- ###################### -->
- <!-- # jbpm mapping files # -->
- <!-- ###################### -->
-
- <!-- hql queries and type defs -->
- <mapping resource="org/jbpm/db/hibernate.queries.hbm.xml" />
- <!-- hql queries used in simulation for quering historical data
- uncomment if you want to use the GetSimulationInputCommand
- or maybe you also want to use the queries yourself
- be patient: the queries need the stddev function to be enabled in your dialect
- more information on this can be found here: http://www.camunda.com/business_process_simulation_news/mysql_and_stddev.... -->
- <!--
- <mapping resource="org/jbpm/sim/bam/hibernate.queries.hbm.xml" />
- -->
-
- <!-- graph.action mapping files -->
- <mapping resource="org/jbpm/graph/action/MailAction.hbm.xml"/>
-
- <!-- graph.def mapping files -->
- <mapping resource="org/jbpm/graph/def/ProcessDefinition.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/Node.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/Transition.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/Event.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/Action.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/SuperState.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/ExceptionHandler.hbm.xml"/>
- <mapping resource="org/jbpm/instantiation/Delegation.hbm.xml"/>
-
- <!-- ############################################ -->
- <!-- # another mapping file with external dependencies # -->
- <!-- ############################################ -->
- <!-- following mapping file has a dependendy on -->
- <!-- 'bsh-{version}.jar'. -->
- <!-- uncomment this if you don't have bsh on your -->
- <!-- classpath. you won't be able to use the -->
- <!-- script element in process definition files -->
- <!-- has to be defined below org/jbpm/graph/def/Action.hbm.xml -->
- <!-- due to the inline collection-cache elements below -->
- <mapping resource="org/jbpm/graph/action/Script.hbm.xml"/>
-
- <!-- graph.node mapping files -->
- <mapping resource="org/jbpm/graph/node/StartState.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/EndState.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/ProcessState.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/Decision.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/Fork.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/Join.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/MailNode.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/State.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/TaskNode.hbm.xml"/>
-
- <!-- context.def mapping files -->
- <mapping resource="org/jbpm/context/def/ContextDefinition.hbm.xml"/>
- <mapping resource="org/jbpm/context/def/VariableAccess.hbm.xml"/>
-
-
- <!-- bytes mapping files -->
- <mapping resource="org/jbpm/bytes/ByteArray.hbm.xml"/>
-
- <!-- module.def mapping files -->
- <mapping resource="org/jbpm/module/def/ModuleDefinition.hbm.xml"/>
-
- <!-- file.def mapping files -->
- <mapping resource="org/jbpm/file/def/FileDefinition.hbm.xml"/>
-
- <!-- taskmgmt.def mapping files -->
- <mapping resource="org/jbpm/taskmgmt/def/TaskMgmtDefinition.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/def/Swimlane.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/def/Task.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/def/TaskController.hbm.xml"/>
-
- <!-- scheduler.def mapping files -->
- <mapping resource="org/jbpm/scheduler/def/CreateTimerAction.hbm.xml"/>
- <mapping resource="org/jbpm/scheduler/def/CancelTimerAction.hbm.xml"/>
-
- <!-- graph.exe mapping files -->
- <mapping resource="org/jbpm/graph/exe/Comment.hbm.xml"/>
- <mapping resource="org/jbpm/graph/exe/ProcessInstance.hbm.xml"/>
- <mapping resource="org/jbpm/graph/exe/Token.hbm.xml"/>
- <mapping resource="org/jbpm/graph/exe/RuntimeAction.hbm.xml"/>
-
- <!-- module.exe mapping files -->
- <mapping resource="org/jbpm/module/exe/ModuleInstance.hbm.xml"/>
-
- <!-- context.exe mapping files -->
- <mapping resource="org/jbpm/context/exe/ContextInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/TokenVariableMap.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/VariableInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/ByteArrayInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/DateInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/DoubleInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/HibernateLongInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/HibernateStringInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/LongInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/NullInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/StringInstance.hbm.xml"/>
-
- <!-- job mapping files -->
- <mapping resource="org/jbpm/job/Job.hbm.xml"/>
- <mapping resource="org/jbpm/job/Timer.hbm.xml"/>
- <mapping resource="org/jbpm/job/ExecuteNodeJob.hbm.xml"/>
- <mapping resource="org/jbpm/job/ExecuteActionJob.hbm.xml"/>
-
- <!-- taskmgmt.exe mapping files -->
- <mapping resource="org/jbpm/taskmgmt/exe/TaskMgmtInstance.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/exe/TaskInstance.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/exe/PooledActor.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/exe/SwimlaneInstance.hbm.xml"/>
-
- <!-- logging mapping files -->
- <mapping resource="org/jbpm/logging/log/ProcessLog.hbm.xml"/>
- <mapping resource="org/jbpm/logging/log/MessageLog.hbm.xml"/>
- <mapping resource="org/jbpm/logging/log/CompositeLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/ActionLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/NodeLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/ProcessInstanceCreateLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/ProcessInstanceEndLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/ProcessStateLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/SignalLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/TokenCreateLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/TokenEndLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/TransitionLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/VariableLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/VariableCreateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/VariableDeleteLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/VariableUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/ByteArrayUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/DateUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/DoubleUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/HibernateLongUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/HibernateStringUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/LongUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/StringUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/TaskLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/TaskCreateLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/TaskAssignLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/TaskEndLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/SwimlaneLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/SwimlaneCreateLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/SwimlaneAssignLog.hbm.xml"/>
-
-
- <!-- ############################################ -->
- <!-- # cache settings # -->
- <!-- # strategy="nonstrict-read-write" # -->
- <!-- # can be used with hibernate.cache.provider_class=org.hibernate.cache.HashtableCacheProvider # -->
- <!-- ############################################ -->
-
- <class-cache class="org.jbpm.context.def.VariableAccess" usage="nonstrict-read-write" />
-
- <collection-cache collection="org.jbpm.file.def.FileDefinition.processFiles" usage="nonstrict-read-write" />
-
- <collection-cache collection="org.jbpm.graph.action.Script.variableAccesses" usage="nonstrict-read-write" />
-
- <class-cache class="org.jbpm.graph.def.Action" usage="nonstrict-read-write" />
-
- <class-cache class="org.jbpm.graph.def.Event" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.Event.actions" usage="nonstrict-read-write" />
-
- <class-cache class="org.jbpm.graph.def.ExceptionHandler" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.ExceptionHandler.actions" usage="nonstrict-read-write" />
-
- <class-cache class="org.jbpm.graph.def.Node" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.Node.events" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.Node.exceptionHandlers" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.Node.leavingTransitions" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.Node.arrivingTransitions" usage="nonstrict-read-write" />
-
- <class-cache class="org.jbpm.graph.def.ProcessDefinition" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.events" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.exceptionHandlers" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.nodes" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.actions" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.definitions" usage="nonstrict-read-write" />
-
- <collection-cache collection="org.jbpm.graph.def.SuperState.nodes" usage="nonstrict-read-write" />
-
- <class-cache class="org.jbpm.graph.def.Transition" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.Transition.events" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.Transition.exceptionHandlers" usage="nonstrict-read-write" />
-
- <collection-cache collection="org.jbpm.graph.node.Decision.decisionConditions" usage="nonstrict-read-write" />
-
- <collection-cache collection="org.jbpm.graph.node.ProcessState.variableAccesses" usage="nonstrict-read-write" />
-
- <collection-cache collection="org.jbpm.graph.node.TaskNode.tasks" usage="nonstrict-read-write" />
-
- <class-cache class="org.jbpm.instantiation.Delegation" usage="nonstrict-read-write" />
-
- <class-cache class="org.jbpm.module.def.ModuleDefinition" usage="nonstrict-read-write" />
-
- <collection-cache collection="org.jbpm.taskmgmt.def.Swimlane.tasks" usage="nonstrict-read-write" />
-
- <class-cache class="org.jbpm.taskmgmt.def.TaskController" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.taskmgmt.def.TaskController.variableAccesses" usage="nonstrict-read-write" />
-
- <class-cache class="org.jbpm.taskmgmt.def.Task" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.taskmgmt.def.Task.events" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.taskmgmt.def.Task.exceptionHandlers" usage="nonstrict-read-write" />
-
- <collection-cache collection="org.jbpm.taskmgmt.def.TaskMgmtDefinition.swimlanes" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.taskmgmt.def.TaskMgmtDefinition.tasks" usage="nonstrict-read-write" />
-
-
-
- <!-- ############################################ -->
- <!-- # cache settings # -->
- <!-- # strategy="transactional" # -->
- <!-- # can be used with hibernate.cache.provider_class=org.hibernate.cache.TreeCacheProvider # -->
- <!-- ############################################ -->
-
- <!--
-
- <class-cache class="org.jbpm.context.def.VariableAccess" usage="transactional" />
-
- <collection-cache collection="org.jbpm.file.def.FileDefinition.processFiles" usage="transactional" />
-
- <collection-cache collection="org.jbpm.graph.action.Script.variableAccesses" usage="transactional" />
-
- <class-cache class="org.jbpm.graph.def.Action" usage="transactional" />
-
- <class-cache class="org.jbpm.graph.def.Event" usage="transactional" />
- <collection-cache collection="org.jbpm.graph.def.Event.actions" usage="transactional" />
-
- <class-cache class="org.jbpm.graph.def.ExceptionHandler" usage="transactional" />
- <collection-cache collection="org.jbpm.graph.def.ExceptionHandler.actions" usage="transactional" />
-
- <class-cache class="org.jbpm.graph.def.Node" usage="transactional" />
- <collection-cache collection="org.jbpm.graph.def.Node.events" usage="transactional" />
- <collection-cache collection="org.jbpm.graph.def.Node.exceptionHandlers" usage="transactional" />
- <collection-cache collection="org.jbpm.graph.def.Node.leavingTransitions" usage="transactional" />
- <collection-cache collection="org.jbpm.graph.def.Node.arrivingTransitions" usage="transactional" />
-
- <class-cache class="org.jbpm.graph.def.ProcessDefinition" usage="transactional" />
- <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.events" usage="transactional" />
- <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.exceptionHandlers" usage="transactional" />
- <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.nodes" usage="transactional" />
- <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.actions" usage="transactional" />
- <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.definitions" usage="transactional" />
-
- <collection-cache collection="org.jbpm.graph.def.SuperState.nodes" usage="transactional" />
-
- <class-cache class="org.jbpm.graph.def.Transition" usage="transactional" />
- <collection-cache collection="org.jbpm.graph.def.Transition.events" usage="transactional" />
- <collection-cache collection="org.jbpm.graph.def.Transition.exceptionHandlers" usage="transactional" />
-
- <collection-cache collection="org.jbpm.graph.node.Decision.decisionConditions" usage="transactional" />
-
- <collection-cache collection="org.jbpm.graph.node.ProcessState.variableAccesses" usage="transactional" />
-
- <collection-cache collection="org.jbpm.graph.node.TaskNode.tasks" usage="transactional" />
-
- <class-cache class="org.jbpm.instantiation.Delegation" usage="transactional" />
-
- <class-cache class="org.jbpm.module.def.ModuleDefinition" usage="transactional" />
-
- <collection-cache collection="org.jbpm.taskmgmt.def.Swimlane.tasks" usage="transactional" />
-
- <class-cache class="org.jbpm.taskmgmt.def.TaskController" usage="transactional" />
- <collection-cache collection="org.jbpm.taskmgmt.def.TaskController.variableAccesses" usage="transactional" />
-
- <class-cache class="org.jbpm.taskmgmt.def.Task" usage="transactional" />
- <collection-cache collection="org.jbpm.taskmgmt.def.Task.events" usage="transactional" />
- <collection-cache collection="org.jbpm.taskmgmt.def.Task.exceptionHandlers" usage="transactional" />
-
- <collection-cache collection="org.jbpm.taskmgmt.def.TaskMgmtDefinition.swimlanes" usage="transactional" />
- <collection-cache collection="org.jbpm.taskmgmt.def.TaskMgmtDefinition.tasks" usage="transactional" />
-
- -->
-
- </session-factory>
-</hibernate-configuration>
\ No newline at end of file
Deleted: jbossbpm/impl/jbpm3/trunk/modules/jpdl/ws/src/main/resources/jbpm.cfg.xml
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/jpdl/ws/src/main/resources/jbpm.cfg.xml 2008-07-29 09:44:52 UTC (rev 1744)
+++ jbossbpm/impl/jbpm3/trunk/modules/jpdl/ws/src/main/resources/jbpm.cfg.xml 2008-07-29 09:49:33 UTC (rev 1745)
@@ -1,52 +0,0 @@
-<jbpm-configuration>
-
- <!--
- This configuration is used when there is no jbpm.cfg.xml file found in the
- root of the classpath. It is a very basic configuration without persistence
- and message services. Only the authorization service installed.
- You can parse and create processes, but when you try to use one of the
- unavailable services, you'll get an exception.
- -->
-
- <jbpm-context>
- <service name="persistence" factory="org.jbpm.persistence.db.DbPersistenceServiceFactory" />
- <service name="tx" factory="org.jbpm.tx.TxServiceFactory" />
- <service name="message" factory="org.jbpm.msg.db.DbMessageServiceFactory" />
- <service name="scheduler" factory="org.jbpm.scheduler.db.DbSchedulerServiceFactory" />
- <service name="logging" factory="org.jbpm.logging.db.DbLoggingServiceFactory" />
- <service name="authentication" factory="org.jbpm.security.authentication.DefaultAuthenticationServiceFactory" />
- </jbpm-context>
-
- <!-- configuration property used by persistence service impl org.jbpm.persistence.db.DbPersistenceServiceFactory -->
- <string name="resource.hibernate.cfg.xml" value="hibernate.cfg.xml" />
-
- <!-- configuration resource files pointing to default configuration files in jbpm-{version}.jar -->
- <string name="resource.business.calendar" value="org/jbpm/calendar/jbpm.business.calendar.properties" />
- <string name="resource.default.modules" value="org/jbpm/graph/def/jbpm.default.modules.properties" />
- <string name="resource.converter" value="org/jbpm/db/hibernate/jbpm.converter.properties" />
- <string name="resource.action.types" value="org/jbpm/graph/action/action.types.xml" />
- <string name="resource.node.types" value="org/jbpm/graph/node/node.types.xml" />
- <string name="resource.parsers" value="org/jbpm/jpdl/par/jbpm.parsers.xml" />
- <string name="resource.varmapping" value="org/jbpm/context/exe/jbpm.varmapping.xml" />
- <string name="resource.mail.templates" value="jbpm.mail.templates.xml" />
-
- <int name="jbpm.byte.block.size" value="1024" singleton="true" />
- <bean name="jbpm.task.instance.factory" class="org.jbpm.taskmgmt.impl.DefaultTaskInstanceFactoryImpl" singleton="true" />
- <bean name="jbpm.variable.resolver" class="org.jbpm.jpdl.el.impl.JbpmVariableResolver" singleton="true" />
- <string name="jbpm.mail.smtp.host" value="localhost" />
- <bean name="jbpm.mail.address.resolver" class="org.jbpm.identity.mail.IdentityAddressResolver" singleton="true" />
- <string name="jbpm.mail.from.address" value="jbpm@noreply" />
-
- <bean name="jbpm.job.executor" class="org.jbpm.job.executor.JobExecutor">
- <field name="jbpmConfiguration"><ref bean="jbpmConfiguration" /></field>
- <field name="name"><string value="JbpmJobExector" /></field>
- <field name="nbrOfThreads"><int value="1" /></field>
- <field name="idleInterval"><int value="5000" /></field>
- <field name="maxIdleInterval"><int value="3600000" /></field> <!-- 1 hour -->
- <field name="historyMaxSize"><int value="20" /></field>
- <field name="maxLockTime"><int value="600000" /></field> <!-- 10 minutes -->
- <field name="lockMonitorInterval"><int value="60000" /></field> <!-- 1 minute -->
- <field name="lockBufferTime"><int value="5000" /></field> <!-- 5 seconds -->
- </bean>
-
-</jbpm-configuration>
15 years, 9 months
JBoss JBPM SVN: r1744 - in jbpm4/pvm/trunk: modules/core/src/test/java/org/jbpm/pvm and 9 other directories.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2008-07-29 05:44:52 -0400 (Tue, 29 Jul 2008)
New Revision: 1744
Added:
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/langext/
jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/Dummy.java
jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/internal/db/
jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/internal/db/langext/
Removed:
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/db/langext/
jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/db/langext/
Modified:
jbpm4/pvm/trunk/.classpath
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/DbTests.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/langext/AddressActivity.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/langext/AddressSession.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/langext/DbLangExtTests.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/langext/LanguageExtensionsDbTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/langext/language.extensions.hbm.xml
jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/internal/db/langext/environment.cfg.xml
jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/internal/db/langext/language.extensions.hbm.xml
Log:
test suite clean up
Modified: jbpm4/pvm/trunk/.classpath
===================================================================
--- jbpm4/pvm/trunk/.classpath 2008-07-29 09:12:55 UTC (rev 1743)
+++ jbpm4/pvm/trunk/.classpath 2008-07-29 09:44:52 UTC (rev 1744)
@@ -2,8 +2,8 @@
<classpath>
<classpathentry kind="src" output="modules/core/target/classes" path="modules/core/src/main/java"/>
<classpathentry kind="src" output="modules/core/target/test-classes" path="modules/core/src/test/java"/>
- <classpathentry excluding="**" kind="src" output="modules/core/target/classes" path="modules/core/src/main/resources"/>
- <classpathentry excluding="**" kind="src" output="modules/core/target/test-classes" path="modules/core/src/test/resources"/>
+ <classpathentry kind="src" output="modules/core/target/classes" path="modules/core/src/main/resources"/>
+ <classpathentry kind="src" output="modules/core/target/test-classes" 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/modules"/>
<classpathentry kind="output" path="target/classes"/>
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/DbTests.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/DbTests.java 2008-07-29 09:12:55 UTC (rev 1743)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/DbTests.java 2008-07-29 09:44:52 UTC (rev 1744)
@@ -24,9 +24,9 @@
import junit.framework.Test;
import junit.framework.TestSuite;
-import org.jbpm.pvm.db.langext.DbLangExtTests;
import org.jbpm.pvm.db.model.DbModelTests;
import org.jbpm.pvm.db.svc.DbSvcTests;
+import org.jbpm.pvm.internal.db.langext.DbLangExtTests;
import org.jbpm.pvm.jobexecutor.JobExecutorTests;
Copied: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/langext (from rev 1741, jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/db/langext)
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/langext/AddressActivity.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/db/langext/AddressActivity.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/langext/AddressActivity.java 2008-07-29 09:44:52 UTC (rev 1744)
@@ -19,7 +19,7 @@
* 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.pvm.db.langext;
+package org.jbpm.pvm.internal.db.langext;
import org.jbpm.pvm.activity.Activity;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/langext/AddressSession.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/db/langext/AddressSession.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/langext/AddressSession.java 2008-07-29 09:44:52 UTC (rev 1744)
@@ -19,7 +19,7 @@
* 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.pvm.db.langext;
+package org.jbpm.pvm.internal.db.langext;
import java.util.ArrayList;
import java.util.List;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/langext/DbLangExtTests.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/db/langext/DbLangExtTests.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/langext/DbLangExtTests.java 2008-07-29 09:44:52 UTC (rev 1744)
@@ -19,7 +19,7 @@
* 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.pvm.db.langext;
+package org.jbpm.pvm.internal.db.langext;
import junit.framework.Test;
import junit.framework.TestSuite;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/langext/LanguageExtensionsDbTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/db/langext/LanguageExtensionsDbTest.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/langext/LanguageExtensionsDbTest.java 2008-07-29 09:44:52 UTC (rev 1744)
@@ -19,7 +19,7 @@
* 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.pvm.db.langext;
+package org.jbpm.pvm.internal.db.langext;
import java.util.ArrayList;
import java.util.List;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/langext/language.extensions.hbm.xml
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/db/langext/language.extensions.hbm.xml 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/langext/language.extensions.hbm.xml 2008-07-29 09:44:52 UTC (rev 1744)
@@ -3,7 +3,7 @@
<hibernate-mapping package="org.jbpm.pvm" default-access="field">
- <class name="org.jbpm.pvm.db.langext.AddressActivity">
+ <class name="org.jbpm.pvm.internal.db.langext.AddressActivity">
<id name="id" column="DBID_" type="long">
<generator class="native" />
</id>
Added: jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/Dummy.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/Dummy.java (rev 0)
+++ jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/Dummy.java 2008-07-29 09:44:52 UTC (rev 1744)
@@ -0,0 +1,30 @@
+/*
+ * 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.pvm;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class Dummy {
+
+}
Copied: jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/internal/db/langext (from rev 1741, jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/db/langext)
Property changes on: jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/internal/db/langext
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/internal/db/langext/environment.cfg.xml
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/db/langext/environment.cfg.xml 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/internal/db/langext/environment.cfg.xml 2008-07-29 09:44:52 UTC (rev 1744)
@@ -6,7 +6,7 @@
<properties resource="hibernate.properties" />
<mappings resource="org/jbpm/pvm/pvm.hibernate.mappings.xml" />
<cache-configuration resource="org/jbpm/pvm/pvm.cache.xml" usage="nonstrict-read-write" />
- <mapping resource="org/jbpm/pvm/db/langext/language.extensions.hbm.xml" />
+ <mapping resource="org/jbpm/pvm/internal/db/langext/language.extensions.hbm.xml" />
</hibernate-configuration>
<hibernate-session-factory />
@@ -19,7 +19,7 @@
<transaction />
<hibernate-session />
<pvm-db-session />
- <object class="org.jbpm.pvm.db.langext.AddressSession" />
+ <object class="org.jbpm.pvm.internal.db.langext.AddressSession" />
</environment>
Modified: jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/internal/db/langext/language.extensions.hbm.xml
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/db/langext/language.extensions.hbm.xml 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/internal/db/langext/language.extensions.hbm.xml 2008-07-29 09:44:52 UTC (rev 1744)
@@ -3,7 +3,7 @@
<hibernate-mapping package="org.jbpm.pvm" default-access="field">
- <class name="org.jbpm.pvm.db.langext.AddressActivity">
+ <class name="org.jbpm.pvm.internal.db.langext.AddressActivity">
<id name="id" column="DBID_" type="long">
<generator class="native" />
</id>
15 years, 9 months
JBoss JBPM SVN: r1743 - in jbossbpm/spec/trunk/modules: dialects/stp/src/test/resources and 8 other directories.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-07-29 05:12:55 -0400 (Tue, 29 Jul 2008)
New Revision: 1743
Added:
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/MessageManager.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/SignalManager.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/client/internal/MessageManagerImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/client/internal/SignalManagerImpl.java
Modified:
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/ExecutionManager.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessEngine.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessManager.java
jbossbpm/spec/trunk/modules/dialects/stp/src/test/resources/jbpm-beans.xml
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/client/internal/ExecutionManagerImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/client/internal/ProcessEngineImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/client/internal/ProcessManagerImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ActivityImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/MessageImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ProcessImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/SendTaskImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/TaskBuilderImpl.java
jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/client/ProcessEngineLocatorTest.java
jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/airticket/AirticketTest.java
jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/parallelsplit/ParallelSplitTest.java
jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/sequence/BasicSequenceTest.java
jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/task/BasicTaskTest.java
jbossbpm/spec/trunk/modules/testsuite/src/test/resources/jbpm-beans.xml
Log:
Implement SendTask
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/ExecutionManager.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/ExecutionManager.java 2008-07-29 08:43:03 UTC (rev 1742)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/ExecutionManager.java 2008-07-29 09:12:55 UTC (rev 1743)
@@ -39,31 +39,26 @@
*/
public abstract class ExecutionManager
{
- // Injected through the MC
- protected ProcessEngine engine;
-
// Hide public constructor
protected ExecutionManager()
{
}
+ /**
+ * Get the ProcessEngine
+ */
+ public ProcessEngine getProcessEngine()
+ {
+ return ProcessEngineLocator.locateProcessEngine();
+ }
+
/**
* Start the Process and return a Future
* @param proc The Process to start
* @param att The Attachments in the ExecutionContext
- * @return The Future from which to obtain the process result
*/
public abstract void startProcess(Process proc, Attachments att);
- /**
- * Locate the signal manager
- */
- public static ExecutionManager locateExecutionManager()
- {
- ProcessEngine engine = ProcessEngineLocator.locateProcessEngine();
- return engine.getExecutionManager();
- }
-
protected ExecutionHandler getExecutionHandler(FlowObject target)
{
HandlerSupport exfo = getHandlerSupport(target);
Added: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/MessageManager.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/MessageManager.java (rev 0)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/MessageManager.java 2008-07-29 09:12:55 UTC (rev 1743)
@@ -0,0 +1,130 @@
+/*
+ * 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.HashSet;
+import java.util.Set;
+
+import javax.management.ObjectName;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.jboss.bpm.model.FlowObject;
+import org.jboss.bpm.model.Message;
+import org.jboss.bpm.model.Process;
+import org.jboss.bpm.model.Task;
+
+/**
+ * The ProcessEngine sends mesages through the MessageManager.
+ * <p/>
+ * A @{link Message} has an ID and is targeted to a
+ * specific @{limk Participant}. A component can register a @{link MessageListener} with the MessageManager.
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 18-Jun-2008
+ */
+public class MessageManager
+{
+ // provide logging
+ private static final Log log = LogFactory.getLog(MessageManager.class);
+
+ // The set of registered message listeners
+ private Set<MessageListener> messageListeners = new HashSet<MessageListener>();
+
+ /**
+ * Get the ProcessEngine
+ */
+ public ProcessEngine getProcessEngine()
+ {
+ return ProcessEngineLocator.locateProcessEngine();
+ }
+
+ /**
+ * Locate the MessageManager
+ */
+ public static MessageManager locateMessageManager()
+ {
+ ProcessEngine engine = ProcessEngineLocator.locateProcessEngine();
+ return engine.getMessageManager();
+ }
+
+ /**
+ * Add a MessageListener
+ */
+ public void addMessageListener(MessageListener listener)
+ {
+ log.debug("addMessageListener: " + listener);
+ messageListeners.add(listener);
+ }
+
+ /**
+ * Remove an MessageListener
+ */
+ public void removeMessageListener(MessageListener listener)
+ {
+ log.debug("removeMessageListener: " + listener);
+ messageListeners.remove(listener);
+ }
+
+ /**
+ * Send a message to a given {@link Task} or @{link Event}
+ */
+ public void sendMessage(ObjectName procID, String targetName, Message msg)
+ {
+ ProcessManager pm = getProcessEngine().getProcessManager();
+ Process proc = pm.getProcessByID(procID);
+ FlowObject target = proc.findFlowObject(targetName);
+ if (target == null)
+ throw new IllegalArgumentException("Cannot find message target: " + targetName);
+ if (target instanceof MessageListener == false)
+ throw new IllegalArgumentException("Message target is not a valid message receiver: " + targetName);
+
+ MessageListener msgListener = (MessageListener)target;
+ msgListener.catchMessage(msg);
+ }
+
+ /**
+ * Send a message to a given {@link MessageListener}
+ */
+ public void sendMessage(ObjectName targetID, Message msg)
+ {
+ MessageListener msgListener = null;
+ for (MessageListener auxListener : messageListeners)
+ {
+ if (auxListener.getMessageListenerID().equals(targetID))
+ {
+ msgListener = auxListener;
+ break;
+ }
+ }
+ if (msgListener != null)
+ {
+ msgListener.catchMessage(msg);
+ }
+ else
+ {
+ log.warn("No message listener registered: " + targetID);
+ }
+ }
+}
\ No newline at end of file
Property changes on: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/MessageManager.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessEngine.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessEngine.java 2008-07-29 08:43:03 UTC (rev 1742)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessEngine.java 2008-07-29 09:12:55 UTC (rev 1743)
@@ -21,19 +21,8 @@
*/
package org.jboss.bpm.client;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import javax.management.ObjectName;
-
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.bpm.model.FlowObject;
-import org.jboss.bpm.model.Message;
-import org.jboss.bpm.model.Process;
-import org.jboss.bpm.model.Signal;
// $Id$
@@ -57,14 +46,13 @@
protected ProcessManager processManager;
// Injected through the MC
protected ExecutionManager executionManager;
+ // Injected through the MC
+ protected SignalManager signalManager;
+ // Injected through the MC
+ protected MessageManager messageManager;
// Flag to indicate that the Engine is shutting down
private boolean prepareForShutdown;
- // The map of registered signal listeners
- private Map<String, Set<SignalListener>> signalListeners = new HashMap<String, Set<SignalListener>>();
- // The set of registered message listeners
- private Set<MessageListener> messageListeners = new HashSet<MessageListener>();
-
// Hide public constructor
protected ProcessEngine()
{
@@ -103,7 +91,6 @@
{
if (processManager == null)
throw new IllegalStateException("ProcessManager not available through kernel configuration");
-
return processManager;
}
@@ -116,116 +103,30 @@
{
if (executionManager == null)
throw new IllegalStateException("ExecutionManager not available through kernel configuration");
-
return executionManager;
}
/**
- * Add a SignalListener for a given process
+ * Get the configured instance of the SignalManager
+ *
+ * @return The SignalManager
*/
- public void addSignalListener(String procName, SignalListener listener)
+ public SignalManager getSignalManager()
{
- log.debug("addSignalListener: " + listener);
- Set<SignalListener> set = signalListeners.get(procName);
- if (set == null)
- {
- set = new HashSet<SignalListener>();
- signalListeners.put(procName, set);
- }
- set.add(listener);
+ if (signalManager == null)
+ throw new IllegalStateException("SignalManager not available through kernel configuration");
+ return signalManager;
}
/**
- * Remove an SignalListener for a given process
+ * Get the configured instance of the MessageManager
+ *
+ * @return The MessageManager
*/
- public void removeSignalListener(String procName, SignalListener listener)
+ public MessageManager getMessageManager()
{
- log.debug("removeSignalListener: " + listener);
- Set<SignalListener> set = signalListeners.get(procName);
- if (set != null)
- {
- set.remove(listener);
- }
+ if (messageManager == null)
+ throw new IllegalStateException("MessageManager not available through kernel configuration");
+ return messageManager;
}
-
- /** Remove all SignalListener for a given process */
- public void removeSignalListeners(String procName)
- {
- log.debug("removeSignalListeners: " + procName);
- signalListeners.remove(procName);
- }
-
- /** Throw a signal to all registered listeners */
- public void throwSignal(Signal signal)
- {
- log.debug("throwSignal: " + signal);
- String procName = signal.getProcessName();
- Set<SignalListener> set = signalListeners.get(procName);
- if (set != null)
- {
- for (SignalListener listener : set)
- {
- listener.catchSignal(signal);
- }
- }
- }
-
- /**
- * Add a MessageListener
- */
- public void addMessageListener(MessageListener listener)
- {
- log.debug("addMessageListener: " + listener);
- messageListeners.add(listener);
- }
-
- /**
- * Remove an MessageListener
- */
- public void removeMessageListener(MessageListener listener)
- {
- log.debug("removeMessageListener: " + listener);
- messageListeners.remove(listener);
- }
-
- /**
- * Send a message to a given {@link Task} or @{link Event}
- */
- public void sendMessage(ObjectName procID, String targetName, Message msg)
- {
- ProcessManager pm = ProcessManager.locateProcessManager();
- Process proc = pm.getProcessByID(procID);
- FlowObject target = proc.findFlowObject(targetName);
- if (target == null)
- throw new IllegalArgumentException("Cannot find message target: " + targetName);
- if (target instanceof MessageListener == false)
- throw new IllegalArgumentException("Message target is not a valid message receiver: " + targetName);
-
- MessageListener msgListener = (MessageListener)target;
- msgListener.catchMessage(msg);
- }
-
- /**
- * Send a message to a given {@link MessageListener}
- */
- public void sendMessage(ObjectName listenerID, Message msg)
- {
- MessageListener msgListener = null;
- for (MessageListener auxListener : messageListeners)
- {
- if (auxListener.getMessageListenerID().equals(listenerID))
- {
- msgListener = auxListener;
- break;
- }
- }
- if (msgListener != null)
- {
- msgListener.catchMessage(msg);
- }
- else
- {
- log.warn("No message listener registered: " + listenerID);
- }
- }
}
\ No newline at end of file
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessManager.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessManager.java 2008-07-29 08:43:03 UTC (rev 1742)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessManager.java 2008-07-29 09:12:55 UTC (rev 1743)
@@ -58,8 +58,6 @@
// provide logging
private static final Log log = LogFactory.getLog(ProcessManager.class);
- // Injected through the MC
- protected ProcessEngine engine;
// The map of registerd dialect handlers
protected Map<String, DialectHandler> dialectHandlers;
// The dialect registry
@@ -72,32 +70,29 @@
{
}
- /**
- * Get the associated process engine
+ /**
+ * Get the ProcessEngine
*/
public ProcessEngine getProcessEngine()
{
- if (engine == null)
- throw new IllegalStateException("ProcessEngine not available through kernel configuration");
-
- return engine;
+ return ProcessEngineLocator.locateProcessEngine();
}
-
+
/**
- * Locate the process definition manager
+ * Locate the ProcessManager
*/
public static ProcessManager locateProcessManager()
{
ProcessEngine engine = ProcessEngineLocator.locateProcessEngine();
return engine.getProcessManager();
}
-
+
/**
* Create a Process from a XML string in one of the supported formats
*/
public final Process createProcess(String pXML)
{
- if (engine.isPrepareForShutdown())
+ if (getProcessEngine().isPrepareForShutdown())
throw new EngineShutdownException("Cannot create new Process while engine is shutting down");
String nsURI = getNamespaceURI(new ByteArrayInputStream(pXML.getBytes()));
@@ -111,7 +106,7 @@
*/
public final Process createProcess(URL pURL) throws IOException
{
- if (engine.isPrepareForShutdown())
+ if (getProcessEngine().isPrepareForShutdown())
throw new EngineShutdownException("Cannot create new Process while engine is shutting down");
String nsURI = getNamespaceURI(pURL.openStream());
Added: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/SignalManager.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/SignalManager.java (rev 0)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/SignalManager.java 2008-07-29 09:12:55 UTC (rev 1743)
@@ -0,0 +1,122 @@
+/*
+ * 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.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.jboss.bpm.model.Signal;
+
+/**
+ * The ProcessEngine sends signals through the SignalManager
+ * <p/>
+ * A @{link Signal} is like an undirected flare shot up into the air.
+ * A component can register a @{link SignalListener} with the SignalManager.
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 18-Jun-2008
+ */
+public class SignalManager
+{
+ // provide logging
+ private static final Log log = LogFactory.getLog(SignalManager.class);
+
+ // The map of registered signal listeners
+ private Map<String, Set<SignalListener>> signalListeners = new HashMap<String, Set<SignalListener>>();
+
+ /**
+ * Get the ProcessEngine
+ */
+ public ProcessEngine getProcessEngine()
+ {
+ return ProcessEngineLocator.locateProcessEngine();
+ }
+
+ /**
+ * Locate the SignalManager
+ */
+ public static SignalManager locateSignalManager()
+ {
+ ProcessEngine engine = ProcessEngineLocator.locateProcessEngine();
+ return engine.getSignalManager();
+ }
+
+ /**
+ * Add a SignalListener for a given process
+ */
+ public void addSignalListener(String procName, SignalListener listener)
+ {
+ log.debug("addSignalListener: " + listener);
+ Set<SignalListener> set = signalListeners.get(procName);
+ if (set == null)
+ {
+ set = new HashSet<SignalListener>();
+ signalListeners.put(procName, set);
+ }
+ set.add(listener);
+ }
+
+ /**
+ * Remove an SignalListener for a given process
+ */
+ public void removeSignalListener(String procName, SignalListener listener)
+ {
+ log.debug("removeSignalListener: " + listener);
+ Set<SignalListener> set = signalListeners.get(procName);
+ if (set != null)
+ {
+ set.remove(listener);
+ }
+ }
+
+ /**
+ * Remove all SignalListener for a given process
+ */
+ public void removeSignalListeners(String procName)
+ {
+ log.debug("removeSignalListeners: " + procName);
+ signalListeners.remove(procName);
+ }
+
+ /**
+ * Throw a signal to all registered listeners
+ */
+ public void throwSignal(Signal signal)
+ {
+ log.debug("throwSignal: " + signal);
+ String procName = signal.getProcessName();
+ Set<SignalListener> set = signalListeners.get(procName);
+ if (set != null)
+ {
+ for (SignalListener listener : set)
+ {
+ listener.catchSignal(signal);
+ }
+ }
+ }
+}
\ No newline at end of file
Property changes on: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/SignalManager.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbossbpm/spec/trunk/modules/dialects/stp/src/test/resources/jbpm-beans.xml
===================================================================
--- jbossbpm/spec/trunk/modules/dialects/stp/src/test/resources/jbpm-beans.xml 2008-07-29 08:43:03 UTC (rev 1742)
+++ jbossbpm/spec/trunk/modules/dialects/stp/src/test/resources/jbpm-beans.xml 2008-07-29 09:12:55 UTC (rev 1743)
@@ -10,16 +10,17 @@
<bean name="jBPMProcessEngine" class="org.jboss.bpm.client.internal.ProcessEngineImpl">
<property name="processManager"><inject bean="jBPMProcessManager"/></property>
<property name="executionManager"><inject bean="jBPMExecutionManager"/></property>
+ <property name="signalManager"><inject bean="jBPMSignalManager"/></property>
+ <property name="messageManager"><inject bean="jBPMMessageManager"/></property>
</bean>
- <!-- The ExecutionManager -->
- <bean name="jBPMExecutionManager" class="org.jboss.bpm.client.internal.ExecutionManagerImpl">
- <property name="processEngine"><inject bean="jBPMProcessEngine" state="Instantiated"/></property>
- </bean>
+ <!-- The Managers -->
+ <bean name="jBPMExecutionManager" class="org.jboss.bpm.client.internal.ExecutionManagerImpl"/>
+ <bean name="jBPMSignalManager" class="org.jboss.bpm.client.internal.SignalManagerImpl"/>
+ <bean name="jBPMMessageManager" class="org.jboss.bpm.client.internal.MessageManagerImpl"/>
<!-- The ProcessManager -->
<bean name="jBPMProcessManager" class="org.jboss.bpm.client.internal.ProcessManagerImpl">
- <property name="processEngine"><inject bean="jBPMProcessEngine" state="Instantiated"/></property>
<property name="dialectRegistry"><inject bean="jBPMDialectRegistry"/></property>
<property name="dialectHandlers">
<map keyClass="java.lang.String" valueClass="org.jboss.bpm.client.DialectHandler">
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/client/internal/ExecutionManagerImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/client/internal/ExecutionManagerImpl.java 2008-07-29 08:43:03 UTC (rev 1742)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/client/internal/ExecutionManagerImpl.java 2008-07-29 09:12:55 UTC (rev 1743)
@@ -27,6 +27,8 @@
import org.apache.commons.logging.LogFactory;
import org.jboss.bpm.client.ExecutionManager;
import org.jboss.bpm.client.ProcessEngine;
+import org.jboss.bpm.client.ProcessEngineLocator;
+import org.jboss.bpm.client.SignalManager;
import org.jboss.bpm.model.Flow;
import org.jboss.bpm.model.FlowObject;
import org.jboss.bpm.model.Process;
@@ -56,11 +58,6 @@
// provide logging
private static final Log log = LogFactory.getLog(ExecutionManager.class);
- public void setProcessEngine(ProcessEngine engine)
- {
- this.engine = engine;
- }
-
@Override
public void startProcess(Process proc, Attachments att)
{
@@ -77,7 +74,8 @@
{
RuntimeProcess rtProc = new RuntimeProcessImpl(proc);
- engine.throwSignal(new Signal(proc, Signal.Type.ENTER_PROCESS));
+ SignalManager signalManager = getProcessEngine().getSignalManager();
+ signalManager.throwSignal(new Signal(proc, Signal.Type.ENTER_PROCESS));
MutableFlowScheduler flowScheduler = rtProc.getFlowScheduler();
try
{
@@ -102,12 +100,12 @@
// Execute the FlowObject's ExecutionHandler
try
{
- engine.throwSignal(sigHandler.getEnterSignal());
+ signalManager.throwSignal(sigHandler.getEnterSignal());
executable.execute(token);
}
finally
{
- engine.throwSignal(sigHandler.getExitSignal());
+ signalManager.throwSignal(sigHandler.getExitSignal());
}
// Remove the head tuple
@@ -126,7 +124,7 @@
}
finally
{
- engine.throwSignal(new Signal(proc, Signal.Type.EXIT_PROCESS));
+ signalManager.throwSignal(new Signal(proc, Signal.Type.EXIT_PROCESS));
}
}
Added: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/client/internal/MessageManagerImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/client/internal/MessageManagerImpl.java (rev 0)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/client/internal/MessageManagerImpl.java 2008-07-29 09:12:55 UTC (rev 1743)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.client.internal;
+
+// $Id$
+
+import org.jboss.bpm.client.MessageManager;
+
+/**
+ * The ProcessEngine sends mesages through the MessageManager.
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 18-Jun-2008
+ */
+public class MessageManagerImpl extends MessageManager
+{
+}
\ No newline at end of file
Property changes on: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/client/internal/MessageManagerImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/client/internal/ProcessEngineImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/client/internal/ProcessEngineImpl.java 2008-07-29 08:43:03 UTC (rev 1742)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/client/internal/ProcessEngineImpl.java 2008-07-29 09:12:55 UTC (rev 1743)
@@ -24,8 +24,10 @@
//$Id$
import org.jboss.bpm.client.ExecutionManager;
+import org.jboss.bpm.client.MessageManager;
import org.jboss.bpm.client.ProcessEngine;
import org.jboss.bpm.client.ProcessManager;
+import org.jboss.bpm.client.SignalManager;
/**
* A process engine with public access
@@ -44,4 +46,15 @@
{
this.executionManager = executionManager;
}
+
+ public void setSignalManager(SignalManager signalManager)
+ {
+ this.signalManager = signalManager;
+ }
+
+ public void setMessageManager(MessageManager messageManager)
+ {
+ this.messageManager = messageManager;
+ }
+
}
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/client/internal/ProcessManagerImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/client/internal/ProcessManagerImpl.java 2008-07-29 08:43:03 UTC (rev 1742)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/client/internal/ProcessManagerImpl.java 2008-07-29 09:12:55 UTC (rev 1743)
@@ -49,11 +49,6 @@
// provide logging
private static final Log log = LogFactory.getLog(ProcessManagerImpl.class);
- public void setProcessEngine(ProcessEngine engine)
- {
- this.engine = engine;
- }
-
public void setDialectHandlers(Map<String, DialectHandler> dialectHandlers)
{
this.dialectHandlers = dialectHandlers;
@@ -79,7 +74,7 @@
registerProcess(procCopy);
// Start the process in a thread
- ExecutionManager exm = ExecutionManager.locateExecutionManager();
+ ExecutionManager exm = getProcessEngine().getExecutionManager();
exm.startProcess(proc, att);
}
}
Added: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/client/internal/SignalManagerImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/client/internal/SignalManagerImpl.java (rev 0)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/client/internal/SignalManagerImpl.java 2008-07-29 09:12:55 UTC (rev 1743)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.client.internal;
+
+// $Id$
+
+import org.jboss.bpm.client.SignalManager;
+
+/**
+ * The ProcessEngine sends signals through the SignalManager
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 18-Jun-2008
+ */
+public class SignalManagerImpl extends SignalManager
+{
+}
\ No newline at end of file
Property changes on: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/client/internal/SignalManagerImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ActivityImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ActivityImpl.java 2008-07-29 08:43:03 UTC (rev 1742)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ActivityImpl.java 2008-07-29 09:12:55 UTC (rev 1743)
@@ -319,7 +319,8 @@
ExecutionContext exContext = token.getExecutionContext();
for (Property prop : inputSet.getProperties())
{
- exContext.removeAttachment(prop.getName());
+ // TODO: define proper scope for token data
+ // exContext.removeAttachment(prop.getName());
}
}
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/MessageImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/MessageImpl.java 2008-07-29 08:43:03 UTC (rev 1742)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/MessageImpl.java 2008-07-29 09:12:55 UTC (rev 1743)
@@ -103,7 +103,7 @@
*/
public Participant getFromRef()
{
- throw new NotImplementedException();
+ return sourceID != null ? new EntityImpl(sourceID.getCanonicalName()) : null;
}
/**
@@ -111,7 +111,7 @@
*/
public Participant getToRef()
{
- throw new NotImplementedException();
+ return targetID != null ? new EntityImpl(targetID.getCanonicalName()) : null;
}
public String toString()
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ProcessImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ProcessImpl.java 2008-07-29 08:43:03 UTC (rev 1742)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ProcessImpl.java 2008-07-29 09:12:55 UTC (rev 1743)
@@ -33,6 +33,8 @@
import org.jboss.bpm.InvalidProcessException;
import org.jboss.bpm.NotImplementedException;
+import org.jboss.bpm.client.ProcessEngine;
+import org.jboss.bpm.client.ProcessEngineLocator;
import org.jboss.bpm.client.ProcessManager;
import org.jboss.bpm.model.EndEvent;
import org.jboss.bpm.model.FlowObject;
@@ -183,19 +185,22 @@
public void startProcess(Attachments att)
{
- ProcessManager pm = ProcessManager.locateProcessManager();
+ ProcessEngine engine = ProcessEngineLocator.locateProcessEngine();
+ ProcessManager pm = engine.getProcessManager();
pm.startProcess(getName(), att);
}
public void waitForEnd()
{
- ProcessManager pm = ProcessManager.locateProcessManager();
+ ProcessEngine engine = ProcessEngineLocator.locateProcessEngine();
+ ProcessManager pm = engine.getProcessManager();
pm.waitForEnd(getID(), -1);
}
public void waitForEnd(long timeout)
{
- ProcessManager pm = ProcessManager.locateProcessManager();
+ ProcessEngine engine = ProcessEngineLocator.locateProcessEngine();
+ ProcessManager pm = engine.getProcessManager();
pm.waitForEnd(getID(), timeout);
}
@@ -244,7 +249,8 @@
// Set the anonymous default name
if (getName() == null)
{
- ProcessManager pm = ProcessManager.locateProcessManager();
+ ProcessEngine engine = ProcessEngineLocator.locateProcessEngine();
+ ProcessManager pm = engine.getProcessManager();
this.name = "AnonymousProcess#" + pm.getProcesses().size();
}
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/SendTaskImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/SendTaskImpl.java 2008-07-29 08:43:03 UTC (rev 1742)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/SendTaskImpl.java 2008-07-29 09:12:55 UTC (rev 1743)
@@ -21,19 +21,33 @@
*/
package org.jboss.bpm.model.internal;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.management.ObjectName;
+
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jboss.bpm.InvalidProcessException;
+import org.jboss.bpm.client.MessageManager;
+import org.jboss.bpm.client.ObjectNameFactory;
+import org.jboss.bpm.model.Entity;
+import org.jboss.bpm.model.Expression;
import org.jboss.bpm.model.InputSet;
import org.jboss.bpm.model.Message;
import org.jboss.bpm.model.MessageBuilder;
import org.jboss.bpm.model.MessageBuilderFactory;
import org.jboss.bpm.model.OutputSet;
+import org.jboss.bpm.model.Participant;
import org.jboss.bpm.model.Process;
import org.jboss.bpm.model.Property;
+import org.jboss.bpm.model.PropertyBuilder;
import org.jboss.bpm.model.SendTask;
+import org.jboss.bpm.model.Expression.ExpressionLanguage;
+import org.jboss.bpm.runtime.ExecutionContext;
import org.jboss.bpm.runtime.ExecutionHandler;
import org.jboss.bpm.runtime.Token;
+import org.mvel.MVEL;
//$Id$
@@ -78,40 +92,50 @@
this.messageRef = message;
}
- @Override
- public ExecutionHandler getExecutionHandler()
+ /**
+ * Execute external business logic
+ */
+ protected void executeHandler(Token token, InputSet inputSet, OutputSet outputSet)
{
- ExecutionHandler handler = super.getExecutionHandler();
- if (handler == null)
+ // Call the execution handler with the InputSet
+ ExecutionHandler handler = getExecutionHandler();
+ if (handler != null)
{
- handler = new ExecutionHandler()
+ handler.execute(token, inputSet, outputSet);
+ }
+ // Assume the the single IORule actually mapps the data
+ else
+ {
+ ExecutionContext exContext = token.getExecutionContext();
+ MessageBuilderFactory factory = MessageBuilderFactory.newInstance();
+ MessageBuilder msgBuilder = factory.newMessageBuilder();
+
+ Participant toRef = messageRef.getToRef();
+ if (toRef == null || toRef.getEntityRef() == null)
+ throw new IllegalStateException("Cannot obtain target participant");
+
+ Entity entityRef = toRef.getEntityRef();
+ ObjectName targetID = ObjectNameFactory.create(entityRef.getName());
+ msgBuilder.newMessage(messageRef.getName(), targetID);
+
+ // Copy the properties from the execution context
+ // to the send message
+ for (Property auxProp : messageRef.getProperties())
{
- public void execute(Token token, InputSet inputSet, OutputSet outputSet)
- {
- MessageBuilderFactory factory = MessageBuilderFactory.newInstance();
- MessageBuilder msgBuilder = factory.newMessageBuilder();
- msgBuilder.newMessage(messageRef.getName(), null);
+ String key = auxProp.getName();
+ Expression expr = exContext.getAttachment(key);
+ if (expr == null)
+ throw new IllegalStateException("Cannot obtain property: " + key);
- // Copy the properties from the execution context
- // to the send message
- for (Property auxProp : messageRef.getProperties())
- {
- String key = auxProp.getName();
- Property prop = inputSet.getProperty(key);
- if (prop == null)
- throw new IllegalStateException("Cannot obtain property: " + key);
-
- msgBuilder.addProperty(key, prop.getValue().getExpressionBody());
- }
-
- Message msg = msgBuilder.getMessage();
- System.out.println(msg);
- }
- };
+ msgBuilder.addProperty(key, expr.getExpressionBody());
+ }
+ Message msg = msgBuilder.getMessage();
+
+ MessageManager mm = MessageManager.locateMessageManager();
+ mm.sendMessage(targetID, msg);
}
- return handler;
}
-
+
@Override
protected void initialize(Process proc)
{
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/TaskBuilderImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/TaskBuilderImpl.java 2008-07-29 08:43:03 UTC (rev 1742)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/TaskBuilderImpl.java 2008-07-29 09:12:55 UTC (rev 1743)
@@ -49,11 +49,19 @@
message = new MessageImpl(messageName, targetID);
if (flowObject instanceof ReceiveTaskImpl)
{
- ((ReceiveTaskImpl)flowObject).setMessageRef(message);
+ if (targetID != null)
+ throw new IllegalArgumentException("Message targetID must be null for ReceiveTask");
+
+ ReceiveTaskImpl receiveTask = (ReceiveTaskImpl)flowObject;
+ receiveTask.setMessageRef(message);
}
else if (flowObject instanceof SendTaskImpl)
{
- ((SendTaskImpl)flowObject).setMessageRef(message);
+ if (targetID == null)
+ throw new IllegalArgumentException("Message targetID cannot be null for SendTask");
+
+ SendTaskImpl sendTask = (SendTaskImpl)flowObject;
+ sendTask.setMessageRef(message);
}
else
{
Modified: jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/client/ProcessEngineLocatorTest.java
===================================================================
--- jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/client/ProcessEngineLocatorTest.java 2008-07-29 08:43:03 UTC (rev 1742)
+++ jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/client/ProcessEngineLocatorTest.java 2008-07-29 09:12:55 UTC (rev 1743)
@@ -30,7 +30,7 @@
public void testLocateProcessEngine() throws Exception
{
- ProcessEngine engine = ProcessEngineLocator.locateProcessEngine();
+ SignalManager engine = SignalManager.locateSignalManager();
assertNotNull(engine);
}
}
Modified: jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/airticket/AirticketTest.java
===================================================================
--- jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/airticket/AirticketTest.java 2008-07-29 08:43:03 UTC (rev 1742)
+++ jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/airticket/AirticketTest.java 2008-07-29 09:12:55 UTC (rev 1743)
@@ -27,11 +27,12 @@
import javax.management.ObjectName;
+import org.jboss.bpm.client.MessageListener;
+import org.jboss.bpm.client.MessageManager;
import org.jboss.bpm.client.ObjectNameFactory;
-import org.jboss.bpm.client.ProcessEngine;
-import org.jboss.bpm.client.ProcessEngineLocator;
import org.jboss.bpm.client.ProcessManager;
import org.jboss.bpm.client.SignalListener;
+import org.jboss.bpm.client.SignalManager;
import org.jboss.bpm.model.BPMNElement;
import org.jboss.bpm.model.GatewayBuilder;
import org.jboss.bpm.model.Message;
@@ -56,16 +57,10 @@
public class AirticketTest extends DefaultEngineTestCase
{
@Override
- public ObjectName getMessageListenerID()
- {
- return ObjectNameFactory.create(BPMNElement.ID_DOMAIN, "test", "AirticketTest");
- }
-
- @Override
protected void setUp() throws Exception
{
super.setUp();
-
+
// Add a signal listener
SignalListener sl = new SignalListener()
{
@@ -74,7 +69,7 @@
System.out.println(signal);
}
};
- ProcessEngine engine = ProcessEngineLocator.locateProcessEngine();
+ SignalManager engine = SignalManager.locateSignalManager();
engine.addSignalListener("Airticket", sl);
}
@@ -86,30 +81,45 @@
ProcessManager pm = ProcessManager.locateProcessManager();
Process proc = pm.createProcess(jpdlURL);
assertNotNull(proc);
-
+
proc.startProcess();
proc.waitForEnd();
}
-
+
public void testValidRequest() throws Exception
{
Process proc = buildDynamicProcess();
proc.startProcess();
-
- ProcessEngine engine = ProcessEngineLocator.locateProcessEngine();
- engine.sendMessage(proc.getID(), "ReceiveReqTask", getValidRequestMessage());
-
+
+ MessageManager mm = MessageManager.locateMessageManager();
+ mm.sendMessage(proc.getID(), "ReceiveReqTask", getValidRequestMessage());
+
proc.waitForEnd();
}
public void testInvalidRequest() throws Exception
{
- Process proc = buildDynamicProcess();
+ final Process proc = buildDynamicProcess();
proc.startProcess();
+
+ final MessageManager mm = MessageManager.locateMessageManager();
+ final ObjectName listenerID = ObjectNameFactory.create(BPMNElement.ID_DOMAIN, "test", getName());
+ MessageListener msgListener = new MessageListener()
+ {
+ public void catchMessage(Message message)
+ {
+ mm.sendMessage(proc.getID(), "ReceiveReqTask", getValidRequestMessage());
+ }
+
+ public ObjectName getMessageListenerID()
+ {
+ return listenerID;
+ }
+ };
+ mm.addMessageListener(msgListener);
- ProcessEngine engine = ProcessEngineLocator.locateProcessEngine();
- engine.sendMessage(proc.getID(), "ReceiveReqTask", getInvalidRequestMessage());
-
+ mm.sendMessage(proc.getID(), "ReceiveReqTask", getInvalidRequestMessage(listenerID));
+
proc.waitForEnd();
}
@@ -119,17 +129,17 @@
ProcessBuilderFactory procFactory = ProcessBuilderFactory.newInstance();
ProcessBuilder procBuilder = procFactory.newProcessBuilder();
procBuilder.addProcess("Airticket").addStartEvent().addSequenceFlow("ReceiveReqTask");
-
+
// Build the ReceiveReq Task
TaskBuilder taskBuilder = procBuilder.addTask("ReceiveReqTask", TaskType.Receive);
- taskBuilder.addMessageRef("ReqDataMsg", getMessageListenerID()).
+ taskBuilder.addMessageRef("ReqDataMsg", null).
addMessageProperty("Name", null, true).
addMessageProperty("From", null, true).
addMessageProperty("To", null, true).
addMessageProperty("Date", null, true).
addMessageProperty("Seats", null, true).
addSequenceFlow("ValidateTask");
-
+
// Build the Validate Task
taskBuilder = procBuilder.addTask("ValidateTask", TaskType.None);
taskBuilder.addInputSet().
@@ -142,16 +152,16 @@
addPropertyOutput("isReqDataValid", null).
addIORule("Name != null && From != null && To != null && Date != null && Seats > 0", ExpressionLanguage.MVEL).
addSequenceFlow("ValidateGateway");
-
+
// Build the Validate Gateway
GatewayBuilder gatewayBuilder = procBuilder.addGateway("ValidateGateway", GatewayType.Exclusive);
gatewayBuilder.addConditionalGate("CheckAvailabilityTask", ExpressionLanguage.MVEL, "isReqDataValid == true").
addDefaultGate("SendInvalidTask");
-
+
// Build the CheckAvailability Task
taskBuilder = procBuilder.addTask("CheckAvailabilityTask", TaskType.None);
taskBuilder.addSequenceFlow("End");
-
+
// Build the SendInvalid Task
taskBuilder = procBuilder.addTask("SendInvalidTask", TaskType.Send);
taskBuilder.addMessageRef("InvalidDataMsg", getMessageListenerID()).
@@ -161,7 +171,7 @@
addMessageProperty("Date", null, true).
addMessageProperty("Seats", null, true).
addSequenceFlow("ReceiveReqTask");
-
+
// Add the EndEvent get the Process
Process proc = procBuilder.addEndEvent("End").getProcess();
ProcessManager pm = ProcessManager.locateProcessManager();
@@ -183,11 +193,11 @@
return msg;
}
- private Message getInvalidRequestMessage()
+ private Message getInvalidRequestMessage(ObjectName targetID)
{
MessageBuilderFactory msgFactory = MessageBuilderFactory.newInstance();
MessageBuilder msgBuilder = msgFactory.newMessageBuilder();
- Message msg = msgBuilder.newMessage("ReqDataMsg", null).
+ Message msg = msgBuilder.newMessage("ReqDataMsg", targetID).
addProperty("Name", "Kermit").
addProperty("From", "MUC").
addProperty("To", "NYC").
Modified: jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/parallelsplit/ParallelSplitTest.java
===================================================================
--- jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/parallelsplit/ParallelSplitTest.java 2008-07-29 08:43:03 UTC (rev 1742)
+++ jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/parallelsplit/ParallelSplitTest.java 2008-07-29 09:12:55 UTC (rev 1743)
@@ -27,9 +27,9 @@
import java.util.List;
import java.util.concurrent.ExecutionException;
-import org.jboss.bpm.client.ProcessEngine;
import org.jboss.bpm.client.ProcessEngineLocator;
import org.jboss.bpm.client.ProcessManager;
+import org.jboss.bpm.client.SignalManager;
import org.jboss.bpm.model.Process;
import org.jboss.bpm.model.ProcessBuilder;
import org.jboss.bpm.model.ProcessBuilderFactory;
@@ -51,7 +51,7 @@
protected void setUp() throws Exception
{
super.setUp();
- ProcessEngine engine = ProcessEngineLocator.locateProcessEngine();
+ SignalManager engine = SignalManager.locateSignalManager();
engine.addSignalListener(getName(), this);
}
Modified: jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/sequence/BasicSequenceTest.java
===================================================================
--- jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/sequence/BasicSequenceTest.java 2008-07-29 08:43:03 UTC (rev 1742)
+++ jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/sequence/BasicSequenceTest.java 2008-07-29 09:12:55 UTC (rev 1743)
@@ -27,9 +27,9 @@
import java.util.List;
import java.util.concurrent.ExecutionException;
-import org.jboss.bpm.client.ProcessEngine;
import org.jboss.bpm.client.ProcessEngineLocator;
import org.jboss.bpm.client.ProcessManager;
+import org.jboss.bpm.client.SignalManager;
import org.jboss.bpm.model.Process;
import org.jboss.bpm.model.ProcessBuilder;
import org.jboss.bpm.model.ProcessBuilderFactory;
@@ -49,7 +49,7 @@
protected void setUp() throws Exception
{
super.setUp();
- ProcessEngine engine = ProcessEngineLocator.locateProcessEngine();
+ SignalManager engine = SignalManager.locateSignalManager();
engine.addSignalListener(getName(), this);
}
Modified: jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/task/BasicTaskTest.java
===================================================================
--- jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/task/BasicTaskTest.java 2008-07-29 08:43:03 UTC (rev 1742)
+++ jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/task/BasicTaskTest.java 2008-07-29 09:12:55 UTC (rev 1743)
@@ -27,9 +27,9 @@
import java.util.List;
import java.util.concurrent.ExecutionException;
-import org.jboss.bpm.client.ProcessEngine;
import org.jboss.bpm.client.ProcessEngineLocator;
import org.jboss.bpm.client.ProcessManager;
+import org.jboss.bpm.client.SignalManager;
import org.jboss.bpm.model.Process;
import org.jboss.bpm.model.ProcessBuilder;
import org.jboss.bpm.model.ProcessBuilderFactory;
@@ -49,7 +49,7 @@
protected void setUp() throws Exception
{
super.setUp();
- ProcessEngine engine = ProcessEngineLocator.locateProcessEngine();
+ SignalManager engine = SignalManager.locateSignalManager();
engine.addSignalListener(getName(), this);
}
Modified: jbossbpm/spec/trunk/modules/testsuite/src/test/resources/jbpm-beans.xml
===================================================================
--- jbossbpm/spec/trunk/modules/testsuite/src/test/resources/jbpm-beans.xml 2008-07-29 08:43:03 UTC (rev 1742)
+++ jbossbpm/spec/trunk/modules/testsuite/src/test/resources/jbpm-beans.xml 2008-07-29 09:12:55 UTC (rev 1743)
@@ -12,16 +12,17 @@
<bean name="jBPMProcessEngine" class="org.jboss.bpm.client.internal.ProcessEngineImpl">
<property name="processManager"><inject bean="jBPMProcessManager"/></property>
<property name="executionManager"><inject bean="jBPMExecutionManager"/></property>
+ <property name="signalManager"><inject bean="jBPMSignalManager"/></property>
+ <property name="messageManager"><inject bean="jBPMMessageManager"/></property>
</bean>
- <!-- The ExecutionManager -->
- <bean name="jBPMExecutionManager" class="org.jboss.bpm.client.internal.ExecutionManagerImpl">
- <property name="processEngine"><inject bean="jBPMProcessEngine" state="Instantiated"/></property>
- </bean>
+ <!-- The Managers -->
+ <bean name="jBPMExecutionManager" class="org.jboss.bpm.client.internal.ExecutionManagerImpl"/>
+ <bean name="jBPMSignalManager" class="org.jboss.bpm.client.internal.SignalManagerImpl"/>
+ <bean name="jBPMMessageManager" class="org.jboss.bpm.client.internal.MessageManagerImpl"/>
<!-- The ProcessManager -->
<bean name="jBPMProcessManager" class="org.jboss.bpm.client.internal.ProcessManagerImpl">
- <property name="processEngine"><inject bean="jBPMProcessEngine" state="Instantiated"/></property>
<property name="dialectRegistry"><inject bean="jBPMDialectRegistry"/></property>
<property name="dialectHandlers">
<map keyClass="java.lang.String" valueClass="org.jboss.bpm.client.DialectHandler">
15 years, 9 months
JBoss JBPM SVN: r1742 - in jbpm4/pvm/trunk/modules/core/src/test: java/org/jbpm/pvm/api and 2 other directories.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2008-07-29 04:43:03 -0400 (Tue, 29 Jul 2008)
New Revision: 1742
Added:
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/
Removed:
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/basicfeatures/
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/msg/
jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/msg/
Modified:
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/NonDbTests.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/AutomaticDecisionTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/BasicExecutionFlowTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/EventPropagationTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/EventTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/ExceptionHandlerTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/ExecutionStateTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/ExternalDecisionTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/FunctionalActivityTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/LoopingTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/PvmClientTests.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/ScopeStateTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/ScopeVariableDeclarationTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/ScopeVariableTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/SubProcessTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/TransitionAsWaitStateTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/TransitionBasedConcurrencyTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/TransitionEventsTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/VariableTest.java
Log:
test suite clean up
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/NonDbTests.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/NonDbTests.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/NonDbTests.java 2008-07-29 08:43:03 UTC (rev 1742)
@@ -24,7 +24,7 @@
import junit.framework.Test;
import junit.framework.TestSuite;
-import org.jbpm.pvm.basicfeatures.PvmClientTests;
+import org.jbpm.pvm.api.basicfeatures.PvmClientTests;
import org.jbpm.pvm.env.EnvironmentTests;
import org.jbpm.wire.WireTests;
Copied: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures (from rev 1731, jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/basicfeatures)
Property changes on: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/AutomaticDecisionTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/basicfeatures/AutomaticDecisionTest.java 2008-07-25 13:51:28 UTC (rev 1731)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/AutomaticDecisionTest.java 2008-07-29 08:43:03 UTC (rev 1742)
@@ -19,7 +19,7 @@
* 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.pvm.basicfeatures;
+package org.jbpm.pvm.api.basicfeatures;
import java.util.Map;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/BasicExecutionFlowTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/basicfeatures/BasicExecutionFlowTest.java 2008-07-25 13:51:28 UTC (rev 1731)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/BasicExecutionFlowTest.java 2008-07-29 08:43:03 UTC (rev 1742)
@@ -19,7 +19,7 @@
* 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.pvm.basicfeatures;
+package org.jbpm.pvm.api.basicfeatures;
import java.util.ArrayList;
import java.util.List;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/EventPropagationTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/basicfeatures/EventPropagationTest.java 2008-07-25 13:51:28 UTC (rev 1731)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/EventPropagationTest.java 2008-07-29 08:43:03 UTC (rev 1742)
@@ -19,7 +19,7 @@
* 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.pvm.basicfeatures;
+package org.jbpm.pvm.api.basicfeatures;
import java.util.ArrayList;
import java.util.List;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/EventTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/basicfeatures/EventTest.java 2008-07-25 13:51:28 UTC (rev 1731)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/EventTest.java 2008-07-29 08:43:03 UTC (rev 1742)
@@ -19,7 +19,7 @@
* 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.pvm.basicfeatures;
+package org.jbpm.pvm.api.basicfeatures;
import java.util.ArrayList;
import java.util.List;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/ExceptionHandlerTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/basicfeatures/ExceptionHandlerTest.java 2008-07-25 13:51:28 UTC (rev 1731)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/ExceptionHandlerTest.java 2008-07-29 08:43:03 UTC (rev 1742)
@@ -19,7 +19,7 @@
* 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.pvm.basicfeatures;
+package org.jbpm.pvm.api.basicfeatures;
import java.util.Map;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/ExecutionStateTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/basicfeatures/ExecutionStateTest.java 2008-07-25 13:51:28 UTC (rev 1731)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/ExecutionStateTest.java 2008-07-29 08:43:03 UTC (rev 1742)
@@ -19,7 +19,7 @@
* 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.pvm.basicfeatures;
+package org.jbpm.pvm.api.basicfeatures;
import java.util.Map;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/ExternalDecisionTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/basicfeatures/ExternalDecisionTest.java 2008-07-25 13:51:28 UTC (rev 1731)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/ExternalDecisionTest.java 2008-07-29 08:43:03 UTC (rev 1742)
@@ -19,7 +19,7 @@
* 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.pvm.basicfeatures;
+package org.jbpm.pvm.api.basicfeatures;
import junit.framework.TestCase;
import org.jbpm.pvm.samples.activities.AutomaticActivity;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/FunctionalActivityTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/basicfeatures/FunctionalActivityTest.java 2008-07-25 13:51:28 UTC (rev 1731)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/FunctionalActivityTest.java 2008-07-29 08:43:03 UTC (rev 1742)
@@ -19,7 +19,7 @@
* 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.pvm.basicfeatures;
+package org.jbpm.pvm.api.basicfeatures;
import java.util.ArrayList;
import java.util.List;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/LoopingTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/basicfeatures/LoopingTest.java 2008-07-25 13:51:28 UTC (rev 1731)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/LoopingTest.java 2008-07-29 08:43:03 UTC (rev 1742)
@@ -1,4 +1,4 @@
-package org.jbpm.pvm.basicfeatures;
+package org.jbpm.pvm.api.basicfeatures;
import java.util.ArrayList;
import java.util.List;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/PvmClientTests.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/basicfeatures/PvmClientTests.java 2008-07-25 13:51:28 UTC (rev 1731)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/PvmClientTests.java 2008-07-29 08:43:03 UTC (rev 1742)
@@ -19,7 +19,7 @@
* 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.pvm.basicfeatures;
+package org.jbpm.pvm.api.basicfeatures;
import junit.framework.Test;
import junit.framework.TestSuite;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/ScopeStateTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/basicfeatures/ScopeStateTest.java 2008-07-25 13:51:28 UTC (rev 1731)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/ScopeStateTest.java 2008-07-29 08:43:03 UTC (rev 1742)
@@ -19,7 +19,7 @@
* 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.pvm.basicfeatures;
+package org.jbpm.pvm.api.basicfeatures;
import java.util.Map;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/ScopeVariableDeclarationTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/basicfeatures/ScopeVariableDeclarationTest.java 2008-07-25 13:51:28 UTC (rev 1731)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/ScopeVariableDeclarationTest.java 2008-07-29 08:43:03 UTC (rev 1742)
@@ -19,7 +19,7 @@
* 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.pvm.basicfeatures;
+package org.jbpm.pvm.api.basicfeatures;
import java.util.HashMap;
import java.util.Map;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/ScopeVariableTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/basicfeatures/ScopeVariableTest.java 2008-07-25 13:51:28 UTC (rev 1731)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/ScopeVariableTest.java 2008-07-29 08:43:03 UTC (rev 1742)
@@ -19,7 +19,7 @@
* 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.pvm.basicfeatures;
+package org.jbpm.pvm.api.basicfeatures;
import java.util.Map;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/SubProcessTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/basicfeatures/SubProcessTest.java 2008-07-25 13:51:28 UTC (rev 1731)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/SubProcessTest.java 2008-07-29 08:43:03 UTC (rev 1742)
@@ -19,7 +19,7 @@
* 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.pvm.basicfeatures;
+package org.jbpm.pvm.api.basicfeatures;
import java.util.Map;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/TransitionAsWaitStateTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/basicfeatures/TransitionAsWaitStateTest.java 2008-07-25 13:51:28 UTC (rev 1731)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/TransitionAsWaitStateTest.java 2008-07-29 08:43:03 UTC (rev 1742)
@@ -19,7 +19,7 @@
* 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.pvm.basicfeatures;
+package org.jbpm.pvm.api.basicfeatures;
import java.util.Map;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/TransitionBasedConcurrencyTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/basicfeatures/TransitionBasedConcurrencyTest.java 2008-07-25 13:51:28 UTC (rev 1731)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/TransitionBasedConcurrencyTest.java 2008-07-29 08:43:03 UTC (rev 1742)
@@ -1,4 +1,4 @@
-package org.jbpm.pvm.basicfeatures;
+package org.jbpm.pvm.api.basicfeatures;
import java.util.ArrayList;
import java.util.Collection;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/TransitionEventsTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/basicfeatures/TransitionEventsTest.java 2008-07-25 13:51:28 UTC (rev 1731)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/TransitionEventsTest.java 2008-07-29 08:43:03 UTC (rev 1742)
@@ -19,7 +19,7 @@
* 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.pvm.basicfeatures;
+package org.jbpm.pvm.api.basicfeatures;
import java.util.ArrayList;
import java.util.List;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/VariableTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/basicfeatures/VariableTest.java 2008-07-25 13:51:28 UTC (rev 1731)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/VariableTest.java 2008-07-29 08:43:03 UTC (rev 1742)
@@ -19,7 +19,7 @@
* 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.pvm.basicfeatures;
+package org.jbpm.pvm.api.basicfeatures;
import java.util.HashMap;
import java.util.HashSet;
15 years, 9 months
JBoss JBPM SVN: r1741 - in jbpm4/pvm/trunk: modules/core and 1 other directory.
by do-not-reply@jboss.org
Author: porcherg
Date: 2008-07-29 04:34:34 -0400 (Tue, 29 Jul 2008)
New Revision: 1741
Modified:
jbpm4/pvm/trunk/assembly.xml
jbpm4/pvm/trunk/modules/core/pom.xml
Log:
basic docbook manual generation (only for reference-guide)
Modified: jbpm4/pvm/trunk/assembly.xml
===================================================================
--- jbpm4/pvm/trunk/assembly.xml 2008-07-28 20:54:25 UTC (rev 1740)
+++ jbpm4/pvm/trunk/assembly.xml 2008-07-29 08:34:34 UTC (rev 1741)
@@ -38,6 +38,13 @@
<outputDirectory>src</outputDirectory>
</fileSet>
<fileSet>
+ <directory>modules/core/target/manual</directory>
+ <outputDirectory>manual</outputDirectory>
+ <excludes>
+ <exclude>**/*.fo</exclude>
+ </excludes>
+ </fileSet>
+ <fileSet>
<directory>modules/core/src/test/java</directory>
<includes>
<include>org/jbpm/pvm/samples/**/*.*</include>
Modified: jbpm4/pvm/trunk/modules/core/pom.xml
===================================================================
--- jbpm4/pvm/trunk/modules/core/pom.xml 2008-07-28 20:54:25 UTC (rev 1740)
+++ jbpm4/pvm/trunk/modules/core/pom.xml 2008-07-29 08:34:34 UTC (rev 1741)
@@ -130,11 +130,7 @@
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<showDeprecation>false</showDeprecation>
-<!-- <testExcludes>-->
-<!-- sample currently do not compile -->
-<!-- <exclude>org/jbpm/pvm/client/ExternalDecisionTest.java</exclude>-->
-<!-- <exclude>org/jbpm/pvm/client/PvmClientTests.java</exclude>-->
-<!-- </testExcludes>-->
+
</configuration>
</plugin>
<plugin>
@@ -204,6 +200,73 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>com.agilejava.docbkx</groupId>
+ <artifactId>docbkx-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>doc-reference html</id>
+ <goals>
+ <goal>generate-html</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <sourceDirectory>${basedir}/src/docbook/doc-reference/en</sourceDirectory>
+ <targetDirectory>${basedir}/target/manual/html_single/reference</targetDirectory>
+ <postProcess>
+ <copy todir="${basedir}/target/manual/html_single/reference/images">
+ <fileset dir="${basedir}/src/docbook/doc-reference/en/images">
+ <include name="**/*.png"/>
+ <include name="**/*.gif"/>
+ <include name="**/*.jpg"/>
+ </fileset>
+ </copy>
+ </postProcess>
+ </configuration>
+ </execution>
+ <execution>
+ <id>doc-reference chunk html</id>
+ <goals>
+ <goal>generate-html</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <sourceDirectory>${basedir}/src/docbook/doc-reference/en</sourceDirectory>
+ <targetDirectory>${basedir}/target/manual/html/reference</targetDirectory>
+ <chunkedOutput>true</chunkedOutput>
+ <postProcess>
+ <copy todir="${basedir}/target/manual/html/reference/images">
+ <fileset dir="${basedir}/src/docbook/doc-reference/en/images">
+ <include name="**/*.png"/>
+ <include name="**/*.gif"/>
+ <include name="**/*.jpg"/>
+ </fileset>
+ </copy>
+ </postProcess>
+ </configuration>
+ </execution>
+ <execution>
+ <id>doc-reference pdf</id>
+ <goals>
+ <goal>generate-pdf</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <sourceDirectory>${basedir}/src/docbook/doc-reference/en</sourceDirectory>
+ <targetDirectory>${basedir}/target/manual/pdf/reference</targetDirectory>
+ <imgSrcPath>${basedir}/src/docbook/doc-reference/en/</imgSrcPath>
+ </configuration>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>org.docbook</groupId>
+ <artifactId>docbook-xml</artifactId>
+ <version>4.4</version>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+ </plugin>
</plugins>
</build>
15 years, 9 months
JBoss JBPM SVN: r1740 - in jbossbpm/impl/jbpm3/trunk/modules/jpdl/core/src: test/java/org/jbpm and 1 other directories.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2008-07-28 16:54:25 -0400 (Mon, 28 Jul 2008)
New Revision: 1740
Added:
jbossbpm/impl/jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/command/
jbossbpm/impl/jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/command/GetProcessInstancesCommandTest.java
Modified:
jbossbpm/impl/jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/command/GetProcessInstancesCommand.java
Log:
allow process instance selection based on date and time, not just time: JBPM-1106
Modified: jbossbpm/impl/jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/command/GetProcessInstancesCommand.java
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/command/GetProcessInstancesCommand.java 2008-07-28 17:11:43 UTC (rev 1739)
+++ jbossbpm/impl/jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/command/GetProcessInstancesCommand.java 2008-07-28 20:54:25 UTC (rev 1740)
@@ -88,10 +88,10 @@
Query query = jbpmContext.getSession().createQuery(queryText.toString());
if (fromStartDate != null) {
- query.setDate("from", fromStartDate);
+ query.setTimestamp("from", fromStartDate);
}
if (untilStartDate != null) {
- query.setDate("until", untilStartDate);
+ query.setTimestamp("until", untilStartDate);
}
if (processName != null && processName.length() > 0) {
Added: jbossbpm/impl/jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/command/GetProcessInstancesCommandTest.java
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/command/GetProcessInstancesCommandTest.java (rev 0)
+++ jbossbpm/impl/jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/command/GetProcessInstancesCommandTest.java 2008-07-28 20:54:25 UTC (rev 1740)
@@ -0,0 +1,94 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.command;
+
+import java.util.Calendar;
+import java.util.List;
+
+import org.jbpm.command.impl.CommandServiceImpl;
+import org.jbpm.db.AbstractDbTestCase;
+import org.jbpm.graph.def.ProcessDefinition;
+import org.jbpm.graph.exe.ProcessInstance;
+
+/**
+ * Test case for JBPM-1106.
+ * @author Alejandro Guizar
+ */
+public class GetProcessInstancesCommandTest extends AbstractDbTestCase {
+
+ private static CommandService commandService = new CommandServiceImpl(jbpmConfiguration);
+ private ProcessDefinition processDefinition;
+
+ public void setUp() throws Exception {
+ super.setUp();
+ processDefinition = new ProcessDefinition("Audit");
+ jbpmContext.deployProcessDefinition(processDefinition);
+
+ ProcessInstance processInstance = new ProcessInstance(processDefinition);
+ Calendar calendar = Calendar.getInstance();
+ calendar.set(2008, 8, 10, 9, 30);
+ processInstance.setStart(calendar.getTime());
+ jbpmContext.save(processInstance);
+
+ processInstance = new ProcessInstance(processDefinition);
+ calendar.set(Calendar.HOUR_OF_DAY, 16);
+ processInstance.setStart(calendar.getTime());
+ jbpmContext.save(processInstance);
+
+ processInstance = new ProcessInstance(processDefinition);
+ calendar.add(Calendar.DAY_OF_MONTH, 1);
+ processInstance.setStart(calendar.getTime());
+ jbpmContext.save(processInstance);
+
+ processInstance = new ProcessInstance(processDefinition);
+ calendar.set(Calendar.HOUR_OF_DAY, 9);
+ processInstance.setStart(calendar.getTime());
+ jbpmContext.save(processInstance);
+
+ newTransaction();
+ }
+
+ public void testStartDate() {
+ GetProcessInstancesCommand command = new GetProcessInstancesCommand();
+ Calendar calendar = Calendar.getInstance();
+ calendar.set(2008, 8, 10, 9, 0);
+ command.setFromStartDate(calendar.getTime());
+ calendar.add(Calendar.DAY_OF_MONTH, 1);
+ command.setUntilStartDate(calendar.getTime());
+
+ List processInstances = (List) commandService.execute(command);
+ assertEquals(2, processInstances.size());
+ }
+
+ public void testStartTime() {
+ GetProcessInstancesCommand command = new GetProcessInstancesCommand();
+ Calendar calendar = Calendar.getInstance();
+ calendar.set(2008, 8, 10, 9, 0);
+ command.setFromStartDate(calendar.getTime());
+ calendar.set(Calendar.HOUR_OF_DAY, 12);
+ command.setUntilStartDate(calendar.getTime());
+
+ List processInstances = (List) commandService.execute(command);
+ assertEquals(1, processInstances.size());
+ }
+
+}
15 years, 9 months
JBoss JBPM SVN: r1739 - in jbossbpm/spec/trunk/modules: api/src/main/java/org/jboss/bpm/model and 10 other directories.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-07-28 13:11:43 -0400 (Mon, 28 Jul 2008)
New Revision: 1739
Added:
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/MessageListener.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/ObjectNameFactory.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/EntityImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ParticipantImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/RoleImpl.java
Removed:
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/SignalManager.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/MessageReceiver.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/client/internal/SignalManagerImpl.java
Modified:
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/ExecutionManager.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessEngine.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessManager.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/MessageBuilder.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Participant.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Process.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/TaskBuilder.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/SignalHandler.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/test/AbstractAPITestCase.java
jbossbpm/spec/trunk/modules/dialects/stp/src/test/resources/jbpm-beans.xml
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/client/internal/ExecutionManagerImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/client/internal/ProcessEngineImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/BPMNElementImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/MessageBuilderImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/MessageImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ProcessImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ReceiveTaskImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/SendTaskImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/TaskBuilderImpl.java
jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/airticket/AirticketTest.java
jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/parallelsplit/ParallelSplitTest.java
jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/sequence/BasicSequenceTest.java
jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/task/BasicTaskTest.java
jbossbpm/spec/trunk/modules/testsuite/src/test/resources/jbpm-beans.xml
Log:
Add MessageListener
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/ExecutionManager.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/ExecutionManager.java 2008-07-28 15:46:17 UTC (rev 1738)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/ExecutionManager.java 2008-07-28 17:11:43 UTC (rev 1739)
@@ -25,7 +25,6 @@
import org.jboss.bpm.model.FlowObject;
import org.jboss.bpm.model.Process;
-import org.jboss.bpm.model.Signal;
import org.jboss.bpm.runtime.Attachments;
import org.jboss.bpm.runtime.ExecutionHandler;
import org.jboss.bpm.runtime.FlowHandler;
@@ -94,12 +93,6 @@
return handler;
}
- protected void throwSignal(Signal signal)
- {
- SignalManager sm = SignalManager.locateSignalManager();
- sm.throwSignal(signal);
- }
-
private HandlerSupport getHandlerSupport(FlowObject fo)
{
if (fo instanceof HandlerSupport == false)
Added: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/MessageListener.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/MessageListener.java (rev 0)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/MessageListener.java 2008-07-28 17:11:43 UTC (rev 1739)
@@ -0,0 +1,47 @@
+/*
+ * 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;
+
+import javax.management.ObjectName;
+
+import org.jboss.bpm.model.Message;
+
+//$Id$
+
+/**
+ * A MessageListener that can be registered with the ProcessEngine
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 08-Jul-2008
+ */
+public interface MessageListener
+{
+ /**
+ * Get the id for this listener
+ */
+ ObjectName getMessageListenerID();
+
+ /**
+ * Catch a message from the process that this listener is registered with
+ */
+ void catchMessage(Message message);
+}
\ No newline at end of file
Property changes on: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/MessageListener.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/ObjectNameFactory.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/ObjectNameFactory.java (rev 0)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/ObjectNameFactory.java 2008-07-28 17:11:43 UTC (rev 1739)
@@ -0,0 +1,74 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.client;
+
+// $Id$
+
+import java.util.Hashtable;
+
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+
+/**
+ * A simple factory for creating safe object names.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 08-May-2006
+ */
+public class ObjectNameFactory
+{
+ public static ObjectName create(String name)
+ {
+ try
+ {
+ return new ObjectName(name);
+ }
+ catch (MalformedObjectNameException e)
+ {
+ throw new Error("Invalid ObjectName: " + name + "; " + e);
+ }
+ }
+
+ public static ObjectName create(String domain, String key, String value)
+ {
+ try
+ {
+ return new ObjectName(domain, key, value);
+ }
+ catch (MalformedObjectNameException e)
+ {
+ throw new Error("Invalid ObjectName: " + domain + "," + key + "," + value + "; " + e);
+ }
+ }
+
+ public static ObjectName create(String domain, Hashtable table)
+ {
+ try
+ {
+ return new ObjectName(domain, table);
+ }
+ catch (MalformedObjectNameException e)
+ {
+ throw new Error("Invalid ObjectName: " + domain + "," + table + "; " + e);
+ }
+ }
+}
Property changes on: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/ObjectNameFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessEngine.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessEngine.java 2008-07-28 15:46:17 UTC (rev 1738)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessEngine.java 2008-07-28 17:11:43 UTC (rev 1739)
@@ -21,6 +21,20 @@
*/
package org.jboss.bpm.client;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import javax.management.ObjectName;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.jboss.bpm.model.FlowObject;
+import org.jboss.bpm.model.Message;
+import org.jboss.bpm.model.Process;
+import org.jboss.bpm.model.Signal;
+
// $Id$
/**
@@ -36,15 +50,21 @@
/** The default bean config: jbpm-beans.xml */
public static final String JBPM_ENGINE_CONFIG = "jbpm-beans.xml";
+ // provide logging
+ private static final Log log = LogFactory.getLog(ProcessEngine.class);
+
// Injected through the MC
protected ProcessManager processManager;
// Injected through the MC
- protected SignalManager signalManager;
- // Injected through the MC
protected ExecutionManager executionManager;
// Flag to indicate that the Engine is shutting down
private boolean prepareForShutdown;
+ // The map of registered signal listeners
+ private Map<String, Set<SignalListener>> signalListeners = new HashMap<String, Set<SignalListener>>();
+ // The set of registered message listeners
+ private Set<MessageListener> messageListeners = new HashSet<MessageListener>();
+
// Hide public constructor
protected ProcessEngine()
{
@@ -76,6 +96,7 @@
/**
* Get the configured instance of the ProcessManager
+ *
* @return The ProcessManager
*/
public ProcessManager getProcessManager()
@@ -87,19 +108,8 @@
}
/**
- * Get the configured instance of the SignalManager
- * @return The SignalManager
- */
- public SignalManager getSignalManager()
- {
- if (signalManager == null)
- throw new IllegalStateException("SignalManager not available through kernel configuration");
-
- return signalManager;
- }
-
- /**
* Get the configured instance of the ExecutionManager
+ *
* @return The ExecutionManager
*/
public ExecutionManager getExecutionManager()
@@ -109,4 +119,113 @@
return executionManager;
}
+
+ /**
+ * Add a SignalListener for a given process
+ */
+ public void addSignalListener(String procName, SignalListener listener)
+ {
+ log.debug("addSignalListener: " + listener);
+ Set<SignalListener> set = signalListeners.get(procName);
+ if (set == null)
+ {
+ set = new HashSet<SignalListener>();
+ signalListeners.put(procName, set);
+ }
+ set.add(listener);
+ }
+
+ /**
+ * Remove an SignalListener for a given process
+ */
+ public void removeSignalListener(String procName, SignalListener listener)
+ {
+ log.debug("removeSignalListener: " + listener);
+ Set<SignalListener> set = signalListeners.get(procName);
+ if (set != null)
+ {
+ set.remove(listener);
+ }
+ }
+
+ /** Remove all SignalListener for a given process */
+ public void removeSignalListeners(String procName)
+ {
+ log.debug("removeSignalListeners: " + procName);
+ signalListeners.remove(procName);
+ }
+
+ /** Throw a signal to all registered listeners */
+ public void throwSignal(Signal signal)
+ {
+ log.debug("throwSignal: " + signal);
+ String procName = signal.getProcessName();
+ Set<SignalListener> set = signalListeners.get(procName);
+ if (set != null)
+ {
+ for (SignalListener listener : set)
+ {
+ listener.catchSignal(signal);
+ }
+ }
+ }
+
+ /**
+ * Add a MessageListener
+ */
+ public void addMessageListener(MessageListener listener)
+ {
+ log.debug("addMessageListener: " + listener);
+ messageListeners.add(listener);
+ }
+
+ /**
+ * Remove an MessageListener
+ */
+ public void removeMessageListener(MessageListener listener)
+ {
+ log.debug("removeMessageListener: " + listener);
+ messageListeners.remove(listener);
+ }
+
+ /**
+ * Send a message to a given {@link Task} or @{link Event}
+ */
+ public void sendMessage(ObjectName procID, String targetName, Message msg)
+ {
+ ProcessManager pm = ProcessManager.locateProcessManager();
+ Process proc = pm.getProcessByID(procID);
+ FlowObject target = proc.findFlowObject(targetName);
+ if (target == null)
+ throw new IllegalArgumentException("Cannot find message target: " + targetName);
+ if (target instanceof MessageListener == false)
+ throw new IllegalArgumentException("Message target is not a valid message receiver: " + targetName);
+
+ MessageListener msgListener = (MessageListener)target;
+ msgListener.catchMessage(msg);
+ }
+
+ /**
+ * Send a message to a given {@link MessageListener}
+ */
+ public void sendMessage(ObjectName listenerID, Message msg)
+ {
+ MessageListener msgListener = null;
+ for (MessageListener auxListener : messageListeners)
+ {
+ if (auxListener.getMessageListenerID().equals(listenerID))
+ {
+ msgListener = auxListener;
+ break;
+ }
+ }
+ if (msgListener != null)
+ {
+ msgListener.catchMessage(msg);
+ }
+ else
+ {
+ log.warn("No message listener registered: " + listenerID);
+ }
+ }
}
\ No newline at end of file
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessManager.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessManager.java 2008-07-28 15:46:17 UTC (rev 1738)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessManager.java 2008-07-28 17:11:43 UTC (rev 1739)
@@ -41,12 +41,9 @@
import org.jboss.bpm.BPMException;
import org.jboss.bpm.EngineShutdownException;
import org.jboss.bpm.ProcessTimeoutException;
-import org.jboss.bpm.model.FlowObject;
-import org.jboss.bpm.model.Message;
import org.jboss.bpm.model.Process;
import org.jboss.bpm.model.Process.Status;
import org.jboss.bpm.runtime.Attachments;
-import org.jboss.bpm.runtime.MessageReceiver;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -191,21 +188,6 @@
public abstract void startProcess(String name, Attachments att);
/**
- * Send a message to a given {@link MessageReceiver}
- */
- public void sendMessage(ObjectName procID, String toName, Message msg)
- {
- Process proc = getProcessByID(procID);
- FlowObject target = proc.findFlowObject(toName);
- if (target == null)
- throw new IllegalArgumentException("Cannot find message target: " + toName);
- if (target instanceof MessageReceiver == false)
- throw new IllegalArgumentException("Message target is not a valid message receiver: " + toName);
-
- ((MessageReceiver)target).receiveMessage(msg);
- }
-
- /**
* Wait for the Process to end. All Tokens that are generated at the Start Event for that Process must eventually
* arrive at an End Event. The Process will be in a running state until all Tokens are consumed.
* <p/>
Deleted: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/SignalManager.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/SignalManager.java 2008-07-28 15:46:17 UTC (rev 1738)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/SignalManager.java 2008-07-28 17:11:43 UTC (rev 1739)
@@ -1,121 +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.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.jboss.bpm.model.Signal;
-
-/**
- * The signal manager is the entry point for signal processing
- *
- * @author thomas.diesler(a)jboss.com
- * @since 08-Jul-2008
- */
-public abstract class SignalManager
-{
- // provide logging
- private static final Log log = LogFactory.getLog(SignalManager.class);
-
- // Injected through the MC
- protected ProcessEngine engine;
- // The map of registered signal listeners
- private Map<String, Set<SignalListener>> listeners = new HashMap<String, Set<SignalListener>>();
-
- // Hide public constructor
- protected SignalManager()
- {
- }
-
- /**
- * Get the associated process engine
- */
- public ProcessEngine getProcessEngine()
- {
- if (engine == null)
- throw new IllegalStateException("ProcessEngine not available through kernel configuration");
-
- return engine;
- }
-
- /**
- * Locate the signal manager
- */
- public static SignalManager locateSignalManager()
- {
- ProcessEngine engine = ProcessEngineLocator.locateProcessEngine();
- return engine.getSignalManager();
- }
-
- /** Add a signal listener for a given process */
- public void addListener(String procName, SignalListener listener)
- {
- log.debug("addListener: " + listener);
- Set<SignalListener> set = listeners.get(procName);
- if (set == null)
- {
- set = new HashSet<SignalListener>();
- listeners.put(procName, set);
- }
- set.add(listener);
- }
-
- /** Remove an signal listener for a given process */
- public void removeListener(String procName, SignalListener listener)
- {
- log.debug("removeListener: " + listener);
- Set<SignalListener> set = listeners.get(procName);
- if (set != null)
- {
- set.remove(listener);
- }
- }
-
- /** Remove all signal listeners for a given process */
- public void removeListeners(String procName)
- {
- log.debug("removeListeners: " + procName);
- listeners.remove(procName);
- }
-
- /** Throw a signal to all registered listeners */
- public void throwSignal(Signal signal)
- {
- log.debug("throwSignal: " + signal);
- String procName = signal.getProcessName();
- Set<SignalListener> set = listeners.get(procName);
- if (set != null)
- {
- for (SignalListener listener : set)
- {
- listener.catchSignal(signal);
- }
- }
- }
-}
\ No newline at end of file
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/MessageBuilder.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/MessageBuilder.java 2008-07-28 15:46:17 UTC (rev 1738)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/MessageBuilder.java 2008-07-28 17:11:43 UTC (rev 1739)
@@ -21,6 +21,8 @@
*/
package org.jboss.bpm.model;
+import javax.management.ObjectName;
+
//$Id$
/**
@@ -34,7 +36,7 @@
/**
* Create a {@link Message} with a given name
*/
- MessageBuilder newMessage(String name);
+ MessageBuilder newMessage(String messageName, ObjectName targetID);
/**
* Add a message property
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Participant.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Participant.java 2008-07-28 15:46:17 UTC (rev 1738)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Participant.java 2008-07-28 17:11:43 UTC (rev 1739)
@@ -24,10 +24,9 @@
//$Id$
/**
- * A Participant, which is used in the definition of attributes for a @{link Pool},
+ * A Participant, which is used in the definition of attributes for a @{link Pool}, @{link Message}, and @{link
+ * WebService}
*
- * @{link Message}, and @{link WebService}
- *
* @author thomas.diesler(a)jboss.com
* @since 21-Jul-2008
*/
@@ -37,17 +36,17 @@
{
Role, Entity
}
-
+
/**
* Get the type of this participant
*/
ParticipantType getParticipantType();
-
+
/**
* If the ParticipantType = Role, then a Role MUST be identified.
*/
Role getRoleRef();
-
+
/**
* If the ParticipantType = Entity, then an Entity MUST be identified.
*/
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Process.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Process.java 2008-07-28 15:46:17 UTC (rev 1738)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Process.java 2008-07-28 17:11:43 UTC (rev 1739)
@@ -158,9 +158,4 @@
* This method until the process ends with a given timeout.
*/
void waitForEnd(long timeout);
-
- /**
- * Send a message to a given @{link Task} or @{link Event}
- */
- void sendMessage(String toName, Message msg);
}
\ No newline at end of file
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/TaskBuilder.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/TaskBuilder.java 2008-07-28 15:46:17 UTC (rev 1738)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/TaskBuilder.java 2008-07-28 17:11:43 UTC (rev 1739)
@@ -21,7 +21,9 @@
*/
package org.jboss.bpm.model;
+import javax.management.ObjectName;
+
//$Id$
/**
@@ -32,7 +34,7 @@
*/
public interface TaskBuilder extends ActivityBuilder
{
- TaskBuilder addMessageRef(String name);
+ TaskBuilder addMessageRef(String messageName, ObjectName targetID);
- TaskBuilder addMessageProperty(String name, String value, boolean isCorrelation);
+ TaskBuilder addMessageProperty(String propName, String propValue, boolean isCorrelation);
}
\ No newline at end of file
Deleted: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/MessageReceiver.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/MessageReceiver.java 2008-07-28 15:46:17 UTC (rev 1738)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/MessageReceiver.java 2008-07-28 17:11:43 UTC (rev 1739)
@@ -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.runtime;
-
-import org.jboss.bpm.model.Message;
-
-//$Id$
-
-/**
- * The {@link FlowScheduler} that can be manipulated.
- *
- * @author thomas.diesler(a)jboss.com
- * @since 08-Jul-2008
- */
-public interface MessageReceiver
-{
- void receiveMessage(Message message);
-}
\ No newline at end of file
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/SignalHandler.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/SignalHandler.java 2008-07-28 15:46:17 UTC (rev 1738)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/SignalHandler.java 2008-07-28 17:11:43 UTC (rev 1739)
@@ -24,13 +24,12 @@
//$Id$
import org.jboss.bpm.client.ProcessEngine;
-import org.jboss.bpm.client.SignalManager;
import org.jboss.bpm.model.FlowObject;
import org.jboss.bpm.model.Signal;
/**
* The {@link ProcessEngine} invokes the SignalHandler on an {@link HandlerSupport}
- * {@link FlowObject} to send {@link Signal}s to the {@link SignalManager}.
+ * {@link FlowObject} to send {@link Signal}s.
*
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/test/AbstractAPITestCase.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/test/AbstractAPITestCase.java 2008-07-28 15:46:17 UTC (rev 1738)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/test/AbstractAPITestCase.java 2008-07-28 17:11:43 UTC (rev 1739)
@@ -28,16 +28,22 @@
import java.util.Collections;
import java.util.List;
+import javax.management.ObjectName;
+
import junit.framework.TestCase;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jboss.bpm.BPMException;
+import org.jboss.bpm.client.MessageListener;
+import org.jboss.bpm.client.ObjectNameFactory;
import org.jboss.bpm.client.SignalListener;
import org.jboss.bpm.client.internal.EmbeddedBeansDeployer;
+import org.jboss.bpm.model.BPMNElement;
+import org.jboss.bpm.model.Message;
import org.jboss.bpm.model.Signal;
-public abstract class AbstractAPITestCase extends TestCase implements SignalListener
+public abstract class AbstractAPITestCase extends TestCase implements SignalListener, MessageListener
{
// provide logging
private static final Log log = LogFactory.getLog(AbstractAPITestCase.class);
@@ -46,6 +52,8 @@
private EmbeddedBeansDeployer deployer;
// The signals caught by this test case
private List<Signal> signals = new ArrayList<Signal>();
+ // The messages caught by this test case
+ private List<Message> messages = new ArrayList<Message>();
/** Overwrite to provide beans config */
protected abstract String getBeansConfig();
@@ -112,4 +120,20 @@
{
return Collections.unmodifiableList(signals);
}
+
+ public ObjectName getMessageListenerID()
+ {
+ return ObjectNameFactory.create(BPMNElement.ID_DOMAIN, "test", getName());
+ }
+
+ public void catchMessage(Message message)
+ {
+ messages.add(message);
+ log.debug("catchMessage: " + message);
+ }
+
+ public List<Message> getMessages()
+ {
+ return Collections.unmodifiableList(messages);
+ }
}
Modified: jbossbpm/spec/trunk/modules/dialects/stp/src/test/resources/jbpm-beans.xml
===================================================================
--- jbossbpm/spec/trunk/modules/dialects/stp/src/test/resources/jbpm-beans.xml 2008-07-28 15:46:17 UTC (rev 1738)
+++ jbossbpm/spec/trunk/modules/dialects/stp/src/test/resources/jbpm-beans.xml 2008-07-28 17:11:43 UTC (rev 1739)
@@ -3,15 +3,19 @@
<!-- The KernelLocator -->
<bean name="KernelLocator" class="org.jboss.kernel.plugins.util.KernelLocator"/>
+ <!-- The ProcessBuilderFactory -->
+ <bean name="jBPMProcessBuilderFactory" class="org.jboss.bpm.model.internal.ProcessBuilderFactoryImpl"/>
+
<!-- The ProcessEngine -->
<bean name="jBPMProcessEngine" class="org.jboss.bpm.client.internal.ProcessEngineImpl">
<property name="processManager"><inject bean="jBPMProcessManager"/></property>
<property name="executionManager"><inject bean="jBPMExecutionManager"/></property>
- <property name="signalManager"><inject bean="jBPMSignalManager"/></property>
</bean>
- <!-- The ProcessBuilderFactory -->
- <bean name="jBPMProcessBuilderFactory" class="org.jboss.bpm.model.internal.ProcessBuilderFactoryImpl"/>
+ <!-- The ExecutionManager -->
+ <bean name="jBPMExecutionManager" class="org.jboss.bpm.client.internal.ExecutionManagerImpl">
+ <property name="processEngine"><inject bean="jBPMProcessEngine" state="Instantiated"/></property>
+ </bean>
<!-- The ProcessManager -->
<bean name="jBPMProcessManager" class="org.jboss.bpm.client.internal.ProcessManagerImpl">
@@ -34,13 +38,4 @@
</property>
</bean>
- <!-- The ExecutionManager -->
- <bean name="jBPMExecutionManager" class="org.jboss.bpm.client.internal.ExecutionManagerImpl">
- <property name="processEngine"><inject bean="jBPMProcessEngine" state="Instantiated"/></property>
- </bean>
-
- <!-- The SignalManager -->
- <bean name="jBPMSignalManager" class="org.jboss.bpm.client.internal.SignalManagerImpl">
- <property name="processEngine"><inject bean="jBPMProcessEngine" state="Instantiated"/></property>
- </bean>
</deployment>
\ No newline at end of file
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/client/internal/ExecutionManagerImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/client/internal/ExecutionManagerImpl.java 2008-07-28 15:46:17 UTC (rev 1738)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/client/internal/ExecutionManagerImpl.java 2008-07-28 17:11:43 UTC (rev 1739)
@@ -77,7 +77,7 @@
{
RuntimeProcess rtProc = new RuntimeProcessImpl(proc);
- throwSignal(new Signal(proc, Signal.Type.ENTER_PROCESS));
+ engine.throwSignal(new Signal(proc, Signal.Type.ENTER_PROCESS));
MutableFlowScheduler flowScheduler = rtProc.getFlowScheduler();
try
{
@@ -102,12 +102,12 @@
// Execute the FlowObject's ExecutionHandler
try
{
- throwSignal(sigHandler.getEnterSignal());
+ engine.throwSignal(sigHandler.getEnterSignal());
executable.execute(token);
}
finally
{
- throwSignal(sigHandler.getExitSignal());
+ engine.throwSignal(sigHandler.getExitSignal());
}
// Remove the head tuple
@@ -126,7 +126,7 @@
}
finally
{
- throwSignal(new Signal(proc, Signal.Type.EXIT_PROCESS));
+ engine.throwSignal(new Signal(proc, Signal.Type.EXIT_PROCESS));
}
}
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/client/internal/ProcessEngineImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/client/internal/ProcessEngineImpl.java 2008-07-28 15:46:17 UTC (rev 1738)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/client/internal/ProcessEngineImpl.java 2008-07-28 17:11:43 UTC (rev 1739)
@@ -26,7 +26,6 @@
import org.jboss.bpm.client.ExecutionManager;
import org.jboss.bpm.client.ProcessEngine;
import org.jboss.bpm.client.ProcessManager;
-import org.jboss.bpm.client.SignalManager;
/**
* A process engine with public access
@@ -45,9 +44,4 @@
{
this.executionManager = executionManager;
}
-
- public void setSignalManager(SignalManager signalManager)
- {
- this.signalManager = signalManager;
- }
}
Deleted: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/client/internal/SignalManagerImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/client/internal/SignalManagerImpl.java 2008-07-28 15:46:17 UTC (rev 1738)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/client/internal/SignalManagerImpl.java 2008-07-28 17:11:43 UTC (rev 1739)
@@ -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.jboss.bpm.client.internal;
-
-// $Id$
-
-import org.jboss.bpm.client.ProcessEngine;
-import org.jboss.bpm.client.SignalManager;
-import org.jboss.bpm.model.Signal;
-
-/**
- * An implementation of a signal manager
- *
- * @author thomas.diesler(a)jboss.com
- * @since 18-Jun-2008
- */
-public class SignalManagerImpl extends SignalManager
-{
- public void setProcessEngine(ProcessEngine engine)
- {
- this.engine = engine;
- }
-
- @Override
- public void throwSignal(Signal signal)
- {
- super.throwSignal(signal);
- }
-}
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/BPMNElementImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/BPMNElementImpl.java 2008-07-28 15:46:17 UTC (rev 1738)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/BPMNElementImpl.java 2008-07-28 17:11:43 UTC (rev 1739)
@@ -23,10 +23,9 @@
//$Id$
-import javax.management.MalformedObjectNameException;
import javax.management.ObjectName;
-import org.jboss.bpm.InvalidProcessException;
+import org.jboss.bpm.client.ObjectNameFactory;
import org.jboss.bpm.model.BPMNElement;
import org.jboss.bpm.model.Event;
import org.jboss.bpm.model.Flow;
@@ -44,7 +43,7 @@
public class BPMNElementImpl implements BPMNElement
{
private static final long serialVersionUID = 1L;
-
+
private ObjectName id;
private Process process;
@@ -74,43 +73,36 @@
protected void assignElementID()
{
- try
+ StringBuilder str = new StringBuilder(ID_DOMAIN + ":");
+ if (this instanceof Event)
{
- StringBuilder str = new StringBuilder(ID_DOMAIN + ":");
- if (this instanceof Event)
- {
- str.append("type=Event");
- }
- else if (this instanceof Process)
- {
- str.append("type=Process");
- }
- else if (this instanceof Task)
- {
- str.append("type=Task");
- }
- else if (this instanceof Gateway)
- {
- str.append("type=Gateway");
- }
- else if (this instanceof Flow)
- {
- str.append("type=Flow");
- }
- else
- {
- str.append("type=Other");
- }
- if (this instanceof NameSupport)
- {
- str.append(",name=" + ((NameSupport)this).getName());
- }
- str.append(",id=" + new UID());
- this.id = new ObjectName(str.toString());
+ str.append("type=Event");
}
- catch (MalformedObjectNameException ex)
+ else if (this instanceof Process)
{
- throw new InvalidProcessException("Cannot assign id", ex);
+ str.append("type=Process");
}
+ else if (this instanceof Task)
+ {
+ str.append("type=Task");
+ }
+ else if (this instanceof Gateway)
+ {
+ str.append("type=Gateway");
+ }
+ else if (this instanceof Flow)
+ {
+ str.append("type=Flow");
+ }
+ else
+ {
+ str.append("type=Other");
+ }
+ if (this instanceof NameSupport)
+ {
+ str.append(",name=" + ((NameSupport)this).getName());
+ }
+ str.append(",id=" + new UID());
+ this.id = ObjectNameFactory.create(str.toString());
}
}
\ No newline at end of file
Added: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/EntityImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/EntityImpl.java (rev 0)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/EntityImpl.java 2008-07-28 17:11:43 UTC (rev 1739)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.model.internal;
+
+import org.jboss.bpm.model.Entity;
+
+//$Id$
+
+/**
+ * An Entity, which is used in the definition of attributes for a @{link Participant}
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 21-Jul-2008
+ */
+public class EntityImpl extends ParticipantImpl implements Entity
+{
+ private String name;
+
+ public EntityImpl(String name)
+ {
+ this.name = name;
+ this.entityRef = this;
+ }
+
+ public ParticipantType getParticipantType()
+ {
+ return ParticipantType.Entity;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+}
Property changes on: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/EntityImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/MessageBuilderImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/MessageBuilderImpl.java 2008-07-28 15:46:17 UTC (rev 1738)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/MessageBuilderImpl.java 2008-07-28 17:11:43 UTC (rev 1739)
@@ -23,6 +23,8 @@
//$Id$
+import javax.management.ObjectName;
+
import org.jboss.bpm.model.Message;
import org.jboss.bpm.model.MessageBuilder;
import org.jboss.bpm.model.Property;
@@ -37,9 +39,9 @@
{
private MessageImpl message;
- public MessageBuilder newMessage(String name)
+ public MessageBuilder newMessage(String name, ObjectName targetID)
{
- message = new MessageImpl(name);
+ message = new MessageImpl(name, targetID);
return this;
}
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/MessageImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/MessageImpl.java 2008-07-28 15:46:17 UTC (rev 1738)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/MessageImpl.java 2008-07-28 17:11:43 UTC (rev 1739)
@@ -25,6 +25,8 @@
import java.util.Collections;
import java.util.List;
+import javax.management.ObjectName;
+
import org.jboss.bpm.NotImplementedException;
import org.jboss.bpm.model.Message;
import org.jboss.bpm.model.Participant;
@@ -45,11 +47,14 @@
public class MessageImpl extends SupportingElementImpl implements Message, MutablePropertySupport
{
private String name;
+ private ObjectName sourceID;
+ private ObjectName targetID;
private List<Property> props = new ArrayList<Property>();
- public MessageImpl(String name)
+ public MessageImpl(String name, ObjectName targetID)
{
this.name = name;
+ this.targetID = targetID;
}
/**
Added: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ParticipantImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ParticipantImpl.java (rev 0)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ParticipantImpl.java 2008-07-28 17:11:43 UTC (rev 1739)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.model.internal;
+
+import org.jboss.bpm.model.Entity;
+import org.jboss.bpm.model.Participant;
+import org.jboss.bpm.model.Role;
+
+//$Id$
+
+/**
+ * A Participant, which is used in the definition of attributes for a @{link Pool}, @{link Message}, and @{link
+ * WebService}
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 21-Jul-2008
+ */
+public abstract class ParticipantImpl extends SupportingElementImpl implements Participant
+{
+ protected Entity entityRef;
+ protected Role roleRef;
+
+ public Entity getEntityRef()
+ {
+ return entityRef;
+ }
+
+ public Role getRoleRef()
+ {
+ return roleRef;
+ }
+}
Property changes on: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ParticipantImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ProcessImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ProcessImpl.java 2008-07-28 15:46:17 UTC (rev 1738)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ProcessImpl.java 2008-07-28 17:11:43 UTC (rev 1739)
@@ -230,12 +230,6 @@
this.status = status;
}
- public void sendMessage(String toName, Message msg)
- {
- ProcessManager pm = ProcessManager.locateProcessManager();
- pm.sendMessage(getID(), toName, msg);
- }
-
/**
* Set the process state
*/
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ReceiveTaskImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ReceiveTaskImpl.java 2008-07-28 15:46:17 UTC (rev 1738)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ReceiveTaskImpl.java 2008-07-28 17:11:43 UTC (rev 1739)
@@ -24,22 +24,20 @@
import java.util.ArrayList;
import java.util.List;
+import javax.management.ObjectName;
+
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jboss.bpm.InvalidProcessException;
import org.jboss.bpm.NotImplementedException;
import org.jboss.bpm.ProcessTimeoutException;
+import org.jboss.bpm.client.MessageListener;
import org.jboss.bpm.model.Expression;
-import org.jboss.bpm.model.InputSet;
import org.jboss.bpm.model.Message;
-import org.jboss.bpm.model.OutputSet;
import org.jboss.bpm.model.Process;
import org.jboss.bpm.model.Property;
import org.jboss.bpm.model.ReceiveTask;
-import org.jboss.bpm.model.Task;
import org.jboss.bpm.runtime.ExecutionContext;
-import org.jboss.bpm.runtime.ExecutionHandler;
-import org.jboss.bpm.runtime.MessageReceiver;
import org.jboss.bpm.runtime.Token;
//$Id$
@@ -50,7 +48,7 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
-public class ReceiveTaskImpl extends TaskImpl implements ReceiveTask, MessageReceiver
+public class ReceiveTaskImpl extends TaskImpl implements ReceiveTask, MessageListener
{
private static final int RECEIVE_TIMEOUT = 5000;
@@ -93,8 +91,13 @@
throw new NotImplementedException();
}
- public void receiveMessage(Message message)
+ public ObjectName getMessageListenerID()
{
+ return getID();
+ }
+
+ public void catchMessage(Message message)
+ {
String msgName = message.getName();
if (messageRef.getName().equals(msgName))
{
Added: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/RoleImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/RoleImpl.java (rev 0)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/RoleImpl.java 2008-07-28 17:11:43 UTC (rev 1739)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.model.internal;
+
+import org.jboss.bpm.model.Role;
+
+//$Id$
+
+/**
+ * A Role, which is used in the definition of attributes for a @{link Participant}
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 21-Jul-2008
+ */
+public class RoleImpl extends ParticipantImpl implements Role
+{
+ private String name;
+
+ public RoleImpl(String name)
+ {
+ this.name = name;
+ this.roleRef = this;
+ }
+
+ public ParticipantType getParticipantType()
+ {
+ return ParticipantType.Role;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+}
Property changes on: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/RoleImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/SendTaskImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/SendTaskImpl.java 2008-07-28 15:46:17 UTC (rev 1738)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/SendTaskImpl.java 2008-07-28 17:11:43 UTC (rev 1739)
@@ -90,7 +90,7 @@
{
MessageBuilderFactory factory = MessageBuilderFactory.newInstance();
MessageBuilder msgBuilder = factory.newMessageBuilder();
- msgBuilder.newMessage(messageRef.getName());
+ msgBuilder.newMessage(messageRef.getName(), null);
// Copy the properties from the execution context
// to the send message
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/TaskBuilderImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/TaskBuilderImpl.java 2008-07-28 15:46:17 UTC (rev 1738)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/TaskBuilderImpl.java 2008-07-28 17:11:43 UTC (rev 1739)
@@ -23,6 +23,8 @@
//$Id$
+import javax.management.ObjectName;
+
import org.jboss.bpm.model.Property;
import org.jboss.bpm.model.Task;
import org.jboss.bpm.model.TaskBuilder;
@@ -42,9 +44,9 @@
super(proc, flowObject);
}
- public TaskBuilder addMessageRef(String name)
+ public TaskBuilder addMessageRef(String messageName, ObjectName targetID)
{
- message = new MessageImpl(name);
+ message = new MessageImpl(messageName, targetID);
if (flowObject instanceof ReceiveTaskImpl)
{
((ReceiveTaskImpl)flowObject).setMessageRef(message);
Modified: jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/airticket/AirticketTest.java
===================================================================
--- jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/airticket/AirticketTest.java 2008-07-28 15:46:17 UTC (rev 1738)
+++ jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/airticket/AirticketTest.java 2008-07-28 17:11:43 UTC (rev 1739)
@@ -25,9 +25,14 @@
import java.net.URL;
+import javax.management.ObjectName;
+
+import org.jboss.bpm.client.ObjectNameFactory;
+import org.jboss.bpm.client.ProcessEngine;
+import org.jboss.bpm.client.ProcessEngineLocator;
import org.jboss.bpm.client.ProcessManager;
import org.jboss.bpm.client.SignalListener;
-import org.jboss.bpm.client.SignalManager;
+import org.jboss.bpm.model.BPMNElement;
import org.jboss.bpm.model.GatewayBuilder;
import org.jboss.bpm.model.Message;
import org.jboss.bpm.model.MessageBuilder;
@@ -51,12 +56,17 @@
public class AirticketTest extends DefaultEngineTestCase
{
@Override
+ public ObjectName getMessageListenerID()
+ {
+ return ObjectNameFactory.create(BPMNElement.ID_DOMAIN, "test", "AirticketTest");
+ }
+
+ @Override
protected void setUp() throws Exception
{
super.setUp();
// Add a signal listener
- SignalManager sm = SignalManager.locateSignalManager();
SignalListener sl = new SignalListener()
{
public void catchSignal(Signal signal)
@@ -64,7 +74,8 @@
System.out.println(signal);
}
};
- sm.addListener("Airticket", sl);
+ ProcessEngine engine = ProcessEngineLocator.locateProcessEngine();
+ engine.addSignalListener("Airticket", sl);
}
public void _testProcessStart() throws Exception
@@ -80,18 +91,38 @@
proc.waitForEnd();
}
- public void testDynamicProcess() throws Exception
+ public void testValidRequest() throws Exception
{
- ProcessBuilderFactory procFactory = ProcessBuilderFactory.newInstance();
- MessageBuilderFactory msgFactory = MessageBuilderFactory.newInstance();
+ Process proc = buildDynamicProcess();
+ proc.startProcess();
+ ProcessEngine engine = ProcessEngineLocator.locateProcessEngine();
+ engine.sendMessage(proc.getID(), "ReceiveReqTask", getValidRequestMessage());
+
+ proc.waitForEnd();
+ }
+
+ public void testInvalidRequest() throws Exception
+ {
+ Process proc = buildDynamicProcess();
+ proc.startProcess();
+
+ ProcessEngine engine = ProcessEngineLocator.locateProcessEngine();
+ engine.sendMessage(proc.getID(), "ReceiveReqTask", getInvalidRequestMessage());
+
+ proc.waitForEnd();
+ }
+
+ private Process buildDynamicProcess()
+ {
// Create a Process through the ProcessBuilder
+ ProcessBuilderFactory procFactory = ProcessBuilderFactory.newInstance();
ProcessBuilder procBuilder = procFactory.newProcessBuilder();
procBuilder.addProcess("Airticket").addStartEvent().addSequenceFlow("ReceiveReqTask");
// Build the ReceiveReq Task
TaskBuilder taskBuilder = procBuilder.addTask("ReceiveReqTask", TaskType.Receive);
- taskBuilder.addMessageRef("ReqDataMsg").
+ taskBuilder.addMessageRef("ReqDataMsg", getMessageListenerID()).
addMessageProperty("Name", null, true).
addMessageProperty("From", null, true).
addMessageProperty("To", null, true).
@@ -123,7 +154,7 @@
// Build the SendInvalid Task
taskBuilder = procBuilder.addTask("SendInvalidTask", TaskType.Send);
- taskBuilder.addMessageRef("InvalidDataMsg").
+ taskBuilder.addMessageRef("InvalidDataMsg", getMessageListenerID()).
addMessageProperty("Name", null, true).
addMessageProperty("From", null, true).
addMessageProperty("To", null, true).
@@ -133,24 +164,36 @@
// Add the EndEvent get the Process
Process proc = procBuilder.addEndEvent("End").getProcess();
-
- // Register the Process with the ProcessManager
ProcessManager pm = ProcessManager.locateProcessManager();
pm.registerProcess(proc);
-
- proc.startProcess();
-
+ return proc;
+ }
+
+ private Message getValidRequestMessage()
+ {
+ MessageBuilderFactory msgFactory = MessageBuilderFactory.newInstance();
MessageBuilder msgBuilder = msgFactory.newMessageBuilder();
- Message msg = msgBuilder.newMessage("ReqDataMsg").
+ Message msg = msgBuilder.newMessage("ReqDataMsg", null).
addProperty("Name", "Kermit").
addProperty("From", "MUC").
addProperty("To", "NYC").
addProperty("Date", "25-Jul-2008").
addProperty("Seats", "1").
getMessage();
-
- proc.sendMessage("ReceiveReqTask", msg);
-
- proc.waitForEnd();
+ return msg;
}
-}
+
+ private Message getInvalidRequestMessage()
+ {
+ MessageBuilderFactory msgFactory = MessageBuilderFactory.newInstance();
+ MessageBuilder msgBuilder = msgFactory.newMessageBuilder();
+ Message msg = msgBuilder.newMessage("ReqDataMsg", null).
+ addProperty("Name", "Kermit").
+ addProperty("From", "MUC").
+ addProperty("To", "NYC").
+ addProperty("Date", "25-Jul-2008").
+ addProperty("Seats", "0"). // Invalid number of seats
+ getMessage();
+ return msg;
+ }
+}
\ No newline at end of file
Modified: jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/parallelsplit/ParallelSplitTest.java
===================================================================
--- jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/parallelsplit/ParallelSplitTest.java 2008-07-28 15:46:17 UTC (rev 1738)
+++ jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/parallelsplit/ParallelSplitTest.java 2008-07-28 17:11:43 UTC (rev 1739)
@@ -27,8 +27,9 @@
import java.util.List;
import java.util.concurrent.ExecutionException;
+import org.jboss.bpm.client.ProcessEngine;
+import org.jboss.bpm.client.ProcessEngineLocator;
import org.jboss.bpm.client.ProcessManager;
-import org.jboss.bpm.client.SignalManager;
import org.jboss.bpm.model.Process;
import org.jboss.bpm.model.ProcessBuilder;
import org.jboss.bpm.model.ProcessBuilderFactory;
@@ -50,8 +51,8 @@
protected void setUp() throws Exception
{
super.setUp();
- SignalManager em = SignalManager.locateSignalManager();
- em.addListener(getName(), this);
+ ProcessEngine engine = ProcessEngineLocator.locateProcessEngine();
+ engine.addSignalListener(getName(), this);
}
/**
Modified: jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/sequence/BasicSequenceTest.java
===================================================================
--- jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/sequence/BasicSequenceTest.java 2008-07-28 15:46:17 UTC (rev 1738)
+++ jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/sequence/BasicSequenceTest.java 2008-07-28 17:11:43 UTC (rev 1739)
@@ -27,13 +27,13 @@
import java.util.List;
import java.util.concurrent.ExecutionException;
+import org.jboss.bpm.client.ProcessEngine;
+import org.jboss.bpm.client.ProcessEngineLocator;
import org.jboss.bpm.client.ProcessManager;
-import org.jboss.bpm.client.SignalManager;
import org.jboss.bpm.model.Process;
import org.jboss.bpm.model.ProcessBuilder;
import org.jboss.bpm.model.ProcessBuilderFactory;
import org.jboss.bpm.model.Signal;
-import org.jboss.bpm.model.Task;
import org.jboss.bpm.model.Task.TaskType;
import org.jboss.bpm.test.DefaultEngineTestCase;
@@ -49,8 +49,8 @@
protected void setUp() throws Exception
{
super.setUp();
- SignalManager em = SignalManager.locateSignalManager();
- em.addListener(getName(), this);
+ ProcessEngine engine = ProcessEngineLocator.locateProcessEngine();
+ engine.addSignalListener(getName(), this);
}
/**
Modified: jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/task/BasicTaskTest.java
===================================================================
--- jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/task/BasicTaskTest.java 2008-07-28 15:46:17 UTC (rev 1738)
+++ jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/task/BasicTaskTest.java 2008-07-28 17:11:43 UTC (rev 1739)
@@ -27,13 +27,13 @@
import java.util.List;
import java.util.concurrent.ExecutionException;
+import org.jboss.bpm.client.ProcessEngine;
+import org.jboss.bpm.client.ProcessEngineLocator;
import org.jboss.bpm.client.ProcessManager;
-import org.jboss.bpm.client.SignalManager;
import org.jboss.bpm.model.Process;
import org.jboss.bpm.model.ProcessBuilder;
import org.jboss.bpm.model.ProcessBuilderFactory;
import org.jboss.bpm.model.Signal;
-import org.jboss.bpm.model.Task;
import org.jboss.bpm.model.Task.TaskType;
import org.jboss.bpm.test.DefaultEngineTestCase;
@@ -49,8 +49,8 @@
protected void setUp() throws Exception
{
super.setUp();
- SignalManager em = SignalManager.locateSignalManager();
- em.addListener(getName(), this);
+ ProcessEngine engine = ProcessEngineLocator.locateProcessEngine();
+ engine.addSignalListener(getName(), this);
}
/**
Modified: jbossbpm/spec/trunk/modules/testsuite/src/test/resources/jbpm-beans.xml
===================================================================
--- jbossbpm/spec/trunk/modules/testsuite/src/test/resources/jbpm-beans.xml 2008-07-28 15:46:17 UTC (rev 1738)
+++ jbossbpm/spec/trunk/modules/testsuite/src/test/resources/jbpm-beans.xml 2008-07-28 17:11:43 UTC (rev 1739)
@@ -3,17 +3,21 @@
<!-- The KernelLocator -->
<bean name="KernelLocator" class="org.jboss.kernel.plugins.util.KernelLocator"/>
+ <!-- The Builder Factories -->
+ <bean name="jBPMProcessBuilderFactory" class="org.jboss.bpm.model.internal.ProcessBuilderFactoryImpl"/>
+ <bean name="jBPMMessageBuilderFactory" class="org.jboss.bpm.model.internal.MessageBuilderFactoryImpl"/>
+ <bean name="jBPMPropertyBuilderFactory" class="org.jboss.bpm.model.internal.PropertyBuilderFactoryImpl"/>
+
<!-- The ProcessEngine -->
<bean name="jBPMProcessEngine" class="org.jboss.bpm.client.internal.ProcessEngineImpl">
<property name="processManager"><inject bean="jBPMProcessManager"/></property>
<property name="executionManager"><inject bean="jBPMExecutionManager"/></property>
- <property name="signalManager"><inject bean="jBPMSignalManager"/></property>
</bean>
- <!-- The Builder Factories -->
- <bean name="jBPMProcessBuilderFactory" class="org.jboss.bpm.model.internal.ProcessBuilderFactoryImpl"/>
- <bean name="jBPMMessageBuilderFactory" class="org.jboss.bpm.model.internal.MessageBuilderFactoryImpl"/>
- <bean name="jBPMPropertyBuilderFactory" class="org.jboss.bpm.model.internal.PropertyBuilderFactoryImpl"/>
+ <!-- The ExecutionManager -->
+ <bean name="jBPMExecutionManager" class="org.jboss.bpm.client.internal.ExecutionManagerImpl">
+ <property name="processEngine"><inject bean="jBPMProcessEngine" state="Instantiated"/></property>
+ </bean>
<!-- The ProcessManager -->
<bean name="jBPMProcessManager" class="org.jboss.bpm.client.internal.ProcessManagerImpl">
@@ -45,13 +49,4 @@
</property>
</bean>
- <!-- The ExecutionManager -->
- <bean name="jBPMExecutionManager" class="org.jboss.bpm.client.internal.ExecutionManagerImpl">
- <property name="processEngine"><inject bean="jBPMProcessEngine" state="Instantiated"/></property>
- </bean>
-
- <!-- The SignalManager -->
- <bean name="jBPMSignalManager" class="org.jboss.bpm.client.internal.SignalManagerImpl">
- <property name="processEngine"><inject bean="jBPMProcessEngine" state="Instantiated"/></property>
- </bean>
</deployment>
\ No newline at end of file
15 years, 9 months
JBoss JBPM SVN: r1738 - in jbossbpm/spec/trunk/modules: api/src/main/java/org/jboss/bpm/runtime and 5 other directories.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-07-28 11:46:17 -0400 (Mon, 28 Jul 2008)
New Revision: 1738
Added:
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/PropertyBuilder.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/PropertyBuilderFactory.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Executable.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/MutablePropertySupport.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/PropertyBuilderFactoryImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/PropertyBuilderImpl.java
Removed:
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ExecutionHandlerImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/FlowHandlerImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/MutablePropertySupport.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/SignalHandlerImpl.java
Modified:
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/GatewayBuilder.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/InputSet.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/OutputSet.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/SequenceFlow.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/BasicAttachments.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/ExecutionHandler.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Token.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/client/internal/ExecutionManagerImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ActivityBuilderImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ActivityImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/EndEventImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ExclusiveGatewayDataBasedImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ExclusiveGatewayImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ExpressionImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/FlowObjectImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/GateImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/GatewayBuilderImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/GatewayImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/InputSetImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/IntermediateEventImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/MessageBuilderImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/MessageImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/OutputSetImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ReceiveTaskImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/SendTaskImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/SequenceFlowImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/StartEventImpl.java
jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/airticket/AirticketTest.java
jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/task/TaskA.java
jbossbpm/spec/trunk/modules/testsuite/src/test/resources/jbpm-beans.xml
Log:
Add MVEL gates
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/GatewayBuilder.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/GatewayBuilder.java 2008-07-28 14:22:17 UTC (rev 1737)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/GatewayBuilder.java 2008-07-28 15:46:17 UTC (rev 1738)
@@ -32,6 +32,9 @@
*/
public interface GatewayBuilder extends ProcessBuilder
{
+ GatewayBuilder addDefaultGate(String targetName);
+
+ GatewayBuilder addConditionalGate(String targetName, Expression.ExpressionLanguage exprLang, String exprBody);
+
GatewayBuilder addGate(String targetName);
-
}
\ No newline at end of file
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/InputSet.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/InputSet.java 2008-07-28 14:22:17 UTC (rev 1737)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/InputSet.java 2008-07-28 15:46:17 UTC (rev 1738)
@@ -25,13 +25,15 @@
import java.util.List;
+import org.jboss.bpm.runtime.MutablePropertySupport;
+
/**
* An InputSet, which is used in the definition of common attributes for Activities and for attributes of a Process
*
* @author thomas.diesler(a)jboss.com
* @since 21-Jul-2008
*/
-public interface InputSet extends SupportingElement
+public interface InputSet extends SupportingElement, MutablePropertySupport
{
/**
* Zero or more ArtifactInputs MAY be defined for each InputSet. For the
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/OutputSet.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/OutputSet.java 2008-07-28 14:22:17 UTC (rev 1737)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/OutputSet.java 2008-07-28 15:46:17 UTC (rev 1738)
@@ -25,13 +25,15 @@
import java.util.List;
+import org.jboss.bpm.runtime.MutablePropertySupport;
+
/**
* An OuputSet, which is used in the definition of common attributes for Activities and for attributes of a Process
*
* @author thomas.diesler(a)jboss.com
* @since 21-Jul-2008
*/
-public interface OutputSet extends SupportingElement
+public interface OutputSet extends SupportingElement, MutablePropertySupport
{
/**
* Zero or more ArtifactOutputs MAY be defined for each OutputSet. For the
Added: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/PropertyBuilder.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/PropertyBuilder.java (rev 0)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/PropertyBuilder.java 2008-07-28 15:46:17 UTC (rev 1738)
@@ -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.model;
+
+//$Id$
+
+/**
+ * A PropertyBuilder can be used to build a {@link Property} dynamically.
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 08-Jul-2008
+ */
+public interface PropertyBuilder
+{
+ /**
+ * Create a {@link Property} with a given name and value
+ */
+ Property newProperty(String name, String value);
+}
\ No newline at end of file
Property changes on: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/PropertyBuilder.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/PropertyBuilderFactory.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/PropertyBuilderFactory.java (rev 0)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/PropertyBuilderFactory.java 2008-07-28 15:46:17 UTC (rev 1738)
@@ -0,0 +1,60 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.model;
+
+import org.jboss.kernel.Kernel;
+import org.jboss.kernel.plugins.util.KernelLocator;
+import org.jboss.kernel.spi.registry.KernelRegistryEntry;
+
+//$Id$
+
+/**
+ * A Factory for the {@link PropertyBuilder}.
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 08-Jul-2008
+ */
+public abstract class PropertyBuilderFactory
+{
+ /** The bean name - jBPMMessageBuilderFactory */
+ public static final String BEAN_NAME = "jBPMPropertyBuilderFactory";
+
+ // Hide the constructor
+ protected PropertyBuilderFactory()
+ {
+ }
+
+ /**
+ * Get a MessageBuilderFactory instance.
+ */
+ public static PropertyBuilderFactory newInstance()
+ {
+ Kernel kernel = KernelLocator.getKernel();
+ KernelRegistryEntry entry = kernel.getRegistry().getEntry(BEAN_NAME);
+ return (PropertyBuilderFactory)entry.getTarget();
+ }
+
+ /**
+ * Get a {@link PropertyBuilder}.
+ */
+ public abstract PropertyBuilder newPropertyBuilder();
+}
\ No newline at end of file
Property changes on: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/PropertyBuilderFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/SequenceFlow.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/SequenceFlow.java 2008-07-28 14:22:17 UTC (rev 1737)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/SequenceFlow.java 2008-07-28 15:46:17 UTC (rev 1738)
@@ -38,7 +38,7 @@
/**
* The ConditionType
*/
- enum ConditionType
+ public enum ConditionType
{
None, Expression, Default
}
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/BasicAttachments.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/BasicAttachments.java 2008-07-28 14:22:17 UTC (rev 1737)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/BasicAttachments.java 2008-07-28 15:46:17 UTC (rev 1738)
@@ -116,4 +116,9 @@
{
return (T)attachments.remove(new Key(null, name));
}
+
+ public String toString()
+ {
+ return attachments.toString();
+ }
}
Added: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Executable.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Executable.java (rev 0)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Executable.java 2008-07-28 15:46:17 UTC (rev 1738)
@@ -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.runtime;
+
+//$Id$
+
+/**
+ * Marks Flow Objects as executable.
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 20-Apr-2007
+ */
+public interface Executable
+{
+ /**
+ * Engine calls this to execute the @{link FlowObject}
+ */
+ void execute(Token token);
+}
\ No newline at end of file
Property changes on: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Executable.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/ExecutionHandler.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/ExecutionHandler.java 2008-07-28 14:22:17 UTC (rev 1737)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/ExecutionHandler.java 2008-07-28 15:46:17 UTC (rev 1738)
@@ -25,9 +25,11 @@
import org.jboss.bpm.client.ProcessEngine;
import org.jboss.bpm.model.FlowObject;
+import org.jboss.bpm.model.InputSet;
+import org.jboss.bpm.model.OutputSet;
/**
- * The {@link ProcessEngine} invokes the ExecutionHandler on an {@link HandlerSupport}
+ * The {@link ProcessEngine} invokes the ExecutionHandler on a
* {@link FlowObject} to execute user provided business logic.
*
* @author thomas.diesler(a)jboss.com
@@ -36,8 +38,8 @@
public interface ExecutionHandler extends Handler
{
/**
- * Execute business logic associated with a {@link FlowObject}
+ * Execute the associated business logic.
*/
- void execute(Token token);
+ void execute(Token token, InputSet input, OutputSet output);
}
\ No newline at end of file
Copied: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/MutablePropertySupport.java (from rev 1734, jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/MutablePropertySupport.java)
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/MutablePropertySupport.java (rev 0)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/MutablePropertySupport.java 2008-07-28 15:46:17 UTC (rev 1738)
@@ -0,0 +1,41 @@
+/*
+ * 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.runtime;
+
+import org.jboss.bpm.model.Property;
+import org.jboss.bpm.model.PropertySupport;
+
+//$Id$
+
+/**
+ * Mutable property support
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 21-Jul-2008
+ */
+public interface MutablePropertySupport extends PropertySupport
+{
+ /**
+ * Add a property
+ */
+ void addProperty(Property prop);
+}
\ No newline at end of file
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Token.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Token.java 2008-07-28 14:22:17 UTC (rev 1737)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Token.java 2008-07-28 15:46:17 UTC (rev 1738)
@@ -78,6 +78,11 @@
return new Token(proc, context);
}
+ public String toString()
+ {
+ return "[proc=" + proc.getID() + ",ctx=" + context + "]";
+ }
+
static class InitialContext extends BasicAttachments implements ExecutionContext
{
InitialContext(Attachments att)
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/client/internal/ExecutionManagerImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/client/internal/ExecutionManagerImpl.java 2008-07-28 14:22:17 UTC (rev 1737)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/client/internal/ExecutionManagerImpl.java 2008-07-28 15:46:17 UTC (rev 1738)
@@ -37,7 +37,7 @@
import org.jboss.bpm.model.internal.RuntimeProcessImpl;
import org.jboss.bpm.model.internal.SequenceFlowImpl;
import org.jboss.bpm.runtime.Attachments;
-import org.jboss.bpm.runtime.ExecutionHandler;
+import org.jboss.bpm.runtime.Executable;
import org.jboss.bpm.runtime.FlowHandler;
import org.jboss.bpm.runtime.MutableFlowScheduler;
import org.jboss.bpm.runtime.RuntimeProcess;
@@ -71,10 +71,6 @@
// TODO: one thread per process is not scalable
ProcessRunner runner = new ProcessRunner(procImpl, att);
new Thread(runner).start();
-
- // Throw possible exception from the runner
- // if (runner.getException() != null)
- // throw runner.getException();
}
private void startProcessInternal(ProcessImpl proc, Attachments att)
@@ -99,7 +95,7 @@
// Get the target and its handlers
FlowObject target = (FlowObject)flow.getTargetRef();
- ExecutionHandler exHandler = getExecutionHandler(target);
+ Executable executable = getExecutable(target);
SignalHandler sigHandler = getSignalHandler(target);
FlowHandler flowHandler = getFlowHandler(target);
@@ -107,7 +103,7 @@
try
{
throwSignal(sigHandler.getEnterSignal());
- exHandler.execute(token);
+ executable.execute(token);
}
finally
{
@@ -134,6 +130,14 @@
}
}
+ private Executable getExecutable(FlowObject target)
+ {
+ if (target instanceof Executable == false)
+ throw new IllegalStateException("Flow Object is not executable: " + target);
+
+ return (Executable)target;
+ }
+
/**
* The initial flow 'to' the StartEvent
*/
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ActivityBuilderImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ActivityBuilderImpl.java 2008-07-28 14:22:17 UTC (rev 1737)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ActivityBuilderImpl.java 2008-07-28 15:46:17 UTC (rev 1738)
@@ -74,7 +74,7 @@
public ActivityBuilder addIORule(String body, ExpressionLanguage lang)
{
- ExpressionImpl expr = new ExpressionImpl(body, lang);
+ ExpressionImpl expr = new ExpressionImpl(lang, body);
getActivity().addIORule(expr);
return this;
}
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ActivityImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ActivityImpl.java 2008-07-28 14:22:17 UTC (rev 1737)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ActivityImpl.java 2008-07-28 15:46:17 UTC (rev 1738)
@@ -25,7 +25,9 @@
import java.util.ArrayList;
import java.util.Collections;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -38,11 +40,16 @@
import org.jboss.bpm.model.OutputSet;
import org.jboss.bpm.model.Process;
import org.jboss.bpm.model.Property;
+import org.jboss.bpm.model.PropertyBuilder;
+import org.jboss.bpm.model.Expression.ExpressionLanguage;
+import org.jboss.bpm.runtime.ExecutionContext;
import org.jboss.bpm.runtime.ExecutionHandler;
import org.jboss.bpm.runtime.FlowHandler;
import org.jboss.bpm.runtime.FlowScheduler;
+import org.jboss.bpm.runtime.MutablePropertySupport;
import org.jboss.bpm.runtime.Token;
import org.jboss.bpm.runtime.FlowScheduler.Tuple;
+import org.mvel.MVEL;
/**
* An activity is a generic term for work that a company or organization performs via business processes. An activity
@@ -181,22 +188,141 @@
this.outFlow = flow;
}
- public ExecutionHandler getExecutionHandler()
+ @Override
+ public void execute(Token token)
{
- ExecutionHandler handler = super.getExecutionHandler();
- if (handler == null)
+ OutputSetImpl outputSet = new OutputSetImpl();
+ InputSet inputSet = getActiveInputSet(token);
+ executeHandler(token, inputSet, outputSet);
+ processOutputSet(token, outputSet);
+ postProcessInputSet(token, inputSet);
+ }
+
+ /**
+ * Select and validate active inputSet
+ */
+ protected InputSet getActiveInputSet(Token token)
+ {
+ InputSetImpl inputSet = null;
+ ExecutionContext exContext = token.getExecutionContext();
+
+ // Find the InputSet that matches the data in the Token
+ if (inputSets.size() > 0)
{
- handler = new ExecutionHandler()
+ for (InputSet auxSet : inputSets)
{
- public void execute(Token token)
+ boolean allInputPropsInContext = true;
+ for (Property prop : auxSet.getProperties())
{
- log.debug("Nothing to do in task: " + getName());
+ Object att = exContext.getAttachment(prop.getName());
+ allInputPropsInContext &= (att != null);
}
- };
+ if (allInputPropsInContext == true)
+ {
+ inputSet = new InputSetImpl();
+ for (Property prop : auxSet.getProperties())
+ {
+ String name = prop.getName();
+ Expression expr = exContext.getAttachment(name);
+ inputSet.addProperty(new PropertyImpl(name, expr));
+ }
+ break;
+ }
+ }
+ if (inputSet == null)
+ throw new IllegalStateException("Cannot find inputSet that matches token: " + token);
}
- return handler;
+
+ // Create an empty input set
+ if (inputSet == null)
+ inputSet = new InputSetImpl();
+
+ return inputSet;
}
+ /**
+ * Execute external business logic
+ */
+ protected void executeHandler(Token token, InputSet inputSet, OutputSet outputSet)
+ {
+ ExecutionHandler handler = getExecutionHandler();
+
+ // Call the execution handler with the InputSet
+ if (handler != null)
+ {
+ handler.execute(token, inputSet, outputSet);
+ }
+ // Assume the the single IORule actually mapps the data
+ else if (outputSets.size() == 1 && ioRules.size() == 1)
+ {
+ PropertyBuilder propBuilder = new PropertyBuilderImpl();
+ OutputSet outSet = outputSets.get(0);
+ if (outSet.getProperties().size() == 1)
+ {
+ Expression expr = ioRules.get(0);
+ if (expr.getExpressionLanguage() == ExpressionLanguage.MVEL)
+ {
+ String mvel = expr.getExpressionBody();
+ Map<String, Object> vars = new HashMap<String, Object>();
+ for (Property prop : inputSet.getProperties())
+ {
+ String name = prop.getName();
+ Object value = prop.getValue().getExpressionBody();
+ vars.put(name, value);
+ }
+ Object result = MVEL.eval(mvel, vars);
+ if (result != null)
+ {
+ String name = outSet.getPropertyNames().get(0);
+ Property prop = propBuilder.newProperty(name, result.toString());
+ outputSet.addProperty(prop);
+ }
+ }
+ else
+ {
+ throw new IllegalStateException("Unsupported expression language: " + expr.getExpressionLanguage());
+ }
+ }
+ }
+ }
+
+ /**
+ * Transfer data from outputSet to Token
+ */
+ protected void processOutputSet(Token token, OutputSet outputSet)
+ {
+ ExecutionContext exContext = token.getExecutionContext();
+
+ // Add the outputSet properties to the Token
+ if (outputSet != null && outputSets.size() > 0)
+ {
+ if (outputSets.size() > 1)
+ throw new NotImplementedException("IORules and multiple outputSets not supported");
+
+ OutputSet auxSet = outputSets.get(0);
+ for (Property prop : auxSet.getProperties())
+ {
+ Property outProp = outputSet.getProperty(prop.getName());
+ if (outProp == null)
+ throw new IllegalStateException("Cannot find required outputSet property: " + prop.getName());
+
+ exContext.addAttachment(outProp.getName(), outProp.getValue().getExpressionBody());
+ }
+ }
+ }
+
+ /**
+ * Remove the inputSet properties
+ */
+ protected void postProcessInputSet(Token token, InputSet inputSet)
+ {
+ ExecutionContext exContext = token.getExecutionContext();
+ for (Property prop : inputSet.getProperties())
+ {
+ exContext.removeAttachment(prop.getName());
+ }
+ }
+
public FlowHandler getFlowHandler()
{
FlowHandler handler = super.getFlowHandler();
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/EndEventImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/EndEventImpl.java 2008-07-28 14:22:17 UTC (rev 1737)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/EndEventImpl.java 2008-07-28 15:46:17 UTC (rev 1738)
@@ -30,8 +30,6 @@
import org.jboss.bpm.model.FlowObject;
import org.jboss.bpm.model.Result;
import org.jboss.bpm.model.Signal;
-import org.jboss.bpm.runtime.Attachments;
-import org.jboss.bpm.runtime.ExecutionHandler;
import org.jboss.bpm.runtime.FlowHandler;
import org.jboss.bpm.runtime.FlowScheduler;
import org.jboss.bpm.runtime.SignalHandler;
@@ -83,29 +81,6 @@
return result;
}
- public ExecutionHandler getExecutionHandler()
- {
- ExecutionHandler handler = super.getExecutionHandler();
- if (handler == null)
- {
- handler = new ExecutionHandler()
- {
- public void execute(final Token token)
- {
- // Provide the result
- result = new Result()
- {
- public Attachments getAttachments()
- {
- return token.getExecutionContext();
- }
- };
- }
- };
- }
- return handler;
- }
-
public FlowHandler getFlowHandler()
{
FlowHandler handler = super.getFlowHandler();
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ExclusiveGatewayDataBasedImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ExclusiveGatewayDataBasedImpl.java 2008-07-28 14:22:17 UTC (rev 1737)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ExclusiveGatewayDataBasedImpl.java 2008-07-28 15:46:17 UTC (rev 1738)
@@ -47,6 +47,7 @@
public Gate getDefaultGate()
{
+
throw new NotImplementedException();
}
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ExclusiveGatewayImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ExclusiveGatewayImpl.java 2008-07-28 14:22:17 UTC (rev 1737)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ExclusiveGatewayImpl.java 2008-07-28 15:46:17 UTC (rev 1738)
@@ -23,10 +23,26 @@
//$Id$
+import java.util.HashMap;
+import java.util.Map;
+
import org.jboss.bpm.model.ExclusiveGateway;
+import org.jboss.bpm.model.Expression;
+import org.jboss.bpm.model.Gate;
+import org.jboss.bpm.model.SequenceFlow;
+import org.jboss.bpm.model.Expression.ExpressionLanguage;
+import org.jboss.bpm.model.SequenceFlow.ConditionType;
+import org.jboss.bpm.runtime.ExecutionContext;
+import org.jboss.bpm.runtime.FlowHandler;
+import org.jboss.bpm.runtime.FlowScheduler;
+import org.jboss.bpm.runtime.Token;
+import org.jboss.bpm.runtime.Attachments.Key;
+import org.jboss.bpm.runtime.FlowScheduler.Tuple;
+import org.mvel.MVEL;
/**
- * A point in the workflow process where, based on a decision or workflow control data, one of several branches is chosen.
+ * A point in the workflow process where, based on a decision or workflow control data, one of several branches is
+ * chosen.
*
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
@@ -43,6 +59,73 @@
return GatewayType.Exclusive;
}
+ @Override
+ public FlowHandler getFlowHandler()
+ {
+ FlowHandler handler = super.getFlowHandler();
+ if (handler == null && getGates().size() > 1)
+ {
+ handler = new FlowHandler()
+ {
+ public void execute(FlowScheduler scheduler, Token token)
+ {
+ Gate selectedGate = null;
+ for (Gate auxGate : getGates())
+ {
+ SequenceFlow seqFlow = auxGate.getOutgoingSequenceFlow();
+ if (seqFlow.getConditionType() == ConditionType.Expression)
+ {
+ Expression expr = seqFlow.getConditionExpression();
+ if (expr.getExpressionLanguage() == ExpressionLanguage.MVEL)
+ {
+ String mvel = expr.getExpressionBody();
+ ExecutionContext exContext = token.getExecutionContext();
+ Map<String, Object> vars = new HashMap<String, Object>();
+ for (Key key : exContext.getAttachmentKeys())
+ {
+ String name = key.getNamePart();
+ Object value = exContext.getAttachment(name);
+ vars.put(name, value);
+ }
+ Boolean result = (Boolean)MVEL.eval(mvel, vars);
+ if (result == true)
+ {
+ selectedGate = auxGate;
+ break;
+ }
+ }
+ else
+ {
+ throw new IllegalStateException("Unsupported expression language: " + expr.getExpressionLanguage());
+ }
+ }
+ }
+
+ // Fallback to the default gate if there is one
+ if (selectedGate == null)
+ {
+ for (Gate auxGate : getGates())
+ {
+ SequenceFlow seqFlow = auxGate.getOutgoingSequenceFlow();
+ if (seqFlow.getConditionType() == ConditionType.Default)
+ {
+ selectedGate = auxGate;
+ break;
+ }
+ }
+ }
+
+ if (selectedGate == null)
+ throw new IllegalStateException("Cannot select applicable gate for: " + token);
+
+ Tuple tuple = new Tuple(selectedGate.getOutgoingSequenceFlow(), token);
+ scheduler.scheduleTuple(tuple);
+ }
+ };
+ }
+ return handler;
+ }
+
public String toString()
{
return "ExclusiveGateway[" + getName() + "]";
Deleted: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ExecutionHandlerImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ExecutionHandlerImpl.java 2008-07-28 14:22:17 UTC (rev 1737)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ExecutionHandlerImpl.java 2008-07-28 15:46:17 UTC (rev 1738)
@@ -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.jboss.bpm.model.internal;
-
-//$Id$
-
-import org.jboss.bpm.runtime.ExecutionHandler;
-import org.jboss.bpm.runtime.Token;
-
-/**
- * Implement to make the FlowObject executable
- *
- * @author thomas.diesler(a)jboss.com
- * @since 08-Jul-2008
- */
-public class ExecutionHandlerImpl extends HandlerImpl implements ExecutionHandler
-{
- private ExecutionHandler handler;
-
- /**
- * Execute this flow object
- */
- public void execute(Token token)
- {
- if (handler == null)
- {
- handler = newInstance(ExecutionHandler.class);
- }
- handler.execute(token);
- }
-}
\ No newline at end of file
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ExpressionImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ExpressionImpl.java 2008-07-28 14:22:17 UTC (rev 1737)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ExpressionImpl.java 2008-07-28 15:46:17 UTC (rev 1738)
@@ -42,7 +42,7 @@
this.body = body;
}
- public ExpressionImpl(String body, ExpressionLanguage lang)
+ public ExpressionImpl(ExpressionLanguage lang, String body)
{
this.body = body;
this.lang = lang;
Deleted: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/FlowHandlerImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/FlowHandlerImpl.java 2008-07-28 14:22:17 UTC (rev 1737)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/FlowHandlerImpl.java 2008-07-28 15:46:17 UTC (rev 1738)
@@ -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.jboss.bpm.model.internal;
-
-//$Id$
-
-import org.jboss.bpm.runtime.FlowHandler;
-import org.jboss.bpm.runtime.FlowScheduler;
-import org.jboss.bpm.runtime.Token;
-
-/**
- * Implement to handle the outgoing Flows for an FlowObject
- *
- * @author thomas.diesler(a)jboss.com
- * @since 08-Jul-2008
- */
-public class FlowHandlerImpl extends HandlerImpl implements FlowHandler
-{
- private FlowHandler handler;
-
- public void execute(FlowScheduler scheduler, Token token)
- {
- if (handler == null)
- {
- handler = newInstance(FlowHandler.class);
- }
- handler.execute(scheduler, token);
- }
-}
\ No newline at end of file
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/FlowObjectImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/FlowObjectImpl.java 2008-07-28 14:22:17 UTC (rev 1737)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/FlowObjectImpl.java 2008-07-28 15:46:17 UTC (rev 1738)
@@ -33,6 +33,7 @@
import org.jboss.bpm.model.Process;
import org.jboss.bpm.model.SingleInFlowSupport;
import org.jboss.bpm.model.SingleOutFlowSupport;
+import org.jboss.bpm.runtime.Executable;
import org.jboss.bpm.runtime.ExecutionHandler;
import org.jboss.bpm.runtime.FlowHandler;
import org.jboss.bpm.runtime.SignalHandler;
@@ -46,7 +47,7 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
-public abstract class FlowObjectImpl extends GraphicalElementImpl implements FlowObject, HandlerSetterSupport
+public abstract class FlowObjectImpl extends GraphicalElementImpl implements FlowObject, HandlerSetterSupport, Executable
{
private static final long serialVersionUID = 1L;
@@ -86,11 +87,7 @@
public void execute(Token token)
{
- ExecutionHandler handler = getExecutionHandler();
- if (handler != null)
- {
- handler.execute(token);
- }
+ // noting to do
}
@Override
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/GateImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/GateImpl.java 2008-07-28 14:22:17 UTC (rev 1737)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/GateImpl.java 2008-07-28 15:46:17 UTC (rev 1738)
@@ -27,9 +27,11 @@
import org.jboss.bpm.NotImplementedException;
import org.jboss.bpm.model.Assignment;
+import org.jboss.bpm.model.Expression;
import org.jboss.bpm.model.Gate;
import org.jboss.bpm.model.Gateway;
import org.jboss.bpm.model.SequenceFlow;
+import org.jboss.bpm.model.SequenceFlow.ConditionType;
/**
* A {@link Gate} associated with a {@link Gateway}.
@@ -46,6 +48,11 @@
seqFlow = new SequenceFlowImpl(targetName);
}
+ public GateImpl(String targetName, ConditionType type, Expression expr)
+ {
+ seqFlow = new SequenceFlowImpl(targetName, type, expr);
+ }
+
public SequenceFlow getOutgoingSequenceFlow()
{
return seqFlow;
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/GatewayBuilderImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/GatewayBuilderImpl.java 2008-07-28 14:22:17 UTC (rev 1737)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/GatewayBuilderImpl.java 2008-07-28 15:46:17 UTC (rev 1738)
@@ -26,6 +26,8 @@
import org.jboss.bpm.model.Gate;
import org.jboss.bpm.model.Gateway;
import org.jboss.bpm.model.GatewayBuilder;
+import org.jboss.bpm.model.Expression.ExpressionLanguage;
+import org.jboss.bpm.model.SequenceFlow.ConditionType;
/**
* The GatewayBuilder can be used to build a {@link Gateway} dynamically.
@@ -49,6 +51,20 @@
return this;
}
+ public GatewayBuilder addConditionalGate(String targetName, ExpressionLanguage lang, String body)
+ {
+ gate = new GateImpl(targetName, ConditionType.Expression, new ExpressionImpl(lang, body));
+ getGateway().addGate(gate);
+ return this;
+ }
+
+ public GatewayBuilder addDefaultGate(String targetName)
+ {
+ gate = new GateImpl(targetName, ConditionType.Default, null);
+ getGateway().addGate(gate);
+ return this;
+ }
+
private GatewayImpl getGateway()
{
if (flowObject instanceof Gateway == false)
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/GatewayImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/GatewayImpl.java 2008-07-28 14:22:17 UTC (rev 1737)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/GatewayImpl.java 2008-07-28 15:46:17 UTC (rev 1738)
@@ -29,11 +29,12 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.bpm.NotImplementedException;
import org.jboss.bpm.model.Flow;
import org.jboss.bpm.model.FlowObject;
import org.jboss.bpm.model.Gate;
import org.jboss.bpm.model.Gateway;
+import org.jboss.bpm.model.InputSet;
+import org.jboss.bpm.model.OutputSet;
import org.jboss.bpm.model.Signal;
import org.jboss.bpm.runtime.ExecutionHandler;
import org.jboss.bpm.runtime.FlowHandler;
@@ -95,7 +96,7 @@
{
handler = new ExecutionHandler()
{
- public void execute(Token token)
+ public void execute(Token token, InputSet inputSet, OutputSet outputSet)
{
log.debug("Nothing to do in gateway: " + getName());
}
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/InputSetImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/InputSetImpl.java 2008-07-28 14:22:17 UTC (rev 1737)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/InputSetImpl.java 2008-07-28 15:46:17 UTC (rev 1738)
@@ -32,6 +32,7 @@
import org.jboss.bpm.model.ArtifactOutput;
import org.jboss.bpm.model.InputSet;
import org.jboss.bpm.model.Property;
+import org.jboss.bpm.runtime.MutablePropertySupport;
/**
* An InputSet, which is used in the definition of common attributes for Activities and for attributes of a Process
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/IntermediateEventImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/IntermediateEventImpl.java 2008-07-28 14:22:17 UTC (rev 1737)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/IntermediateEventImpl.java 2008-07-28 15:46:17 UTC (rev 1738)
@@ -27,7 +27,9 @@
import org.apache.commons.logging.LogFactory;
import org.jboss.bpm.model.Event;
import org.jboss.bpm.model.Flow;
+import org.jboss.bpm.model.InputSet;
import org.jboss.bpm.model.IntermediateEvent;
+import org.jboss.bpm.model.OutputSet;
import org.jboss.bpm.model.Signal;
import org.jboss.bpm.runtime.ExecutionHandler;
import org.jboss.bpm.runtime.FlowHandler;
@@ -90,7 +92,7 @@
{
handler = new ExecutionHandler()
{
- public void execute(Token token)
+ public void execute(Token token, InputSet inputSet, OutputSet outputSet)
{
log.debug("Nothing to do in event");
}
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/MessageBuilderImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/MessageBuilderImpl.java 2008-07-28 14:22:17 UTC (rev 1737)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/MessageBuilderImpl.java 2008-07-28 15:46:17 UTC (rev 1738)
@@ -25,11 +25,10 @@
import org.jboss.bpm.model.Message;
import org.jboss.bpm.model.MessageBuilder;
-import org.jboss.bpm.model.Process;
import org.jboss.bpm.model.Property;
/**
- * The ProcessBuilder can be used to dynamically build a {@link Process}.
+ * A MessageBuilder can be used to build a {@link Message} dynamically.
*
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/MessageImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/MessageImpl.java 2008-07-28 14:22:17 UTC (rev 1737)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/MessageImpl.java 2008-07-28 15:46:17 UTC (rev 1738)
@@ -30,6 +30,7 @@
import org.jboss.bpm.model.Participant;
import org.jboss.bpm.model.Property;
import org.jboss.bpm.model.PropertySupport;
+import org.jboss.bpm.runtime.MutablePropertySupport;
//$Id$
Deleted: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/MutablePropertySupport.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/MutablePropertySupport.java 2008-07-28 14:22:17 UTC (rev 1737)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/MutablePropertySupport.java 2008-07-28 15:46:17 UTC (rev 1738)
@@ -1,41 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.bpm.model.internal;
-
-import org.jboss.bpm.model.Property;
-import org.jboss.bpm.model.PropertySupport;
-
-//$Id$
-
-/**
- * Mutable property support
- *
- * @author thomas.diesler(a)jboss.com
- * @since 21-Jul-2008
- */
-public interface MutablePropertySupport extends PropertySupport
-{
- /**
- * Add a property
- */
- void addProperty(Property prop);
-}
\ No newline at end of file
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/OutputSetImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/OutputSetImpl.java 2008-07-28 14:22:17 UTC (rev 1737)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/OutputSetImpl.java 2008-07-28 15:46:17 UTC (rev 1738)
@@ -31,6 +31,7 @@
import org.jboss.bpm.model.ArtifactOutput;
import org.jboss.bpm.model.OutputSet;
import org.jboss.bpm.model.Property;
+import org.jboss.bpm.runtime.MutablePropertySupport;
/**
* An OuputSet, which is used in the definition of common attributes for Activities and for attributes of a Process
Added: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/PropertyBuilderFactoryImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/PropertyBuilderFactoryImpl.java (rev 0)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/PropertyBuilderFactoryImpl.java 2008-07-28 15:46:17 UTC (rev 1738)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.model.internal;
+
+//$Id$
+
+import org.jboss.bpm.model.PropertyBuilder;
+import org.jboss.bpm.model.PropertyBuilderFactory;
+
+/**
+ * A Factory for the {@link PropertyBuilder}.
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 08-Jul-2008
+ */
+public class PropertyBuilderFactoryImpl extends PropertyBuilderFactory
+{
+ @Override
+ public PropertyBuilder newPropertyBuilder()
+ {
+ return new PropertyBuilderImpl();
+ }
+}
\ No newline at end of file
Property changes on: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/PropertyBuilderFactoryImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/PropertyBuilderImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/PropertyBuilderImpl.java (rev 0)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/PropertyBuilderImpl.java 2008-07-28 15:46:17 UTC (rev 1738)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.model.internal;
+
+//$Id$
+
+import org.jboss.bpm.model.Property;
+import org.jboss.bpm.model.PropertyBuilder;
+
+/**
+ * A PropertyBuilder can be used to build a {@link Property} dynamically.
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 08-Jul-2008
+ */
+public class PropertyBuilderImpl implements PropertyBuilder
+{
+ public Property newProperty(String name, String value)
+ {
+ return new PropertyImpl(name, new ExpressionImpl(value));
+ }
+}
\ No newline at end of file
Property changes on: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/PropertyBuilderImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ReceiveTaskImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ReceiveTaskImpl.java 2008-07-28 14:22:17 UTC (rev 1737)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ReceiveTaskImpl.java 2008-07-28 15:46:17 UTC (rev 1738)
@@ -30,7 +30,9 @@
import org.jboss.bpm.NotImplementedException;
import org.jboss.bpm.ProcessTimeoutException;
import org.jboss.bpm.model.Expression;
+import org.jboss.bpm.model.InputSet;
import org.jboss.bpm.model.Message;
+import org.jboss.bpm.model.OutputSet;
import org.jboss.bpm.model.Process;
import org.jboss.bpm.model.Property;
import org.jboss.bpm.model.ReceiveTask;
@@ -111,50 +113,41 @@
}
@Override
- public ExecutionHandler getExecutionHandler()
+ public void execute(Token token)
{
- final Task task = this;
- ExecutionHandler handler = super.getExecutionHandler();
- if (handler == null)
+ // Wait for the message to arrive
+ long now = System.currentTimeMillis();
+ long until = now + RECEIVE_TIMEOUT;
+ while (messages.size() == 0 && now < until)
{
- handler = new ExecutionHandler()
+ try
{
- public void execute(Token token)
- {
- // Wait for the message to arrive
- long now = System.currentTimeMillis();
- long until = now + RECEIVE_TIMEOUT;
- while (messages.size() == 0 && now < until)
- {
- try
- {
- Thread.currentThread().sleep(500);
- now = System.currentTimeMillis();
- }
- catch (InterruptedException ex)
- {
- log.error("ReceiveTask interrupted" + ex.toString());
- }
- }
-
- // Timeout if the message did not arrive
- if (messages.size() == 0)
- throw new ProcessTimeoutException("Message receive timeout in: " + task);
-
- // Copy the expected properties from the
- // received message to the execution context
- ExecutionContext exContext = token.getExecutionContext();
- Message msg = messages.remove(0);
- for (Property prop : messageRef.getProperties())
- {
- String key = prop.getName();
- Expression value = msg.getProperty(key).getValue();
- exContext.addAttachment(key, value);
- }
- }
- };
+ Thread.currentThread().sleep(500);
+ now = System.currentTimeMillis();
+ }
+ catch (InterruptedException ex)
+ {
+ log.error("ReceiveTask interrupted" + ex.toString());
+ }
}
- return handler;
+
+ // Timeout if the message did not arrive
+ if (messages.size() == 0)
+ throw new ProcessTimeoutException("Message receive timeout in: " + this);
+
+ // Copy the expected properties from the
+ // received message to the execution context
+ Message msg = messages.remove(0);
+ ExecutionContext exContext = token.getExecutionContext();
+ for (Property prop : messageRef.getProperties())
+ {
+ String key = prop.getName();
+ Expression value = msg.getProperty(key).getValue();
+ exContext.addAttachment(key, value);
+ }
+
+ // Call default execute
+ super.execute(token);
}
@Override
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/SendTaskImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/SendTaskImpl.java 2008-07-28 14:22:17 UTC (rev 1737)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/SendTaskImpl.java 2008-07-28 15:46:17 UTC (rev 1738)
@@ -24,14 +24,14 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jboss.bpm.InvalidProcessException;
-import org.jboss.bpm.model.Expression;
+import org.jboss.bpm.model.InputSet;
import org.jboss.bpm.model.Message;
import org.jboss.bpm.model.MessageBuilder;
import org.jboss.bpm.model.MessageBuilderFactory;
+import org.jboss.bpm.model.OutputSet;
import org.jboss.bpm.model.Process;
import org.jboss.bpm.model.Property;
import org.jboss.bpm.model.SendTask;
-import org.jboss.bpm.runtime.ExecutionContext;
import org.jboss.bpm.runtime.ExecutionHandler;
import org.jboss.bpm.runtime.Token;
@@ -86,7 +86,7 @@
{
handler = new ExecutionHandler()
{
- public void execute(Token token)
+ public void execute(Token token, InputSet inputSet, OutputSet outputSet)
{
MessageBuilderFactory factory = MessageBuilderFactory.newInstance();
MessageBuilder msgBuilder = factory.newMessageBuilder();
@@ -94,18 +94,14 @@
// Copy the properties from the execution context
// to the send message
- ExecutionContext exContext = token.getExecutionContext();
- for (Property prop : messageRef.getProperties())
+ for (Property auxProp : messageRef.getProperties())
{
- String key = prop.getName();
- Object att = exContext.getAttachment(key);
- if (att == null)
- throw new IllegalStateException("Cannot obtain expression: " + key);
- if (att instanceof Expression == false)
- throw new IllegalStateException("Value is not an expression: " + att);
+ String key = auxProp.getName();
+ Property prop = inputSet.getProperty(key);
+ if (prop == null)
+ throw new IllegalStateException("Cannot obtain property: " + key);
- Expression value = (Expression)att;
- msgBuilder.addProperty(key, value.getExpressionBody());
+ msgBuilder.addProperty(key, prop.getValue().getExpressionBody());
}
Message msg = msgBuilder.getMessage();
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/SequenceFlowImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/SequenceFlowImpl.java 2008-07-28 14:22:17 UTC (rev 1737)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/SequenceFlowImpl.java 2008-07-28 15:46:17 UTC (rev 1738)
@@ -23,32 +23,40 @@
//$Id$
-import org.jboss.bpm.NotImplementedException;
import org.jboss.bpm.model.Expression;
-import org.jboss.bpm.model.GraphicalElement;
import org.jboss.bpm.model.SequenceFlow;
/**
- * A Sequence Flow is a solid graphical line that is used to show the order that Activities will be performed in a Process. Each Flow has only one source and only one
- * target.
+ * A Sequence Flow is a solid graphical line that is used to show the order that Activities will be performed in a Process.
+ * Each Flow has only one source and only one target.
*
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
public class SequenceFlowImpl extends FlowImpl implements SequenceFlow
{
+ private ConditionType conditionType = ConditionType.None;
+ private Expression conditionExpression;
+
public SequenceFlowImpl(String targetName)
{
super(targetName);
}
- public Expression getConditionExpression()
+ public SequenceFlowImpl(String targetName, ConditionType type, Expression expr)
{
- throw new NotImplementedException();
+ super(targetName);
+ this.conditionType = type;
+ this.conditionExpression = expr;
}
public ConditionType getConditionType()
{
- throw new NotImplementedException();
+ return conditionType;
}
+
+ public Expression getConditionExpression()
+ {
+ return conditionExpression;
+ }
}
\ No newline at end of file
Deleted: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/SignalHandlerImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/SignalHandlerImpl.java 2008-07-28 14:22:17 UTC (rev 1737)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/SignalHandlerImpl.java 2008-07-28 15:46:17 UTC (rev 1738)
@@ -1,56 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.bpm.model.internal;
-
-//$Id$
-
-import org.jboss.bpm.model.Signal;
-import org.jboss.bpm.runtime.SignalHandler;
-
-/**
- * Implement to get signals on enter and exit.
- *
- * @author thomas.diesler(a)jboss.com
- * @since 08-Jul-2008
- */
-public class SignalHandlerImpl extends HandlerImpl implements SignalHandler
-{
- private SignalHandler handler;
-
- public Signal getEnterSignal()
- {
- if (handler == null)
- {
- handler = newInstance(SignalHandler.class);
- }
- return handler.getEnterSignal();
- }
-
- public Signal getExitSignal()
- {
- if (handler == null)
- {
- handler = newInstance(SignalHandler.class);
- }
- return handler.getExitSignal();
- }
-}
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/StartEventImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/StartEventImpl.java 2008-07-28 14:22:17 UTC (rev 1737)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/StartEventImpl.java 2008-07-28 15:46:17 UTC (rev 1738)
@@ -30,6 +30,8 @@
import org.jboss.bpm.NotImplementedException;
import org.jboss.bpm.model.EventDetail;
import org.jboss.bpm.model.Flow;
+import org.jboss.bpm.model.InputSet;
+import org.jboss.bpm.model.OutputSet;
import org.jboss.bpm.model.Signal;
import org.jboss.bpm.model.StartEvent;
import org.jboss.bpm.runtime.ExecutionHandler;
@@ -75,7 +77,7 @@
{
handler = new ExecutionHandler()
{
- public void execute(Token token)
+ public void execute(Token token, InputSet inputSet, OutputSet outputSet)
{
log.debug("Nothing to do in start-event");
}
Modified: jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/airticket/AirticketTest.java
===================================================================
--- jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/airticket/AirticketTest.java 2008-07-28 14:22:17 UTC (rev 1737)
+++ jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/airticket/AirticketTest.java 2008-07-28 15:46:17 UTC (rev 1738)
@@ -114,7 +114,8 @@
// Build the Validate Gateway
GatewayBuilder gatewayBuilder = procBuilder.addGateway("ValidateGateway", GatewayType.Exclusive);
- gatewayBuilder.addGate("CheckAvailabilityTask").addGate("SendInvalidTask");
+ gatewayBuilder.addConditionalGate("CheckAvailabilityTask", ExpressionLanguage.MVEL, "isReqDataValid == true").
+ addDefaultGate("SendInvalidTask");
// Build the CheckAvailability Task
taskBuilder = procBuilder.addTask("CheckAvailabilityTask", TaskType.None);
Modified: jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/task/TaskA.java
===================================================================
--- jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/task/TaskA.java 2008-07-28 14:22:17 UTC (rev 1737)
+++ jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/task/TaskA.java 2008-07-28 15:46:17 UTC (rev 1738)
@@ -23,7 +23,11 @@
// $Id$
-import org.jboss.bpm.runtime.ExecutionContext;
+import org.jboss.bpm.model.InputSet;
+import org.jboss.bpm.model.OutputSet;
+import org.jboss.bpm.model.Property;
+import org.jboss.bpm.model.PropertyBuilder;
+import org.jboss.bpm.model.PropertyBuilderFactory;
import org.jboss.bpm.runtime.ExecutionHandler;
import org.jboss.bpm.runtime.Token;
@@ -35,9 +39,10 @@
*/
public class TaskA implements ExecutionHandler
{
- public void execute(Token token)
+ public void execute(Token token, InputSet inputSet, OutputSet outputSet)
{
- ExecutionContext ctx = token.getExecutionContext();
- ctx.addAttachment(String.class, "Task: TaskA");
+ PropertyBuilder builder = PropertyBuilderFactory.newInstance().newPropertyBuilder();
+ Property prop = builder.newProperty("SomeString", "Task: TaskA");
+ outputSet.addProperty(prop);
}
}
Modified: jbossbpm/spec/trunk/modules/testsuite/src/test/resources/jbpm-beans.xml
===================================================================
--- jbossbpm/spec/trunk/modules/testsuite/src/test/resources/jbpm-beans.xml 2008-07-28 14:22:17 UTC (rev 1737)
+++ jbossbpm/spec/trunk/modules/testsuite/src/test/resources/jbpm-beans.xml 2008-07-28 15:46:17 UTC (rev 1738)
@@ -13,6 +13,7 @@
<!-- The Builder Factories -->
<bean name="jBPMProcessBuilderFactory" class="org.jboss.bpm.model.internal.ProcessBuilderFactoryImpl"/>
<bean name="jBPMMessageBuilderFactory" class="org.jboss.bpm.model.internal.MessageBuilderFactoryImpl"/>
+ <bean name="jBPMPropertyBuilderFactory" class="org.jboss.bpm.model.internal.PropertyBuilderFactoryImpl"/>
<!-- The ProcessManager -->
<bean name="jBPMProcessManager" class="org.jboss.bpm.client.internal.ProcessManagerImpl">
15 years, 9 months
JBoss JBPM SVN: r1737 - in jbpm4/pvm/trunk/modules/core/src: main/java/org/jbpm/pvm/internal/jobexecutor and 6 other directories.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2008-07-28 10:22:17 -0400 (Mon, 28 Jul 2008)
New Revision: 1737
Added:
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/TestTimerSession.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/TestTimerSessionBinding.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/TimerConfiguration.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/TimerIntegrationTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/TimerUnitTest.java
Removed:
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/DbTimerTests.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/TimerTest.java
Modified:
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/job/TimerImpl.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobTestTimerSession.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/TimerDefinitionImpl.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/model/ProcessFactory.java
jbpm4/pvm/trunk/modules/core/src/main/resources/org/jbpm/pvm/hibernate.definition.hbm.xml
jbpm4/pvm/trunk/modules/core/src/main/resources/org/jbpm/pvm/hibernate.job.hbm.xml
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/DbTests.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/pvm.wire.bindings.xml
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/IncrementCounterWaitState.java
jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/timer/environment.cfg.xml
Log:
revert pascal's timer patch
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/job/TimerImpl.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/job/TimerImpl.java 2008-07-28 11:15:05 UTC (rev 1736)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/job/TimerImpl.java 2008-07-28 14:22:17 UTC (rev 1737)
@@ -21,7 +21,6 @@
*/
package org.jbpm.pvm.internal.job;
-import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
@@ -34,7 +33,6 @@
import org.jbpm.pvm.internal.jobexecutor.JobAddedNotification;
import org.jbpm.pvm.internal.jobexecutor.JobExecutor;
import org.jbpm.pvm.internal.log.Log;
-import org.jbpm.pvm.internal.script.ScriptManager;
import org.jbpm.pvm.internal.util.Clock;
import org.jbpm.pvm.job.Timer;
import org.jbpm.pvm.model.ObservableElement;
@@ -55,115 +53,45 @@
private static final long serialVersionUID = 1L;
private static final Log log = Log.getLog(TimerImpl.class.getName());
- private static String dateFormat = "yyyy-MM-dd HH:mm:ss,SSS";
+ private final static String dateFormat = "yyyy-MM-dd HH:mm:ss,SSS";
protected String signalName;
protected String eventName;
protected String repeat;
- protected String language;
public static final String EVENT_TIMER = "timer";
public TimerImpl() {
}
- private static Date getDateFromDuration(String expression) {
- Duration duration = new Duration(expression);
+ public void setDueDateDescription(String dueDateDescription) {
+ Duration duration = new Duration(dueDateDescription);
Date now = Clock.getCurrentTime();
- Date result = null;
-
+
if ( duration.isBusinessTime()
- || duration.getMonths()>0
- || duration.getYears()>0
- ) {
+ || duration.getMonths()>0
+ || duration.getYears()>0
+ ) {
Environment environment = Environment.getCurrent();
if (environment==null) {
- log.debug("no environment to get business calendar for calculating dueDate "+expression);
- } else {
- BusinessCalendar businessCalendar = environment.get(BusinessCalendar.class);
- if (businessCalendar==null) {
- log.debug("no business calendar to calculate dueDate "+expression);
- } else {
- result = businessCalendar.add(now, duration);
- }
+ throw new PvmException("no environment to get business calendar for calculating dueDate "+dueDateDescription);
}
+ BusinessCalendar businessCalendar = environment.get(BusinessCalendar.class);
+ dueDate = businessCalendar.add(now, duration);
+
} else {
long millis = duration.getMillis() +
- 1000*( duration.getSeconds() +
- 60*( duration.getMinutes() +
- 60*( duration.getHours() +
- 24*( duration.getDays() +
- 7*duration.getWeeks()))));
- result = new Date(now.getTime() + millis);
+ 1000*( duration.getSeconds() +
+ 60*( duration.getMinutes() +
+ 60*( duration.getHours() +
+ 24*( duration.getDays() +
+ 7*duration.getWeeks()))));
+ dueDate = new Date(now.getTime() + millis);
}
- return result;
}
- private Object evaluateExpression(String expression) {
- Object result = null;
- Environment environment = Environment.getCurrent();
- if (environment==null) {
- log.debug("no environment to get script manager to evaluate "+expression);
- } else {
- ScriptManager scriptManager = environment.getEnvironmentFactory().get(ScriptManager.class);
- if (scriptManager==null) {
- log.debug("no script manager to evaluate "+expression);
- } else {
- log.debug("evaluates "+expression);
- result = scriptManager.evaluateExpression(expression, execution, language);
- }
- }
- return result;
- }
-
- public void setDueDateDescription(String expression) {
- Exception exception = null;
- Object dueDateDescription = evaluateExpression(expression);
-
- // now we analyse the description
- Date date = null;
- // date?
- if (dueDateDescription instanceof Date) {
- date = (Date)dueDateDescription;
- } else if (dueDateDescription instanceof String) {
- // formatted date?
- try {
- date = new SimpleDateFormat(dateFormat).parse((String) dueDateDescription);
- } catch (ParseException e) {
- // not a formatted date
- exception = e;
- }
-
- // duration?
- try {
- date = getDateFromDuration((String) dueDateDescription);
- } catch (PvmException e) {
- // not a duration
- exception = e;
- }
- } else {
- throw new PvmException("invalid timer's dueDateDescription");
- }
-
- if (date!=null) {
- setDueDate(date);
- } else {
- throw new PvmException("Unable to set dueDate from " + expression+". " +
- "This might be a environment configuration error", exception);
- }
- }
-
- private void repeatTimer(String repeat) {
- Object description = evaluateExpression(repeat);
- if (description instanceof String && description!=null) {
- setDueDate(getDateFromDuration((String)description));
- } else {
- throw new PvmException("invalid timer's repeat: "+repeat);
- }
- }
-
public Boolean execute(Environment environment) throws Exception {
- log.debug("executing " + this);
+ if (log.isDebugEnabled()) log.debug("executing " + this);
if (environment==null) {
throw new PvmException("environment is null");
@@ -173,13 +101,13 @@
environment.addContext(jobContext);
try {
if (signalName!=null) {
- log.debug("feeding timer signal "+signalName+" into "+execution);
+ if (log.isDebugEnabled()) log.debug("feeding timer signal "+signalName+" into "+execution);
execution.signal(signalName);
}
if (eventName!=null) {
ObservableElement eventSource = execution.getNode();
- log.debug("firing event "+signalName+" into "+eventSource);
+ if (log.isDebugEnabled()) log.debug("firing event "+signalName+" into "+eventSource);
execution.fire(eventName, eventSource);
}
@@ -191,7 +119,7 @@
// if there is no repeat on this timer
if (repeat==null) {
// delete the jobImpl
- log.debug("deleting " + this);
+ if (log.isDebugEnabled()) log.debug("deleting " + this);
DbSession dbSession = environment.get(DbSession.class);
if (dbSession==null) {
throw new PvmException("no "+DbSession.class.getName()+" in environment");
@@ -203,10 +131,10 @@
// suppose that it took the timer runner thread a very long time to execute the timers
// then the repeat action dueDate could already have passed
do {
- repeatTimer(repeat);
+ setDueDateDescription(repeat);
} while (dueDate.getTime() <= Clock.getCurrentTime().getTime());
- log.debug("rescheduled "+this+" for "+formatDueDate(dueDate));
+ if (log.isDebugEnabled()) log.debug("rescheduled "+this+" for "+formatDueDate(dueDate));
// release the lock on the timer
setLockOwner(null);
@@ -250,9 +178,6 @@
public static String formatDueDate(Date date) {
return new SimpleDateFormat(dateFormat).format(date);
}
- public static void setDateFormat(String dateFormat) {
- TimerImpl.dateFormat = dateFormat;
- }
public String getSignalName() {
return signalName;
@@ -272,14 +197,4 @@
public void setRepeat(String repeat) {
this.repeat = repeat;
}
-
-
- public String getLanguage() {
- return language;
- }
-
-
- public void setLanguage(String language) {
- this.language = language;
- }
}
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobTestTimerSession.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobTestTimerSession.java 2008-07-28 11:15:05 UTC (rev 1736)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobTestTimerSession.java 2008-07-28 14:22:17 UTC (rev 1737)
@@ -28,7 +28,6 @@
/**
* @author Tom Baeyens
- * @author Pascal Verdage
*/
public class JobTestTimerSession implements TimerSession {
@@ -36,15 +35,11 @@
Session session;
public void schedule(Timer timer) {
- if (session!=null) {
- session.save(timer);
- }
+ session.save(timer);
}
public void cancel(Timer timer) {
- if (session!=null) {
- session.delete(timer);
- }
+ session.delete(timer);
}
}
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java 2008-07-28 11:15:05 UTC (rev 1736)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java 2008-07-28 14:22:17 UTC (rev 1737)
@@ -25,6 +25,7 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
+import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashSet;
@@ -75,7 +76,6 @@
/**
* @author Tom Baeyens
- * @author Pascal Verdage
*/
public class ExecutionImpl implements ClientProcessInstance,
ActivityExecution,
@@ -792,8 +792,8 @@
createTimer(
timerDefinition.getEventName(),
timerDefinition.getSignalName(),
- timerDefinition.getExpression(),
- timerDefinition.getLanguage(),
+ timerDefinition.getDueDateDescription(),
+ timerDefinition.getDueDate(),
timerDefinition.getRepeat(),
timerDefinition.isExclusive(),
timerDefinition.getRetries()
@@ -822,16 +822,15 @@
}
}
- public void createTimer(String eventName, String signalName, String expression) {
- createTimer(eventName, signalName, expression, null, null, null, null);
+ public void createTimer(String eventName, String signalName, String dueDateDescription) {
+ createTimer(eventName, signalName, dueDateDescription, null, null, null, null);
}
- public void createTimer(String eventName, String signalName, String expression, String repeat) {
- createTimer(eventName, signalName, expression, null, repeat, null, null);
+ public void createTimer(String eventName, String signalName, String dueDateDescription, String repeat) {
+ createTimer(eventName, signalName, dueDateDescription, null, repeat, null, null);
}
- public void createTimer(String eventName, String signalName, String expression,
- String language, String repeat, Boolean isExclusive, Integer retries) {
+ public void createTimer(String eventName, String signalName, String dueDateDescription, Date dueDate, String repeat, Boolean isExclusive, Integer retries) {
if ( (eventName==null)
&& (signalName==null)
) {
@@ -847,17 +846,16 @@
timerImpl.setExecution(this);
timers.add(timerImpl);
hasTimers = true;
+ // setInverseReference(timerImpl);
- // initialize all the timer properties
+ // initialise all the timer properties
timerImpl.setEventName(eventName);
timerImpl.setSignalName(signalName);
-
- // the if is added to keep the original default
- if (language!=null) {
- timerImpl.setLanguage(language);
+ if (dueDate!=null) {
+ timerImpl.setDueDate(dueDate);
+ } else {
+ timerImpl.setDueDateDescription(dueDateDescription);
}
- // language has to be set before expression
- timerImpl.setDueDateDescription(expression);
// the if is added to keep the original default
if (isExclusive!=null) {
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/TimerDefinitionImpl.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/TimerDefinitionImpl.java 2008-07-28 11:15:05 UTC (rev 1736)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/TimerDefinitionImpl.java 2008-07-28 14:22:17 UTC (rev 1737)
@@ -22,6 +22,7 @@
package org.jbpm.pvm.internal.model;
import java.io.Serializable;
+import java.util.Date;
/**
@@ -34,13 +35,13 @@
protected long dbid;
protected int dbversion;
- protected String expression;
- protected String language;
+ protected String dueDateDescription;
protected String repeat;
protected Boolean isExclusive;
protected Integer retries;
protected String eventName;
protected String signalName;
+ protected Date dueDate;
public TimerDefinitionImpl() {
}
@@ -54,6 +55,12 @@
public long getDbid() {
return dbid;
}
+ public String getDueDateDescription() {
+ return dueDateDescription;
+ }
+ public void setDueDateDescription(String dueDateDescription) {
+ this.dueDateDescription = dueDateDescription;
+ }
public Boolean isExclusive() {
return isExclusive;
}
@@ -78,20 +85,10 @@
public void setEventName(String eventName) {
this.eventName = eventName;
}
-
- public String getExpression() {
- return expression;
+ public Date getDueDate() {
+ return dueDate;
}
-
- public void setExpression(String expression) {
- this.expression = expression;
+ public void setDueDate(Date dueDate) {
+ this.dueDate = dueDate;
}
-
- public String getLanguage() {
- return language;
- }
-
- public void setLanguage(String language) {
- this.language = language;
- }
}
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/model/ProcessFactory.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/model/ProcessFactory.java 2008-07-28 11:15:05 UTC (rev 1736)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/model/ProcessFactory.java 2008-07-28 14:22:17 UTC (rev 1737)
@@ -22,6 +22,7 @@
package org.jbpm.pvm.model;
import java.util.ArrayList;
+import java.util.Date;
import java.util.List;
import java.util.Stack;
@@ -191,26 +192,34 @@
}
/** declares a timer on the current node or process. {@link #scope()} is
- * automatically implied.
- * @param expression can be a formatted date or duration
- * or an expression in the default expression language if defined */
- public ProcessFactory timer(String expression, String signalName) {
- return timer(expression, null, signalName, null);
+ * automatically implied. */
+ public ProcessFactory timer(String dueDateDescription, String signalName) {
+ return timer(dueDateDescription, null, signalName, null);
}
/** declares a timer on the current node or process. {@link #scope()} is
- * automatically implied.
- * @param expression can be a formatted date or duration
- * or an expression in the given language.
- * @param language is a supposed known language (environment configuration) */
- public ProcessFactory timer(String expression, String language,
- String signalName, String repeat) {
+ * automatically implied. */
+ public ProcessFactory timer(String dueDateDescription, String signalName, String repeat) {
+ return timer(dueDateDescription, null, signalName, repeat);
+ }
+
+ /** declares a timer on the current node or process. {@link #scope()} is
+ * automatically implied. */
+ public ProcessFactory timer(Date dueDate, String signalName) {
+ return timer(null, dueDate, signalName, null);
+ }
+
+ protected ProcessFactory timer(String dueDateDescription, Date dueDate,
+ String signalName, String repeat) {
if (node!=null && scope==null) {
scope();
}
TimerDefinitionImpl timerDefinition = scope.createTimerDefinition();
- timerDefinition.setExpression(expression);
- timerDefinition.setLanguage(language);
+ if (dueDate!=null) {
+ timerDefinition.setDueDate(dueDate);
+ } else {
+ timerDefinition.setDueDateDescription(dueDateDescription);
+ }
timerDefinition.setSignalName(signalName);
timerDefinition.setRepeat(repeat);
return this;
Modified: jbpm4/pvm/trunk/modules/core/src/main/resources/org/jbpm/pvm/hibernate.definition.hbm.xml
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/resources/org/jbpm/pvm/hibernate.definition.hbm.xml 2008-07-28 11:15:05 UTC (rev 1736)
+++ jbpm4/pvm/trunk/modules/core/src/main/resources/org/jbpm/pvm/hibernate.definition.hbm.xml 2008-07-28 14:22:17 UTC (rev 1737)
@@ -378,13 +378,13 @@
<generator class="native" />
</id>
<version name="dbversion" column="DBVERSION_" />
- <property name="expression" column="EXPRESSION_"/>
- <property name="language" column="LANGUAGE_"/>
+ <property name="dueDateDescription" column="DUEDATEDESCR_"/>
<property name="repeat" column="REPEAT_"/>
<property name="isExclusive" column="ISEXCL_"/>
<property name="retries" column="RETRIES_"/>
<property name="eventName" column="EVENT_"/>
<property name="signalName" column="SIGNAL_"/>
+ <property name="dueDate" column="DUEDATE_" type="timestamp"/>
</class>
<!-- ### QUERIES ######################################################## -->
Modified: jbpm4/pvm/trunk/modules/core/src/main/resources/org/jbpm/pvm/hibernate.job.hbm.xml
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/resources/org/jbpm/pvm/hibernate.job.hbm.xml 2008-07-28 11:15:05 UTC (rev 1736)
+++ jbpm4/pvm/trunk/modules/core/src/main/resources/org/jbpm/pvm/hibernate.job.hbm.xml 2008-07-28 14:22:17 UTC (rev 1737)
@@ -49,7 +49,6 @@
<property name="signalName" column="SIGNAL_" />
<property name="eventName" column="EVENT_" />
<property name="repeat" column="REPEAT_" />
- <property name="language" column="LANGUAGE_" />
</subclass>
</class>
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/DbTests.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/DbTests.java 2008-07-28 11:15:05 UTC (rev 1736)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/DbTests.java 2008-07-28 14:22:17 UTC (rev 1737)
@@ -28,7 +28,6 @@
import org.jbpm.pvm.db.model.DbModelTests;
import org.jbpm.pvm.db.svc.DbSvcTests;
import org.jbpm.pvm.jobexecutor.JobExecutorTests;
-import org.jbpm.pvm.timer.DbTimerTests;
/**
@@ -44,8 +43,7 @@
suite.addTest(DbModelTests.suite());
suite.addTest(DbSvcTests.suite());
suite.addTest(JobExecutorTests.suite());
- suite.addTest(DbTimerTests.suite());
-
+
//$JUnit-END$
return suite;
}
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/pvm.wire.bindings.xml
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/pvm.wire.bindings.xml 2008-07-28 11:15:05 UTC (rev 1736)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/pvm.wire.bindings.xml 2008-07-28 14:22:17 UTC (rev 1737)
@@ -1,2 +1,5 @@
<wire-bindings>
+
+ <binding class="org.jbpm.pvm.timer.TestTimerSessionBinding" />
+
</wire-bindings>
Deleted: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/DbTimerTests.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/DbTimerTests.java 2008-07-28 11:15:05 UTC (rev 1736)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/DbTimerTests.java 2008-07-28 14:22:17 UTC (rev 1737)
@@ -1,17 +0,0 @@
-package org.jbpm.pvm.timer;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-
-public class DbTimerTests {
-
- public static Test suite() {
- TestSuite suite = new TestSuite("Test for org.jbpm.pvm.timer");
- //$JUnit-BEGIN$
- suite.addTestSuite(TimerTest.class);
- //$JUnit-END$
- return suite;
- }
-
-}
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/IncrementCounterWaitState.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/IncrementCounterWaitState.java 2008-07-28 11:15:05 UTC (rev 1736)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/IncrementCounterWaitState.java 2008-07-28 14:22:17 UTC (rev 1737)
@@ -53,10 +53,8 @@
}
}
if (continueToWait) {
- log.debug("continue to wait");
execution.waitForSignal();
} else {
- log.debug("take a timeout transition");
execution.take("timeout");
}
}
Added: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/TestTimerSession.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/TestTimerSession.java (rev 0)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/TestTimerSession.java 2008-07-28 14:22:17 UTC (rev 1737)
@@ -0,0 +1,85 @@
+/*
+ * 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.pvm.timer;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+import org.jbpm.pvm.env.Environment;
+import org.jbpm.pvm.internal.job.TimerImpl;
+import org.jbpm.pvm.job.Timer;
+import org.jbpm.pvm.session.TimerSession;
+
+/**
+ * @author Tom Baeyens
+ * @author Pascal Verdage
+ */
+public class TestTimerSession implements TimerSession {
+
+ private static final long serialVersionUID = 1L;
+
+ protected List<TimerImpl> timers = new ArrayList<TimerImpl>();
+
+ public void cancel(Timer timer) {
+ timers.remove(timer);
+ }
+
+ public void schedule(Timer timer) {
+ timers.add((TimerImpl)timer);
+ }
+
+ /** execute the first timer (ordered by dueDate)
+ * @throws Exception */
+ public void executeFirstTimer() throws Exception {
+ TimerImpl timerImpl = getFirstTimer();
+ if (timerImpl != null) {
+ TimerConfiguration.getEnvironmentFactory().openEnvironment();
+ try {
+ boolean deleteThisJob = timerImpl.execute(Environment.getCurrent());
+ if (deleteThisJob) {
+ timers.remove(timerImpl);
+ }
+ } finally {
+ Environment.getCurrent().close();
+ }
+ }
+ }
+
+ /** return the first timer (ordered by dueDate) */
+ public TimerImpl getFirstTimer() {
+ TimerImpl firstTimer = null;
+ Date firstDueDate = new Date(Long.MAX_VALUE);
+ for (TimerImpl timerImpl : timers) {
+ if (firstDueDate.after(timerImpl.getDueDate())) {
+ firstTimer = timerImpl;
+ firstDueDate = timerImpl.getDueDate();
+ }
+ }
+ return firstTimer;
+ }
+
+ /** return the number of scheduled timers */
+ public int getNbTimer() {
+ return timers.size();
+ }
+}
Added: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/TestTimerSessionBinding.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/TestTimerSessionBinding.java (rev 0)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/TestTimerSessionBinding.java 2008-07-28 14:22:17 UTC (rev 1737)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.pvm.timer;
+
+import org.jbpm.pvm.internal.util.TagBinding;
+import org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor;
+import org.jbpm.pvm.internal.wire.xml.WireParser;
+import org.jbpm.pvm.internal.xml.Parse;
+import org.jbpm.pvm.internal.xml.Parser;
+import org.w3c.dom.Element;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class TestTimerSessionBinding extends TagBinding {
+
+ public TestTimerSessionBinding() {
+ super("test-timer-session", null, WireParser.CATEGORY_DESCRIPTOR);
+ }
+
+ public Object parse(Element element, Parse parse, Parser parser) {
+ return new ObjectDescriptor(TestTimerSession.class);
+ }
+
+}
Added: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/TimerConfiguration.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/TimerConfiguration.java (rev 0)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/TimerConfiguration.java 2008-07-28 14:22:17 UTC (rev 1737)
@@ -0,0 +1,50 @@
+ package org.jbpm.pvm.timer;
+
+import org.jbpm.pvm.ExecutionService;
+import org.jbpm.pvm.ManagementService;
+import org.jbpm.pvm.ProcessService;
+import org.jbpm.pvm.env.EnvironmentFactory;
+import org.jbpm.pvm.env.PvmEnvironmentFactory;
+
+/**
+ * @author Pascal Verdage
+ */
+public abstract class TimerConfiguration {
+
+ static boolean isInitialized;
+ static ProcessService processService;
+ static ExecutionService executionService;
+ static ManagementService managementService;
+ static EnvironmentFactory environmentFactory;
+
+ public static ProcessService getProcessService() {
+ initialize();
+ return processService;
+ }
+
+ public static ExecutionService getExecutionService() {
+ initialize();
+ return executionService;
+ }
+
+ public static ManagementService getManagementService() {
+ initialize();
+ return managementService;
+ }
+
+ public static EnvironmentFactory getEnvironmentFactory() {
+ initialize();
+ return environmentFactory;
+ }
+
+ private synchronized static void initialize() {
+ if (!isInitialized) {
+ isInitialized = true;
+ environmentFactory = new PvmEnvironmentFactory("org/jbpm/pvm/timer/environment.cfg.xml");
+ processService = environmentFactory.get(ProcessService.class);
+ executionService = environmentFactory.get(ExecutionService.class);
+ managementService = environmentFactory.get(ManagementService.class);
+ }
+ }
+
+}
Added: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/TimerIntegrationTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/TimerIntegrationTest.java (rev 0)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/TimerIntegrationTest.java 2008-07-28 14:22:17 UTC (rev 1737)
@@ -0,0 +1,342 @@
+/**
+ * Copyright (C) 2006 Bull S. A. S.
+ * Bull, Rue Jean Jaures, B.P.68, 78340, Les Clayes-sous-Bois
+ * This library 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
+ * version 2.1 of the License.
+ * This library 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
+ * program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
+ * Floor, Boston, MA 02110-1301, USA.
+ **/
+package org.jbpm.pvm.timer;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.jbpm.pvm.Execution;
+import org.jbpm.pvm.ExecutionService;
+import org.jbpm.pvm.ProcessService;
+import org.jbpm.pvm.activity.ActivityExecution;
+import org.jbpm.pvm.activity.ExternalActivity;
+import org.jbpm.pvm.env.Environment;
+import org.jbpm.pvm.internal.model.ExecutionImpl;
+import org.jbpm.pvm.internal.model.NodeImpl;
+import org.jbpm.pvm.internal.util.Clock;
+import org.jbpm.pvm.job.JobTestHelper;
+import org.jbpm.pvm.job.Timer;
+import org.jbpm.pvm.model.OpenExecution;
+import org.jbpm.pvm.model.ProcessDefinition;
+import org.jbpm.pvm.model.ProcessFactory;
+import org.jbpm.pvm.samples.activities.AutomaticActivity;
+import org.jbpm.pvm.session.DbSession;
+import org.jbpm.pvm.session.PvmDbSession;
+import org.jbpm.pvm.test.base.DbTestCase;
+
+/**
+ * @author Pascal Verdage
+ */
+public class TimerIntegrationTest extends DbTestCase {
+ public static class WaitState implements ExternalActivity {
+
+ private static final long serialVersionUID = 1L;
+
+ public void execute(ActivityExecution execution) {
+ execution.waitForSignal();
+ }
+
+ public void signal(ActivityExecution execution,
+ String signalName,
+ Map<String, Object> parameters) {
+ if (signalName!=null) {
+ execution.take(signalName);
+ }
+ }
+ }
+
+ private static Date getDueDate(long duration) {
+ return new Date(System.currentTimeMillis() + duration);
+ }
+
+ private static long twoDaysDuration = 2*24*60*60*1000;
+
+ private static ExecutionService getExecutionService() {
+ return Environment.getCurrent().get(ExecutionService.class);
+ }
+
+ private static ExecutionImpl deployAndInstanciateProcess(ProcessDefinition definition) {
+ ProcessService processService = Environment.getCurrent().get(ProcessService.class);
+ processService.deploy(definition);
+
+ Execution processInstance = getExecutionService().startExecution(definition.getName());
+
+ return (ExecutionImpl) processInstance;
+ }
+
+ public void testTimerDefinition() {
+ ProcessDefinition processDefinition = ProcessFactory.build("timerDefinition")
+ .node("request").initial().behaviour(WaitState.class)
+ .transition().to("decide")
+ .node("decide").behaviour(WaitState.class)
+ .timer(getDueDate(twoDaysDuration), "timeout")
+ .transition("decision made").to("response") // first defined transition is the default one
+ .transition("timeout").to("reassign")
+ .node("reassign").behaviour(WaitState.class)
+ .node("response").behaviour(WaitState.class)
+ .done();
+
+ ExecutionImpl processInstance = deployAndInstanciateProcess(processDefinition);
+
+ Execution execution = processInstance;
+ assertEquals("request", execution.getNodeName());
+ // first node is a wait state with no timer
+ execution = getExecutionService().signalExecution(execution.getDbid());
+ assertEquals("decide", execution.getNodeName());
+
+ assertTrue(execution instanceof OpenExecution);
+ OpenExecution openExecution = (OpenExecution) execution;
+
+ // timer are created in a child execution
+ assertFalse(openExecution.hasTimers());
+
+ assertEquals(1, openExecution.getExecutions().size());
+ OpenExecution child = openExecution.getExecutions().iterator().next();
+
+ NodeImpl node1 = (NodeImpl) openExecution.getNode();
+ NodeImpl node2 = (NodeImpl) child.getNode();
+ assertEquals(node1, node2);
+ assertEquals("decide", node1.getName());
+ assertNotNull(node1.getTimerDefinitions());
+
+ assertTrue(child.hasTimers());
+ Set<Timer> timers = child.getTimers();
+ assertEquals(1, timers.size());
+ }
+
+ private static ExecutionImpl loadExecutionFromDb(long id) {
+ return Environment.getCurrent().get(DbSession.class).get(ExecutionImpl.class, id);
+ }
+
+ public void testTimerExecution() {
+ ProcessDefinition processDefinition = ProcessFactory.build("timerExecution")
+ .node("decide").initial().behaviour(WaitState.class)
+ .timer(getDueDate(twoDaysDuration), "timeout")
+ .transition("decision made").to("response") // first defined transition is the default one
+ .transition("timeout").to("reassign")
+ .node("reassign").behaviour(WaitState.class)
+ .node("response").behaviour(WaitState.class)
+ .done();
+
+ ExecutionImpl processInstance = deployAndInstanciateProcess(processDefinition);
+
+ Execution execution = processInstance;
+ assertEquals("decide", execution.getNodeName());
+
+ OpenExecution child = ((OpenExecution) execution).getExecutions().iterator().next();
+ assertEquals("decide", child.getNodeName());
+ Timer timer = child.getTimers().iterator().next();
+
+ JobTestHelper jobTestHelper = getEnvironmentFactory().get(JobTestHelper.class);
+ child = (OpenExecution) jobTestHelper.executeTimer(timer.getDbid());
+ assertEquals(Execution.STATE_ENDED, child.getState());
+
+ // check that the subExecution was deleted
+ child = loadExecutionFromDb(child.getDbid());
+ assertNull(child);
+
+ // check that timers have been deleted
+ List<Timer> timers = Environment.getCurrent().get(PvmDbSession.class).findTimers();
+ assertNotNull(timers);
+ assertTrue(timers.isEmpty());
+
+ // check that process is in the right state
+ execution = loadExecutionFromDb(processInstance.getDbid());
+ assertEquals("reassign", execution.getNodeName());
+ }
+
+ public void testCanceledTimer() {
+ ProcessDefinition processDefinition = ProcessFactory.build("timerCanceled")
+ .node("decide").initial().behaviour(WaitState.class)
+ .timer(getDueDate(twoDaysDuration), "timeout")
+ .transition("decision made").to("response") // first defined transition is the default one
+ .transition("timeout").to("reassign")
+ .node("reassign").behaviour(WaitState.class)
+ .node("response").behaviour(WaitState.class)
+ .done();
+
+ ExecutionImpl processInstance = deployAndInstanciateProcess(processDefinition);
+
+ Execution execution = processInstance;
+ assertEquals("decide", execution.getNodeName());
+
+ // signal child execution
+ Execution child = ((OpenExecution)execution).getExecutions().iterator().next();
+ execution = getExecutionService().signalExecution(child.getDbid());
+ assertEquals(Execution.STATE_ENDED, execution.getState());
+
+ // check that the subExecution was deleted
+ child = loadExecutionFromDb(child.getDbid());
+ assertNull(child);
+
+ // check that timers have been deleted
+ List<Timer> timers = Environment.getCurrent().get(PvmDbSession.class).findTimers();
+ assertNotNull(timers);
+ assertTrue(timers.isEmpty());
+
+ // check that process is in the right state
+ execution = loadExecutionFromDb(processInstance.getDbid());
+ assertEquals("response", execution.getNodeName());
+ }
+
+ public void testFixedDateTimer() {
+ Date now = new Date();
+ long twoDaysFromNow = now.getTime() + twoDaysDuration;
+
+ ProcessDefinition processDefinition = ProcessFactory.build("fixedDateTimer")
+ .node("decide").initial().behaviour(WaitState.class)
+ .timer(getDueDate(twoDaysDuration), "timeout")
+ .transition("decision made").to("response") // first defined transition is the default one
+ .transition("timeout").to("reassign")
+ .node("reassign").behaviour(WaitState.class)
+ .node("response").behaviour(WaitState.class)
+ .done();
+
+ ExecutionImpl processInstance = deployAndInstanciateProcess(processDefinition);
+
+ Execution execution = processInstance;
+ OpenExecution child = ((OpenExecution) execution).getExecutions().iterator().next();
+ assertEquals("decide", child.getNodeName());
+
+ // check that timer's dueDate is good
+ Timer timer = child.getTimers().iterator().next();
+ assertTrue(twoDaysFromNow <= timer.getDueDate().getTime());
+
+ // timer execution is tested in testTimerExecution
+ }
+
+ public void testDueDateDescriptionTimer() {
+ Date now = new Date();
+ long twoDaysFromNow = now.getTime() + twoDaysDuration;
+
+ ProcessDefinition processDefinition = ProcessFactory.build("dueDateDescriptionTimer")
+ .node("decide").initial().behaviour(WaitState.class)
+ .timer("2 days", "timeout")
+ .transition("decision made").to("response") // first defined transition is the default one
+ .transition("timeout").to("reassign")
+ .node("reassign").behaviour(WaitState.class)
+ .node("response").behaviour(WaitState.class)
+ .done();
+
+ ExecutionImpl processInstance = deployAndInstanciateProcess(processDefinition);
+
+ Execution execution = processInstance;
+ OpenExecution child = ((OpenExecution) execution).getExecutions().iterator().next();
+ assertEquals("decide", child.getNodeName());
+
+ // check that timer's dueDate is good
+ Timer timer = child.getTimers().iterator().next();
+ assertTrue(twoDaysFromNow <= timer.getDueDate().getTime());
+
+ // timer execution is tested in testTimerExecution
+ }
+
+ public void testReschedulingTimer() {
+ Date now = Clock.getCurrentTime();
+ long twoDaysFromNow = now.getTime() + twoDaysDuration;
+
+ ProcessDefinition processDefinition = ProcessFactory.build("reschedulingTimer")
+ .node("decide").initial().behaviour(IncrementCounterWaitState.class)
+ .variable(IncrementCounterWaitState.COUNTER, "0")
+ .timer("2 days", "increment", "2 days")
+ .transition("decision made").to("response") // first defined transition is the default one
+ .transition("timeout").to("reassign")
+ .node("reassign").behaviour(WaitState.class)
+ .node("response").behaviour(WaitState.class)
+ .done();
+
+ ExecutionImpl processInstance = deployAndInstanciateProcess(processDefinition);
+
+ Execution execution = processInstance;
+ OpenExecution child = ((OpenExecution) execution).getExecutions().iterator().next();
+
+ for (int i=0; i<IncrementCounterWaitState.MAX_COUNTER_VALUE; i++) {
+ // check that the execution is in the right node
+ assertNotNull(child);
+ assertEquals("decide", child.getNodeName());
+ assertEquals(Execution.STATE_ACTIVE, child.getState());
+
+ // check there is one timer
+ assertTrue(child.hasTimers());
+ assertEquals(1, child.getTimers().size());
+
+ // check that timer's dueDate is good
+ Timer timer = child.getTimers().iterator().next();
+ assertTrue("error is "+(timer.getDueDate().getTime()-twoDaysFromNow)+" millis",
+ twoDaysFromNow <= timer.getDueDate().getTime()+200);
+
+ // set next minimum due date
+ twoDaysFromNow = Clock.getCurrentTime().getTime() + twoDaysDuration;
+
+ // execute timer
+ JobTestHelper jobTestHelper = getEnvironmentFactory().get(JobTestHelper.class);
+ jobTestHelper.executeTimer(timer.getDbid());
+ child = loadExecutionFromDb(child.getDbid());
+ }
+
+ newTransaction();
+ child = loadExecutionFromDb(child.getDbid());
+ assertNull(child);
+
+ // check that timers have been deleted
+ List<Timer> timers = Environment.getCurrent().get(PvmDbSession.class).findTimers();
+ assertNotNull(timers);
+ assertTrue(timers.isEmpty());
+
+ // check that process is in the right state
+ execution = loadExecutionFromDb(processInstance.getDbid());
+ assertEquals("reassign", execution.getNodeName());
+ }
+
+ public void testTimerEndingProcessExecution() {
+ ProcessDefinition processDefinition = ProcessFactory.build("timerEndingProcess")
+ .node("decide").initial().behaviour(WaitState.class)
+ .timer("2 business days", "timeout")
+ .transition("decision made").to("response") // first defined transition is the default one
+ .transition("timeout").to("reassign")
+ .node("reassign").behaviour(AutomaticActivity.class)
+ .node("response").behaviour(WaitState.class)
+ .done();
+
+ ExecutionImpl processInstance = deployAndInstanciateProcess(processDefinition);
+
+ Execution execution = processInstance;
+ OpenExecution child = ((OpenExecution) execution).getExecutions().iterator().next();
+ assertEquals("decide", child.getNodeName());
+
+ // timer execution
+ Timer timer = child.getTimers().iterator().next();
+
+ JobTestHelper jobTestHelper = getEnvironmentFactory().get(JobTestHelper.class);
+ child = (OpenExecution) jobTestHelper.executeTimer(timer.getDbid());
+ assertEquals(Execution.STATE_ENDED, child.getState());
+
+ // check that the subExecution was deleted
+ child = loadExecutionFromDb(child.getDbid());
+ assertNull(child);
+
+ // check that timers have been deleted
+ List<Timer> timers = Environment.getCurrent().get(PvmDbSession.class).findTimers();
+ assertNotNull(timers);
+ assertTrue(timers.isEmpty());
+
+ // check that process is in the right state
+ execution = loadExecutionFromDb(processInstance.getDbid());
+ assertEquals("reassign", execution.getNodeName());
+ assertEquals(Execution.STATE_ENDED, execution.getState());
+ }
+
+}
Deleted: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/TimerTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/TimerTest.java 2008-07-28 11:15:05 UTC (rev 1736)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/TimerTest.java 2008-07-28 14:22:17 UTC (rev 1737)
@@ -1,475 +0,0 @@
-/**
- * Copyright (C) 2006 Bull S. A. S.
- * Bull, Rue Jean Jaures, B.P.68, 78340, Les Clayes-sous-Bois
- * This library 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
- * version 2.1 of the License.
- * This library 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
- * program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301, USA.
- **/
-package org.jbpm.pvm.timer;
-
-import java.util.Date;
-import java.util.Map;
-
-import org.jbpm.pvm.Execution;
-import org.jbpm.pvm.ExecutionService;
-import org.jbpm.pvm.ProcessService;
-import org.jbpm.pvm.activity.ActivityExecution;
-import org.jbpm.pvm.activity.ExternalActivity;
-import org.jbpm.pvm.env.Environment;
-import org.jbpm.pvm.internal.job.TimerImpl;
-import org.jbpm.pvm.internal.model.ExecutionImpl;
-import org.jbpm.pvm.internal.util.Clock;
-import org.jbpm.pvm.job.JobTestHelper;
-import org.jbpm.pvm.job.Timer;
-import org.jbpm.pvm.model.OpenExecution;
-import org.jbpm.pvm.model.ProcessDefinition;
-import org.jbpm.pvm.model.ProcessFactory;
-import org.jbpm.pvm.samples.activities.AutomaticActivity;
-import org.jbpm.pvm.session.DbSession;
-import org.jbpm.pvm.session.PvmDbSession;
-import org.jbpm.pvm.test.base.DbTestCase;
-
-/**
- * @author Pascal Verdage
- */
-public class TimerTest extends DbTestCase {
- /** Wait state that tries to take a transition when signalled */
- public static class WaitState implements ExternalActivity {
-
- private static final long serialVersionUID = 1L;
-
- public void execute(ActivityExecution execution) {
- execution.waitForSignal();
- }
-
- public void signal(ActivityExecution execution,
- String signalName,
- Map<String, Object> parameters) {
- if (signalName!=null &&
- execution.getNode().hasOutgoingTransition(signalName)) {
- execution.take(signalName);
- }
- }
- }
-
- /** Wait state whose execution sets 'dueDate' variable to a fixed Date */
- public static class SetDueDateWaitState extends WaitState {
- private static final long serialVersionUID = 1L;
-
- public void execute(ActivityExecution execution) {
- Date dueDate = new Date(Clock.getCurrentTime().getTime() + twoDaysDuration);
- execution.setVariable("dueDate", dueDate);
- super.execute(execution);
- }
-
- }
- /////////////////////////////////////////////////////////
- // Tools
- /////////////////////////////////////////////////////////
- private static long twoDaysDuration = 2*24*60*60*1000;
-
- private static String getFormattedDate(long delay) {
- return TimerImpl.formatDueDate(new Date(System.currentTimeMillis() + delay));
- }
-
- private static OpenExecution signalExecution(long executionDbid) {
- ExecutionService executionService =
- Environment.getCurrent().get(ExecutionService.class);
- return (OpenExecution) executionService.signalExecution(executionDbid);
- }
-
- private static OpenExecution deployAndInstanciateProcess(ProcessDefinition definition) {
- ProcessService processService = Environment.getCurrent().get(ProcessService.class);
- processService.deploy(definition);
-
- ExecutionService executionService =
- Environment.getCurrent().get(ExecutionService.class);
- Execution processInstance = executionService.startExecution(definition.getName());
-
- return (ExecutionImpl) processInstance;
- }
-
- private static OpenExecution loadExecutionFromDb(long id) {
- return Environment.getCurrent().get(DbSession.class).get(ExecutionImpl.class, id);
- }
-
- private static void assertNoTimer() {
- assertTrue(Environment.getCurrent().get(PvmDbSession.class).findTimers().isEmpty());
- }
-
- /////////////////////////////////////////////////////////
- // test methods
- /////////////////////////////////////////////////////////
- private OpenExecution initTest(ProcessDefinition definition) {
- OpenExecution processInstance = deployAndInstanciateProcess(definition);
- OpenExecution execution = processInstance;
-
- if ("request".equals(execution.getNodeName())) {
- /* the request node might be use to have a specific initialisation
- * through the node execution */
- // go to test node
- execution = signalExecution(execution.getDbid());
- }
- return execution;
- }
-
- private long makeTestNode(long minimumDate, OpenExecution execution) {
- // check there is one sub execution
- assertEquals(1, execution.getExecutions().size());
-
- // check the execution state
- assertEquals("decide", execution.getNodeName());
- OpenExecution child = execution.getExecutions().iterator().next();
- assertEquals("decide", child.getNodeName());
-
- // check there is one timer
- assertFalse(execution.hasTimers());
- assertTrue(child.hasTimers());
- assertEquals(1, child.getTimers().size());
-
- // check that timer's dueDate is good
- Timer timer = child.getTimers().iterator().next();
- assertTrue("error is "+(minimumDate-timer.getDueDate().getTime()),
- minimumDate <= timer.getDueDate().getTime());
-
- // execute the timer
- JobTestHelper jobTestHelper = getEnvironmentFactory().get(JobTestHelper.class);
- child = (OpenExecution) jobTestHelper.executeTimer(timer.getDbid());
-
- return child.getDbid();
- }
-
- private void endTest(long executionDbid, long childDbid, String expectedState) {
- newTransaction();
-
- // check that the sub execution has been deleted
- OpenExecution child = loadExecutionFromDb(childDbid);
- assertNull(child);
-
- // check that timers have been deleted
- assertNoTimer();
-
- // check that process is in the right state
- OpenExecution execution = loadExecutionFromDb(executionDbid);
- assertEquals(0, execution.getExecutions().size());
- assertEquals("reassign", execution.getNodeName());
- assertEquals(expectedState, execution.getState());
- }
-
- private void makeTestNoRepeat(ProcessDefinition definition) {
- long twoDaysFromNow =Clock.getCurrentTime().getTime() + twoDaysDuration;
- OpenExecution execution = initTest(definition);
-
- long childDbid = makeTestNode(twoDaysFromNow - 100, execution);
-
- endTest(execution.getDbid(), childDbid, Execution.STATE_ACTIVE);
- }
-
- private void makeTestRepeat(ProcessDefinition definition) {
- OpenExecution execution = initTest(definition);
- long childDbid = -1;
-
- for (int i=0; i<IncrementCounterWaitState.MAX_COUNTER_VALUE; i++) {
- long twoDaysFromNow = Clock.getCurrentTime().getTime() + twoDaysDuration;
- childDbid = makeTestNode(twoDaysFromNow-200, execution);
- newTransaction();
- execution = loadExecutionFromDb(execution.getDbid());
- }
-
- endTest(execution.getDbid(), childDbid, Execution.STATE_ACTIVE);
- }
-
- /////////////////////////////////////////////////////////
- // simple timer execution
- // not repeated timer when due date is not a script
- /////////////////////////////////////////////////////////
- /** This scenario test a timer defined by a string.
- * The string represents a formatted date. */
- public void testFormattedDateTimer() {
- String dueDate = getFormattedDate(twoDaysDuration);
-
- ProcessDefinition processDefinition = ProcessFactory.build("formattedDateTimer")
- .node("decide").initial().behaviour(WaitState.class)
- .timer(dueDate, "timeout")
- .transition("decision made").to("response")
- .transition("timeout").to("reassign")
- .node("reassign").behaviour(WaitState.class)
- .node("response").behaviour(WaitState.class)
- .done();
-
- makeTestNoRepeat(processDefinition);
- }
-
- /** This scenario test a timer defined by a string.
- * The string represents a formatted date. */
- public void testCustomFormattedDateTimer() {
- TimerImpl.setDateFormat("EE, MM dd yyyy, hh:mm:ss,SSS a");
- try {
- String dueDate = getFormattedDate(twoDaysDuration);
-
- ProcessDefinition processDefinition = ProcessFactory.build("customFormattedDateTimer")
- .node("decide").initial().behaviour(WaitState.class)
- .timer(dueDate, "timeout")
- .transition("decision made").to("response")
- .transition("timeout").to("reassign")
- .node("reassign").behaviour(WaitState.class)
- .node("response").behaviour(WaitState.class)
- .done();
-
- makeTestNoRepeat(processDefinition);
- } finally {
- // reset original date format
- TimerImpl.setDateFormat("yyyy-MM-dd HH:mm:ss,SSS");
- }
- }
-
- /** This scenario test a timer defined by a string.
- * The string represents a duration. */
- public void testDurationTimer() {
- ProcessDefinition processDefinition = ProcessFactory.build("durationTimer")
- .node("decide").initial().behaviour(WaitState.class)
- .timer("2 days", "juel", "timeout", null)
- .transition("decision made").to("response")
- .transition("timeout").to("reassign")
- .node("reassign").behaviour(WaitState.class)
- .node("response").behaviour(WaitState.class)
- .done();
-
- makeTestNoRepeat(processDefinition);
- }
-
- /////////////////////////////////////////////////////////
- // simple timer execution
- // not repeated timer when due date is a juel script
- /////////////////////////////////////////////////////////
- /** This scenario test a timer defined by a juel script.
- * The corresponding variable is a Date object */
- public void testDateVariableJuelTimer() {
- ProcessDefinition processDefinition = ProcessFactory.build("dateVariableJuelTimer")
- .variable("dueDate")
- .node("request").initial().behaviour(SetDueDateWaitState.class)
- .transition().to("decide")
- .node("decide").behaviour(WaitState.class)
- .timer("#{dueDate}", "juel", "timeout", null)
- .transition("decision made").to("response")
- .transition("timeout").to("reassign")
- .node("reassign").behaviour(WaitState.class)
- .node("response").behaviour(WaitState.class)
- .done();
-
- makeTestNoRepeat(processDefinition);
- }
-
- /** This scenario test a timer defined by a juel script.
- * The corresponding variable is a String object.
- * The string represents a formatted date */
- public void testFormattedDateVariableJuelTimer() {
- String dueDate = getFormattedDate(twoDaysDuration);
-
- ProcessDefinition processDefinition = ProcessFactory.build("formattedDateVariableJuelTimer")
- .variable("timerDelay", dueDate)
- .node("decide").initial().behaviour(WaitState.class)
- .timer("#{timerDelay}", "juel", "timeout", null)
- .transition("decision made").to("response")
- .transition("timeout").to("reassign")
- .node("reassign").behaviour(WaitState.class)
- .node("response").behaviour(WaitState.class)
- .done();
-
- makeTestNoRepeat(processDefinition);
- }
-
- /** This scenario test a timer defined by a juel script.
- * The corresponding variable is a String object.
- * The string represents a duration */
- public void testDurationVariableJuelTimer() {
- ProcessDefinition processDefinition = ProcessFactory.build("durationVariableJuelTimer")
- .variable("timerDelay", "2 days")
- .node("decide").initial().behaviour(WaitState.class)
- .timer("#{timerDelay}", "juel", "timeout", null)
- .transition("decision made").to("response")
- .transition("timeout").to("reassign")
- .node("reassign").behaviour(WaitState.class)
- .node("response").behaviour(WaitState.class)
- .done();
-
- makeTestNoRepeat(processDefinition);
- }
-
- /*
- /////////////////////////////////////////////////////////
- // simple timer execution
- // not repeated timer when due date is a groovy script
- /////////////////////////////////////////////////////////
- public void testDateVariableGroovyTimer() {
- ProcessDefinition processDefinition = ProcessFactory.build("dateVariableGroovyTimer")
- .variable("dueDate")
- .node("request").initial().behaviour(SetDueDateWaitState.class)
- .transition().to("decide")
- .node("decide").behaviour(WaitState.class)
- .timer("dueDate", "groovy", "timeout", null)
- .transition("decision made").to("response")
- .transition("timeout").to("reassign")
- .node("reassign").behaviour(WaitState.class)
- .node("response").behaviour(WaitState.class)
- .done();
-
- makeTestNoRepeat(processDefinition);
- }
-
- public void testFormattedDateVariableGroovyTimer() {
- String dueDate = getFormattedDate(twoDaysDuration);
-
- ProcessDefinition processDefinition = ProcessFactory.build("formattedDateVariableGroovyTimer")
- .variable("timerDelay", dueDate)
- .node("decide").initial().behaviour(WaitState.class)
- .timer("timerDelay", "groovy", "timeout", null)
- .transition("decision made").to("response")
- .transition("timeout").to("reassign")
- .node("reassign").behaviour(WaitState.class)
- .node("response").behaviour(WaitState.class)
- .done();
-
- makeTestNoRepeat(processDefinition);
- }
-
- public void testDurationVariableGroovyTimer() {
- ProcessDefinition processDefinition = ProcessFactory.build("durationVariableGroovyTimer")
- .variable("timerDelay", "2 days")
- .node("decide").initial().behaviour(WaitState.class)
- .timer("timerDelay", "groovy", "timeout", null)
- .transition("decision made").to("response")
- .transition("timeout").to("reassign")
- .node("reassign").behaviour(WaitState.class)
- .node("response").behaviour(WaitState.class)
- .done();
-
- makeTestNoRepeat(processDefinition);
- }
- */
-
- /////////////////////////////////////////////////////////
- // repeated timer execution
- /////////////////////////////////////////////////////////
- /** <p>this scenario tests a repeated timer.
- * When signalled, the node makes an alert (logs).<br>
- * After IncrementCounterWaitState.COUNTER loops,
- * the node takes a timeout transition.</p>
- * <p>Repeat is a string representing a duration.</p> */
- public void testDurationRepeat() {
- ProcessDefinition processDefinition = ProcessFactory.build("durationRepeat")
- .node("decide").initial().behaviour(IncrementCounterWaitState.class)
- .variable(IncrementCounterWaitState.COUNTER, "0")
- .timer("2 days", null, "increment", "2 days")
- .transition("decision made").to("response")
- .transition("timeout").to("reassign")
- .node("reassign").behaviour(WaitState.class)
- .node("response").behaviour(WaitState.class)
- .done();
-
- makeTestRepeat(processDefinition);
- }
-
- /*
- public void testDurationVariableGroovyRepeat() {
- // groovy constraint
- // if we use '2 days' instead of 'timerDelay' variable,
- // scripting fails to evaluate '2 days'
- ProcessDefinition processDefinition = ProcessFactory.build("durationGroovyRepeat")
- .variable("repeat", "2 days")
- .node("decide").initial().behaviour(IncrementCounterWaitState.class)
- .variable(IncrementCounterWaitState.COUNTER, "0")
- .timer("'2 days'", "groovy", "increment", "repeat")
- .transition("decision made").to("response")
- .transition("timeout").to("reassign")
- .node("reassign").behaviour(WaitState.class)
- .node("response").behaviour(WaitState.class)
- .done();
-
- makeTestRepeat(processDefinition);
- }
- */
-
- /** <p>this scenario tests a repeated timer.
- * When signalled, the node makes an alert (logs).<br>
- * After IncrementCounterWaitState.COUNTER loops,
- * the node takes a timeout transition.</p>
- * <p>Repeat is a juel script referring to a duration.</p> */
- public void testDurationVariableJuelRepeat() {
- ProcessDefinition processDefinition = ProcessFactory.build("durationJuelRepeat")
- .variable("repeat", "2 days")
- .node("decide").initial().behaviour(IncrementCounterWaitState.class)
- .variable(IncrementCounterWaitState.COUNTER, "0")
- .timer("2 days", "juel", "increment", "#{repeat}")
- .transition("decision made").to("response")
- .transition("timeout").to("reassign")
- .node("reassign").behaviour(WaitState.class)
- .node("response").behaviour(WaitState.class)
- .done();
-
- makeTestRepeat(processDefinition);
- }
-
- /////////////////////////////////////////////////////////
- // others
- /////////////////////////////////////////////////////////
- /** this scenario tests a timer that doesn't fire */
- public void testCanceledTimer() {
- String dueDate = getFormattedDate(twoDaysDuration);
- ProcessDefinition processDefinition = ProcessFactory.build("timerCanceled")
- .node("decide").initial().behaviour(WaitState.class)
- .timer(dueDate, "timeout")
- .transition("decision made").to("response")
- .transition("timeout").to("reassign")
- .node("reassign").behaviour(WaitState.class)
- .node("response").behaviour(WaitState.class)
- .done();
-
- OpenExecution processInstance = deployAndInstanciateProcess(processDefinition);
-
- OpenExecution execution = processInstance;
- assertEquals("decide", execution.getNodeName());
-
- // signal child execution
- OpenExecution child = execution.getExecutions().iterator().next();
- execution = signalExecution(child.getDbid());
- assertEquals(Execution.STATE_ENDED, execution.getState());
-
- // check that the subExecution was deleted
- child = loadExecutionFromDb(child.getDbid());
- assertNull(child);
-
- // check that timers have been deleted
- assertNoTimer();
-
- // check that process is in the right state
- execution = loadExecutionFromDb(processInstance.getDbid());
- assertEquals("response", execution.getNodeName());
- assertEquals(Execution.STATE_ACTIVE, execution.getState());
- }
-
- /** this scenario tests the case where the process execution ends
- * in the transaction that executes the timer */
- public void testTimerEndingProcessExecution() {
- ProcessDefinition processDefinition = ProcessFactory.build("timerEndingProcess")
- .node("decide").initial().behaviour(WaitState.class)
- .timer("2 business days", "timeout")
- .transition("decision made").to("response")
- .transition("timeout").to("reassign")
- .node("reassign").behaviour(AutomaticActivity.class)
- .node("response").behaviour(WaitState.class)
- .done();
-
- long twoDaysFromNow = Clock.getCurrentTime().getTime()+twoDaysDuration;
- OpenExecution execution = initTest(processDefinition);
- long childDbid = makeTestNode(twoDaysFromNow, execution);
- endTest(execution.getDbid(), childDbid, Execution.STATE_ENDED);
- }
-
-}
Added: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/TimerUnitTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/TimerUnitTest.java (rev 0)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/TimerUnitTest.java 2008-07-28 14:22:17 UTC (rev 1737)
@@ -0,0 +1,176 @@
+/*
+ * 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.pvm.timer;
+
+import java.util.Date;
+
+import org.jbpm.pvm.test.base.JbpmTestCase;
+import org.jbpm.pvm.internal.job.TimerImpl;
+import org.jbpm.pvm.job.Timer;
+
+/**
+ * @author Tom Baeyens
+ * @author Pascal Verdage
+ */
+public class TimerUnitTest extends JbpmTestCase
+{
+
+
+ protected Timer timer() {
+ return new TimerImpl();
+ }
+
+ public void testSetDueDate() throws Exception {
+ TimerImpl timer = new TimerImpl();
+ Date now = new Date(System.currentTimeMillis());
+ timer.setDueDate(now);
+ TestTimerSession timerSession = new TestTimerSession();
+ timerSession.schedule(timer);
+ assertEquals(1, timerSession.getNbTimer());
+ assertEquals(timer, timerSession.getFirstTimer());
+ timerSession.executeFirstTimer();
+ assertEquals(0, timerSession.getNbTimer());
+ }
+
+ /*
+ TODO finish after refactoring
+
+
+ public void testSetDueDateDescription() throws Exception {
+ TimerImpl timerImpl = new TimerImpl();
+ timerImpl.setDueDateDescription("5 seconds");
+ TestTimerSession timerSession = new TestTimerSession();
+ timerSession.schedule(timerImpl);
+ assertEquals(1, timerSession.getNbTimer());
+ assertEquals(timerImpl, timerSession.getFirstTimer());
+ timerSession.executeFirstTimer();
+ assertEquals(0, timerSession.getNbTimer());
+ }
+
+ public void testRepeatedTimer() throws Exception {
+ TimerImpl timerImpl = new TimerImpl();
+ Date now= new Date();
+ timerImpl.setDueDate(now);
+ timerImpl.setRepeat("3 seconds");
+ TestTimerSession timerSession = new TestTimerSession();
+ timerSession.schedule(timerImpl);
+ assertEquals(1, timerSession.getNbTimer());
+ assertEquals(timerImpl, timerSession.getFirstTimer());
+ timerSession.executeFirstTimer();
+ assertEquals(1, timerSession.getNbTimer());
+ }
+
+ private static class TestActivityInstance extends ActivityInstanceImpl {
+ private static final long serialVersionUID = 1L;
+ private int executionCount = 0;
+
+ public void signal(String signalName, Map<String, Object> parameters) {
+ executionCount++;
+ }
+ public int getExecutionCount() {
+ return executionCount;
+ }
+
+ public String toString() {
+ return "test activity";
+ }
+ }
+
+ public void testActivityInstanceNoSignalNoEvent() throws Exception {
+ TimerImpl timerImpl = new TimerImpl();
+ TestActivityInstance instance = new TestActivityInstance();
+ TestExecution execution = new TestExecution();
+ timerImpl.setActivityInstance(instance);
+ timerImpl.setExecution(execution);
+ TestTimerSession timerSession = new TestTimerSession();
+ timerSession.schedule(timerImpl);
+ assertEquals(1, timerSession.getNbTimer());
+ timerSession.executeFirstTimer();
+ assertEquals(0, timerSession.getNbTimer());
+ assertEquals(0, instance.getExecutionCount());
+ assertEquals(0, execution.getExecutionCount());
+ }
+
+ public void testActivityInstanceWithSignal() throws Exception {
+ TimerImpl timerImpl = new TimerImpl();
+ TestActivityInstance instance = new TestActivityInstance();
+ TestExecution execution = new TestExecution();
+ timerImpl.setActivityInstance(instance);
+ timerImpl.setSignalName("timeout");
+ timerImpl.setExecution(execution);
+ TestTimerSession timerSession = new TestTimerSession();
+ timerSession.schedule(timerImpl);
+ assertEquals(1, timerSession.getNbTimer());
+ timerSession.executeFirstTimer();
+ assertEquals(0, timerSession.getNbTimer());
+ assertEquals(1, instance.getExecutionCount());
+ assertEquals(0, execution.getExecutionCount());
+ }
+
+ private static class TestExecution extends ExecutionImpl {
+ private static final long serialVersionUID = 1L;
+ private int executionCount = 0;
+
+ public int getExecutionCount() {
+ return executionCount;
+ }
+
+ public void fire(String eventName, ObservableElement eventSource) {
+ executionCount++;
+ }
+
+ public String toString() {
+ return "test execution";
+ }
+ }
+
+ public void testActivityInstanceWithEvent() throws Exception {
+ TimerImpl timerImpl = new TimerImpl();
+ TestActivityInstance instance = new TestActivityInstance();
+ TestExecution execution = new TestExecution();
+ timerImpl.setActivityInstance(instance);
+ timerImpl.setEventName("timeout");
+ timerImpl.setExecution(execution);
+ TestTimerSession timerSession = new TestTimerSession();
+ timerSession.schedule(timerImpl);
+ assertEquals(1, timerSession.getNbTimer());
+ timerSession.executeFirstTimer();
+ assertEquals(0, timerSession.getNbTimer());
+ assertEquals(0, instance.getExecutionCount());
+ assertEquals(1, execution.getExecutionCount());
+ }
+
+ public void testEventWithNoActivityInstance() throws Exception {
+ TimerImpl timerImpl = new TimerImpl();
+ TestExecution execution = new TestExecution();
+ timerImpl.setEventName("timeout");
+ timerImpl.setExecution(execution);
+ TestTimerSession timerSession = new TestTimerSession();
+ timerSession.schedule(timerImpl);
+ assertEquals(1, timerSession.getNbTimer());
+ timerSession.executeFirstTimer();
+ assertEquals(0, timerSession.getNbTimer());
+ assertEquals(1, execution.getExecutionCount());
+ }
+
+ */
+}
Modified: jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/timer/environment.cfg.xml
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/timer/environment.cfg.xml 2008-07-28 11:15:05 UTC (rev 1736)
+++ jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/timer/environment.cfg.xml 2008-07-28 14:22:17 UTC (rev 1737)
@@ -7,7 +7,6 @@
<job-test-helper />
<process-service />
- <execution-service />
<command-service>
<retry-interceptor />
@@ -40,14 +39,6 @@
<holiday period="01/07/2008 - 31/08/2008"/>
</business-calendar>
- <script-manager default-expression-language='juel'
- default-script-language='juel'
- read-contexts='execution, environment, environment-factory'
- write-context='null'>
- <script-language name='juel' factory='com.sun.script.juel.JuelScriptEngineFactory' />
-<!-- <script-language name='groovy' factory='com.sun.script.groovy.GroovyScriptEngineFactory' />-->
- </script-manager>
-
</environment-factory>
<environment>
15 years, 9 months
JBoss JBPM SVN: r1736 - jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer.
by do-not-reply@jboss.org
Author: pascal.verdage
Date: 2008-07-28 07:15:05 -0400 (Mon, 28 Jul 2008)
New Revision: 1736
Added:
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/DbTimerTests.java
Log:
add timer test suite
Added: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/DbTimerTests.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/DbTimerTests.java (rev 0)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/DbTimerTests.java 2008-07-28 11:15:05 UTC (rev 1736)
@@ -0,0 +1,17 @@
+package org.jbpm.pvm.timer;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+
+public class DbTimerTests {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite("Test for org.jbpm.pvm.timer");
+ //$JUnit-BEGIN$
+ suite.addTestSuite(TimerTest.class);
+ //$JUnit-END$
+ return suite;
+ }
+
+}
Property changes on: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/DbTimerTests.java
___________________________________________________________________
Name: svn:keywords
+ Id
15 years, 9 months