JBoss JBPM SVN: r1755 - in jbossbpm/spec/trunk/modules/samples/airticket: rpc and 3 other directories.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-07-29 15:40:36 -0400 (Tue, 29 Jul 2008)
New Revision: 1755
Modified:
jbossbpm/spec/trunk/modules/samples/airticket/
jbossbpm/spec/trunk/modules/samples/airticket/rpc/
jbossbpm/spec/trunk/modules/samples/airticket/server/
jbossbpm/spec/trunk/modules/samples/airticket/war/
jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/resources/com/totsp/mavenplugin/gwt/sample/public/images/gwt-logo.png
Log:
Fix gwt.png
Property changes on: jbossbpm/spec/trunk/modules/samples/airticket
___________________________________________________________________
Name: svn:ignore
+ .gwt-cache
Property changes on: jbossbpm/spec/trunk/modules/samples/airticket/rpc
___________________________________________________________________
Name: svn:ignore
+ target
Property changes on: jbossbpm/spec/trunk/modules/samples/airticket/server
___________________________________________________________________
Name: svn:ignore
+ target
Property changes on: jbossbpm/spec/trunk/modules/samples/airticket/war
___________________________________________________________________
Name: svn:ignore
+ target
Modified: jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/resources/com/totsp/mavenplugin/gwt/sample/public/images/gwt-logo.png
===================================================================
(Binary files differ)
15 years, 9 months
JBoss JBPM SVN: r1754 - in jbossbpm/spec/trunk/modules: samples and 62 other directories.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-07-29 15:26:17 -0400 (Tue, 29 Jul 2008)
New Revision: 1754
Added:
jbossbpm/spec/trunk/modules/samples/
jbossbpm/spec/trunk/modules/samples/airticket/
jbossbpm/spec/trunk/modules/samples/airticket/README.txt
jbossbpm/spec/trunk/modules/samples/airticket/pom.xml
jbossbpm/spec/trunk/modules/samples/airticket/rpc/
jbossbpm/spec/trunk/modules/samples/airticket/rpc/pom.xml
jbossbpm/spec/trunk/modules/samples/airticket/rpc/src/
jbossbpm/spec/trunk/modules/samples/airticket/rpc/src/main/
jbossbpm/spec/trunk/modules/samples/airticket/rpc/src/main/java/
jbossbpm/spec/trunk/modules/samples/airticket/rpc/src/main/java/com/
jbossbpm/spec/trunk/modules/samples/airticket/rpc/src/main/java/com/totsp/
jbossbpm/spec/trunk/modules/samples/airticket/rpc/src/main/java/com/totsp/mavenplugin/
jbossbpm/spec/trunk/modules/samples/airticket/rpc/src/main/java/com/totsp/mavenplugin/gwt/
jbossbpm/spec/trunk/modules/samples/airticket/rpc/src/main/java/com/totsp/mavenplugin/gwt/sample/
jbossbpm/spec/trunk/modules/samples/airticket/rpc/src/main/java/com/totsp/mavenplugin/gwt/sample/client/
jbossbpm/spec/trunk/modules/samples/airticket/rpc/src/main/java/com/totsp/mavenplugin/gwt/sample/client/SampleRemoteService.java
jbossbpm/spec/trunk/modules/samples/airticket/rpc/src/main/java/com/totsp/mavenplugin/gwt/sample/client/SampleRemoteServiceAsync.java
jbossbpm/spec/trunk/modules/samples/airticket/rpc/src/main/resources/
jbossbpm/spec/trunk/modules/samples/airticket/server/
jbossbpm/spec/trunk/modules/samples/airticket/server/pom.xml
jbossbpm/spec/trunk/modules/samples/airticket/server/src/
jbossbpm/spec/trunk/modules/samples/airticket/server/src/main/
jbossbpm/spec/trunk/modules/samples/airticket/server/src/main/java/
jbossbpm/spec/trunk/modules/samples/airticket/server/src/main/java/com/
jbossbpm/spec/trunk/modules/samples/airticket/server/src/main/java/com/totsp/
jbossbpm/spec/trunk/modules/samples/airticket/server/src/main/java/com/totsp/mavenplugin/
jbossbpm/spec/trunk/modules/samples/airticket/server/src/main/java/com/totsp/mavenplugin/gwt/
jbossbpm/spec/trunk/modules/samples/airticket/server/src/main/java/com/totsp/mavenplugin/gwt/sample/
jbossbpm/spec/trunk/modules/samples/airticket/server/src/main/java/com/totsp/mavenplugin/gwt/sample/server/
jbossbpm/spec/trunk/modules/samples/airticket/server/src/main/java/com/totsp/mavenplugin/gwt/sample/server/HttpServlet.java
jbossbpm/spec/trunk/modules/samples/airticket/server/src/main/java/com/totsp/mavenplugin/gwt/sample/server/RandomCompliment.java
jbossbpm/spec/trunk/modules/samples/airticket/server/src/main/java/com/totsp/mavenplugin/gwt/sample/server/SampleRemoteServiceImpl.java
jbossbpm/spec/trunk/modules/samples/airticket/server/src/main/resources/
jbossbpm/spec/trunk/modules/samples/airticket/server/src/main/resources/com/
jbossbpm/spec/trunk/modules/samples/airticket/server/src/main/resources/com/totsp/
jbossbpm/spec/trunk/modules/samples/airticket/server/src/main/resources/com/totsp/mavenplugin/
jbossbpm/spec/trunk/modules/samples/airticket/server/src/main/resources/com/totsp/mavenplugin/gwt/
jbossbpm/spec/trunk/modules/samples/airticket/server/src/main/resources/com/totsp/mavenplugin/gwt/sample/
jbossbpm/spec/trunk/modules/samples/airticket/server/src/main/resources/com/totsp/mavenplugin/gwt/sample/server/
jbossbpm/spec/trunk/modules/samples/airticket/server/src/main/resources/com/totsp/mavenplugin/gwt/sample/server/ApplicationServices.gwt.xml
jbossbpm/spec/trunk/modules/samples/airticket/server/src/main/webapp/
jbossbpm/spec/trunk/modules/samples/airticket/server/src/main/webapp/WEB-INF/
jbossbpm/spec/trunk/modules/samples/airticket/server/src/main/webapp/WEB-INF/web.xml
jbossbpm/spec/trunk/modules/samples/airticket/server/src/main/webapp/index.jsp
jbossbpm/spec/trunk/modules/samples/airticket/war/
jbossbpm/spec/trunk/modules/samples/airticket/war/pom.xml
jbossbpm/spec/trunk/modules/samples/airticket/war/src/
jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/
jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/java/
jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/java/com/
jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/java/com/totsp/
jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/java/com/totsp/mavenplugin/
jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/java/com/totsp/mavenplugin/gwt/
jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/java/com/totsp/mavenplugin/gwt/sample/
jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/java/com/totsp/mavenplugin/gwt/sample/client/
jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/java/com/totsp/mavenplugin/gwt/sample/client/Application.java
jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/java/com/totsp/mavenplugin/gwt/sample/client/SampleImageBundle.java
jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/resources/
jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/resources/com/
jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/resources/com/totsp/
jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/resources/com/totsp/mavenplugin/
jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/resources/com/totsp/mavenplugin/gwt/
jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/resources/com/totsp/mavenplugin/gwt/sample/
jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/resources/com/totsp/mavenplugin/gwt/sample/Application.gwt.xml
jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/resources/com/totsp/mavenplugin/gwt/sample/public/
jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/resources/com/totsp/mavenplugin/gwt/sample/public/Application.html
jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/resources/com/totsp/mavenplugin/gwt/sample/public/images/
jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/resources/com/totsp/mavenplugin/gwt/sample/public/images/gwt-logo.png
jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/resources/com/totsp/mavenplugin/gwt/sample/public/styles/
jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/resources/com/totsp/mavenplugin/gwt/sample/public/styles/sample.css
jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/webapp/
jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/webapp/WEB-INF/
jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/webapp/WEB-INF/web.xml
jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/webapp/index.html
jbossbpm/spec/trunk/modules/samples/airticket/war/src/site/
jbossbpm/spec/trunk/modules/samples/airticket/war/src/site/apt/
jbossbpm/spec/trunk/modules/samples/airticket/war/src/site/apt/index.apt
jbossbpm/spec/trunk/modules/samples/airticket/war/src/site/site.xml
jbossbpm/spec/trunk/modules/samples/airticket/war/src/test/
jbossbpm/spec/trunk/modules/samples/airticket/war/src/test/java/
jbossbpm/spec/trunk/modules/samples/airticket/war/src/test/java/com/
jbossbpm/spec/trunk/modules/samples/airticket/war/src/test/java/com/totsp/
jbossbpm/spec/trunk/modules/samples/airticket/war/src/test/java/com/totsp/mavenplugin/
jbossbpm/spec/trunk/modules/samples/airticket/war/src/test/java/com/totsp/mavenplugin/gwt/
jbossbpm/spec/trunk/modules/samples/airticket/war/src/test/java/com/totsp/mavenplugin/gwt/sample/
jbossbpm/spec/trunk/modules/samples/airticket/war/src/test/java/com/totsp/mavenplugin/gwt/sample/AStandardNonGwtTest.java
jbossbpm/spec/trunk/modules/samples/airticket/war/src/test/java/com/totsp/mavenplugin/gwt/sample/client/
jbossbpm/spec/trunk/modules/samples/airticket/war/src/test/java/com/totsp/mavenplugin/gwt/sample/client/GwtTestExample.java
Modified:
jbossbpm/spec/trunk/modules/testsuite/pom.xml
Log:
Add google gwt sample
Added: jbossbpm/spec/trunk/modules/samples/airticket/README.txt
===================================================================
--- jbossbpm/spec/trunk/modules/samples/airticket/README.txt (rev 0)
+++ jbossbpm/spec/trunk/modules/samples/airticket/README.txt 2008-07-29 19:26:17 UTC (rev 1754)
@@ -0,0 +1,117 @@
+WELCOME to the maven-googlewebtoolkit2-sample Project
+=====================================================
+
+Also see GWT-Maven documentation:
+http://gwt-maven.googlecode.com/svn/docs/maven-googlewebtoolkit2-plugin/index.html
+
+About:
+======
+This sample project has some specific goals:
+ + GWT-Maven 'Best Practice' & Usage
+ + Java5+ integration on the GWT server side & Java1.4 on the GWT client side using a multi-module maven project.
+ + GWT RPC structure via multi-module maven project - and inheriting a GWT module
+ + The features offered by GWT-Maven (like building a WAR, running the GWTShell, mergewebxml, and GWT testing)
+
+Overview:
+=========
+This sample package contains 4 different examples to show how GWT-Maven
+should be used with your project. If you intend to use multiple modules, you will want to build
+more than one of the examples. If you wish to set up a simpler single module (with just one pom.xml),
+then choose the example that is closest to the function of your project (likely the war project).
+
+This sample uses GWT-Maven with the "automatic" GWT setup mode enabled. This means
+that you do *not* have to download and install GWT yourself, the plugin will
+setup and extract GWT for you (when using this method).
+(You can optionally use manual method with a local GWT install, see documentation.)
+
+Which project to build:
+=======================
+ + parent (this is the root parent module of the project)
+ + rpc (this is the GWT RPC *INTERFACE* definition) Java 1.4
+ + server (this is the GWT RPC *IMPLEMENTATION*, it builds a GWT module that war inherits) Java 1.5+
+ + war (this is the GWT client code) Java 1.4
+
+Prerequisites:
+==============
+ + Maven2 - http://maven.apache.org
+ + Maven bin directory added to Path
+
+
+Running the parent example:
+===========================
+The parent example demonstrates a multi-module Maven build with a GWT project.
+When run it will build the rpc, server, and war sub projects.
+
+1. Use a command prompt to navigate into the maven-googlewebtoolkit2-sample directory.
+2. Execute "mvn clean install".
+3. Sub projects will have artifacts (see details for each below)
+
+
+Running the WAR example:
+========================
+The WAR project builds a Web-Application-Archive file for a GWT project.
+This war can then be deployed to a servlet container, and or you can run this
+project in the GWTShell using GWT-Maven.
+
+This project demonstrates not only the usefulness of GWT-Maven in terms of
+building WAR files, and running the shell, but also the "merge web xml" aspect.
+Notice that this project has a local web.xml source file, that is used to create
+a deployment time file that includes a standard servlet entry, as well as a GWT-RPC entry.
+(GWT-Maven allows you to use the embedded Tomcat server with source web.xml and other
+files [context.xml, if you use Tomcat outside of the shell], and it configures the
+embedded Tomcat for you.)
+
+This project also includes a testing sample using the GWT-Maven testGwt goal, and
+includes EMMA based code coverage and reports for GWTTestCase based tests.
+Code coverage with GWT is a bit tricky, but using the coverage patch JAR (as this project does)
+and generating ONLY a report (not instrumentation data itself, which GWT does for you when patched)
+along with AntRun to move things around, creates an automated build with testing and reports.
+(If you want to see the testing stuff, uncomment the "testGwt" goal in the POM, it is commented
+out by default to keep things faster and simpler.)
+(Note* - when running tests the Surefire plugin is NOT used for GwtTestCase based tests, rather
+a special testGwt goal is included with GWT-Maven for GwtTestCase based tests, thus TWO test phases
+will happen during "mvn test", one for Surefire standard tests, and one for testGwt GWT tests.)
+
+1. Build the server sub-project, using the instructions in "Running the parent example" above.
+2. Use a command prompt to navigate into the maven-googlewebtoolkit2-sample/war directory.
+3. Execute "mvn package".
+4. Your sample war will be created in the war/target directory.
+
+ OR you can run the GWTShell locally by executing "mvn gwt:gwt".
+
+ Optionally: Execute "mvn test site" (with testGwt goal enabled) to run test and get coverage.
+(See "target/site" directory for output.)
+
+
+Running the RPC example
+========================
+The RPC example is meant to show defining GWT-RPC interfaces.
+This project creates a JAR archive that includes source, so that it can be used by other
+GWT projects (the WAR example here uses it). This project does not need GWT-Maven
+(no shell to run, no GWT compiler, etc) - but does require GWT dependencies.
+
+1. Use a command prompt to navigate into the maven-googlewebtoolkit2-sample/rpc directory.
+2. Execute "mvn install".
+3. Your JAR library, with source included, will be in the rpc/target directory.
+
+
+Running the SERVER sample
+=========================
+The Server example demonstrates implementing GWT-RPC interfaces (the one from the RPC example),
+creating a GWT library module (that other projects can inherit), and including a standard
+HttpServlet example in the same project. This project creates
+a JAR archive that is built for the server side of a GWT project. This JAR can then
+be inherited using GWT inheritance to expose a GWT-RPC endpoint.
+(This demonstrates that it can make sense to break up your GWT projects into client and server portions,
+sometimes that helps with re-use [more than one client can import and use the RPC] and with team divisions.)
+
+1. Use a command prompt to navigate into the maven-googlewebtoolkit2-sample/server directory.
+2. Execute "mvn install".
+3. Your JAR library, with source included, will be in the server/target directory.
+
+
+More help:
+==========
+Docs: http://gwt-maven.googlecode.com/svn/docs/maven-googlewebtoolkit2-plugin/i...
+Also refer to the the gwt-maven message board: http://groups.google.com/group/gwt-maven
+
Property changes on: jbossbpm/spec/trunk/modules/samples/airticket/README.txt
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbossbpm/spec/trunk/modules/samples/airticket/pom.xml
===================================================================
--- jbossbpm/spec/trunk/modules/samples/airticket/pom.xml (rev 0)
+++ jbossbpm/spec/trunk/modules/samples/airticket/pom.xml 2008-07-29 19:26:17 UTC (rev 1754)
@@ -0,0 +1,84 @@
+<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>
+ <groupId>com.totsp.gwt</groupId>
+ <artifactId>maven-googlewebtoolkit2-sample</artifactId>
+ <packaging>pom</packaging>
+ <version>1.0-SNAPSHOT</version>
+ <name>maven-googlewebtoolkit2-sample</name>
+
+ <pluginRepositories>
+ <pluginRepository>
+ <id>gwt-maven-plugins</id>
+ <url>
+ http://gwt-maven.googlecode.com/svn/trunk/mavenrepo/
+ </url>
+ </pluginRepository>
+ </pluginRepositories>
+
+ <repositories>
+ <repository>
+ <id>java.net</id>
+ <url>http://download.java.net/maven/1</url>
+ <layout>legacy</layout>
+ </repository>
+ <repository>
+ <id>gwt-maven</id>
+ <url>
+ http://gwt-maven.googlecode.com/svn/trunk/mavenrepo/
+ </url>
+ </repository>
+ </repositories>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>com.totsp.gwt</groupId>
+ <artifactId>
+ maven-googlewebtoolkit2-sample-war
+ </artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.totsp.gwt</groupId>
+ <artifactId>
+ maven-googlewebtoolkit2-sample-rpc
+ </artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.totsp.gwt</groupId>
+ <artifactId>
+ maven-googlewebtoolkit2-sample-server
+ </artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.google.gwt</groupId>
+ <artifactId>gwt-servlet</artifactId>
+ <version>1.4.61</version>
+ </dependency>
+ <dependency>
+ <groupId>com.google.gwt</groupId>
+ <artifactId>gwt-user</artifactId>
+ <version>1.4.61</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <modules>
+ <module>rpc</module>
+ <module>server</module>
+ <module>war</module>
+ </modules>
+</project>
Property changes on: jbossbpm/spec/trunk/modules/samples/airticket/pom.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Added: jbossbpm/spec/trunk/modules/samples/airticket/rpc/pom.xml
===================================================================
--- jbossbpm/spec/trunk/modules/samples/airticket/rpc/pom.xml (rev 0)
+++ jbossbpm/spec/trunk/modules/samples/airticket/rpc/pom.xml 2008-07-29 19:26:17 UTC (rev 1754)
@@ -0,0 +1,42 @@
+<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">
+ <parent>
+ <groupId>com.totsp.gwt</groupId>
+ <artifactId>maven-googlewebtoolkit2-sample</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>maven-googlewebtoolkit2-sample-rpc</artifactId>
+ <name>maven-googlewebtoolkit2-sample-rpc</name>
+
+ <build>
+ <!-- Include SOURCE in output artifact for GWT (GWT libraries must include source) -->
+ <resources>
+ <resource>
+ <directory>src/main/java</directory>
+ </resource>
+ </resources>
+ </build>
+
+ <repositories>
+ <repository>
+ <id>gwt-maven</id>
+ <url>
+ http://gwt-maven.googlecode.com/svn/trunk/mavenrepo/
+ </url>
+ </repository>
+ </repositories>
+
+ <dependencies>
+ <dependency>
+ <groupId>com.google.gwt</groupId>
+ <artifactId>gwt-servlet</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.google.gwt</groupId>
+ <artifactId>gwt-user</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+</project>
Property changes on: jbossbpm/spec/trunk/modules/samples/airticket/rpc/pom.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbossbpm/spec/trunk/modules/samples/airticket/rpc/src/main/java/com/totsp/mavenplugin/gwt/sample/client/SampleRemoteService.java
===================================================================
--- jbossbpm/spec/trunk/modules/samples/airticket/rpc/src/main/java/com/totsp/mavenplugin/gwt/sample/client/SampleRemoteService.java (rev 0)
+++ jbossbpm/spec/trunk/modules/samples/airticket/rpc/src/main/java/com/totsp/mavenplugin/gwt/sample/client/SampleRemoteService.java 2008-07-29 19:26:17 UTC (rev 1754)
@@ -0,0 +1,7 @@
+package com.totsp.mavenplugin.gwt.sample.client;
+
+import com.google.gwt.user.client.rpc.RemoteService;
+
+public interface SampleRemoteService extends RemoteService {
+ public String doComplimentMe();
+}
Property changes on: jbossbpm/spec/trunk/modules/samples/airticket/rpc/src/main/java/com/totsp/mavenplugin/gwt/sample/client/SampleRemoteService.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbossbpm/spec/trunk/modules/samples/airticket/rpc/src/main/java/com/totsp/mavenplugin/gwt/sample/client/SampleRemoteServiceAsync.java
===================================================================
--- jbossbpm/spec/trunk/modules/samples/airticket/rpc/src/main/java/com/totsp/mavenplugin/gwt/sample/client/SampleRemoteServiceAsync.java (rev 0)
+++ jbossbpm/spec/trunk/modules/samples/airticket/rpc/src/main/java/com/totsp/mavenplugin/gwt/sample/client/SampleRemoteServiceAsync.java 2008-07-29 19:26:17 UTC (rev 1754)
@@ -0,0 +1,7 @@
+package com.totsp.mavenplugin.gwt.sample.client;
+
+import com.google.gwt.user.client.rpc.AsyncCallback;
+
+public interface SampleRemoteServiceAsync {
+ public void doComplimentMe(AsyncCallback callback);
+}
Property changes on: jbossbpm/spec/trunk/modules/samples/airticket/rpc/src/main/java/com/totsp/mavenplugin/gwt/sample/client/SampleRemoteServiceAsync.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbossbpm/spec/trunk/modules/samples/airticket/server/pom.xml
===================================================================
--- jbossbpm/spec/trunk/modules/samples/airticket/server/pom.xml (rev 0)
+++ jbossbpm/spec/trunk/modules/samples/airticket/server/pom.xml 2008-07-29 19:26:17 UTC (rev 1754)
@@ -0,0 +1,53 @@
+<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">
+ <parent>
+ <groupId>com.totsp.gwt</groupId>
+ <artifactId>maven-googlewebtoolkit2-sample</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>maven-googlewebtoolkit2-sample-server</artifactId>
+ <name>maven-googlewebtoolkit2-sample-server</name>
+
+ <build>
+
+ <!-- Include SOURCE in output artifact for GWT (GWT libraries must include source) -->
+ <resources>
+ <resource>
+ <directory>src/main/java</directory>
+ </resource>
+ <resource>
+ <directory>src/main/resources</directory>
+ </resource>
+ </resources>
+
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ <finalName>maven-googlewebtoolkit2-sample-server</finalName>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>com.totsp.gwt</groupId>
+ <artifactId>maven-googlewebtoolkit2-sample-rpc</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.google.gwt</groupId>
+ <artifactId>gwt-servlet</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.google.gwt</groupId>
+ <artifactId>gwt-user</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+</project>
Property changes on: jbossbpm/spec/trunk/modules/samples/airticket/server/pom.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbossbpm/spec/trunk/modules/samples/airticket/server/src/main/java/com/totsp/mavenplugin/gwt/sample/server/HttpServlet.java
===================================================================
--- jbossbpm/spec/trunk/modules/samples/airticket/server/src/main/java/com/totsp/mavenplugin/gwt/sample/server/HttpServlet.java (rev 0)
+++ jbossbpm/spec/trunk/modules/samples/airticket/server/src/main/java/com/totsp/mavenplugin/gwt/sample/server/HttpServlet.java 2008-07-29 19:26:17 UTC (rev 1754)
@@ -0,0 +1,31 @@
+package com.totsp.mavenplugin.gwt.sample.server;
+
+import java.io.IOException;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * This is a sample of how to integrate a standard HTTPServlet inside a
+ * GWT-Maven project. More specifically, the mergexml functionality will use
+ * this HttpServlet & web.xml servlet mapping to integrate them into your
+ * GWT-Maven WebApp.
+ *
+ * @author andrew
+ *
+ */
+public class HttpServlet extends javax.servlet.http.HttpServlet {
+
+ protected void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws ServletException, IOException {
+ try {
+ // Call a random compliment, built with Java5 enums!
+ resp.getWriter().println(RandomCompliment.get());
+ } catch (Exception e) {
+ // completely unexpected exception!
+ e.printStackTrace(resp.getWriter());
+ }
+ }
+
+}
Property changes on: jbossbpm/spec/trunk/modules/samples/airticket/server/src/main/java/com/totsp/mavenplugin/gwt/sample/server/HttpServlet.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbossbpm/spec/trunk/modules/samples/airticket/server/src/main/java/com/totsp/mavenplugin/gwt/sample/server/RandomCompliment.java
===================================================================
--- jbossbpm/spec/trunk/modules/samples/airticket/server/src/main/java/com/totsp/mavenplugin/gwt/sample/server/RandomCompliment.java (rev 0)
+++ jbossbpm/spec/trunk/modules/samples/airticket/server/src/main/java/com/totsp/mavenplugin/gwt/sample/server/RandomCompliment.java 2008-07-29 19:26:17 UTC (rev 1754)
@@ -0,0 +1,41 @@
+package com.totsp.mavenplugin.gwt.sample.server;
+
+/*
+ * Java5+ Class, showing how to run Java5 server side code.. and Java1.4 GWT Client code simultaneously in GWT-Maven
+ */
+public class RandomCompliment {
+
+ /*
+ * Java5+ enum
+ */
+ private static enum compliment {
+ GREAT, EXCELLENT, FANTASTIC, AWESOME, L337
+ }
+
+ /**
+ * Just use the static method to get a random value
+ */
+ private RandomCompliment() {
+ };
+
+ /**
+ * Randomly select a compliment from the Java5+ enum
+ *
+ * @return a random compliment
+ */
+ public static String get() {
+ return "" + compliment.values()[(int) getRandomIndex()];
+ }
+
+ /**
+ * Generates a random index number, to select a random compliment
+ *
+ * @return random index number to the compliment.values array
+ */
+ private static int getRandomIndex() {
+ // (int) float : will round DOWN, so [ 0 <= RETURN_VAL <
+ // compliment.length ]
+ return (int) (Math.random() * ((double) compliment.values().length));
+ }
+
+}
Property changes on: jbossbpm/spec/trunk/modules/samples/airticket/server/src/main/java/com/totsp/mavenplugin/gwt/sample/server/RandomCompliment.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbossbpm/spec/trunk/modules/samples/airticket/server/src/main/java/com/totsp/mavenplugin/gwt/sample/server/SampleRemoteServiceImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/samples/airticket/server/src/main/java/com/totsp/mavenplugin/gwt/sample/server/SampleRemoteServiceImpl.java (rev 0)
+++ jbossbpm/spec/trunk/modules/samples/airticket/server/src/main/java/com/totsp/mavenplugin/gwt/sample/server/SampleRemoteServiceImpl.java 2008-07-29 19:26:17 UTC (rev 1754)
@@ -0,0 +1,12 @@
+package com.totsp.mavenplugin.gwt.sample.server;
+
+import com.google.gwt.user.server.rpc.RemoteServiceServlet;
+import com.totsp.mavenplugin.gwt.sample.client.SampleRemoteService;
+
+public class SampleRemoteServiceImpl extends RemoteServiceServlet implements
+ SampleRemoteService {
+
+ public String doComplimentMe() {
+ return RandomCompliment.get();
+ }
+}
Property changes on: jbossbpm/spec/trunk/modules/samples/airticket/server/src/main/java/com/totsp/mavenplugin/gwt/sample/server/SampleRemoteServiceImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbossbpm/spec/trunk/modules/samples/airticket/server/src/main/resources/com/totsp/mavenplugin/gwt/sample/server/ApplicationServices.gwt.xml
===================================================================
--- jbossbpm/spec/trunk/modules/samples/airticket/server/src/main/resources/com/totsp/mavenplugin/gwt/sample/server/ApplicationServices.gwt.xml (rev 0)
+++ jbossbpm/spec/trunk/modules/samples/airticket/server/src/main/resources/com/totsp/mavenplugin/gwt/sample/server/ApplicationServices.gwt.xml 2008-07-29 19:26:17 UTC (rev 1754)
@@ -0,0 +1,8 @@
+<module>
+
+ <inherits name='com.google.gwt.user.User' />
+
+ <!-- Service Servlet Mapping -->
+ <servlet path='/sampleRemoteService' class='com.totsp.mavenplugin.gwt.sample.server.SampleRemoteServiceImpl' />
+
+</module>
Property changes on: jbossbpm/spec/trunk/modules/samples/airticket/server/src/main/resources/com/totsp/mavenplugin/gwt/sample/server/ApplicationServices.gwt.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbossbpm/spec/trunk/modules/samples/airticket/server/src/main/webapp/WEB-INF/web.xml
===================================================================
--- jbossbpm/spec/trunk/modules/samples/airticket/server/src/main/webapp/WEB-INF/web.xml (rev 0)
+++ jbossbpm/spec/trunk/modules/samples/airticket/server/src/main/webapp/WEB-INF/web.xml 2008-07-29 19:26:17 UTC (rev 1754)
@@ -0,0 +1,7 @@
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd" >
+
+<web-app>
+ <display-name>GWT Maven Example</display-name>
+</web-app>
Property changes on: jbossbpm/spec/trunk/modules/samples/airticket/server/src/main/webapp/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbossbpm/spec/trunk/modules/samples/airticket/server/src/main/webapp/index.jsp
===================================================================
--- jbossbpm/spec/trunk/modules/samples/airticket/server/src/main/webapp/index.jsp (rev 0)
+++ jbossbpm/spec/trunk/modules/samples/airticket/server/src/main/webapp/index.jsp 2008-07-29 19:26:17 UTC (rev 1754)
@@ -0,0 +1,5 @@
+<html>
+<body>
+<h2>Hello World!</h2>
+</body>
+</html>
Added: jbossbpm/spec/trunk/modules/samples/airticket/war/pom.xml
===================================================================
--- jbossbpm/spec/trunk/modules/samples/airticket/war/pom.xml (rev 0)
+++ jbossbpm/spec/trunk/modules/samples/airticket/war/pom.xml 2008-07-29 19:26:17 UTC (rev 1754)
@@ -0,0 +1,170 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <parent>
+ <artifactId>maven-googlewebtoolkit2-sample</artifactId>
+ <groupId>com.totsp.gwt</groupId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>maven-googlewebtoolkit2-sample-war</artifactId>
+ <packaging>war</packaging>
+ <name>maven-googlewebtoolkit2-sample-war</name>
+ <build>
+ <plugins>
+ <!-- currently gwt supports java 1.4 (client) source -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.4</source>
+ <target>1.4</target>
+ </configuration>
+ </plugin>
+ <!-- All the fantastical settings that GWT needs -->
+ <plugin>
+ <groupId>com.totsp.gwt</groupId>
+ <artifactId>maven-googlewebtoolkit2-plugin</artifactId>
+ <version>2.0-beta18</version>
+ <configuration>
+ <!-- gwtVersion can be specified, currently defaults to 1.4.61 if NOT specified -->
+ <!-- <gwtVersion>1.4.61</gwtVersion> -->
+ <logLevel>INFO</logLevel>
+ <compileTargets>
+ <value> com.totsp.mavenplugin.gwt.sample.Application</value>
+ </compileTargets>
+ <runTarget> com.totsp.mavenplugin.gwt.sample.Application/Application.html</runTarget>
+ <generatorRootClasses>
+ <value> com.totsp.mavenplugin.gwt.sample.Application</value>
+ </generatorRootClasses>
+ <overwriteGeneratedClasses> true</overwriteGeneratedClasses>
+ <!-- use style OBF for prod -->
+ <style>DETAILED</style>
+ <generateGettersAndSetters> true</generateGettersAndSetters>
+ <noServer>false</noServer>
+ <extraJvmArgs>-Dgwt.coverage.enable=true</extraJvmArgs>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <!-- autoconfig gwt (download and unzip GWT itself) -->
+ <!-- *note* you can also use manual config, if you already have GWT installed -->
+ <!-- see site docs for details - http://gwt-maven.googlecode.com/svn/docs/maven-googlewebtoolkit2-plugin/s... -->
+ <goal>setup</goal>
+ <goal>extractGwt</goal>
+
+ <!-- actual work goals -->
+ <goal>mergewebxml</goal>
+ <goal>compile</goal>
+ <goal>gwt</goal>
+ <!-- uncomment testGwt to see the testing and code coverage magic -->
+ <!-- <goal>testGwt</goal> -->
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <configuration>
+ <webXml>target/web.xml</webXml>
+ </configuration>
+ </plugin>
+ <plugin>
+ <!-- use AntRun to do the Emma report (GWT emits coverage data files on it's own) -->
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <!--
+ <execution> <id>emma-coverage-report</id> <phase>pre-site</phase> <configuration> <tasks> <taskdef
+ resource="emma_ant.properties" classpathref="maven.plugin.classpath" /> <emma enabled="true"> <report>
+ <infileset dir="${project.build.directory}" includes="*.em, *.ec" /> <html
+ outfile="${project.build.directory}/coverage/coverage.html" depth="method"
+ columns="name,class,method,block,line" /> </report> </emma> <copy todir="${project.build.directory}/site/">
+ <fileset dir="${project.build.directory}/coverage" /> </copy> </tasks> </configuration> <goals>
+ <goal>run</goal> </goals> </execution>
+ -->
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>emma</groupId>
+ <artifactId>emma</artifactId>
+ <version>2.0.5312</version>
+ </dependency>
+ <dependency>
+ <groupId>emma</groupId>
+ <artifactId>emma_ant</artifactId>
+ <version>2.0.5312</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </build>
+
+ <!-- standard Maven reporting done here -->
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId> maven-project-info-reports-plugin</artifactId>
+ <reportSets>
+ <reportSet>
+ <reports>
+ <report>dependencies</report>
+ </reports>
+ </reportSet>
+ </reportSets>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ <!--
+ the Maven Surefire Report plugin has a bug where it re-runs the tests, this is needed to avoid that -
+ http://jira.codehaus.org/browse/SUREFIRE-257
+ -->
+ <reportSets>
+ <reportSet>
+ <reports>
+ <report>report-only</report>
+ </reports>
+ </reportSet>
+ </reportSets>
+ </plugin>
+ </plugins>
+ </reporting>
+ <dependencies>
+ <dependency>
+ <groupId>com.totsp.gwt</groupId>
+ <artifactId> maven-googlewebtoolkit2-sample-server</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.google.gwt</groupId>
+ <artifactId>gwt-servlet</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.google.gwt</groupId>
+ <artifactId>gwt-user</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <!--
+ coverage patch (used to generate code coverage data for GwtTestCase based tests, when -Dgwt.coverage.enable=true
+ -->
+ <dependency>
+ <groupId>com.google.gwt</groupId>
+ <artifactId>gwtcoverage</artifactId>
+ <version>1.4.61</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>emma</groupId>
+ <artifactId>emma</artifactId>
+ <version>2.0.5312</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Property changes on: jbossbpm/spec/trunk/modules/samples/airticket/war/pom.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Added: jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/java/com/totsp/mavenplugin/gwt/sample/client/Application.java
===================================================================
--- jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/java/com/totsp/mavenplugin/gwt/sample/client/Application.java (rev 0)
+++ jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/java/com/totsp/mavenplugin/gwt/sample/client/Application.java 2008-07-29 19:26:17 UTC (rev 1754)
@@ -0,0 +1,96 @@
+package com.totsp.mavenplugin.gwt.sample.client;
+
+import com.google.gwt.core.client.EntryPoint;
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.google.gwt.user.client.rpc.ServiceDefTarget;
+import com.google.gwt.user.client.ui.Button;
+import com.google.gwt.user.client.ui.ClickListener;
+import com.google.gwt.user.client.ui.Image;
+import com.google.gwt.user.client.ui.Label;
+import com.google.gwt.user.client.ui.RootPanel;
+import com.google.gwt.user.client.ui.Widget;
+import com.totsp.mavenplugin.gwt.sample.client.SampleRemoteService;
+import com.totsp.mavenplugin.gwt.sample.client.SampleRemoteServiceAsync;
+
+/**
+ * Entry point classes define <code>onModuleLoad()</code>.
+ */
+public class Application implements EntryPoint {
+
+ /**
+ * This is the entry point method.
+ */
+ public void onModuleLoad() {
+
+ //example of image bundle
+ final SampleImageBundle sampleImageBundle = (SampleImageBundle) GWT.create(SampleImageBundle.class);
+ final Image gwtLogoImage = sampleImageBundle.getGWTLogo().createImage();
+ gwtLogoImage.setTitle("This image was delivered via automatic resource inclusion and the ImageBundle feature");
+
+
+ final Button button = new Button("Run GWT Async RPC!");
+ //example of css inclusion and use
+ button.setStyleName("gwtMavenButton");
+
+ final Label label = new Label();
+
+ button.setTitle("This will execute the RPC call to the Java v1.5 GWT server");
+
+ button.addClickListener(new ClickListener() {
+ public void onClick(Widget sender) {
+
+ // (1) Create the client proxy. Note that although you are
+ // creating the
+ // service interface proper, you cast the result to the
+ // asynchronous
+ // version of
+ // the interface. The cast is always safe because the generated
+ // proxy
+ // implements the asynchronous interface automatically.
+ SampleRemoteServiceAsync sampleRemoteService = (SampleRemoteServiceAsync) GWT
+ .create(SampleRemoteService.class);
+
+ // (2) Specify the URL at which our service implementation is
+ // running.
+ // Note that the target URL must reside on the same domain and
+ // port from
+ // which the host page was served.
+ ServiceDefTarget endpoint = (ServiceDefTarget) sampleRemoteService;
+
+ String moduleRelativeURL = GWT.getModuleBaseURL()
+ + "sampleRemoteService";
+ endpoint.setServiceEntryPoint(moduleRelativeURL);
+
+ // (3) Create an asynchronous callback to handle the result.
+ AsyncCallback callback = new AsyncCallback() {
+ public void onSuccess(Object result) {
+ // do some UI stuff to show success
+ label.setText((String) result);
+ }
+
+ public void onFailure(Throwable caught) {
+ // do some UI stuff to show failure
+ label.setText("DAMMIT! This didnt work.");
+ }
+ };
+
+ // (4) Make the call. Control flow will continue immediately and
+ // later
+ // 'callback' will be invoked when the RPC completes.
+ sampleRemoteService.doComplimentMe(callback);
+
+ }
+ });
+
+ // Assume that the host HTML has elements defined whose
+ // IDs are "slot1", "slot2". In a real app, you probably would not want
+ // 4532
+ // to hard-code IDs. Instead, you could, for example, search for all
+ // elements with a particular CSS class and replace them with widgets.
+ //
+ RootPanel.get("gwtLogo").add(gwtLogoImage);
+ RootPanel.get("rpcButton").add(button);
+ RootPanel.get("rpcResponse").add(label);
+ }
+}
Property changes on: jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/java/com/totsp/mavenplugin/gwt/sample/client/Application.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/java/com/totsp/mavenplugin/gwt/sample/client/SampleImageBundle.java
===================================================================
--- jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/java/com/totsp/mavenplugin/gwt/sample/client/SampleImageBundle.java (rev 0)
+++ jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/java/com/totsp/mavenplugin/gwt/sample/client/SampleImageBundle.java 2008-07-29 19:26:17 UTC (rev 1754)
@@ -0,0 +1,17 @@
+package com.totsp.mavenplugin.gwt.sample.client;
+
+import com.google.gwt.user.client.ui.AbstractImagePrototype;
+import com.google.gwt.user.client.ui.ImageBundle;
+
+/**
+ * This is a sample how to use image bundles in your gwt-maven project.
+ * @author Andrew
+ */
+public interface SampleImageBundle extends ImageBundle {
+
+ /**
+ * @gwt.resource com/totsp/mavenplugin/gwt/sample/public/images/gwt-logo.png
+ */
+ public AbstractImagePrototype getGWTLogo();
+
+}
Property changes on: jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/java/com/totsp/mavenplugin/gwt/sample/client/SampleImageBundle.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/resources/com/totsp/mavenplugin/gwt/sample/Application.gwt.xml
===================================================================
--- jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/resources/com/totsp/mavenplugin/gwt/sample/Application.gwt.xml (rev 0)
+++ jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/resources/com/totsp/mavenplugin/gwt/sample/Application.gwt.xml 2008-07-29 19:26:17 UTC (rev 1754)
@@ -0,0 +1,15 @@
+<module>
+
+ <!-- Inherit the core Web Toolkit stuff. -->
+ <inherits name='com.google.gwt.user.User' />
+
+ <!-- Inherit the server project, which defines a service servlet endpoint -->
+ <inherits name='com.totsp.mavenplugin.gwt.sample.server.ApplicationServices' />
+
+ <!-- Specify the app entry point class. -->
+ <entry-point class='com.totsp.mavenplugin.gwt.sample.client.Application' />
+
+ <!-- Specify a css to load into your gwt application -->
+ <stylesheet src='styles/sample.css'/>
+
+</module>
Property changes on: jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/resources/com/totsp/mavenplugin/gwt/sample/Application.gwt.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/resources/com/totsp/mavenplugin/gwt/sample/public/Application.html
===================================================================
--- jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/resources/com/totsp/mavenplugin/gwt/sample/public/Application.html (rev 0)
+++ jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/resources/com/totsp/mavenplugin/gwt/sample/public/Application.html 2008-07-29 19:26:17 UTC (rev 1754)
@@ -0,0 +1,79 @@
+<html>
+ <head>
+ <title>maven-googlewebtoolkit2-sample</title>
+ <style>
+ html,body{
+ font-family:arial,sans-serif;
+ height: 100%;
+ width: 800px;
+ align: center;
+ overflow: hidden;
+ }
+ </style>
+<!-- -->
+<!-- This script loads your compiled module. -->
+<!-- If you add any GWT meta tags, they must -->
+<!-- be added before this line. -->
+<!-- -->
+<script language='javascript'
+ src='com.totsp.mavenplugin.gwt.sample.Application.nocache.js'></script>
+</head>
+
+<!-- -->
+<!-- The body can have arbitrary html, or -->
+<!-- you can leave the body empty if you want -->
+<!-- to create a completely dynamic ui -->
+<!-- -->
+<body>
+
+<!-- OPTIONAL: include this if you want history support -->
+<iframe src="javascript:''" id="__gwt_historyFrame"
+ style="width: 0; height: 0; border: 0"></iframe>
+<table align=center>
+ <tr align="center">
+ <td>
+ <h1>Welcome to the maven-googlewebtoolkit2-sample</h1>
+ <table>
+ <tr>
+ <td>
+ <p>This is a <i>simple</i> gwt-maven example project, based on GWT v1.4.6x and maven v2.0.9+.</p>
+
+ Inside this example you will find a...
+ <ul>
+ <li>Maven Multi-Module project</li>
+ <li>GWT client that makes an RPC/AJAX call to a Java1.5 GWT server</li>
+ <li>Automatic Resource Inclusion (css)</li>
+ <li>Automatic Resource Inclusion (images via an ImageBundle)</li>
+ </ul>
+
+ Maven Modules Explained:
+ <ul>
+ <li>parent: this is the root/parent of the project</li>
+ <li>war: this is the client GWT code</li>
+ <li>rpc: this is an interface to a GWT server (not an
+ implementation)</li>
+ <li>server: is the implementation of the rpc interface (in
+ Java1.5+)</li>
+ <li>Look inside the pom.xml's for more comments and docs</li>
+ </ul>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr align="center">
+ <td>The Demo is Below<hr/></td>
+ </tr>
+ <!-- Below is where the gwt widgets are injected -->
+ <tr align="center">
+ <td id="gwtLogo"></td>
+ </tr>
+ <tr align="center">
+ <td id="rpcButton"></td>
+ </tr>
+ <tr align="center">
+ <td id="rpcResponse"></td>
+ </tr>
+</table>
+</body>
+</html>
Added: jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/resources/com/totsp/mavenplugin/gwt/sample/public/images/gwt-logo.png
===================================================================
(Binary files differ)
Property changes on: jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/resources/com/totsp/mavenplugin/gwt/sample/public/images/gwt-logo.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/resources/com/totsp/mavenplugin/gwt/sample/public/styles/sample.css
===================================================================
--- jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/resources/com/totsp/mavenplugin/gwt/sample/public/styles/sample.css (rev 0)
+++ jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/resources/com/totsp/mavenplugin/gwt/sample/public/styles/sample.css 2008-07-29 19:26:17 UTC (rev 1754)
@@ -0,0 +1,11 @@
+/**
+* Sample showing how to include a css in your gwt-maven project
+*/
+.gwtMavenButton {
+ border-color: rgb(255, 0, 0);
+ font-weight: normal;
+ font-style: normal;
+ text-align: center;
+ background-color: rgb(255, 0, 0);
+ color: rgb(255, 255, 255);
+}
\ No newline at end of file
Added: jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/webapp/WEB-INF/web.xml
===================================================================
--- jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/webapp/WEB-INF/web.xml (rev 0)
+++ jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/webapp/WEB-INF/web.xml 2008-07-29 19:26:17 UTC (rev 1754)
@@ -0,0 +1,19 @@
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd" >
+
+<web-app>
+ <display-name>Archetype Created Web Application</display-name>
+ <servlet>
+ <servlet-name>HttpServlet</servlet-name>
+ <servlet-class>com.totsp.mavenplugin.gwt.sample.server.HttpServlet</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>HttpServlet</servlet-name>
+ <url-pattern>/HttpServlet</url-pattern>
+ </servlet-mapping>
+
+ <welcome-file-list>
+ <welcome-file>index.html</welcome-file>
+ </welcome-file-list>
+</web-app>
Property changes on: jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/webapp/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/webapp/index.html
===================================================================
--- jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/webapp/index.html (rev 0)
+++ jbossbpm/spec/trunk/modules/samples/airticket/war/src/main/webapp/index.html 2008-07-29 19:26:17 UTC (rev 1754)
@@ -0,0 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<!-- forward to the GWT Example Application -->
+<meta http-equiv="REFRESH"
+ content="0;url=com.totsp.mavenplugin.gwt.sample.Application/Application.html">
+</HEAD>
+</HTML>
\ No newline at end of file
Added: jbossbpm/spec/trunk/modules/samples/airticket/war/src/site/apt/index.apt
===================================================================
--- jbossbpm/spec/trunk/modules/samples/airticket/war/src/site/apt/index.apt (rev 0)
+++ jbossbpm/spec/trunk/modules/samples/airticket/war/src/site/apt/index.apt 2008-07-29 19:26:17 UTC (rev 1754)
@@ -0,0 +1,8 @@
+GWT-Maven Sample
+
+ This is a sample project that uses GWT-Maven for, well, GWT and Maven integration.
+
+* Overview
+
+ * Lot's of stuff, see src README. http://gwt-maven.googlecode.com/svn/trunk/maven-googlewebtoolkit2-sample/...
+
\ No newline at end of file
Added: jbossbpm/spec/trunk/modules/samples/airticket/war/src/site/site.xml
===================================================================
--- jbossbpm/spec/trunk/modules/samples/airticket/war/src/site/site.xml (rev 0)
+++ jbossbpm/spec/trunk/modules/samples/airticket/war/src/site/site.xml 2008-07-29 19:26:17 UTC (rev 1754)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <body>
+ <menu name="Overview">
+ <item name="Introduction" href="index.html"/>
+ <item name="Coverage Report" href="coverage.html"/>
+ <item name="Dependency Report" href="dependencies.html"/>
+ <item name="Surefire Test Report" href="surefire-report.html"/>
+ </menu>
+ </body>
+</project>
\ No newline at end of file
Property changes on: jbossbpm/spec/trunk/modules/samples/airticket/war/src/site/site.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbossbpm/spec/trunk/modules/samples/airticket/war/src/test/java/com/totsp/mavenplugin/gwt/sample/AStandardNonGwtTest.java
===================================================================
--- jbossbpm/spec/trunk/modules/samples/airticket/war/src/test/java/com/totsp/mavenplugin/gwt/sample/AStandardNonGwtTest.java (rev 0)
+++ jbossbpm/spec/trunk/modules/samples/airticket/war/src/test/java/com/totsp/mavenplugin/gwt/sample/AStandardNonGwtTest.java 2008-07-29 19:26:17 UTC (rev 1754)
@@ -0,0 +1,16 @@
+package com.totsp.mavenplugin.gwt.sample;
+
+import junit.framework.TestCase;
+import junit.framework.Assert;
+
+public class AStandardNonGwtTest extends TestCase {
+
+ public AStandardNonGwtTest() {
+ }
+
+ public void testSomething() {
+ // our favorite kind of test, assert true, this always succeeds!
+ Assert.assertTrue(true);
+ }
+
+}
\ No newline at end of file
Property changes on: jbossbpm/spec/trunk/modules/samples/airticket/war/src/test/java/com/totsp/mavenplugin/gwt/sample/AStandardNonGwtTest.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbossbpm/spec/trunk/modules/samples/airticket/war/src/test/java/com/totsp/mavenplugin/gwt/sample/client/GwtTestExample.java
===================================================================
--- jbossbpm/spec/trunk/modules/samples/airticket/war/src/test/java/com/totsp/mavenplugin/gwt/sample/client/GwtTestExample.java (rev 0)
+++ jbossbpm/spec/trunk/modules/samples/airticket/war/src/test/java/com/totsp/mavenplugin/gwt/sample/client/GwtTestExample.java 2008-07-29 19:26:17 UTC (rev 1754)
@@ -0,0 +1,29 @@
+package com.totsp.mavenplugin.gwt.sample.client;
+
+import junit.framework.Assert;
+
+import com.google.gwt.junit.client.GWTTestCase;
+
+public class GwtTestExample extends GWTTestCase
+{
+
+ public String getModuleName() {
+ return "com.totsp.mavenplugin.gwt.sample.Application";
+ }
+
+ public void setUp() throws Exception {
+ super.setUp();
+ }
+
+ public void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+ public void testSomething()
+ {
+ // Not much to actually test in this sample app
+ // Ideally you would test your Controller here (NOT YOUR UI)
+ // (Make calls to RPC services, test client side model objects, test client side logic, etc)
+ Assert.assertTrue(true);
+ }
+}
\ No newline at end of file
Property changes on: jbossbpm/spec/trunk/modules/samples/airticket/war/src/test/java/com/totsp/mavenplugin/gwt/sample/client/GwtTestExample.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbossbpm/spec/trunk/modules/testsuite/pom.xml
===================================================================
--- jbossbpm/spec/trunk/modules/testsuite/pom.xml 2008-07-29 18:56:07 UTC (rev 1753)
+++ jbossbpm/spec/trunk/modules/testsuite/pom.xml 2008-07-29 19:26:17 UTC (rev 1754)
@@ -1,28 +1,15 @@
<?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$
- -->
+
+<!-- ====================================================================== -->
+<!-- -->
+<!-- JBoss, the OpenSource J2EE webOS -->
+<!-- -->
+<!-- Distributable under LGPL license. -->
+<!-- See terms of license at http://www.gnu.org. -->
+<!-- -->
+<!-- ====================================================================== -->
+
+<!-- $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>
15 years, 9 months
JBoss JBPM SVN: r1752 - in jbossbpm/spec/trunk/modules: api/src/main/java/org/jboss/bpm/model and 6 other directories.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-07-29 13:28:54 -0400 (Tue, 29 Jul 2008)
New Revision: 1752
Modified:
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/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/MessageBuilderFactory.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ProcessBuilderFactory.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/PropertyBuilderFactory.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/ActivityImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ComplexGatewayImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/EntityImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/EventImpl.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/FlowImpl.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/HandlerImpl.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/MessageFlowImpl.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/NoneTaskImpl.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/ParticipantImpl.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/PropertyImpl.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/RoleImpl.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/ri/src/main/java/org/jboss/bpm/model/internal/SupportingElementImpl.java
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/TaskImpl.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/airticket/AvailabilityHandler.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/java/org/jboss/bpm/samples/task/TaskA.java
Log:
Fix warnings
Modified: 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 2008-07-29 15:17:43 UTC (rev 1751)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/ObjectNameFactory.java 2008-07-29 17:28:54 UTC (rev 1752)
@@ -60,7 +60,7 @@
}
}
- public static ObjectName create(String domain, Hashtable table)
+ public static ObjectName create(String domain, Hashtable<String, String> table)
{
try
{
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 15:17:43 UTC (rev 1751)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessEngine.java 2008-07-29 17:28:54 UTC (rev 1752)
@@ -21,8 +21,6 @@
*/
package org.jboss.bpm.client;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
// $Id$
@@ -39,9 +37,6 @@
/** 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
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 15:17:43 UTC (rev 1751)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessManager.java 2008-07-29 17:28:54 UTC (rev 1752)
@@ -218,7 +218,7 @@
else
throw rte;
}
- Thread.currentThread().sleep(100);
+ Thread.sleep(100);
now = System.currentTimeMillis();
}
}
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/MessageBuilderFactory.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/MessageBuilderFactory.java 2008-07-29 15:17:43 UTC (rev 1751)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/MessageBuilderFactory.java 2008-07-29 17:28:54 UTC (rev 1752)
@@ -46,6 +46,7 @@
/**
* Get a MessageBuilderFactory instance.
*/
+ @SuppressWarnings("deprecation")
public static MessageBuilderFactory newInstance()
{
Kernel kernel = KernelLocator.getKernel();
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ProcessBuilderFactory.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ProcessBuilderFactory.java 2008-07-29 15:17:43 UTC (rev 1751)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ProcessBuilderFactory.java 2008-07-29 17:28:54 UTC (rev 1752)
@@ -46,6 +46,7 @@
/**
* Get a ProcessBuilderFactory instance.
*/
+ @SuppressWarnings("deprecation")
public static ProcessBuilderFactory newInstance()
{
Kernel kernel = KernelLocator.getKernel();
Modified: 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 2008-07-29 15:17:43 UTC (rev 1751)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/PropertyBuilderFactory.java 2008-07-29 17:28:54 UTC (rev 1752)
@@ -46,6 +46,7 @@
/**
* Get a MessageBuilderFactory instance.
*/
+ @SuppressWarnings("deprecation")
public static PropertyBuilderFactory newInstance()
{
Kernel kernel = KernelLocator.getKernel();
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 15:17:43 UTC (rev 1751)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/client/internal/ExecutionManagerImpl.java 2008-07-29 17:28:54 UTC (rev 1752)
@@ -135,6 +135,7 @@
/**
* The initial flow 'to' the StartEvent
*/
+ @SuppressWarnings("serial")
class InitialFlow extends SequenceFlowImpl
{
InitialFlow(StartEvent start)
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 15:17:43 UTC (rev 1751)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ActivityImpl.java 2008-07-29 17:28:54 UTC (rev 1752)
@@ -29,8 +29,6 @@
import java.util.List;
import java.util.Map;
-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.model.Activity;
@@ -61,9 +59,6 @@
@SuppressWarnings("serial")
public abstract class ActivityImpl extends FlowObjectImpl implements Activity, MutablePropertySupport, SingleInFlowSetterSupport, SingleOutFlowSetterSupport
{
- // provide logging
- private static final Log log = LogFactory.getLog(ActivityImpl.class);
-
private String name;
private List<InputSet> inputSets = new ArrayList<InputSet>();
private List<OutputSet> outputSets = new ArrayList<OutputSet>();
@@ -315,12 +310,12 @@
*/
protected void postProcessInputSet(Token token, InputSet inputSet)
{
- ExecutionContext exContext = token.getExecutionContext();
- for (Property prop : inputSet.getProperties())
- {
- // TODO: define proper scope for token data
- // exContext.removeAttachment(prop.getName());
- }
+// ExecutionContext exContext = token.getExecutionContext();
+// for (Property prop : inputSet.getProperties())
+// {
+// // TODO: define proper scope for token data
+// exContext.removeAttachment(prop.getName());
+// }
}
public FlowHandler getFlowHandler()
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ComplexGatewayImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ComplexGatewayImpl.java 2008-07-29 15:17:43 UTC (rev 1751)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ComplexGatewayImpl.java 2008-07-29 17:28:54 UTC (rev 1752)
@@ -35,6 +35,7 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
+@SuppressWarnings("serial")
public class ComplexGatewayImpl extends GatewayImpl implements ComplexGateway
{
public ComplexGatewayImpl(String name)
Modified: 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 2008-07-29 15:17:43 UTC (rev 1751)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/EntityImpl.java 2008-07-29 17:28:54 UTC (rev 1752)
@@ -31,6 +31,7 @@
* @author thomas.diesler(a)jboss.com
* @since 21-Jul-2008
*/
+@SuppressWarnings("serial")
public class EntityImpl extends ParticipantImpl implements Entity
{
private String name;
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/EventImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/EventImpl.java 2008-07-29 15:17:43 UTC (rev 1751)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/EventImpl.java 2008-07-29 17:28:54 UTC (rev 1752)
@@ -33,6 +33,7 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
+@SuppressWarnings("serial")
public abstract class EventImpl extends FlowObjectImpl implements Event
{
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-29 15:17:43 UTC (rev 1751)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ExclusiveGatewayDataBasedImpl.java 2008-07-29 17:28:54 UTC (rev 1752)
@@ -33,6 +33,7 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
+@SuppressWarnings("serial")
public class ExclusiveGatewayDataBasedImpl extends ExclusiveGatewayImpl implements ExclusiveGatewayDataBased
{
public ExclusiveGatewayDataBasedImpl(String name)
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-29 15:17:43 UTC (rev 1751)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ExclusiveGatewayImpl.java 2008-07-29 17:28:54 UTC (rev 1752)
@@ -32,7 +32,6 @@
import org.jboss.bpm.model.Flow;
import org.jboss.bpm.model.Gate;
import org.jboss.bpm.model.SequenceFlow;
-import org.jboss.bpm.model.ExclusiveGateway.ExclusiveType;
import org.jboss.bpm.model.Expression.ExpressionLanguage;
import org.jboss.bpm.model.SequenceFlow.ConditionType;
import org.jboss.bpm.runtime.ExecutionContext;
@@ -49,6 +48,7 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
+@SuppressWarnings("serial")
public abstract class ExclusiveGatewayImpl extends GatewayImpl implements ExclusiveGateway
{
public ExclusiveGatewayImpl(String name)
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-29 15:17:43 UTC (rev 1751)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ExpressionImpl.java 2008-07-29 17:28:54 UTC (rev 1752)
@@ -32,6 +32,7 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
+@SuppressWarnings("serial")
public class ExpressionImpl extends SupportingElementImpl implements Expression
{
private String body;
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/FlowImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/FlowImpl.java 2008-07-29 15:17:43 UTC (rev 1751)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/FlowImpl.java 2008-07-29 17:28:54 UTC (rev 1752)
@@ -23,9 +23,7 @@
//$Id$
-import org.jboss.bpm.NotImplementedException;
import org.jboss.bpm.model.Flow;
-import org.jboss.bpm.model.FlowObject;
import org.jboss.bpm.model.GraphicalElement;
/**
@@ -35,6 +33,7 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
+@SuppressWarnings("serial")
public abstract class FlowImpl extends SupportingElementImpl implements Flow
{
private String name;
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-29 15:17:43 UTC (rev 1751)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/GateImpl.java 2008-07-29 17:28:54 UTC (rev 1752)
@@ -39,6 +39,7 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
+@SuppressWarnings("serial")
public class GateImpl extends SupportingElementImpl implements Gate
{
private SequenceFlow seqFlow;
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/HandlerImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/HandlerImpl.java 2008-07-29 15:17:43 UTC (rev 1751)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/HandlerImpl.java 2008-07-29 17:28:54 UTC (rev 1752)
@@ -32,6 +32,7 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
+@SuppressWarnings("serial")
public abstract class HandlerImpl implements Handler
{
private String className;
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-29 15:17:43 UTC (rev 1751)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/InputSetImpl.java 2008-07-29 17:28:54 UTC (rev 1752)
@@ -27,9 +27,7 @@
import java.util.Collections;
import java.util.List;
-import org.jboss.bpm.NotImplementedException;
import org.jboss.bpm.model.ArtifactInput;
-import org.jboss.bpm.model.ArtifactOutput;
import org.jboss.bpm.model.InputSet;
import org.jboss.bpm.model.Property;
import org.jboss.bpm.runtime.MutablePropertySupport;
@@ -40,6 +38,7 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
+@SuppressWarnings("serial")
public class InputSetImpl extends SupportingElementImpl implements InputSet, MutablePropertySupport
{
private List<ArtifactInput> artInputs = new ArrayList<ArtifactInput>();
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-29 15:17:43 UTC (rev 1751)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/IntermediateEventImpl.java 2008-07-29 17:28:54 UTC (rev 1752)
@@ -45,6 +45,7 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
+@SuppressWarnings("serial")
public class IntermediateEventImpl extends EventImpl implements IntermediateEvent, SingleInFlowSetterSupport, SingleOutFlowSetterSupport
{
// provide logging
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/MessageFlowImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/MessageFlowImpl.java 2008-07-29 15:17:43 UTC (rev 1751)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/MessageFlowImpl.java 2008-07-29 17:28:54 UTC (rev 1752)
@@ -35,6 +35,7 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
+@SuppressWarnings("serial")
public class MessageFlowImpl extends FlowImpl implements MessageFlow
{
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 15:17:43 UTC (rev 1751)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/MessageImpl.java 2008-07-29 17:28:54 UTC (rev 1752)
@@ -27,11 +27,9 @@
import javax.management.ObjectName;
-import org.jboss.bpm.NotImplementedException;
import org.jboss.bpm.model.Message;
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$
@@ -44,6 +42,7 @@
* @author thomas.diesler(a)jboss.com
* @since 21-Jul-2008
*/
+@SuppressWarnings("serial")
public class MessageImpl extends SupportingElementImpl implements Message, MutablePropertySupport
{
private String name;
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/NoneTaskImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/NoneTaskImpl.java 2008-07-29 15:17:43 UTC (rev 1751)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/NoneTaskImpl.java 2008-07-29 17:28:54 UTC (rev 1752)
@@ -30,6 +30,7 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
+@SuppressWarnings("serial")
public class NoneTaskImpl extends TaskImpl
{
public NoneTaskImpl(String name)
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-29 15:17:43 UTC (rev 1751)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/OutputSetImpl.java 2008-07-29 17:28:54 UTC (rev 1752)
@@ -27,7 +27,6 @@
import java.util.Collections;
import java.util.List;
-import org.jboss.bpm.NotImplementedException;
import org.jboss.bpm.model.ArtifactOutput;
import org.jboss.bpm.model.OutputSet;
import org.jboss.bpm.model.Property;
@@ -39,6 +38,7 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
+@SuppressWarnings("serial")
public class OutputSetImpl extends SupportingElementImpl implements OutputSet, MutablePropertySupport
{
private List<ArtifactOutput> artOutputs = new ArrayList<ArtifactOutput>();
Modified: 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 2008-07-29 15:17:43 UTC (rev 1751)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ParticipantImpl.java 2008-07-29 17:28:54 UTC (rev 1752)
@@ -34,6 +34,7 @@
* @author thomas.diesler(a)jboss.com
* @since 21-Jul-2008
*/
+@SuppressWarnings("serial")
public abstract class ParticipantImpl extends SupportingElementImpl implements Participant
{
protected Entity entityRef;
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 15:17:43 UTC (rev 1751)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ProcessImpl.java 2008-07-29 17:28:54 UTC (rev 1752)
@@ -39,7 +39,6 @@
import org.jboss.bpm.model.EndEvent;
import org.jboss.bpm.model.FlowObject;
import org.jboss.bpm.model.InputSet;
-import org.jboss.bpm.model.Message;
import org.jboss.bpm.model.NameSupport;
import org.jboss.bpm.model.OutputSet;
import org.jboss.bpm.model.Process;
@@ -53,6 +52,7 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
+@SuppressWarnings("serial")
public class ProcessImpl extends SupportingElementImpl implements Process
{
// The required process name
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/PropertyImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/PropertyImpl.java 2008-07-29 15:17:43 UTC (rev 1751)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/PropertyImpl.java 2008-07-29 17:28:54 UTC (rev 1752)
@@ -32,12 +32,13 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
+@SuppressWarnings("serial")
public class PropertyImpl extends SupportingElementImpl implements Property
{
private String name;
private Expression expression;
private boolean isCorrelation;
-
+
public PropertyImpl(String name, Expression expression)
{
this.expression = expression;
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-29 15:17:43 UTC (rev 1751)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ReceiveTaskImpl.java 2008-07-29 17:28:54 UTC (rev 1752)
@@ -48,6 +48,7 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
+@SuppressWarnings("serial")
public class ReceiveTaskImpl extends TaskImpl implements ReceiveTask, MessageListener
{
private static final int RECEIVE_TIMEOUT = 5000;
@@ -95,7 +96,7 @@
{
return getID();
}
-
+
public void catchMessage(Message message)
{
String msgName = message.getName();
@@ -125,7 +126,7 @@
{
try
{
- Thread.currentThread().sleep(500);
+ Thread.sleep(500);
now = System.currentTimeMillis();
}
catch (InterruptedException ex)
@@ -133,12 +134,12 @@
log.error("ReceiveTask interrupted" + ex.toString());
}
}
-
+
// 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
+
+ // Copy the expected properties from the
// received message to the execution context
Message msg = messages.remove(0);
ExecutionContext exContext = token.getExecutionContext();
@@ -148,7 +149,7 @@
Expression value = msg.getProperty(key).getValue();
exContext.addAttachment(key, value.getExpressionBody());
}
-
+
// Call default execute
super.execute(token);
}
Modified: 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 2008-07-29 15:17:43 UTC (rev 1751)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/RoleImpl.java 2008-07-29 17:28:54 UTC (rev 1752)
@@ -31,6 +31,7 @@
* @author thomas.diesler(a)jboss.com
* @since 21-Jul-2008
*/
+@SuppressWarnings("serial")
public class RoleImpl extends ParticipantImpl implements Role
{
private String name;
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-29 15:17:43 UTC (rev 1751)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/SequenceFlowImpl.java 2008-07-29 17:28:54 UTC (rev 1752)
@@ -33,6 +33,7 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
+@SuppressWarnings("serial")
public class SequenceFlowImpl extends FlowImpl implements SequenceFlow
{
private ConditionType conditionType = ConditionType.None;
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-29 15:17:43 UTC (rev 1751)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/StartEventImpl.java 2008-07-29 17:28:54 UTC (rev 1752)
@@ -47,6 +47,7 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
+@SuppressWarnings("serial")
public class StartEventImpl extends EventImpl implements StartEvent, SingleOutFlowSetterSupport
{
// provide logging
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/SupportingElementImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/SupportingElementImpl.java 2008-07-29 15:17:43 UTC (rev 1751)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/SupportingElementImpl.java 2008-07-29 17:28:54 UTC (rev 1752)
@@ -30,6 +30,7 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
+@SuppressWarnings("serial")
public abstract class SupportingElementImpl extends BPMNElementImpl implements SupportingElement
{
}
\ No newline at end of file
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 15:17:43 UTC (rev 1751)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/TaskBuilderImpl.java 2008-07-29 17:28:54 UTC (rev 1752)
@@ -38,7 +38,7 @@
public class TaskBuilderImpl extends ActivityBuilderImpl implements TaskBuilder
{
private MessageImpl message;
-
+
public TaskBuilderImpl(ProcessImpl proc, FlowObjectImpl flowObject)
{
super(proc, flowObject);
@@ -51,7 +51,7 @@
{
if (targetID != null)
throw new IllegalArgumentException("Message targetID must be null for ReceiveTask");
-
+
ReceiveTaskImpl receiveTask = (ReceiveTaskImpl)flowObject;
receiveTask.setMessageRef(message);
}
@@ -59,7 +59,7 @@
{
if (targetID == null)
throw new IllegalArgumentException("Message targetID cannot be null for SendTask");
-
+
SendTaskImpl sendTask = (SendTaskImpl)flowObject;
sendTask.setMessageRef(message);
}
@@ -82,11 +82,4 @@
super.addExecutionHandler(clazz);
return this;
}
-
- private Task getTask()
- {
- if (flowObject instanceof Task == false)
- throw new IllegalStateException("Last added flow object is not a Task");
- return (Task)flowObject;
- }
}
\ No newline at end of file
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/TaskImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/TaskImpl.java 2008-07-29 15:17:43 UTC (rev 1751)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/TaskImpl.java 2008-07-29 17:28:54 UTC (rev 1752)
@@ -36,6 +36,7 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
+@SuppressWarnings("serial")
public abstract class TaskImpl extends ActivityImpl implements Task
{
public TaskImpl(String name)
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 15:17:43 UTC (rev 1751)
+++ jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/airticket/AirticketTest.java 2008-07-29 17:28:54 UTC (rev 1752)
@@ -190,14 +190,4 @@
getMessage();
return msg;
}
-
- private Message getDenyOfferMessage()
- {
- MessageBuilderFactory msgFactory = MessageBuilderFactory.newInstance();
- MessageBuilder msgBuilder = msgFactory.newMessageBuilder();
- Message msg = msgBuilder.newMessage("AcceptOfferMsg", null).
- addProperty("isOfferAccepted", "false").
- getMessage();
- return msg;
- }
}
\ No newline at end of file
Modified: jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/airticket/AvailabilityHandler.java
===================================================================
--- jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/airticket/AvailabilityHandler.java 2008-07-29 15:17:43 UTC (rev 1751)
+++ jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/airticket/AvailabilityHandler.java 2008-07-29 17:28:54 UTC (rev 1752)
@@ -36,6 +36,7 @@
* @author Thomas.Diesler(a)jboss.com
* @since 04-Jul-2008
*/
+@SuppressWarnings("serial")
public class AvailabilityHandler implements ExecutionHandler
{
public void execute(Token token, InputSet inputSet, OutputSet outputSet)
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 15:17:43 UTC (rev 1751)
+++ jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/parallelsplit/ParallelSplitTest.java 2008-07-29 17:28:54 UTC (rev 1752)
@@ -27,7 +27,6 @@
import java.util.List;
import java.util.concurrent.ExecutionException;
-import org.jboss.bpm.client.ProcessEngineLocator;
import org.jboss.bpm.client.ProcessManager;
import org.jboss.bpm.client.SignalManager;
import org.jboss.bpm.model.Process;
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 15:17:43 UTC (rev 1751)
+++ jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/sequence/BasicSequenceTest.java 2008-07-29 17:28:54 UTC (rev 1752)
@@ -27,7 +27,6 @@
import java.util.List;
import java.util.concurrent.ExecutionException;
-import org.jboss.bpm.client.ProcessEngineLocator;
import org.jboss.bpm.client.ProcessManager;
import org.jboss.bpm.client.SignalManager;
import org.jboss.bpm.model.Process;
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 15:17:43 UTC (rev 1751)
+++ jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/task/BasicTaskTest.java 2008-07-29 17:28:54 UTC (rev 1752)
@@ -27,7 +27,6 @@
import java.util.List;
import java.util.concurrent.ExecutionException;
-import org.jboss.bpm.client.ProcessEngineLocator;
import org.jboss.bpm.client.ProcessManager;
import org.jboss.bpm.client.SignalManager;
import org.jboss.bpm.model.Process;
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-29 15:17:43 UTC (rev 1751)
+++ jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/task/TaskA.java 2008-07-29 17:28:54 UTC (rev 1752)
@@ -37,6 +37,7 @@
* @author Thomas.Diesler(a)jboss.com
* @since 04-Jul-2008
*/
+@SuppressWarnings("serial")
public class TaskA implements ExecutionHandler
{
public void execute(Token token, InputSet inputSet, OutputSet outputSet)
15 years, 9 months
JBoss JBPM SVN: r1751 - in jbpm4/pvm/trunk/modules/core/src: main/java/org/jbpm/pvm/internal/hibernate and 25 other directories.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2008-07-29 11:17:43 -0400 (Tue, 29 Jul 2008)
New Revision: 1751
Added:
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/continuation/
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/continuation/ContinuationTests.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/embedded/
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/embedded/EmbeddedPersistenceTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/timer/
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/util/
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/WireObservableTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/xml/
jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/api/db/continuation/
jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/api/db/embedded/
jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/api/timer/
Removed:
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/continuation/ContinuationNode.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/continuation/ContinuationTest.cfg.xml
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/continuation/ContinuationTest.hbm.xml
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/continuation/JobExecutorTest.cfg.xml
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/embedded/ExecutionTypeTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/embedded/Order.hbm.xml
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/embedded/hibernate.cfg.xml
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/util/WireObservableTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/util/
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/svc/hibernate/
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/svc/jobexecutor/
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/wire/
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/xml/
jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/api/db/continuation/ContinuationTest.hbm.xml
jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/api/db/continuation/JobExecutorTest.cfg.xml
jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/timer/
jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/svc/hibernate/
jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/svc/jobexecutor/
Modified:
jbpm4/pvm/trunk/modules/core/src/docbook/doc-reference/en/modules/ch02-SoftwareLogging.xml
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/hibernate/ExecutionType.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/package.html
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/package.html
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/util/DefaultObservable.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/DbTests.java
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/db/continuation/AutomaticActivity.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/continuation/ContinuationTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/continuation/Recorder.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/continuation/WaitState.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/embedded/Order.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/timer/IncrementCounterWaitState.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/timer/TestTimerSession.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/timer/TestTimerSessionBinding.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/timer/TimerConfiguration.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/timer/TimerIntegrationTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/timer/TimerUnitTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/tx/EnlistTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/util/BooleanArrayTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/AutoWireTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/BasicTypeWireTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/ClassWireTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/ConcurrentWiringTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/ContextBlockSubscriptionTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/ContextTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/DelayedInitTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/DependencyTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/EagerInitTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/EnvWireTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/HibernateSessionFactoryWireTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/ListWireTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/MapWireTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/MethodSubscriptionTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/ObjectSubscriptionTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/ObjectWireTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/PropertiesWireTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/RefWireTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/SetWireTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/SubscriptionTestCase.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/TypeLookupTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/WireEventsSubscriptionTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/WireTestCase.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/WireTests.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/xml/DebugDomBuilderTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/xml/WireParserTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/xml/XmlParsingTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/pvm.wire.bindings.xml
jbpm4/pvm/trunk/modules/core/src/test/resources/logging.properties
jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm.wire.bindings.xml
jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/api/db/continuation/ContinuationTest.cfg.xml
jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/api/db/embedded/Order.hbm.xml
jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/api/db/embedded/hibernate.cfg.xml
jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/api/timer/environment.cfg.xml
Log:
test suite clean up
Modified: jbpm4/pvm/trunk/modules/core/src/docbook/doc-reference/en/modules/ch02-SoftwareLogging.xml
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/docbook/doc-reference/en/modules/ch02-SoftwareLogging.xml 2008-07-29 15:00:31 UTC (rev 1750)
+++ jbpm4/pvm/trunk/modules/core/src/docbook/doc-reference/en/modules/ch02-SoftwareLogging.xml 2008-07-29 15:17:43 UTC (rev 1751)
@@ -51,7 +51,7 @@
.level = SEVERE
org.jbpm.level=FINE
org.jbpm.tx.level=FINE
-org.jbpm.wire.level=FINE</programlisting>
+org.jbpm.pvm.internal.wire.level=FINE</programlisting>
<!--
<para>For production usage, jBPM also includes an error triggered log handler. This is
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/hibernate/ExecutionType.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/hibernate/ExecutionType.java 2008-07-29 15:00:31 UTC (rev 1750)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/hibernate/ExecutionType.java 2008-07-29 15:17:43 UTC (rev 1751)
@@ -41,6 +41,7 @@
String nodeName = rs.getString(names[0]);
NodeImpl node = (NodeImpl) execution.getProcessDefinition().getNode(nodeName);
execution.setNode(node);
+ execution.setState(Execution.STATE_ACTIVE);
return execution;
}
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/package.html
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/package.html 2008-07-29 15:00:31 UTC (rev 1750)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/package.html 2008-07-29 15:17:43 UTC (rev 1751)
@@ -1,4 +1,4 @@
<body>
-each {@link org.jbpm.xml.Binding} class creates a
+each {@link org.jbpm.pvm.internal.xml.Binding} class creates a
wire descriptor from a dom element.
</body>
\ No newline at end of file
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/package.html
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/package.html 2008-07-29 15:00:31 UTC (rev 1750)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/package.html 2008-07-29 15:17:43 UTC (rev 1751)
@@ -1,3 +1,3 @@
<body>
-wire context (aka IoC container), start reading {@link org.jbpm.wire.WireContext}.
+wire context (aka IoC container), start reading {@link org.jbpm.pvm.internal.wire.WireContext}.
</body>
\ No newline at end of file
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/util/DefaultObservable.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/util/DefaultObservable.java 2008-07-29 15:00:31 UTC (rev 1750)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/util/DefaultObservable.java 2008-07-29 15:17:43 UTC (rev 1751)
@@ -67,4 +67,8 @@
}
}
}
+
+ public List<Listener> getListeners() {
+ return listeners;
+ }
}
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 15:00:31 UTC (rev 1750)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/DbTests.java 2008-07-29 15:17:43 UTC (rev 1751)
@@ -24,6 +24,7 @@
import junit.framework.Test;
import junit.framework.TestSuite;
+import org.jbpm.pvm.api.db.continuation.ContinuationTests;
import org.jbpm.pvm.api.db.svc.DbSvcTests;
import org.jbpm.pvm.api.spring.SpringTests;
import org.jbpm.pvm.internal.db.langext.DbLangExtTests;
@@ -43,8 +44,9 @@
suite.addTest(DbLangExtTests.suite());
suite.addTest(DbModelTests.suite());
suite.addTest(DbSvcTests.suite());
+ suite.addTest(SpringTests.suite());
suite.addTest(JobExecutorTests.suite());
- suite.addTest(SpringTests.suite());
+ suite.addTest(ContinuationTests.suite());
//$JUnit-END$
return suite;
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 15:00:31 UTC (rev 1750)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/NonDbTests.java 2008-07-29 15:17:43 UTC (rev 1751)
@@ -26,7 +26,7 @@
import org.jbpm.pvm.api.basicfeatures.BasicFeaturesTests;
import org.jbpm.pvm.api.env.EnvironmentTests;
-import org.jbpm.wire.WireTests;
+import org.jbpm.pvm.internal.wire.WireTests;
/**
Copied: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/continuation (from rev 1741, jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/svc/jobexecutor)
Property changes on: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/continuation
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/continuation/AutomaticActivity.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/svc/jobexecutor/AutomaticActivity.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/continuation/AutomaticActivity.java 2008-07-29 15:17:43 UTC (rev 1751)
@@ -19,8 +19,9 @@
* 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.svc.jobexecutor;
+package org.jbpm.pvm.api.db.continuation;
+import org.jbpm.pvm.activity.Activity;
import org.jbpm.pvm.activity.ActivityExecution;
import org.jbpm.pvm.env.Environment;
@@ -29,7 +30,7 @@
*
* @author Tom Baeyens
*/
-public class AutomaticActivity extends ContinuationNode {
+public class AutomaticActivity implements Activity {
private static final long serialVersionUID = 1L;
Deleted: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/continuation/ContinuationNode.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/svc/jobexecutor/ContinuationNode.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/continuation/ContinuationNode.java 2008-07-29 15:17:43 UTC (rev 1751)
@@ -1,34 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.svc.jobexecutor;
-
-import org.jbpm.pvm.activity.Activity;
-
-/**
- * @author Tom Baeyens
- */
-public abstract class ContinuationNode implements Activity {
-
- protected long dbid;
- protected int dbversion;
-
-}
Deleted: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/continuation/ContinuationTest.cfg.xml
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/svc/jobexecutor/ContinuationTest.cfg.xml 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/continuation/ContinuationTest.cfg.xml 2008-07-29 15:17:43 UTC (rev 1751)
@@ -1,40 +0,0 @@
-<contexts>
-
- <environment-factory>
-
- <object class="org.jbpm.pvm.internal.hibernate.PvmNamingStrategy" auto-wire="true" />
-
- <object class="org.jbpm.svc.jobexecutor.Recorder" />
-
- <hibernate-configuration>
- <properties resource="hibernate.properties" />
- <mappings resource="org/jbpm/pvm/pvm.hibernate.mappings.xml" />
- <mapping resource="org/jbpm/svc/jobexecutor/ContinuationTest.hbm.xml" />
- <cache-configuration resource="org/jbpm/pvm/pvm.cache.xml" usage="nonstrict-read-write" />
- </hibernate-configuration>
-
- <hibernate-session-factory />
-
- <job-executor auto-start="true" />
-
- <command-service>
- <environment-interceptor />
- <transaction-interceptor />
- </command-service>
-
- </environment-factory>
-
- <environment>
-
-<!-- <http-filter-authentication />-->
-
- <transaction />
- <hibernate-session />
-
- <pvm-db-session />
- <message-session />
- <job-db-session />
-
- </environment>
-
-</contexts>
Deleted: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/continuation/ContinuationTest.hbm.xml
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/svc/jobexecutor/ContinuationTest.hbm.xml 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/continuation/ContinuationTest.hbm.xml 2008-07-29 15:17:43 UTC (rev 1751)
@@ -1,23 +0,0 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE hibernate-mapping PUBLIC
- "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
- "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-
-<hibernate-mapping package="org.jbpm.svc.jobexecutor" default-access="field">
-
- <class name="ContinuationNode" abstract="true"
- table="CONTINUATION_TEST_NODES" discriminator-value=" ">
-
- <id name="dbid" column="DBID_">
- <generator class="native" />
- </id>
- <discriminator type="string" />
- <version name="dbversion" column="DBVERSION_" />
-
- <subclass name="AutomaticActivity" discriminator-value="A" />
- <subclass name="WaitState" discriminator-value="W" />
-
- </class>
-
-</hibernate-mapping>
\ No newline at end of file
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/continuation/ContinuationTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/svc/jobexecutor/ContinuationTest.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/continuation/ContinuationTest.java 2008-07-29 15:17:43 UTC (rev 1751)
@@ -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.svc.jobexecutor;
+package org.jbpm.pvm.api.db.continuation;
import java.util.HashSet;
import java.util.Set;
@@ -27,7 +27,6 @@
import java.util.TimerTask;
import org.hibernate.Session;
-import org.jbpm.pvm.test.base.JbpmTestCase;
import org.jbpm.pvm.client.ClientProcessDefinition;
import org.jbpm.pvm.client.ClientProcessInstance;
import org.jbpm.pvm.env.Environment;
@@ -36,11 +35,11 @@
import org.jbpm.pvm.internal.job.JobImpl;
import org.jbpm.pvm.internal.jobexecutor.JobExecutor;
import org.jbpm.pvm.internal.log.Log;
-import org.jbpm.pvm.job.Job;
import org.jbpm.pvm.model.ProcessDefinition;
import org.jbpm.pvm.model.ProcessFactory;
import org.jbpm.pvm.session.DbSession;
import org.jbpm.pvm.session.PvmDbSession;
+import org.jbpm.pvm.test.base.JbpmTestCase;
/**
* @author Tom Baeyens
@@ -55,7 +54,7 @@
int checkInterval = 500;
EnvironmentFactory environmentFactory = new PvmEnvironmentFactory(
- "org/jbpm/svc/jobexecutor/ContinuationTest.cfg.xml"
+ "org/jbpm/pvm/api/db/continuation/ContinuationTest.cfg.xml"
);
Set<Integer> expected = new HashSet<Integer>();
@@ -94,19 +93,19 @@
try {
log.debug("building process 'continuations'");
ProcessDefinition processDefinition = ProcessFactory.build("continuations")
- .node("start").initial().behaviour(new AutomaticActivity())
+ .node("start").initial().behaviour(AutomaticActivity.class)
.asyncExecute()
.transition().to("a")
- .node("a").behaviour(new AutomaticActivity())
+ .node("a").behaviour(AutomaticActivity.class)
.asyncExecute()
.transition().to("b")
- .node("b").behaviour(new AutomaticActivity())
+ .node("b").behaviour(AutomaticActivity.class)
.asyncExecute()
.transition().to("c")
- .node("c").behaviour(new AutomaticActivity())
+ .node("c").behaviour(AutomaticActivity.class)
.asyncExecute()
.transition().to("end")
- .node("end").behaviour(new WaitState())
+ .node("end").behaviour(WaitState.class)
.done();
log.debug("saving process 'continuations'");
Added: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/continuation/ContinuationTests.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/continuation/ContinuationTests.java (rev 0)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/continuation/ContinuationTests.java 2008-07-29 15:17:43 UTC (rev 1751)
@@ -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.jbpm.pvm.api.db.continuation;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class ContinuationTests {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite("Test for org.jbpm.pvm.api.db.continuation");
+ //$JUnit-BEGIN$
+ suite.addTestSuite(ContinuationTest.class);
+ //$JUnit-END$
+ return suite;
+ }
+
+}
Deleted: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/continuation/JobExecutorTest.cfg.xml
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/svc/jobexecutor/JobExecutorTest.cfg.xml 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/continuation/JobExecutorTest.cfg.xml 2008-07-29 15:17:43 UTC (rev 1751)
@@ -1,36 +0,0 @@
-<contexts>
-
- <environment-factory>
-
- <list name="messageNumberCollector" synchronized="true" />
- <object class="org.jbpm.pvm.internal.hibernate.PvmNamingStrategy" auto-wire="true" />
-
- <hibernate-configuration>
- <properties resource="hibernate.properties" />
- <mappings resource="org/jbpm/pvm/pvm.hibernate.mappings.xml" />
- <mapping resource="org/jbpm/svc/jobexecutor/JobExecutorTest.hbm.xml" />
- <cache-configuration resource="org/jbpm/pvm/pvm.cache.xml" usage="nonstrict-read-write" />
- </hibernate-configuration>
-
- <hibernate-session-factory />
-
- <job-executor threads="1" auto-start="true" />
-
- <command-service>
- <environment-interceptor />
- <transaction-interceptor />
- </command-service>
-
- </environment-factory>
-
- <environment>
-
- <transaction />
- <hibernate-session />
- <pvm-db-session />
- <message-session />
- <job-session />
-
- </environment>
-
-</contexts>
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/continuation/Recorder.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/svc/jobexecutor/Recorder.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/continuation/Recorder.java 2008-07-29 15:17:43 UTC (rev 1751)
@@ -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.svc.jobexecutor;
+package org.jbpm.pvm.api.db.continuation;
import java.util.ArrayList;
import java.util.HashMap;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/continuation/WaitState.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/svc/jobexecutor/WaitState.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/continuation/WaitState.java 2008-07-29 15:17:43 UTC (rev 1751)
@@ -19,11 +19,10 @@
* 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.svc.jobexecutor;
+package org.jbpm.pvm.api.db.continuation;
import java.util.Map;
-import org.jbpm.pvm.Execution;
import org.jbpm.pvm.activity.ActivityExecution;
import org.jbpm.pvm.activity.ExternalActivity;
import org.jbpm.pvm.env.Environment;
@@ -31,7 +30,7 @@
/**
* @author Tom Baeyens
*/
-public class WaitState extends ContinuationNode implements ExternalActivity {
+public class WaitState implements ExternalActivity {
private static final long serialVersionUID = 1L;
Copied: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/embedded (from rev 1741, jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/svc/hibernate)
Property changes on: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/embedded
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/embedded/EmbeddedPersistenceTest.java (from rev 1741, jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/svc/hibernate/ExecutionTypeTest.java)
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/embedded/EmbeddedPersistenceTest.java (rev 0)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/embedded/EmbeddedPersistenceTest.java 2008-07-29 15:17:43 UTC (rev 1751)
@@ -0,0 +1,72 @@
+/*
+ * 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.api.db.embedded;
+
+import org.hibernate.Session;
+import org.hibernate.SessionFactory;
+import org.hibernate.Transaction;
+import org.hibernate.cfg.Configuration;
+import org.jbpm.pvm.test.base.JbpmTestCase;
+
+/**
+ * @author Tom Baeyens
+ */
+public class EmbeddedPersistenceTest extends JbpmTestCase {
+
+ public void testOrder() {
+ Configuration configuration = new Configuration();
+ configuration.configure("org/jbpm/pvm/api/db/embedded/hibernate.cfg.xml");
+ SessionFactory sessionFactory = configuration.buildSessionFactory();
+
+ // start transaction
+ Session session = sessionFactory.openSession();
+ Transaction transaction = session.beginTransaction();
+
+ Order order = new Order();
+ session.save(order);
+ assertEquals("child", order.getState().getNode().getName());
+
+ // new transaction
+ transaction.commit();
+ session.close();
+ session = sessionFactory.openSession();
+ transaction = session.beginTransaction();
+
+ order = (Order) session.get(Order.class, order.getDbid());
+ assertEquals("child", order.getState().getNode().getName());
+ order.growUp();
+ assertEquals("adult", order.getState().getNode().getName());
+
+ // new transaction
+ transaction.commit();
+ session.close();
+ session = sessionFactory.openSession();
+ transaction = session.beginTransaction();
+
+ order = (Order) session.get(Order.class, order.getDbid());
+ assertEquals("adult", order.getState().getNode().getName());
+
+ transaction.commit();
+ session.close();
+ }
+
+}
Property changes on: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/embedded/EmbeddedPersistenceTest.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Deleted: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/embedded/ExecutionTypeTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/svc/hibernate/ExecutionTypeTest.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/embedded/ExecutionTypeTest.java 2008-07-29 15:17:43 UTC (rev 1751)
@@ -1,73 +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.svc.hibernate;
-
-import org.hibernate.Session;
-import org.hibernate.SessionFactory;
-import org.hibernate.Transaction;
-import org.hibernate.cfg.Configuration;
-import org.jbpm.pvm.test.base.JbpmTestCase;
-
-/**
- * @author Tom Baeyens
- */
-public class ExecutionTypeTest extends JbpmTestCase
-{
-
- public void testOrder() {
- Configuration configuration = new Configuration();
- configuration.configure("org/jbpm/svc/hibernate/hibernate.cfg.xml");
- SessionFactory sessionFactory = configuration.buildSessionFactory();
-
- // start transaction
- Session session = sessionFactory.openSession();
- Transaction transaction = session.beginTransaction();
-
- Order order = new Order();
- session.save(order);
- assertEquals("child", order.getState().getNode().getName());
-
- // new transaction
- transaction.commit();
- session.close();
- session = sessionFactory.openSession();
- transaction = session.beginTransaction();
-
- order = (Order) session.get(Order.class, order.getDbid());
- assertEquals("child", order.getState().getNode().getName());
- order.growUp();
- assertEquals("adult", order.getState().getNode().getName());
-
- // new transaction
- transaction.commit();
- session.close();
- session = sessionFactory.openSession();
- transaction = session.beginTransaction();
-
- order = (Order) session.get(Order.class, order.getDbid());
- assertEquals("adult", order.getState().getNode().getName());
-
- transaction.commit();
- session.close();
- }
-
-}
Deleted: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/embedded/Order.hbm.xml
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/svc/hibernate/Order.hbm.xml 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/embedded/Order.hbm.xml 2008-07-29 15:17:43 UTC (rev 1751)
@@ -1,18 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-
-<hibernate-mapping package="org.jbpm.svc.hibernate" default-access="field">
-
- <typedef name="execution" class="org.jbpm.pvm.client.ClientProcessInstance" />
-
- <class name="Order" table="ORDERS">
-
- <id name="dbid">
- <generator class="sequence"/>
- </id>
-
- <property name="state" type="execution" />
-
- </class>
-
-</hibernate-mapping>
\ No newline at end of file
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/embedded/Order.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/svc/hibernate/Order.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/embedded/Order.java 2008-07-29 15:17:43 UTC (rev 1751)
@@ -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.svc.hibernate;
+package org.jbpm.pvm.api.db.embedded;
import org.jbpm.pvm.client.ClientProcessDefinition;
@@ -52,15 +52,15 @@
private static ClientProcessDefinition createProcessDefinition() {
ClientProcessDefinition processDefinition = ProcessFactory.build("the meaning of life")
.node("child").initial().behaviour(WaitState.class)
- .transition("grow up").to("adult")
+ .transition("grow up").to("adult")
.node("adult").behaviour(new WaitState())
- .transition("find a jobImpl").to("employee")
+ .transition("find a jobImpl").to("employee")
.node("employee").behaviour(new WaitState())
- .transition("wrinkles").to("retired")
+ .transition("wrinkles").to("retired")
.node("retired").behaviour(new WaitState())
- .transition("had enough").to("dead")
+ .transition("had enough").to("dead")
.node("dead")
- .done();
+ .done();
return processDefinition;
}
Deleted: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/embedded/hibernate.cfg.xml
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/svc/hibernate/hibernate.cfg.xml 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/embedded/hibernate.cfg.xml 2008-07-29 15:17:43 UTC (rev 1751)
@@ -1,23 +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="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
- <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
- <property name="hibernate.connection.url">jdbc:hsqldb:mem:.</property>
- <property name="hibernate.connection.username">sa</property>
- <property name="hibernate.connection.password"></property>
- <property name="hibernate.hbm2ddl.auto">create</property>
- <property name="hibernate.show_sql">true"</property>
- <property name="hibernate.format_sql">true"</property>
- <property name="hibernate.use_sql_comments">true"</property>
-
- <mapping resource="org/jbpm/svc/hibernate/Order.hbm.xml"/>
-
- </session-factory>
-</hibernate-configuration>
Copied: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/timer (from rev 1741, jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer)
Property changes on: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/timer
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/timer/IncrementCounterWaitState.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/IncrementCounterWaitState.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/timer/IncrementCounterWaitState.java 2008-07-29 15:17:43 UTC (rev 1751)
@@ -11,7 +11,7 @@
* 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;
+package org.jbpm.pvm.api.timer;
import java.util.Map;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/timer/TestTimerSession.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/TestTimerSession.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/timer/TestTimerSession.java 2008-07-29 15:17:43 UTC (rev 1751)
@@ -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.timer;
+package org.jbpm.pvm.api.timer;
import java.util.ArrayList;
import java.util.Date;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/timer/TestTimerSessionBinding.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/TestTimerSessionBinding.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/timer/TestTimerSessionBinding.java 2008-07-29 15:17:43 UTC (rev 1751)
@@ -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.timer;
+package org.jbpm.pvm.api.timer;
import org.jbpm.pvm.internal.util.TagBinding;
import org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/timer/TimerConfiguration.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/TimerConfiguration.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/timer/TimerConfiguration.java 2008-07-29 15:17:43 UTC (rev 1751)
@@ -1,4 +1,4 @@
- package org.jbpm.pvm.timer;
+ package org.jbpm.pvm.api.timer;
import org.jbpm.pvm.ExecutionService;
import org.jbpm.pvm.ManagementService;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/timer/TimerIntegrationTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/TimerIntegrationTest.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/timer/TimerIntegrationTest.java 2008-07-29 15:17:43 UTC (rev 1751)
@@ -11,7 +11,7 @@
* 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;
+package org.jbpm.pvm.api.timer;
import java.util.Date;
import java.util.List;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/timer/TimerUnitTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/TimerUnitTest.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/timer/TimerUnitTest.java 2008-07-29 15:17:43 UTC (rev 1751)
@@ -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.timer;
+package org.jbpm.pvm.api.timer;
import java.util.Date;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/tx/EnlistTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/tx/EnlistTest.java 2008-07-29 15:00:31 UTC (rev 1750)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/tx/EnlistTest.java 2008-07-29 15:17:43 UTC (rev 1751)
@@ -9,7 +9,7 @@
import org.jbpm.pvm.internal.tx.StandardTransaction;
import org.jbpm.pvm.internal.wire.WireContext;
import org.jbpm.pvm.internal.wire.WireException;
-import org.jbpm.wire.WireTestCase;
+import org.jbpm.pvm.internal.wire.WireTestCase;
/**
* @author Guillaume Porcher
Copied: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/util (from rev 1741, jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/util)
Property changes on: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/util
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/util/BooleanArrayTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/util/BooleanArrayTest.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/util/BooleanArrayTest.java 2008-07-29 15:17:43 UTC (rev 1751)
@@ -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.util;
+package org.jbpm.pvm.internal.util;
import org.jbpm.pvm.test.base.JbpmTestCase;
import org.jbpm.pvm.internal.util.BooleanArray;
Deleted: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/util/WireObservableTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/util/WireObservableTest.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/util/WireObservableTest.java 2008-07-29 15:17:43 UTC (rev 1751)
@@ -1,81 +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.pvm.util;
-
-import java.util.List;
-
-import org.jbpm.pvm.test.base.JbpmTestCase;
-import org.jbpm.pvm.env.Environment;
-import org.jbpm.pvm.env.EnvironmentFactory;
-import org.jbpm.pvm.env.PvmEnvironmentFactory;
-import org.jbpm.pvm.internal.env.DefaultEnvironment;
-import org.jbpm.pvm.internal.wire.WireContext;
-
-/**
- * @author Tom Baeyens
- */
-public class WireObservableTest extends JbpmTestCase
-{
-
- public static class Recorder implements Listener {
- public void event(Object source, String eventName, Object info) {
- }
- }
-
- public void testSubscription() {
- // <subscribe /> will use the scope as the observable
- // In this test, there is no eager initialisation
-
- EnvironmentFactory environmentFactory = PvmEnvironmentFactory.parseXmlString(
- "<environment-scopes>" +
- " <environment-factory />" +
- " <environment>" +
- " <object name='recorder' class='"+Recorder.class.getName()+"'>" +
- " <subscribe />" +
- " </object>" +
- " </environment>" +
- "</environment-scopes>"
- );
-
- Environment environment = environmentFactory.openEnvironment();
- try {
- WireContext environmentContext = (WireContext) environment.getContext(DefaultEnvironment.CONTEXTNAME_ENVIRONMENT);
-
- // this test also checks non-eager-initialized subscription
- // subscription should only be done when the object is created the first time
- List<Listener> listeners = environmentContext.listeners;
- int beforeListenersSize = (listeners!=null ? listeners.size() : 0);
-
- assertNotNull(environment.get("recorder"));
-
- listeners = environmentContext.listeners;
- int afterListenersSize = (listeners!=null ? listeners.size() : 0);
- int addedListeners = afterListenersSize - beforeListenersSize;
- assertEquals(1, addedListeners);
-
-
- } finally {
- environment.close();
- }
- environmentFactory.close();
- }
-}
Copied: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire (from rev 1741, jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/wire)
Property changes on: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/AutoWireTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/wire/AutoWireTest.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/AutoWireTest.java 2008-07-29 15:17:43 UTC (rev 1751)
@@ -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.wire;
+package org.jbpm.pvm.internal.wire;
import java.util.List;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/BasicTypeWireTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/wire/BasicTypeWireTest.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/BasicTypeWireTest.java 2008-07-29 15:17:43 UTC (rev 1751)
@@ -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.wire;
+package org.jbpm.pvm.internal.wire;
import java.util.List;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/ClassWireTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/wire/ClassWireTest.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/ClassWireTest.java 2008-07-29 15:17:43 UTC (rev 1751)
@@ -1,4 +1,4 @@
-package org.jbpm.wire;
+package org.jbpm.pvm.internal.wire;
import java.util.List;
@@ -20,7 +20,7 @@
public void testClass(){
WireContext wireContext = createWireContext(
"<objects>" +
- " <class name='o' class-name='org.jbpm.wire.ClassWireTest' />" +
+ " <class name='o' class-name='"+ClassWireTest.class.getName()+"' />" +
"</objects>"
);
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/ConcurrentWiringTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/wire/ConcurrentWiringTest.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/ConcurrentWiringTest.java 2008-07-29 15:17:43 UTC (rev 1751)
@@ -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.wire;
+package org.jbpm.pvm.internal.wire;
import java.util.ArrayList;
import java.util.List;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/ContextBlockSubscriptionTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/wire/ContextBlockSubscriptionTest.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/ContextBlockSubscriptionTest.java 2008-07-29 15:17:43 UTC (rev 1751)
@@ -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.wire;
+package org.jbpm.pvm.internal.wire;
import org.jbpm.pvm.env.Environment;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/ContextTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/wire/ContextTest.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/ContextTest.java 2008-07-29 15:17:43 UTC (rev 1751)
@@ -11,7 +11,7 @@
* program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301, USA.
**/
-package org.jbpm.wire;
+package org.jbpm.pvm.internal.wire;
import java.util.HashSet;
import java.util.Set;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/DelayedInitTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/wire/DelayedInitTest.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/DelayedInitTest.java 2008-07-29 15:17:43 UTC (rev 1751)
@@ -1,4 +1,4 @@
-package org.jbpm.wire;
+package org.jbpm.pvm.internal.wire;
import java.util.List;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/DependencyTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/wire/DependencyTest.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/DependencyTest.java 2008-07-29 15:17:43 UTC (rev 1751)
@@ -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.wire;
+package org.jbpm.pvm.internal.wire;
import org.jbpm.pvm.internal.wire.WireContext;
import org.jbpm.pvm.internal.wire.WireException;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/EagerInitTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/wire/EagerInitTest.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/EagerInitTest.java 2008-07-29 15:17:43 UTC (rev 1751)
@@ -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.wire;
+package org.jbpm.pvm.internal.wire;
import java.util.ArrayList;
import java.util.List;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/EnvWireTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/wire/EnvWireTest.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/EnvWireTest.java 2008-07-29 15:17:43 UTC (rev 1751)
@@ -1,4 +1,4 @@
-package org.jbpm.wire;
+package org.jbpm.pvm.internal.wire;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.env.EnvironmentFactory;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/HibernateSessionFactoryWireTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/wire/HibernateSessionFactoryWireTest.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/HibernateSessionFactoryWireTest.java 2008-07-29 15:17:43 UTC (rev 1751)
@@ -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.wire;
+package org.jbpm.pvm.internal.wire;
import org.hibernate.SessionFactory;
import org.jbpm.pvm.internal.wire.WireContext;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/ListWireTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/wire/ListWireTest.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/ListWireTest.java 2008-07-29 15:17:43 UTC (rev 1751)
@@ -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.wire;
+package org.jbpm.pvm.internal.wire;
import java.util.ArrayList;
import java.util.HashSet;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/MapWireTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/wire/MapWireTest.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/MapWireTest.java 2008-07-29 15:17:43 UTC (rev 1751)
@@ -1,4 +1,4 @@
-package org.jbpm.wire;
+package org.jbpm.pvm.internal.wire;
import java.util.List;
import java.util.Map;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/MethodSubscriptionTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/wire/MethodSubscriptionTest.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/MethodSubscriptionTest.java 2008-07-29 15:17:43 UTC (rev 1751)
@@ -1,4 +1,4 @@
-package org.jbpm.wire;
+package org.jbpm.pvm.internal.wire;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.env.EnvironmentFactory;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/ObjectSubscriptionTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/wire/ObjectSubscriptionTest.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/ObjectSubscriptionTest.java 2008-07-29 15:17:43 UTC (rev 1751)
@@ -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.wire;
+package org.jbpm.pvm.internal.wire;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.env.EnvironmentFactory;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/ObjectWireTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/wire/ObjectWireTest.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/ObjectWireTest.java 2008-07-29 15:17:43 UTC (rev 1751)
@@ -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.wire;
+package org.jbpm.pvm.internal.wire;
import java.util.List;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/PropertiesWireTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/wire/PropertiesWireTest.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/PropertiesWireTest.java 2008-07-29 15:17:43 UTC (rev 1751)
@@ -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.wire;
+package org.jbpm.pvm.internal.wire;
import java.util.List;
import java.util.Properties;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/RefWireTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/wire/RefWireTest.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/RefWireTest.java 2008-07-29 15:17:43 UTC (rev 1751)
@@ -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.wire;
+package org.jbpm.pvm.internal.wire;
import java.util.List;
import java.util.Map;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/SetWireTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/wire/SetWireTest.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/SetWireTest.java 2008-07-29 15:17:43 UTC (rev 1751)
@@ -1,4 +1,4 @@
-package org.jbpm.wire;
+package org.jbpm.pvm.internal.wire;
import java.util.List;
import java.util.Set;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/SubscriptionTestCase.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/wire/SubscriptionTestCase.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/SubscriptionTestCase.java 2008-07-29 15:17:43 UTC (rev 1751)
@@ -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.wire;
+package org.jbpm.pvm.internal.wire;
import java.util.ArrayList;
import java.util.List;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/TypeLookupTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/wire/TypeLookupTest.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/TypeLookupTest.java 2008-07-29 15:17:43 UTC (rev 1751)
@@ -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.wire;
+package org.jbpm.pvm.internal.wire;
import org.jbpm.pvm.internal.wire.WireContext;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/WireEventsSubscriptionTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/wire/WireEventsSubscriptionTest.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/WireEventsSubscriptionTest.java 2008-07-29 15:17:43 UTC (rev 1751)
@@ -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.wire;
+package org.jbpm.pvm.internal.wire;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.env.EnvironmentFactory;
Copied: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/WireObservableTest.java (from rev 1741, jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/util/WireObservableTest.java)
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/WireObservableTest.java (rev 0)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/WireObservableTest.java 2008-07-29 15:17:43 UTC (rev 1751)
@@ -0,0 +1,82 @@
+/*
+ * 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.internal.wire;
+
+import java.util.List;
+
+import org.jbpm.pvm.test.base.JbpmTestCase;
+import org.jbpm.pvm.util.Listener;
+import org.jbpm.pvm.env.Environment;
+import org.jbpm.pvm.env.EnvironmentFactory;
+import org.jbpm.pvm.env.PvmEnvironmentFactory;
+import org.jbpm.pvm.internal.env.DefaultEnvironment;
+import org.jbpm.pvm.internal.wire.WireContext;
+
+/**
+ * @author Tom Baeyens
+ */
+public class WireObservableTest extends JbpmTestCase
+{
+
+ public static class Recorder implements Listener {
+ public void event(Object source, String eventName, Object info) {
+ }
+ }
+
+ public void testSubscription() {
+ // <subscribe /> will use the scope as the observable
+ // In this test, there is no eager initialisation
+
+ EnvironmentFactory environmentFactory = PvmEnvironmentFactory.parseXmlString(
+ "<environment-scopes>" +
+ " <environment-factory />" +
+ " <environment>" +
+ " <object name='recorder' class='"+Recorder.class.getName()+"'>" +
+ " <subscribe />" +
+ " </object>" +
+ " </environment>" +
+ "</environment-scopes>"
+ );
+
+ Environment environment = environmentFactory.openEnvironment();
+ try {
+ WireContext environmentContext = (WireContext) environment.getContext(DefaultEnvironment.CONTEXTNAME_ENVIRONMENT);
+
+ // this test also checks non-eager-initialized subscription
+ // subscription should only be done when the object is created the first time
+ List<Listener> listeners = environmentContext.getListeners();
+ int beforeListenersSize = (listeners!=null ? listeners.size() : 0);
+
+ assertNotNull(environment.get("recorder"));
+
+ listeners = environmentContext.getListeners();
+ int afterListenersSize = (listeners!=null ? listeners.size() : 0);
+ int addedListeners = afterListenersSize - beforeListenersSize;
+ assertEquals(1, addedListeners);
+
+
+ } finally {
+ environment.close();
+ }
+ environmentFactory.close();
+ }
+}
Property changes on: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/WireObservableTest.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/WireTestCase.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/wire/WireTestCase.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/WireTestCase.java 2008-07-29 15:17:43 UTC (rev 1751)
@@ -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.wire;
+package org.jbpm.pvm.internal.wire;
import java.util.List;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/WireTests.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/wire/WireTests.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/WireTests.java 2008-07-29 15:17:43 UTC (rev 1751)
@@ -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.wire;
+package org.jbpm.pvm.internal.wire;
import junit.framework.Test;
import junit.framework.TestSuite;
@@ -54,6 +54,7 @@
suite.addTestSuite(SetWireTest.class);
suite.addTestSuite(TypeLookupTest.class);
suite.addTestSuite(WireEventsSubscriptionTest.class);
+ suite.addTestSuite(WireObservableTest.class);
//$JUnit-END$
return suite;
}
Copied: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/xml (from rev 1741, jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/xml)
Property changes on: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/xml
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/xml/DebugDomBuilderTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/xml/DebugDomBuilderTest.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/xml/DebugDomBuilderTest.java 2008-07-29 15:17:43 UTC (rev 1751)
@@ -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.xml;
+package org.jbpm.pvm.internal.xml;
import java.io.InputStream;
import java.util.List;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/xml/WireParserTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/xml/WireParserTest.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/xml/WireParserTest.java 2008-07-29 15:17:43 UTC (rev 1751)
@@ -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.xml;
+package org.jbpm.pvm.internal.xml;
import org.jbpm.pvm.test.base.JbpmTestCase;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/xml/XmlParsingTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/xml/XmlParsingTest.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/xml/XmlParsingTest.java 2008-07-29 15:17:43 UTC (rev 1751)
@@ -1,4 +1,4 @@
-package org.jbpm.xml;
+package org.jbpm.pvm.internal.xml;
import java.util.ArrayList;
import java.util.List;
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-29 15:00:31 UTC (rev 1750)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/pvm.wire.bindings.xml 2008-07-29 15:17:43 UTC (rev 1751)
@@ -1,5 +1,5 @@
<wire-bindings>
- <binding class="org.jbpm.pvm.timer.TestTimerSessionBinding" />
+ <binding class="org.jbpm.pvm.api.timer.TestTimerSessionBinding" />
</wire-bindings>
Modified: jbpm4/pvm/trunk/modules/core/src/test/resources/logging.properties
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/resources/logging.properties 2008-07-29 15:00:31 UTC (rev 1750)
+++ jbpm4/pvm/trunk/modules/core/src/test/resources/logging.properties 2008-07-29 15:17:43 UTC (rev 1751)
@@ -17,7 +17,7 @@
org.jbpm.level=FINE
org.jbpm.pvm.internal.tx.level=FINE
org.jbpm.pvm.internal.wire.level=FINE
-org.jbpm.pvm.util.level=FINE
+org.jbpm.pvm.internal.util.level=FINE
org.hibernate.cfg.HbmBinder.level=SEVERE
org.hibernate.cfg.SettingsFactory.level=SEVERE
Copied: jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/api/db/continuation (from rev 1741, jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/svc/jobexecutor)
Property changes on: jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/api/db/continuation
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/api/db/continuation/ContinuationTest.cfg.xml
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/svc/jobexecutor/ContinuationTest.cfg.xml 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/api/db/continuation/ContinuationTest.cfg.xml 2008-07-29 15:17:43 UTC (rev 1751)
@@ -4,12 +4,11 @@
<object class="org.jbpm.pvm.internal.hibernate.PvmNamingStrategy" auto-wire="true" />
- <object class="org.jbpm.svc.jobexecutor.Recorder" />
+ <object class="org.jbpm.pvm.api.db.continuation.Recorder" />
<hibernate-configuration>
<properties resource="hibernate.properties" />
<mappings resource="org/jbpm/pvm/pvm.hibernate.mappings.xml" />
- <mapping resource="org/jbpm/svc/jobexecutor/ContinuationTest.hbm.xml" />
<cache-configuration resource="org/jbpm/pvm/pvm.cache.xml" usage="nonstrict-read-write" />
</hibernate-configuration>
@@ -25,15 +24,13 @@
</environment-factory>
<environment>
-
-<!-- <http-filter-authentication />-->
<transaction />
<hibernate-session />
+ <message-session />
<pvm-db-session />
- <message-session />
- <job-session />
+ <job-db-session />
</environment>
Deleted: jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/api/db/continuation/ContinuationTest.hbm.xml
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/svc/jobexecutor/ContinuationTest.hbm.xml 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/api/db/continuation/ContinuationTest.hbm.xml 2008-07-29 15:17:43 UTC (rev 1751)
@@ -1,23 +0,0 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE hibernate-mapping PUBLIC
- "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
- "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-
-<hibernate-mapping package="org.jbpm.svc.jobexecutor" default-access="field">
-
- <class name="ContinuationNode" abstract="true"
- table="CONTINUATION_TEST_NODES" discriminator-value=" ">
-
- <id name="dbid" column="DBID_">
- <generator class="native" />
- </id>
- <discriminator type="string" />
- <version name="dbversion" column="DBVERSION_" />
-
- <subclass name="AutomaticActivity" extends="org.jbpm.pvm.NodeBehaviour" discriminator-value="A" />
- <subclass name="WaitState" extends="org.jbpm.pvm.NodeBehaviour" discriminator-value="W" />
-
- </class>
-
-</hibernate-mapping>
\ No newline at end of file
Deleted: jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/api/db/continuation/JobExecutorTest.cfg.xml
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/svc/jobexecutor/JobExecutorTest.cfg.xml 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/api/db/continuation/JobExecutorTest.cfg.xml 2008-07-29 15:17:43 UTC (rev 1751)
@@ -1,36 +0,0 @@
-<contexts>
-
- <environment-factory>
-
- <list name="messageNumberCollector" synchronized="true" />
- <object class="org.jbpm.pvm.internal.hibernate.PvmNamingStrategy" auto-wire="true" />
-
- <hibernate-configuration>
- <properties resource="hibernate.properties" />
- <mappings resource="org/jbpm/pvm/pvm.hibernate.mappings.xml" />
- <mapping resource="org/jbpm/svc/jobexecutor/JobExecutorTest.hbm.xml" />
- <cache-configuration resource="org/jbpm/pvm/pvm.cache.xml" usage="nonstrict-read-write" />
- </hibernate-configuration>
-
- <hibernate-session-factory />
-
- <job-executor threads="1" auto-start="true" />
-
- <command-service>
- <environment-interceptor />
- <transaction-interceptor />
- </command-service>
-
- </environment-factory>
-
- <environment>
-
- <transaction />
- <hibernate-session />
- <pvm-db-session />
- <message-session />
- <job-session />
-
- </environment>
-
-</contexts>
Copied: jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/api/db/embedded (from rev 1741, jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/svc/hibernate)
Property changes on: jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/api/db/embedded
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/api/db/embedded/Order.hbm.xml
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/svc/hibernate/Order.hbm.xml 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/api/db/embedded/Order.hbm.xml 2008-07-29 15:17:43 UTC (rev 1751)
@@ -1,9 +1,9 @@
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping package="org.jbpm.svc.hibernate" default-access="field">
+<hibernate-mapping package="org.jbpm.pvm.api.db.embedded" default-access="field">
- <typedef name="execution" class="org.jbpm.svc.hibernate.ExecutionType" />
+ <typedef name="execution" class="org.jbpm.pvm.internal.hibernate.ExecutionType" />
<class name="Order" table="ORDERS">
Modified: jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/api/db/embedded/hibernate.cfg.xml
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/svc/hibernate/hibernate.cfg.xml 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/api/db/embedded/hibernate.cfg.xml 2008-07-29 15:17:43 UTC (rev 1751)
@@ -17,7 +17,7 @@
<property name="hibernate.format_sql">true"</property>
<property name="hibernate.use_sql_comments">true"</property>
- <mapping resource="org/jbpm/svc/hibernate/Order.hbm.xml"/>
+ <mapping resource="org/jbpm/pvm/api/db/embedded/Order.hbm.xml"/>
</session-factory>
</hibernate-configuration>
Copied: jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/api/timer (from rev 1741, jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/timer)
Property changes on: jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/api/timer
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/api/timer/environment.cfg.xml
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/timer/environment.cfg.xml 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/api/timer/environment.cfg.xml 2008-07-29 15:17:43 UTC (rev 1751)
@@ -7,6 +7,8 @@
<job-test-helper />
<process-service />
+ <execution-service />
+ <management-service />
<command-service>
<retry-interceptor />
Modified: jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm.wire.bindings.xml
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm.wire.bindings.xml 2008-07-29 15:00:31 UTC (rev 1750)
+++ jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm.wire.bindings.xml 2008-07-29 15:17:43 UTC (rev 1751)
@@ -1,5 +1,5 @@
<wire-bindings>
- <binding class="org.jbpm.pvm.timer.TestTimerSessionBinding" />
+ <binding class="org.jbpm.pvm.api.timer.TestTimerSessionBinding" />
</wire-bindings>
15 years, 9 months
JBoss JBPM SVN: r1750 - jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/airticket.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-07-29 11:00:31 -0400 (Tue, 29 Jul 2008)
New Revision: 1750
Added:
jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/airticket/AirticketProcessBuilder.java
Modified:
jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/airticket/AirticketTest.java
Log:
Externalize process builder
Added: jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/airticket/AirticketProcessBuilder.java
===================================================================
--- jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/airticket/AirticketProcessBuilder.java (rev 0)
+++ jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/airticket/AirticketProcessBuilder.java 2008-07-29 15:00:31 UTC (rev 1750)
@@ -0,0 +1,194 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.samples.airticket;
+
+// $Id$
+
+import javax.management.ObjectName;
+
+import org.jboss.bpm.client.ProcessManager;
+import org.jboss.bpm.model.GatewayBuilder;
+import org.jboss.bpm.model.Process;
+import org.jboss.bpm.model.ProcessBuilder;
+import org.jboss.bpm.model.ProcessBuilderFactory;
+import org.jboss.bpm.model.TaskBuilder;
+import org.jboss.bpm.model.Expression.ExpressionLanguage;
+import org.jboss.bpm.model.Gateway.GatewayType;
+import org.jboss.bpm.model.Task.TaskType;
+
+/**
+ * Test the Airticket sample application
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 03-Jul-2008
+ */
+public class AirticketProcessBuilder
+{
+ private ObjectName messageListenerID;
+
+ public AirticketProcessBuilder(ObjectName listenerID)
+ {
+ this.messageListenerID = listenerID;
+ }
+
+ public Process buildProcess()
+ {
+ // Create a Process through the ProcessBuilder
+ ProcessBuilderFactory procFactory = ProcessBuilderFactory.newInstance();
+ ProcessBuilder procBuilder = procFactory.newProcessBuilder();
+ procBuilder.addProcess("Airticket").addStartEvent().addSequenceFlow("ReceiveReqTask");
+
+ // Build the ReceiveReqTask
+ TaskBuilder taskBuilder = procBuilder.addTask("ReceiveReqTask", TaskType.Receive);
+ 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 ValidateTask
+ taskBuilder = procBuilder.addTask("ValidateTask", TaskType.None);
+ taskBuilder.addInputSet().
+ addPropertyInput("Name", null).
+ addPropertyInput("From", null).
+ addPropertyInput("To", null).
+ addPropertyInput("Date", null).
+ addPropertyInput("Seats", null).
+ addOutputSet().
+ addPropertyOutput("isReqDataValid", null).
+ addIORule("Name != null && From != null && To != null && Date != null && Seats > 0", ExpressionLanguage.MVEL).
+ addSequenceFlow("ValidateGateway");
+
+ // Build the ValidateGateway
+ GatewayBuilder gatewayBuilder = procBuilder.addGateway("ValidateGateway", GatewayType.Exclusive);
+ gatewayBuilder.addConditionalGate("CheckAvailabilityTask", ExpressionLanguage.MVEL, "isReqDataValid == true").
+ addDefaultGate("SendInvalidTask");
+
+ // Build the CheckAvailabilityTask
+ taskBuilder = procBuilder.addTask("CheckAvailabilityTask", TaskType.None);
+ taskBuilder.addExecutionHandler(AvailabilityHandler.class).
+ addInputSet().
+ addPropertyInput("From", null).
+ addPropertyInput("To", null).
+ addPropertyInput("Date", null).
+ addPropertyInput("Seats", null).
+ addOutputSet().
+ addPropertyOutput("isAvailable", null).
+ addPropertyOutput("Price", null).
+ addSequenceFlow("AvailabilityGateway");
+
+ // Build the SendInvalidTask
+ taskBuilder = procBuilder.addTask("SendInvalidTask", TaskType.Send);
+ taskBuilder.addMessageRef("InvalidDataMsg", messageListenerID).
+ addMessageProperty("Name", null, true).
+ addMessageProperty("From", null, true).
+ addMessageProperty("To", null, true).
+ addMessageProperty("Date", null, true).
+ addMessageProperty("Seats", null, true).
+ addSequenceFlow("ReceiveReqTask");
+
+ // Build the AvailabilityGateway
+ gatewayBuilder = procBuilder.addGateway("AvailabilityGateway", GatewayType.Exclusive);
+ gatewayBuilder.addConditionalGate("SendOfferTask", ExpressionLanguage.MVEL, "isAvailable == true").
+ addDefaultGate("SendNotAvailableTask");
+
+ // Build the SendOfferTask
+ taskBuilder = procBuilder.addTask("SendOfferTask", TaskType.Send);
+ taskBuilder.addMessageRef("OfferMsg", messageListenerID).
+ addMessageProperty("Name", null, true).
+ addMessageProperty("From", null, true).
+ addMessageProperty("To", null, true).
+ addMessageProperty("Date", null, true).
+ addMessageProperty("Seats", null, true).
+ addMessageProperty("Price", null, true).
+ addSequenceFlow("ReceiveOrderTask");
+
+ // Build the SendNotAvailableTask
+ taskBuilder = procBuilder.addTask("SendNotAvailableTask", TaskType.Send);
+ taskBuilder.addMessageRef("NotAvailableMsg", messageListenerID).
+ addMessageProperty("Name", null, true).
+ addMessageProperty("From", null, true).
+ addMessageProperty("To", null, true).
+ addMessageProperty("Date", null, true).
+ addMessageProperty("Seats", null, true).
+ addSequenceFlow("ReceiveReqTask");
+
+ // Build the ReceiveReqTask
+ taskBuilder = procBuilder.addTask("ReceiveOrderTask", TaskType.Receive);
+ taskBuilder.addMessageRef("AcceptOfferMsg", null).
+ addMessageProperty("CreditCard", null, true).
+ addMessageProperty("Expire", null, true).
+ addMessageProperty("isOfferAccepted", null, true).
+ addSequenceFlow("AcceptOfferGateway");
+
+ // Build the AcceptOfferGateway
+ gatewayBuilder = procBuilder.addGateway("AcceptOfferGateway", GatewayType.Exclusive);
+ gatewayBuilder.addConditionalGate("ParallelSplitGateway", ExpressionLanguage.MVEL, "isOfferAccepted == true").
+ addDefaultGate("ReceiveReqTask");
+
+ // Build the AcceptOfferGateway
+ gatewayBuilder = procBuilder.addGateway("ParallelSplitGateway", GatewayType.Parallel);
+ gatewayBuilder.addGate("CreditCardTask").
+ addGate("BookingTask");
+
+ // Build the CreditCardTask
+ taskBuilder = procBuilder.addTask("CreditCardTask", TaskType.None);
+ taskBuilder.addInputSet().
+ addPropertyInput("CreditCard", null).
+ addPropertyInput("Expire", null).
+ addPropertyInput("Price", null).
+ addSequenceFlow("SynchronizedJoinGateway");
+
+ // Build the BookingTask
+ taskBuilder = procBuilder.addTask("BookingTask", TaskType.None);
+ taskBuilder.addInputSet().
+ addPropertyInput("Name", null).
+ addPropertyInput("From", null).
+ addPropertyInput("To", null).
+ addPropertyInput("Date", null).
+ addPropertyInput("Seats", null).
+ addSequenceFlow("SynchronizedJoinGateway");
+
+ // Build the SynchronizedJoinGateway
+ gatewayBuilder = procBuilder.addGateway("SynchronizedJoinGateway", GatewayType.Parallel);
+ gatewayBuilder.addGate("SendConfirmTask");
+
+ // Build the SendConfirmTask
+ taskBuilder = procBuilder.addTask("SendConfirmTask", TaskType.Send);
+ taskBuilder.addMessageRef("ConfirmMsg", messageListenerID).
+ addMessageProperty("Name", null, true).
+ addMessageProperty("From", null, true).
+ addMessageProperty("To", null, true).
+ addMessageProperty("Date", null, true).
+ addMessageProperty("Seats", null, true).
+ addMessageProperty("Price", null, true).
+ addSequenceFlow("End");
+
+ // Add the EndEvent
+ Process proc = procBuilder.addEndEvent("End").getProcess();
+ ProcessManager pm = ProcessManager.locateProcessManager();
+ pm.registerProcess(proc);
+ return proc;
+ }
+}
\ No newline at end of file
Property changes on: jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/airticket/AirticketProcessBuilder.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
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 14:55:18 UTC (rev 1749)
+++ jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/airticket/AirticketTest.java 2008-07-29 15:00:31 UTC (rev 1750)
@@ -32,18 +32,11 @@
import org.jboss.bpm.client.ProcessManager;
import org.jboss.bpm.client.SignalListener;
import org.jboss.bpm.client.SignalManager;
-import org.jboss.bpm.model.GatewayBuilder;
import org.jboss.bpm.model.Message;
import org.jboss.bpm.model.MessageBuilder;
import org.jboss.bpm.model.MessageBuilderFactory;
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.TaskBuilder;
-import org.jboss.bpm.model.Expression.ExpressionLanguage;
-import org.jboss.bpm.model.Gateway.GatewayType;
-import org.jboss.bpm.model.Task.TaskType;
import org.jboss.bpm.test.DefaultEngineTestCase;
/**
@@ -120,7 +113,8 @@
public void testValidRequest() throws Exception
{
- final Process proc = buildDynamicProcess();
+ AirticketProcessBuilder builder = new AirticketProcessBuilder(getMessageListenerID());
+ Process proc = builder.buildProcess();
proc.startProcess();
ObjectName listenerID = getMessageListenerID();
@@ -139,7 +133,8 @@
public void testInvalidRequest() throws Exception
{
- final Process proc = buildDynamicProcess();
+ AirticketProcessBuilder builder = new AirticketProcessBuilder(getMessageListenerID());
+ Process proc = builder.buildProcess();
proc.startProcess();
ObjectName listenerID = getMessageListenerID();
@@ -156,148 +151,6 @@
assertEquals("222", price);
}
- 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 ReceiveReqTask
- TaskBuilder taskBuilder = procBuilder.addTask("ReceiveReqTask", TaskType.Receive);
- 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 ValidateTask
- taskBuilder = procBuilder.addTask("ValidateTask", TaskType.None);
- taskBuilder.addInputSet().
- addPropertyInput("Name", null).
- addPropertyInput("From", null).
- addPropertyInput("To", null).
- addPropertyInput("Date", null).
- addPropertyInput("Seats", null).
- addOutputSet().
- addPropertyOutput("isReqDataValid", null).
- addIORule("Name != null && From != null && To != null && Date != null && Seats > 0", ExpressionLanguage.MVEL).
- addSequenceFlow("ValidateGateway");
-
- // Build the ValidateGateway
- GatewayBuilder gatewayBuilder = procBuilder.addGateway("ValidateGateway", GatewayType.Exclusive);
- gatewayBuilder.addConditionalGate("CheckAvailabilityTask", ExpressionLanguage.MVEL, "isReqDataValid == true").
- addDefaultGate("SendInvalidTask");
-
- // Build the CheckAvailabilityTask
- taskBuilder = procBuilder.addTask("CheckAvailabilityTask", TaskType.None);
- taskBuilder.addExecutionHandler(AvailabilityHandler.class).
- addInputSet().
- addPropertyInput("From", null).
- addPropertyInput("To", null).
- addPropertyInput("Date", null).
- addPropertyInput("Seats", null).
- addOutputSet().
- addPropertyOutput("isAvailable", null).
- addPropertyOutput("Price", null).
- addSequenceFlow("AvailabilityGateway");
-
- // Build the SendInvalidTask
- taskBuilder = procBuilder.addTask("SendInvalidTask", TaskType.Send);
- taskBuilder.addMessageRef("InvalidDataMsg", getMessageListenerID()).
- addMessageProperty("Name", null, true).
- addMessageProperty("From", null, true).
- addMessageProperty("To", null, true).
- addMessageProperty("Date", null, true).
- addMessageProperty("Seats", null, true).
- addSequenceFlow("ReceiveReqTask");
-
- // Build the AvailabilityGateway
- gatewayBuilder = procBuilder.addGateway("AvailabilityGateway", GatewayType.Exclusive);
- gatewayBuilder.addConditionalGate("SendOfferTask", ExpressionLanguage.MVEL, "isAvailable == true").
- addDefaultGate("SendNotAvailableTask");
-
- // Build the SendOfferTask
- taskBuilder = procBuilder.addTask("SendOfferTask", TaskType.Send);
- taskBuilder.addMessageRef("OfferMsg", getMessageListenerID()).
- addMessageProperty("Name", null, true).
- addMessageProperty("From", null, true).
- addMessageProperty("To", null, true).
- addMessageProperty("Date", null, true).
- addMessageProperty("Seats", null, true).
- addMessageProperty("Price", null, true).
- addSequenceFlow("ReceiveOrderTask");
-
- // Build the SendNotAvailableTask
- taskBuilder = procBuilder.addTask("SendNotAvailableTask", TaskType.Send);
- taskBuilder.addMessageRef("NotAvailableMsg", getMessageListenerID()).
- addMessageProperty("Name", null, true).
- addMessageProperty("From", null, true).
- addMessageProperty("To", null, true).
- addMessageProperty("Date", null, true).
- addMessageProperty("Seats", null, true).
- addSequenceFlow("ReceiveReqTask");
-
- // Build the ReceiveReqTask
- taskBuilder = procBuilder.addTask("ReceiveOrderTask", TaskType.Receive);
- taskBuilder.addMessageRef("AcceptOfferMsg", null).
- addMessageProperty("CreditCard", null, true).
- addMessageProperty("Expire", null, true).
- addMessageProperty("isOfferAccepted", null, true).
- addSequenceFlow("AcceptOfferGateway");
-
- // Build the AcceptOfferGateway
- gatewayBuilder = procBuilder.addGateway("AcceptOfferGateway", GatewayType.Exclusive);
- gatewayBuilder.addConditionalGate("ParallelSplitGateway", ExpressionLanguage.MVEL, "isOfferAccepted == true").
- addDefaultGate("ReceiveReqTask");
-
- // Build the AcceptOfferGateway
- gatewayBuilder = procBuilder.addGateway("ParallelSplitGateway", GatewayType.Parallel);
- gatewayBuilder.addGate("CreditCardTask").
- addGate("BookingTask");
-
- // Build the CreditCardTask
- taskBuilder = procBuilder.addTask("CreditCardTask", TaskType.None);
- taskBuilder.addInputSet().
- addPropertyInput("CreditCard", null).
- addPropertyInput("Expire", null).
- addPropertyInput("Price", null).
- addSequenceFlow("SynchronizedJoinGateway");
-
- // Build the BookingTask
- taskBuilder = procBuilder.addTask("BookingTask", TaskType.None);
- taskBuilder.addInputSet().
- addPropertyInput("Name", null).
- addPropertyInput("From", null).
- addPropertyInput("To", null).
- addPropertyInput("Date", null).
- addPropertyInput("Seats", null).
- addSequenceFlow("SynchronizedJoinGateway");
-
- // Build the SynchronizedJoinGateway
- gatewayBuilder = procBuilder.addGateway("SynchronizedJoinGateway", GatewayType.Parallel);
- gatewayBuilder.addGate("SendConfirmTask");
-
- // Build the SendConfirmTask
- taskBuilder = procBuilder.addTask("SendConfirmTask", TaskType.Send);
- taskBuilder.addMessageRef("ConfirmMsg", getMessageListenerID()).
- addMessageProperty("Name", null, true).
- addMessageProperty("From", null, true).
- addMessageProperty("To", null, true).
- addMessageProperty("Date", null, true).
- addMessageProperty("Seats", null, true).
- addMessageProperty("Price", null, true).
- addSequenceFlow("End");
-
- // Add the EndEvent
- Process proc = procBuilder.addEndEvent("End").getProcess();
- ProcessManager pm = ProcessManager.locateProcessManager();
- pm.registerProcess(proc);
- return proc;
- }
-
private Message getValidRequestMessage()
{
MessageBuilderFactory msgFactory = MessageBuilderFactory.newInstance();
15 years, 9 months
JBoss JBPM SVN: r1749 - in jbossbpm/spec/trunk/modules: api/src/main/java/org/jboss/bpm/client and 8 other directories.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-07-29 10:55:18 -0400 (Tue, 29 Jul 2008)
New Revision: 1749
Added:
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/runtime/
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/runtime/internal/
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/runtime/internal/TokenImpl.java
jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/airticket/AvailabilityHandler.java
Modified:
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/BPMException.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/EngineShutdownException.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/InvalidProcessException.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/NameNotUniqueException.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/NotImplementedException.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/ProcessTimeoutException.java
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/model/TaskBuilder.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/FlowScheduler.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/MutableFlowScheduler.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/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/BPMNElementImpl.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/ExclusiveGatewayImpl.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/FlowSchedulerImpl.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/GraphicalElementImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/InclusiveGatewayImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/IntermediateEventImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ParallelGatewayImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/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/StartEventImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/SubProcessImpl.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
Log:
Implement synchronizing merge
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/BPMException.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/BPMException.java 2008-07-29 13:25:51 UTC (rev 1748)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/BPMException.java 2008-07-29 14:55:18 UTC (rev 1749)
@@ -29,10 +29,9 @@
* @author thomas.diesler(a)jboss.com
* @since 18-Jun-2008
*/
+@SuppressWarnings("serial")
public class BPMException extends RuntimeException
{
- private static final long serialVersionUID = 1L;
-
public BPMException()
{
super();
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/EngineShutdownException.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/EngineShutdownException.java 2008-07-29 13:25:51 UTC (rev 1748)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/EngineShutdownException.java 2008-07-29 14:55:18 UTC (rev 1749)
@@ -24,24 +24,22 @@
// $Id$
/**
- * A JBPMException that is thrown when an invalid operation is invoked on
- * engine shutdown.
+ * A JBPMException that is thrown when an invalid operation is invoked on engine shutdown.
*
* @author thomas.diesler(a)jboss.com
* @since 18-Jun-2008
*/
-public class EngineShutdownException extends BPMException {
+@SuppressWarnings("serial")
+public class EngineShutdownException extends BPMException
+{
- /**
- *
- */
- private static final long serialVersionUID = 1L;
-
- public EngineShutdownException() {
+ public EngineShutdownException()
+ {
super();
}
- public EngineShutdownException(String message) {
+ public EngineShutdownException(String message)
+ {
super(message);
}
}
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/InvalidProcessException.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/InvalidProcessException.java 2008-07-29 13:25:51 UTC (rev 1748)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/InvalidProcessException.java 2008-07-29 14:55:18 UTC (rev 1749)
@@ -30,13 +30,9 @@
* @author thomas.diesler(a)jboss.com
* @since 18-Jun-2008
*/
+@SuppressWarnings("serial")
public class InvalidProcessException extends BPMException
{
- /**
- *
- */
- private static final long serialVersionUID = 1L;
-
public InvalidProcessException()
{
super();
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/NameNotUniqueException.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/NameNotUniqueException.java 2008-07-29 13:25:51 UTC (rev 1748)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/NameNotUniqueException.java 2008-07-29 14:55:18 UTC (rev 1749)
@@ -29,10 +29,9 @@
* @author thomas.diesler(a)jboss.com
* @since 18-Jun-2008
*/
+@SuppressWarnings("serial")
public class NameNotUniqueException extends InvalidProcessException
{
- private static final long serialVersionUID = 1L;
-
public NameNotUniqueException()
{
super();
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/NotImplementedException.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/NotImplementedException.java 2008-07-29 13:25:51 UTC (rev 1748)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/NotImplementedException.java 2008-07-29 14:55:18 UTC (rev 1749)
@@ -29,18 +29,16 @@
* @author thomas.diesler(a)jboss.com
* @since 18-Jun-2008
*/
-public class NotImplementedException extends RuntimeException {
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
-
- public NotImplementedException() {
+@SuppressWarnings("serial")
+public class NotImplementedException extends RuntimeException
+{
+ public NotImplementedException()
+ {
super();
}
- public NotImplementedException(String message) {
+ public NotImplementedException(String message)
+ {
super(message);
}
}
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/ProcessTimeoutException.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/ProcessTimeoutException.java 2008-07-29 13:25:51 UTC (rev 1748)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/ProcessTimeoutException.java 2008-07-29 14:55:18 UTC (rev 1749)
@@ -29,10 +29,9 @@
* @author thomas.diesler(a)jboss.com
* @since 24-Jul-2008
*/
+@SuppressWarnings("serial")
public class ProcessTimeoutException extends BPMException
{
- private static final long serialVersionUID = 1L;
-
public ProcessTimeoutException()
{
super();
Modified: 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 2008-07-29 13:25:51 UTC (rev 1748)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/MessageManager.java 2008-07-29 14:55:18 UTC (rev 1749)
@@ -118,13 +118,9 @@
break;
}
}
- if (msgListener != null)
- {
- msgListener.catchMessage(msg);
- }
- else
- {
- log.warn("No message listener registered: " + targetID);
- }
+ if (msgListener == null)
+ throw new IllegalStateException("No message listener registered for: " + targetID);
+
+ msgListener.catchMessage(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-29 13:25:51 UTC (rev 1748)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/TaskBuilder.java 2008-07-29 14:55:18 UTC (rev 1749)
@@ -23,7 +23,9 @@
import javax.management.ObjectName;
+import org.jboss.bpm.runtime.ExecutionHandler;
+
//$Id$
/**
@@ -37,4 +39,9 @@
TaskBuilder addMessageRef(String messageName, ObjectName targetID);
TaskBuilder addMessageProperty(String propName, String propValue, boolean isCorrelation);
+
+ /**
+ * Add an {@link ExecutionHandler} with a given Class
+ */
+ TaskBuilder addExecutionHandler(Class<?> clazz);
}
\ No newline at end of file
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/FlowScheduler.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/FlowScheduler.java 2008-07-29 13:25:51 UTC (rev 1748)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/FlowScheduler.java 2008-07-29 14:55:18 UTC (rev 1749)
@@ -36,37 +36,7 @@
{
/**
* Schedule the given {@link Flow} and {@link Token}
+ * @param flow TODO
*/
- void scheduleTuple(Tuple tuple);
-
- /**
- * A tuple of Flow and Token
- */
- class Tuple
- {
- private Flow flow;
- private Token token;
- /**
- * Construct the Tuple with a given flow and Token
- */
- public Tuple(Flow flow, Token token)
- {
- this.flow = flow;
- this.token = token;
- }
- /**
- * Get the Flow
- */
- public Flow getFlow()
- {
- return flow;
- }
- /**
- * Get the Token
- */
- public Token getToken()
- {
- return token;
- }
- }
+ void scheduleTuple(Flow flow, Token token);
}
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/MutableFlowScheduler.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/MutableFlowScheduler.java 2008-07-29 13:25:51 UTC (rev 1748)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/MutableFlowScheduler.java 2008-07-29 14:55:18 UTC (rev 1749)
@@ -33,12 +33,12 @@
public interface MutableFlowScheduler extends FlowScheduler
{
/**
- * Peek the head {@link Tuple}
+ * Peek the head {@link Token}
*/
- Tuple peekHeadTuple();
+ Token peekHeadTuple();
/**
- * Remove the head {@link Tuple}
+ * Remove the head {@link Token}
*/
- Tuple removeHeadTuple();
+ Token removeHeadTuple();
}
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-29 13:25:51 UTC (rev 1748)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Token.java 2008-07-29 14:55:18 UTC (rev 1749)
@@ -23,6 +23,7 @@
//$Id$
+import org.jboss.bpm.model.Flow;
import org.jboss.bpm.model.Process;
/**
@@ -37,57 +38,37 @@
* @author Thomas.Diesler(a)jboss.com
* @since 20-Apr-2007
*/
-public class Token
+public interface Token
{
- private Process proc;
- private ExecutionContext context;
-
/**
- * Construct a Token with a given {@link Process} and {@link Attachments}
+ * Get the unique token identity
*/
- public Token(Process proc, Attachments att)
- {
- this.proc = proc;
- this.context = new InitialContext(att);
- }
+ String getTokenID();
/**
* Get the associated {@link Process}
*/
- public Process getProcess()
- {
- return proc;
- }
-
+ Process getProcess();
+
/**
* Get the associated {@link ExecutionContext}
*/
- public ExecutionContext getExecutionContext()
- {
- return context;
- }
+ ExecutionContext getExecutionContext();
+
+ /**
+ * Get the current @{link SequenceFlow}
+ */
+ Flow getFlow();
/**
* Create a schallow copy of this Token.
* <p/>
- * The content in the {@link ExecutionContext} will be
- * copied by reference.
+ * The content in the {@link ExecutionContext} will be copied by reference.
*/
- public Token createCopy()
- {
- return new Token(proc, context);
- }
-
- public String toString()
- {
- return "[proc=" + proc.getID() + ",ctx=" + context + "]";
- }
-
- static class InitialContext extends BasicAttachments implements ExecutionContext
- {
- InitialContext(Attachments att)
- {
- super(att);
- }
- }
+ Token copyToken();
+
+ /**
+ * Merge this Token with another token.
+ */
+ void mergeToken(Token token);
}
\ 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-29 13:25:51 UTC (rev 1748)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/client/internal/ExecutionManagerImpl.java 2008-07-29 14:55:18 UTC (rev 1749)
@@ -26,8 +26,6 @@
import org.apache.commons.logging.Log;
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;
@@ -45,7 +43,7 @@
import org.jboss.bpm.runtime.RuntimeProcess;
import org.jboss.bpm.runtime.SignalHandler;
import org.jboss.bpm.runtime.Token;
-import org.jboss.bpm.runtime.FlowScheduler.Tuple;
+import org.jboss.bpm.runtime.internal.TokenImpl;
/**
* The process manager is the entry point to create, find and otherwise manage processes.
@@ -79,17 +77,15 @@
MutableFlowScheduler flowScheduler = rtProc.getFlowScheduler();
try
{
- Token initalToken = new Token(proc, att);
+ Token initalToken = new TokenImpl(proc, att);
StartEvent start = proc.getStartEvent();
- Tuple tuple = new Tuple(new InitialFlow(start), initalToken);
- flowScheduler.scheduleTuple(tuple);
+ flowScheduler.scheduleTuple(new InitialFlow(start), initalToken);
while (flowScheduler.peekHeadTuple() != null)
{
// Peek the head flow
- tuple = flowScheduler.peekHeadTuple();
- Flow flow = tuple.getFlow();
- Token token = tuple.getToken();
+ Token token = flowScheduler.peekHeadTuple();
+ Flow flow = token.getFlow();
// Get the target and its handlers
FlowObject target = (FlowObject)flow.getTargetRef();
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 13:25:51 UTC (rev 1748)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/client/internal/ProcessManagerImpl.java 2008-07-29 14:55:18 UTC (rev 1749)
@@ -26,12 +26,9 @@
import java.util.Map;
import java.util.Set;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.jboss.bpm.client.DialectHandler;
import org.jboss.bpm.client.DialectRegistry;
import org.jboss.bpm.client.ExecutionManager;
-import org.jboss.bpm.client.ProcessEngine;
import org.jboss.bpm.client.ProcessManager;
import org.jboss.bpm.model.Process;
import org.jboss.bpm.model.Process.Status;
@@ -46,9 +43,6 @@
*/
public class ProcessManagerImpl extends ProcessManager
{
- // provide logging
- private static final Log log = LogFactory.getLog(ProcessManagerImpl.class);
-
public void setDialectHandlers(Map<String, DialectHandler> dialectHandlers)
{
this.dialectHandlers = dialectHandlers;
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 13:25:51 UTC (rev 1748)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ActivityImpl.java 2008-07-29 14:55:18 UTC (rev 1749)
@@ -48,7 +48,6 @@
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;
/**
@@ -59,8 +58,8 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
-public abstract class ActivityImpl extends FlowObjectImpl implements Activity, MutablePropertySupport,
- SingleInFlowSetterSupport, SingleOutFlowSetterSupport
+@SuppressWarnings("serial")
+public abstract class ActivityImpl extends FlowObjectImpl implements Activity, MutablePropertySupport, SingleInFlowSetterSupport, SingleOutFlowSetterSupport
{
// provide logging
private static final Log log = LogFactory.getLog(ActivityImpl.class);
@@ -223,14 +222,14 @@
for (Property prop : auxSet.getProperties())
{
String name = prop.getName();
- Expression expr = exContext.getAttachment(name);
- inputSet.addProperty(new PropertyImpl(name, expr));
+ String value = exContext.getAttachment(name);
+ inputSet.addProperty(new PropertyImpl(name, new ExpressionImpl(value)));
}
break;
}
}
if (inputSet == null)
- throw new IllegalStateException("Cannot find inputSet that matches token: " + token);
+ throw new IllegalStateException("Cannot find matching inputSet for " + exContext + " in Activity: " + getName());
}
// Create an empty input set
@@ -245,9 +244,8 @@
*/
protected void executeHandler(Token token, InputSet inputSet, OutputSet outputSet)
{
- ExecutionHandler handler = getExecutionHandler();
-
// Call the execution handler with the InputSet
+ ExecutionHandler handler = getExecutionHandler();
if (handler != null)
{
handler.execute(token, inputSet, outputSet);
@@ -304,7 +302,8 @@
{
Property outProp = outputSet.getProperty(prop.getName());
if (outProp == null)
- throw new IllegalStateException("Cannot find required outputSet property: " + prop.getName());
+ throw new IllegalStateException("Cannot find required outputSet property '" + prop.getName()
+ + "' in Activity: " + getName());
exContext.addAttachment(outProp.getName(), outProp.getValue().getExpressionBody());
}
@@ -319,7 +318,7 @@
ExecutionContext exContext = token.getExecutionContext();
for (Property prop : inputSet.getProperties())
{
- // TODO: define proper scope for token data
+ // TODO: define proper scope for token data
// exContext.removeAttachment(prop.getName());
}
}
@@ -333,8 +332,7 @@
{
public void execute(FlowScheduler scheduler, Token token)
{
- Tuple tuple = new Tuple(outFlow, token);
- scheduler.scheduleTuple(tuple);
+ scheduler.scheduleTuple(outFlow, token);
}
};
}
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-29 13:25:51 UTC (rev 1748)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/BPMNElementImpl.java 2008-07-29 14:55:18 UTC (rev 1749)
@@ -40,10 +40,9 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
+@SuppressWarnings("serial")
public class BPMNElementImpl implements BPMNElement
{
- private static final long serialVersionUID = 1L;
-
private ObjectName id;
private Process process;
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-29 13:25:51 UTC (rev 1748)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/EndEventImpl.java 2008-07-29 14:55:18 UTC (rev 1749)
@@ -44,6 +44,7 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
+@SuppressWarnings("serial")
public class EndEventImpl extends EventImpl implements EndEvent, SingleInFlowSetterSupport
{
// provide logging
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-29 13:25:51 UTC (rev 1748)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ExclusiveGatewayImpl.java 2008-07-29 14:55:18 UTC (rev 1749)
@@ -26,10 +26,13 @@
import java.util.HashMap;
import java.util.Map;
+import org.jboss.bpm.NotImplementedException;
import org.jboss.bpm.model.ExclusiveGateway;
import org.jboss.bpm.model.Expression;
+import org.jboss.bpm.model.Flow;
import org.jboss.bpm.model.Gate;
import org.jboss.bpm.model.SequenceFlow;
+import org.jboss.bpm.model.ExclusiveGateway.ExclusiveType;
import org.jboss.bpm.model.Expression.ExpressionLanguage;
import org.jboss.bpm.model.SequenceFlow.ConditionType;
import org.jboss.bpm.runtime.ExecutionContext;
@@ -37,7 +40,6 @@
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;
/**
@@ -60,6 +62,15 @@
}
@Override
+ public void addInFlow(Flow inFlow)
+ {
+ if (getInFlows().size() > 0)
+ throw new NotImplementedException("ExclusiveGateway with multiple inFlows");
+
+ super.addInFlow(inFlow);
+ }
+
+ @Override
public FlowHandler getFlowHandler()
{
FlowHandler handler = super.getFlowHandler();
@@ -118,8 +129,8 @@
if (selectedGate == null)
throw new IllegalStateException("Cannot select applicable gate for: " + token);
- Tuple tuple = new Tuple(selectedGate.getOutgoingSequenceFlow(), token);
- scheduler.scheduleTuple(tuple);
+ SequenceFlow outFlow = selectedGate.getOutgoingSequenceFlow();
+ scheduler.scheduleTuple(outFlow, token);
}
};
}
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-29 13:25:51 UTC (rev 1748)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/FlowObjectImpl.java 2008-07-29 14:55:18 UTC (rev 1749)
@@ -47,13 +47,12 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
+@SuppressWarnings("serial")
public abstract class FlowObjectImpl extends GraphicalElementImpl implements FlowObject, HandlerSetterSupport, Executable
{
- private static final long serialVersionUID = 1L;
-
- private ExecutionHandler executionHandler;
private FlowHandler flowHandler;
private SignalHandler signalHandler;
+ private ExecutionHandler executionHandler;
public ExecutionHandler getExecutionHandler()
{
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/FlowSchedulerImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/FlowSchedulerImpl.java 2008-07-29 13:25:51 UTC (rev 1748)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/FlowSchedulerImpl.java 2008-07-29 14:55:18 UTC (rev 1749)
@@ -30,6 +30,7 @@
import org.jboss.bpm.runtime.FlowHandler;
import org.jboss.bpm.runtime.MutableFlowScheduler;
import org.jboss.bpm.runtime.Token;
+import org.jboss.bpm.runtime.internal.TokenImpl;
/**
* The {@link FlowHandler} invokes the FlowScheduler to schedule
@@ -40,19 +41,21 @@
*/
public class FlowSchedulerImpl implements MutableFlowScheduler
{
- private Queue<Tuple> flowQueue = new ConcurrentLinkedQueue<Tuple>();
+ private Queue<Token> flowQueue = new ConcurrentLinkedQueue<Token>();
- public void scheduleTuple(Tuple tuple)
+ public void scheduleTuple(Flow flow, Token token)
{
- flowQueue.add(tuple);
+ TokenImpl tokenImpl = (TokenImpl)token;
+ tokenImpl.setFlow(flow);
+ flowQueue.add(tokenImpl);
}
- public Tuple peekHeadTuple()
+ public Token peekHeadTuple()
{
return flowQueue.peek();
}
- public Tuple removeHeadTuple()
+ public Token removeHeadTuple()
{
return flowQueue.remove();
}
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-29 13:25:51 UTC (rev 1748)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/GatewayImpl.java 2008-07-29 14:55:18 UTC (rev 1749)
@@ -25,7 +25,9 @@
import java.util.ArrayList;
import java.util.Collections;
+import java.util.HashSet;
import java.util.List;
+import java.util.Set;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -33,15 +35,18 @@
import org.jboss.bpm.model.FlowObject;
import org.jboss.bpm.model.Gate;
import org.jboss.bpm.model.Gateway;
+import org.jboss.bpm.model.GraphicalElement;
import org.jboss.bpm.model.InputSet;
+import org.jboss.bpm.model.NameSupport;
import org.jboss.bpm.model.OutputSet;
+import org.jboss.bpm.model.SequenceFlow;
import org.jboss.bpm.model.Signal;
import org.jboss.bpm.runtime.ExecutionHandler;
import org.jboss.bpm.runtime.FlowHandler;
import org.jboss.bpm.runtime.FlowScheduler;
import org.jboss.bpm.runtime.SignalHandler;
import org.jboss.bpm.runtime.Token;
-import org.jboss.bpm.runtime.FlowScheduler.Tuple;
+import org.jboss.bpm.runtime.internal.TokenImpl;
/**
* Gateways are modelling elements that are used to control how Sequence Flow interact as they converge and diverge within a Process. If the flow does not need to be
@@ -50,6 +55,7 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
+@SuppressWarnings("serial")
public abstract class GatewayImpl extends FlowObjectImpl implements Gateway, MultipleInFlowSetterSupport
{
// provide logging
@@ -58,6 +64,8 @@
private String name;
protected List<Flow> inFlows = new ArrayList<Flow>();
private List<Gate> gates = new ArrayList<Gate>();
+ private Set<Flow> outstandingFlows;
+ private Set<Token> mergeTokens;
public GatewayImpl(String name)
{
@@ -89,6 +97,33 @@
this.inFlows.add(inFlow);
}
+ @Override
+ public void execute(Token token)
+ {
+ // Multiple incomingFlows must be synchronized
+ if (getInFlows().size() > 1)
+ {
+ if (outstandingFlows == null)
+ {
+ outstandingFlows = new HashSet<Flow>(inFlows);
+ mergeTokens = new HashSet<Token>();
+ }
+
+ Flow flow = token.getFlow();
+ outstandingFlows.remove(flow);
+
+ if (outstandingFlows.size() > 0)
+ mergeTokens.add(token);
+ }
+
+ // Call the execution handler with the InputSet
+ ExecutionHandler handler = getExecutionHandler();
+ if (handler != null)
+ {
+ handler.execute(token, null, null);
+ }
+ }
+
public ExecutionHandler getExecutionHandler()
{
ExecutionHandler handler = super.getExecutionHandler();
@@ -110,18 +145,54 @@
FlowHandler handler = super.getFlowHandler();
if (handler == null && gates.size() == 1)
{
+ final SequenceFlow outFlow = gates.get(0).getOutgoingSequenceFlow();
handler = new FlowHandler()
{
public void execute(FlowScheduler scheduler, Token token)
{
- Tuple tuple = new Tuple(gates.get(0).getOutgoingSequenceFlow(), token);
- scheduler.scheduleTuple(tuple);
+ if (getInFlows().size() > 1)
+ {
+ if (outstandingFlows.size() == 0)
+ {
+ Token mergedToken = mergeTokens(token);
+ scheduler.scheduleTuple(outFlow, mergedToken);
+ outstandingFlows = null;
+ mergeTokens = null;
+ }
+ else
+ {
+ // Log the list of outstanding flows
+ Set<String> sourceNames = new HashSet<String>();
+ for(Flow flow : outstandingFlows)
+ {
+ GraphicalElement sourceRef = flow.getSourceRef();
+ if (sourceRef instanceof NameSupport)
+ sourceNames.add(((NameSupport)sourceRef).getName());
+ else
+ sourceNames.add(sourceRef.getID().getCanonicalName());
+ }
+ log.debug("Waiting for " + outstandingFlows + " in gateway: " + sourceNames);
+ }
+ }
+ else
+ {
+ scheduler.scheduleTuple(outFlow, token);
+ }
}
};
}
return handler;
}
+ private Token mergeTokens(Token token)
+ {
+ TokenImpl mergedToken = new TokenImpl(token.getProcess(), null);
+ for (Token auxToken : mergeTokens)
+ mergedToken.mergeToken(auxToken);
+
+ return mergedToken;
+ }
+
public SignalHandler getSignalHandler()
{
SignalHandler handler = super.getSignalHandler();
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/GraphicalElementImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/GraphicalElementImpl.java 2008-07-29 13:25:51 UTC (rev 1748)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/GraphicalElementImpl.java 2008-07-29 14:55:18 UTC (rev 1749)
@@ -30,7 +30,7 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
+@SuppressWarnings("serial")
public abstract class GraphicalElementImpl extends BPMNElementImpl implements GraphicalElement
{
- private static final long serialVersionUID = 1L;
}
\ No newline at end of file
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/InclusiveGatewayImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/InclusiveGatewayImpl.java 2008-07-29 13:25:51 UTC (rev 1748)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/InclusiveGatewayImpl.java 2008-07-29 14:55:18 UTC (rev 1749)
@@ -23,12 +23,9 @@
//$Id$
-import java.util.List;
-
import org.jboss.bpm.NotImplementedException;
import org.jboss.bpm.model.Gate;
import org.jboss.bpm.model.InclusiveGateway;
-import org.jboss.bpm.model.Gateway.GatewayType;
@@ -40,6 +37,7 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
+@SuppressWarnings("serial")
public class InclusiveGatewayImpl extends GatewayImpl implements InclusiveGateway
{
public InclusiveGatewayImpl(String name)
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-29 13:25:51 UTC (rev 1748)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/IntermediateEventImpl.java 2008-07-29 14:55:18 UTC (rev 1749)
@@ -36,7 +36,6 @@
import org.jboss.bpm.runtime.FlowScheduler;
import org.jboss.bpm.runtime.SignalHandler;
import org.jboss.bpm.runtime.Token;
-import org.jboss.bpm.runtime.FlowScheduler.Tuple;
/**
* An Intermediate Event is an Event that occurs after a Process has been started. It will affect the Flow of the Process, but will not start or (directly) terminate
@@ -110,8 +109,7 @@
{
public void execute(FlowScheduler scheduler, Token token)
{
- Tuple tuple = new Tuple(getOutFlow(), token);
- scheduler.scheduleTuple(tuple);
+ scheduler.scheduleTuple(getOutFlow(), token);
}
};
}
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ParallelGatewayImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ParallelGatewayImpl.java 2008-07-29 13:25:51 UTC (rev 1748)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ParallelGatewayImpl.java 2008-07-29 14:55:18 UTC (rev 1749)
@@ -23,16 +23,12 @@
//$Id$
-import java.util.List;
-
-import org.jboss.bpm.NotImplementedException;
-import org.jboss.bpm.model.Flow;
import org.jboss.bpm.model.Gate;
import org.jboss.bpm.model.ParallelGateway;
+import org.jboss.bpm.model.SequenceFlow;
import org.jboss.bpm.runtime.FlowHandler;
import org.jboss.bpm.runtime.FlowScheduler;
import org.jboss.bpm.runtime.Token;
-import org.jboss.bpm.runtime.FlowScheduler.Tuple;
/**
@@ -41,6 +37,7 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
+@SuppressWarnings("serial")
public class ParallelGatewayImpl extends GatewayImpl implements ParallelGateway
{
public ParallelGatewayImpl(String name)
@@ -67,8 +64,8 @@
{
for(Gate gate : getGates())
{
- Tuple tuple = new Tuple(gate.getOutgoingSequenceFlow(), token.createCopy());
- scheduler.scheduleTuple(tuple);
+ SequenceFlow outFlow = gate.getOutgoingSequenceFlow();
+ scheduler.scheduleTuple(outFlow, token.copyToken());
}
}
};
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-29 13:25:51 UTC (rev 1748)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ReceiveTaskImpl.java 2008-07-29 14:55:18 UTC (rev 1749)
@@ -146,7 +146,7 @@
{
String key = prop.getName();
Expression value = msg.getProperty(key).getValue();
- exContext.addAttachment(key, value);
+ exContext.addAttachment(key, value.getExpressionBody());
}
// Call default execute
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 13:25:51 UTC (rev 1748)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/SendTaskImpl.java 2008-07-29 14:55:18 UTC (rev 1749)
@@ -21,18 +21,12 @@
*/
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;
@@ -41,13 +35,10 @@
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$
@@ -57,11 +48,9 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
+@SuppressWarnings("serial")
public class SendTaskImpl extends TaskImpl implements SendTask
{
- // provide logging
- private static final Log log = LogFactory.getLog(SendTaskImpl.class);
-
// A Web service is the default technology
private Implementation implementation = Implementation.WebService;
private Message messageRef;
@@ -123,11 +112,11 @@
for (Property auxProp : messageRef.getProperties())
{
String key = auxProp.getName();
- Expression expr = exContext.getAttachment(key);
- if (expr == null)
+ String value = exContext.getAttachment(key);
+ if (value == null)
throw new IllegalStateException("Cannot obtain property: " + key);
- msgBuilder.addProperty(key, expr.getExpressionBody());
+ msgBuilder.addProperty(key, value);
}
Message msg = msgBuilder.getMessage();
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-29 13:25:51 UTC (rev 1748)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/StartEventImpl.java 2008-07-29 14:55:18 UTC (rev 1749)
@@ -39,7 +39,6 @@
import org.jboss.bpm.runtime.FlowScheduler;
import org.jboss.bpm.runtime.SignalHandler;
import org.jboss.bpm.runtime.Token;
-import org.jboss.bpm.runtime.FlowScheduler.Tuple;
/**
* A Start Event indicates where a particular Process will start. In terms of Sequence Flow, the Start Event starts the Flow of the Process, and thus, will not have any
@@ -95,8 +94,7 @@
{
public void execute(FlowScheduler scheduler, Token token)
{
- Tuple tuple = new Tuple(outFlow, token);
- scheduler.scheduleTuple(tuple);
+ scheduler.scheduleTuple(outFlow, token);
}
};
}
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/SubProcessImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/SubProcessImpl.java 2008-07-29 13:25:51 UTC (rev 1748)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/SubProcessImpl.java 2008-07-29 14:55:18 UTC (rev 1749)
@@ -34,10 +34,9 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
+@SuppressWarnings("serial")
public class SubProcessImpl extends ActivityImpl implements SubProcess, SingleInFlowSetterSupport, SingleOutFlowSetterSupport
{
- private static final long serialVersionUID = 1L;
-
public SubProcessImpl(String name)
{
super(name);
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 13:25:51 UTC (rev 1748)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/TaskBuilderImpl.java 2008-07-29 14:55:18 UTC (rev 1749)
@@ -76,6 +76,12 @@
message.addProperty(prop);
return this;
}
+
+ public TaskBuilder addExecutionHandler(Class<?> clazz)
+ {
+ super.addExecutionHandler(clazz);
+ return this;
+ }
private Task getTask()
{
Added: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/runtime/internal/TokenImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/runtime/internal/TokenImpl.java (rev 0)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/runtime/internal/TokenImpl.java 2008-07-29 14:55:18 UTC (rev 1749)
@@ -0,0 +1,128 @@
+/*
+ * 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.internal;
+
+//$Id$
+
+import org.jboss.bpm.model.Flow;
+import org.jboss.bpm.model.Process;
+import org.jboss.bpm.runtime.Attachments;
+import org.jboss.bpm.runtime.BasicAttachments;
+import org.jboss.bpm.runtime.ExecutionContext;
+import org.jboss.bpm.runtime.Token;
+import org.jboss.bpm.runtime.Attachments.Key;
+import org.jboss.util.id.UID;
+
+/**
+ * A Token is a descriptive construct used to describe how the flow of a Process will proceed at runtime.
+ *
+ * By tracking how the Token traverses the Flow Objects, gets diverted through alternative paths, and gets split into parallel paths, the normal Sequence Flow should be
+ * completely definable.
+ *
+ * A Token will have a unique identity that can be used to separate multiple Tokens that may exist because of concurrent process instances or the splitting of the Token
+ * for parallel processing within a single process instance.
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 20-Apr-2007
+ */
+public class TokenImpl implements Token
+{
+ private String id;
+ private Process proc;
+ private Flow flow;
+ private ExecutionContext context;
+
+ /**
+ * Construct a Token with a given {@link Process} and {@link Attachments}
+ */
+ public TokenImpl(Process proc, Attachments att)
+ {
+ this.proc = proc;
+ this.context = new InitialContext(att);
+ this.id = new UID().toString();
+ }
+
+ public String getTokenID()
+ {
+ return id;
+ }
+
+ public Process getProcess()
+ {
+ return proc;
+ }
+
+ public ExecutionContext getExecutionContext()
+ {
+ return context;
+ }
+
+ public Flow getFlow()
+ {
+ return flow;
+ }
+
+ public void setFlow(Flow flow)
+ {
+ this.flow = flow;
+ }
+
+ /**
+ * Create a schallow copy of this Token.
+ * <p/>
+ * The content in the {@link ExecutionContext} will be copied by reference.
+ */
+ public Token copyToken()
+ {
+ return new TokenImpl(proc, context);
+ }
+
+ /**
+ * Merge this Token with another token.
+ */
+ public void mergeToken(Token token)
+ {
+ ExecutionContext mergeContext = token.getExecutionContext();
+ for(Key key : mergeContext.getAttachmentKeys())
+ {
+ Object mergeValue = mergeContext.getAttachment(key.getClassPart(), key.getNamePart());
+ Object existValue = context.getAttachment(key.getClassPart(), key.getNamePart());
+ if (existValue != null && existValue.equals(mergeValue) == false)
+ throw new IllegalStateException("Cannot merge the same key with different values: " + key);
+
+ context.addAttachment(key.getClassPart(), key.getNamePart(), mergeValue);
+ }
+ }
+
+ public String toString()
+ {
+ return "[proc=" + proc.getID() + ",ctx=" + context + "]";
+ }
+
+ static class InitialContext extends BasicAttachments implements ExecutionContext
+ {
+ InitialContext(Attachments att)
+ {
+ super(att);
+ }
+ }
+}
\ No newline at end of file
Property changes on: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/runtime/internal/TokenImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
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 13:25:51 UTC (rev 1748)
+++ jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/airticket/AirticketTest.java 2008-07-29 14:55:18 UTC (rev 1749)
@@ -29,11 +29,9 @@
import org.jboss.bpm.client.MessageListener;
import org.jboss.bpm.client.MessageManager;
-import org.jboss.bpm.client.ObjectNameFactory;
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;
@@ -56,6 +54,40 @@
*/
public class AirticketTest extends DefaultEngineTestCase
{
+ private final class AirticketMessageListener implements MessageListener
+ {
+ private Process proc;
+ private ObjectName targetID;
+ private Message confirmMessage;
+
+ private AirticketMessageListener(Process proc, ObjectName listenerID)
+ {
+ this.proc = proc;
+ this.targetID = listenerID;
+ }
+
+ public Message getConfirmMessage()
+ {
+ return confirmMessage;
+ }
+
+ public void catchMessage(Message message)
+ {
+ MessageManager mm = MessageManager.locateMessageManager();
+ if (message.getName().equals("InvalidDataMsg"))
+ mm.sendMessage(proc.getID(), "ReceiveReqTask", getValidRequestMessage());
+ else if (message.getName().equals("OfferMsg"))
+ mm.sendMessage(proc.getID(), "ReceiveOrderTask", getAcceptOfferMessage());
+ else if (message.getName().equals("ConfirmMsg"))
+ confirmMessage = message;
+ }
+
+ public ObjectName getMessageListenerID()
+ {
+ return targetID;
+ }
+ }
+
@Override
protected void setUp() throws Exception
{
@@ -66,7 +98,7 @@
{
public void catchSignal(Signal signal)
{
- System.out.println(signal);
+ //System.out.println(signal);
}
};
SignalManager engine = SignalManager.locateSignalManager();
@@ -88,13 +120,21 @@
public void testValidRequest() throws Exception
{
- Process proc = buildDynamicProcess();
+ final Process proc = buildDynamicProcess();
proc.startProcess();
+ ObjectName listenerID = getMessageListenerID();
MessageManager mm = MessageManager.locateMessageManager();
+ AirticketMessageListener msgListener = new AirticketMessageListener(proc, listenerID);
+ mm.addMessageListener(msgListener);
+
mm.sendMessage(proc.getID(), "ReceiveReqTask", getValidRequestMessage());
+ proc.waitForEnd();
- proc.waitForEnd();
+ Message confirmMessage = msgListener.getConfirmMessage();
+ assertNotNull("Expected confirm message", confirmMessage);
+ String price = confirmMessage.getProperty("Price").getValue().getExpressionBody();
+ assertEquals("222", price);
}
public void testInvalidRequest() throws Exception
@@ -102,25 +142,18 @@
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;
- }
- };
+ ObjectName listenerID = getMessageListenerID();
+ MessageManager mm = MessageManager.locateMessageManager();
+ AirticketMessageListener msgListener = new AirticketMessageListener(proc, listenerID);
mm.addMessageListener(msgListener);
- mm.sendMessage(proc.getID(), "ReceiveReqTask", getInvalidRequestMessage(listenerID));
-
+ mm.sendMessage(proc.getID(), "ReceiveReqTask", getInvalidRequestMessage());
proc.waitForEnd();
+
+ Message confirmMessage = msgListener.getConfirmMessage();
+ assertNotNull("Expected confirm message", confirmMessage);
+ String price = confirmMessage.getProperty("Price").getValue().getExpressionBody();
+ assertEquals("222", price);
}
private Process buildDynamicProcess()
@@ -130,7 +163,7 @@
ProcessBuilder procBuilder = procFactory.newProcessBuilder();
procBuilder.addProcess("Airticket").addStartEvent().addSequenceFlow("ReceiveReqTask");
- // Build the ReceiveReq Task
+ // Build the ReceiveReqTask
TaskBuilder taskBuilder = procBuilder.addTask("ReceiveReqTask", TaskType.Receive);
taskBuilder.addMessageRef("ReqDataMsg", null).
addMessageProperty("Name", null, true).
@@ -140,7 +173,7 @@
addMessageProperty("Seats", null, true).
addSequenceFlow("ValidateTask");
- // Build the Validate Task
+ // Build the ValidateTask
taskBuilder = procBuilder.addTask("ValidateTask", TaskType.None);
taskBuilder.addInputSet().
addPropertyInput("Name", null).
@@ -153,16 +186,25 @@
addIORule("Name != null && From != null && To != null && Date != null && Seats > 0", ExpressionLanguage.MVEL).
addSequenceFlow("ValidateGateway");
- // Build the Validate Gateway
+ // Build the ValidateGateway
GatewayBuilder gatewayBuilder = procBuilder.addGateway("ValidateGateway", GatewayType.Exclusive);
gatewayBuilder.addConditionalGate("CheckAvailabilityTask", ExpressionLanguage.MVEL, "isReqDataValid == true").
addDefaultGate("SendInvalidTask");
- // Build the CheckAvailability Task
+ // Build the CheckAvailabilityTask
taskBuilder = procBuilder.addTask("CheckAvailabilityTask", TaskType.None);
- taskBuilder.addSequenceFlow("End");
+ taskBuilder.addExecutionHandler(AvailabilityHandler.class).
+ addInputSet().
+ addPropertyInput("From", null).
+ addPropertyInput("To", null).
+ addPropertyInput("Date", null).
+ addPropertyInput("Seats", null).
+ addOutputSet().
+ addPropertyOutput("isAvailable", null).
+ addPropertyOutput("Price", null).
+ addSequenceFlow("AvailabilityGateway");
- // Build the SendInvalid Task
+ // Build the SendInvalidTask
taskBuilder = procBuilder.addTask("SendInvalidTask", TaskType.Send);
taskBuilder.addMessageRef("InvalidDataMsg", getMessageListenerID()).
addMessageProperty("Name", null, true).
@@ -172,7 +214,84 @@
addMessageProperty("Seats", null, true).
addSequenceFlow("ReceiveReqTask");
- // Add the EndEvent get the Process
+ // Build the AvailabilityGateway
+ gatewayBuilder = procBuilder.addGateway("AvailabilityGateway", GatewayType.Exclusive);
+ gatewayBuilder.addConditionalGate("SendOfferTask", ExpressionLanguage.MVEL, "isAvailable == true").
+ addDefaultGate("SendNotAvailableTask");
+
+ // Build the SendOfferTask
+ taskBuilder = procBuilder.addTask("SendOfferTask", TaskType.Send);
+ taskBuilder.addMessageRef("OfferMsg", getMessageListenerID()).
+ addMessageProperty("Name", null, true).
+ addMessageProperty("From", null, true).
+ addMessageProperty("To", null, true).
+ addMessageProperty("Date", null, true).
+ addMessageProperty("Seats", null, true).
+ addMessageProperty("Price", null, true).
+ addSequenceFlow("ReceiveOrderTask");
+
+ // Build the SendNotAvailableTask
+ taskBuilder = procBuilder.addTask("SendNotAvailableTask", TaskType.Send);
+ taskBuilder.addMessageRef("NotAvailableMsg", getMessageListenerID()).
+ addMessageProperty("Name", null, true).
+ addMessageProperty("From", null, true).
+ addMessageProperty("To", null, true).
+ addMessageProperty("Date", null, true).
+ addMessageProperty("Seats", null, true).
+ addSequenceFlow("ReceiveReqTask");
+
+ // Build the ReceiveReqTask
+ taskBuilder = procBuilder.addTask("ReceiveOrderTask", TaskType.Receive);
+ taskBuilder.addMessageRef("AcceptOfferMsg", null).
+ addMessageProperty("CreditCard", null, true).
+ addMessageProperty("Expire", null, true).
+ addMessageProperty("isOfferAccepted", null, true).
+ addSequenceFlow("AcceptOfferGateway");
+
+ // Build the AcceptOfferGateway
+ gatewayBuilder = procBuilder.addGateway("AcceptOfferGateway", GatewayType.Exclusive);
+ gatewayBuilder.addConditionalGate("ParallelSplitGateway", ExpressionLanguage.MVEL, "isOfferAccepted == true").
+ addDefaultGate("ReceiveReqTask");
+
+ // Build the AcceptOfferGateway
+ gatewayBuilder = procBuilder.addGateway("ParallelSplitGateway", GatewayType.Parallel);
+ gatewayBuilder.addGate("CreditCardTask").
+ addGate("BookingTask");
+
+ // Build the CreditCardTask
+ taskBuilder = procBuilder.addTask("CreditCardTask", TaskType.None);
+ taskBuilder.addInputSet().
+ addPropertyInput("CreditCard", null).
+ addPropertyInput("Expire", null).
+ addPropertyInput("Price", null).
+ addSequenceFlow("SynchronizedJoinGateway");
+
+ // Build the BookingTask
+ taskBuilder = procBuilder.addTask("BookingTask", TaskType.None);
+ taskBuilder.addInputSet().
+ addPropertyInput("Name", null).
+ addPropertyInput("From", null).
+ addPropertyInput("To", null).
+ addPropertyInput("Date", null).
+ addPropertyInput("Seats", null).
+ addSequenceFlow("SynchronizedJoinGateway");
+
+ // Build the SynchronizedJoinGateway
+ gatewayBuilder = procBuilder.addGateway("SynchronizedJoinGateway", GatewayType.Parallel);
+ gatewayBuilder.addGate("SendConfirmTask");
+
+ // Build the SendConfirmTask
+ taskBuilder = procBuilder.addTask("SendConfirmTask", TaskType.Send);
+ taskBuilder.addMessageRef("ConfirmMsg", getMessageListenerID()).
+ addMessageProperty("Name", null, true).
+ addMessageProperty("From", null, true).
+ addMessageProperty("To", null, true).
+ addMessageProperty("Date", null, true).
+ addMessageProperty("Seats", null, true).
+ addMessageProperty("Price", null, true).
+ addSequenceFlow("End");
+
+ // Add the EndEvent
Process proc = procBuilder.addEndEvent("End").getProcess();
ProcessManager pm = ProcessManager.locateProcessManager();
pm.registerProcess(proc);
@@ -188,16 +307,16 @@
addProperty("From", "MUC").
addProperty("To", "NYC").
addProperty("Date", "25-Jul-2008").
- addProperty("Seats", "1").
+ addProperty("Seats", "2").
getMessage();
return msg;
}
- private Message getInvalidRequestMessage(ObjectName targetID)
+ private Message getInvalidRequestMessage()
{
MessageBuilderFactory msgFactory = MessageBuilderFactory.newInstance();
MessageBuilder msgBuilder = msgFactory.newMessageBuilder();
- Message msg = msgBuilder.newMessage("ReqDataMsg", targetID).
+ Message msg = msgBuilder.newMessage("ReqDataMsg", getMessageListenerID()).
addProperty("Name", "Kermit").
addProperty("From", "MUC").
addProperty("To", "NYC").
@@ -206,4 +325,26 @@
getMessage();
return msg;
}
+
+ private Message getAcceptOfferMessage()
+ {
+ MessageBuilderFactory msgFactory = MessageBuilderFactory.newInstance();
+ MessageBuilder msgBuilder = msgFactory.newMessageBuilder();
+ Message msg = msgBuilder.newMessage("AcceptOfferMsg", null).
+ addProperty("CreditCard", "1234-1234-1234-1234").
+ addProperty("Expire", "25-Jul-2012").
+ addProperty("isOfferAccepted", "true").
+ getMessage();
+ return msg;
+ }
+
+ private Message getDenyOfferMessage()
+ {
+ MessageBuilderFactory msgFactory = MessageBuilderFactory.newInstance();
+ MessageBuilder msgBuilder = msgFactory.newMessageBuilder();
+ Message msg = msgBuilder.newMessage("AcceptOfferMsg", null).
+ addProperty("isOfferAccepted", "false").
+ getMessage();
+ return msg;
+ }
}
\ No newline at end of file
Added: jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/airticket/AvailabilityHandler.java
===================================================================
--- jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/airticket/AvailabilityHandler.java (rev 0)
+++ jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/airticket/AvailabilityHandler.java 2008-07-29 14:55:18 UTC (rev 1749)
@@ -0,0 +1,48 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.samples.airticket;
+
+// $Id$
+
+import org.jboss.bpm.model.InputSet;
+import org.jboss.bpm.model.OutputSet;
+import org.jboss.bpm.model.PropertyBuilder;
+import org.jboss.bpm.model.PropertyBuilderFactory;
+import org.jboss.bpm.runtime.ExecutionHandler;
+import org.jboss.bpm.runtime.Token;
+
+/**
+ * An ExecutionHandler that adds the required outputSet properties
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 04-Jul-2008
+ */
+public class AvailabilityHandler implements ExecutionHandler
+{
+ public void execute(Token token, InputSet inputSet, OutputSet outputSet)
+ {
+ PropertyBuilder builder = PropertyBuilderFactory.newInstance().newPropertyBuilder();
+ Integer seats = Integer.valueOf(inputSet.getProperty("Seats").getValue().getExpressionBody());
+ outputSet.addProperty(builder.newProperty("isAvailable", new Boolean(seats < 10).toString()));
+ outputSet.addProperty(builder.newProperty("Price", new Integer(seats * 111).toString()));
+ }
+}
Property changes on: jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/airticket/AvailabilityHandler.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
15 years, 9 months
JBoss JBPM SVN: r1748 - in jbpm4/pvm/trunk/modules/core/src: main/java/org/jbpm/pvm/internal/log and 20 other directories.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2008-07-29 09:25:51 -0400 (Tue, 29 Jul 2008)
New Revision: 1748
Added:
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/env/SpringEnvironmentFactory.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/BasicFeaturesTests.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/svc/
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/env/
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/spring/
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/spring/SpringTests.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/expr/
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/expr/GroovyExpressionTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/expr/JuelExpressionTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/ExclusiveTestMessage.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/FailOnceTestMessage.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/FailingTestMessage.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTests.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTimerSessionTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/TestMessage.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/TestTimer.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/cron/
jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/api/
jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/api/db/
jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/api/db/svc/
jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/api/spring/
jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/internal/jobexecutor/
Removed:
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/spring/SpringEnvironmentFactory.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/db/
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/env/
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/expr/
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/expr/ExpressionTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/jobexecutor/
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/spring/
jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/db/
jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/jobexecutor/
jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/spring/
Modified:
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/log/LogFormatter.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/spring/SpringEnvironment.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/test/base/JbpmTestCase.java
jbpm4/pvm/trunk/modules/core/src/main/resources/org/jbpm/pvm/wire.xsd
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/CheckInTests.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/DbTests.java
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/db/svc/DbSvcTests.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/svc/ExecutionServiceTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/svc/ManagementServiceTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/svc/ProcessServiceTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/env/BasicEnvironmentTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/env/EnvironmentClassLoaderTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/env/EnvironmentSearchOrderTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/env/EnvironmentTests.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/env/EnvironmentTypeLookupTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/env/NestedEnvironmentTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/spring/SpringTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/cron/CronExpression.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/cron/CronTrigger.java
jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/api/spring/spring.beans.xml
jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/internal/jobexecutor/environment.cfg.xml
jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/internal/jobexecutor/mappings.hbm.xml
Log:
test suite clean up
Copied: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/env/SpringEnvironmentFactory.java (from rev 1741, jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/spring/SpringEnvironmentFactory.java)
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/env/SpringEnvironmentFactory.java (rev 0)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/env/SpringEnvironmentFactory.java 2008-07-29 13:25:51 UTC (rev 1748)
@@ -0,0 +1,97 @@
+/*
+ * 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.env;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.jbpm.pvm.internal.spring.SpringEnvironment;
+import org.jbpm.pvm.internal.util.ReflectUtil;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.ApplicationContextAware;
+
+/** this environment factory will see only the singleton beans.
+ *
+ * The created {@link SpringEnvironment}s will see the prototype
+ * beans and it will cache them.
+ *
+ * @author Tom Baeyens
+ */
+public class SpringEnvironmentFactory extends EnvironmentFactory implements ApplicationContextAware {
+
+ // TODO pull up the common behaviour between this class and the SpringEnvironmentContext
+
+ private static final long serialVersionUID = 1L;
+
+ ApplicationContext applicationContext;
+
+ public SpringEnvironment openEnvironment() {
+ return new SpringEnvironment(this);
+ }
+
+ public boolean has(String key) {
+ return applicationContext.isSingleton(key);
+ }
+
+ public Object get(String key) {
+ if (has(key)) {
+ return applicationContext.getBean(key);
+ }
+ return null;
+ }
+
+ public <T> T get(Class<T> type) {
+ String name = ReflectUtil.getUnqualifiedClassName(type);
+ name = name.substring(0, 1).toLowerCase() + name.substring(1);
+ return (T) get(name);
+ }
+
+ public Set<String> keys() {
+ HashSet<String> keys = new HashSet<String>();
+ for (String key : applicationContext.getBeanDefinitionNames()) {
+ if (has(key)) {
+ keys.add(key);
+ }
+ }
+ return keys;
+ }
+
+ public ApplicationContext getApplicationContext() {
+ return applicationContext;
+ }
+
+ public void setApplicationContext(ApplicationContext applicationContext) {
+ this.applicationContext = applicationContext;
+ }
+
+
+ public void close() {
+ }
+
+ public String getName() {
+ return null;
+ }
+
+ public Object set(String key, Object value) {
+ return null;
+ }
+}
Property changes on: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/env/SpringEnvironmentFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/log/LogFormatter.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/log/LogFormatter.java 2008-07-29 12:13:03 UTC (rev 1747)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/log/LogFormatter.java 2008-07-29 13:25:51 UTC (rev 1748)
@@ -75,7 +75,7 @@
return indentation;
}
- public void resetIndentation() {
+ public static void resetIndentation() {
indentations = new HashMap<Integer, Integer>();
}
}
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/spring/SpringEnvironment.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/spring/SpringEnvironment.java 2008-07-29 12:13:03 UTC (rev 1747)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/spring/SpringEnvironment.java 2008-07-29 13:25:51 UTC (rev 1748)
@@ -28,6 +28,7 @@
import org.jbpm.pvm.env.Context;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.env.EnvironmentFactory;
+import org.jbpm.pvm.env.SpringEnvironmentFactory;
import org.jbpm.pvm.env.Transaction;
import org.springframework.context.ApplicationContext;
Deleted: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/spring/SpringEnvironmentFactory.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/spring/SpringEnvironmentFactory.java 2008-07-29 12:13:03 UTC (rev 1747)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/spring/SpringEnvironmentFactory.java 2008-07-29 13:25:51 UTC (rev 1748)
@@ -1,97 +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.pvm.internal.spring;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.jbpm.pvm.env.EnvironmentFactory;
-import org.jbpm.pvm.internal.util.ReflectUtil;
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.ApplicationContextAware;
-
-/** this environment factory will see only the singleton beans.
- *
- * The created {@link SpringEnvironment}s will see the prototype
- * beans and it will cache them.
- *
- * @author Tom Baeyens
- */
-public class SpringEnvironmentFactory extends EnvironmentFactory implements ApplicationContextAware {
-
- // TODO pull up the common behaviour between this class and the SpringEnvironmentContext
-
- private static final long serialVersionUID = 1L;
-
- ApplicationContext applicationContext;
-
- public SpringEnvironment openEnvironment() {
- return new SpringEnvironment(this);
- }
-
- public boolean has(String key) {
- return applicationContext.isSingleton(key);
- }
-
- public Object get(String key) {
- if (has(key)) {
- return applicationContext.getBean(key);
- }
- return null;
- }
-
- public <T> T get(Class<T> type) {
- String name = ReflectUtil.getUnqualifiedClassName(type);
- name = name.substring(0, 1).toLowerCase() + name.substring(1);
- return (T) get(name);
- }
-
- public Set<String> keys() {
- HashSet<String> keys = new HashSet<String>();
- for (String key : applicationContext.getBeanDefinitionNames()) {
- if (has(key)) {
- keys.add(key);
- }
- }
- return keys;
- }
-
- public ApplicationContext getApplicationContext() {
- return applicationContext;
- }
-
- public void setApplicationContext(ApplicationContext applicationContext) {
- this.applicationContext = applicationContext;
- }
-
-
- public void close() {
- }
-
- public String getName() {
- return null;
- }
-
- public Object set(String key, Object value) {
- return null;
- }
-}
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/test/base/JbpmTestCase.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/test/base/JbpmTestCase.java 2008-07-29 12:13:03 UTC (rev 1747)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/test/base/JbpmTestCase.java 2008-07-29 13:25:51 UTC (rev 1748)
@@ -29,6 +29,7 @@
import org.jbpm.pvm.env.PvmEnvironmentFactory;
import org.jbpm.pvm.internal.log.Jdk14LogFactory;
import org.jbpm.pvm.internal.log.Log;
+import org.jbpm.pvm.internal.log.LogFormatter;
public abstract class JbpmTestCase extends TestCase {
@@ -37,6 +38,7 @@
}
public void setUp() throws Exception {
+ LogFormatter.resetIndentation();
log.info("=== starting "+getName()+" =============================");
}
Modified: jbpm4/pvm/trunk/modules/core/src/main/resources/org/jbpm/pvm/wire.xsd
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/resources/org/jbpm/pvm/wire.xsd 2008-07-29 12:13:03 UTC (rev 1747)
+++ jbpm4/pvm/trunk/modules/core/src/main/resources/org/jbpm/pvm/wire.xsd 2008-07-29 13:25:51 UTC (rev 1748)
@@ -827,7 +827,7 @@
</element>
<element name="transaction-ref">
- <annotation><documentation>Reference to the org.jbpm.pvm.env.Transaction in the
+ <annotation><documentation>Reference to the org.jbpm.pvm.api.env.Transaction in the
current environment.
</documentation></annotation>
</element>
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/CheckInTests.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/CheckInTests.java 2008-07-29 12:13:03 UTC (rev 1747)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/CheckInTests.java 2008-07-29 13:25:51 UTC (rev 1748)
@@ -30,7 +30,7 @@
public class CheckInTests {
public static Test suite() {
- TestSuite suite = new TestSuite("Test for org.jbpm");
+ TestSuite suite = new TestSuite("check in tests");
//$JUnit-BEGIN$
suite.addTest(NonDbTests.suite());
suite.addTest(DbTests.suite());
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 12:13:03 UTC (rev 1747)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/DbTests.java 2008-07-29 13:25:51 UTC (rev 1748)
@@ -24,10 +24,11 @@
import junit.framework.Test;
import junit.framework.TestSuite;
-import org.jbpm.pvm.db.svc.DbSvcTests;
+import org.jbpm.pvm.api.db.svc.DbSvcTests;
+import org.jbpm.pvm.api.spring.SpringTests;
import org.jbpm.pvm.internal.db.langext.DbLangExtTests;
import org.jbpm.pvm.internal.db.model.DbModelTests;
-import org.jbpm.pvm.jobexecutor.JobExecutorTests;
+import org.jbpm.pvm.internal.jobexecutor.JobExecutorTests;
/**
@@ -36,13 +37,14 @@
public class DbTests {
public static Test suite() {
- TestSuite suite = new TestSuite("Test for org.jbpm.pvm");
+ TestSuite suite = new TestSuite("db tests");
//$JUnit-BEGIN$
suite.addTest(DbLangExtTests.suite());
suite.addTest(DbModelTests.suite());
suite.addTest(DbSvcTests.suite());
suite.addTest(JobExecutorTests.suite());
+ suite.addTest(SpringTests.suite());
//$JUnit-END$
return suite;
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 12:13:03 UTC (rev 1747)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/NonDbTests.java 2008-07-29 13:25:51 UTC (rev 1748)
@@ -24,8 +24,8 @@
import junit.framework.Test;
import junit.framework.TestSuite;
-import org.jbpm.pvm.api.basicfeatures.PvmClientTests;
-import org.jbpm.pvm.env.EnvironmentTests;
+import org.jbpm.pvm.api.basicfeatures.BasicFeaturesTests;
+import org.jbpm.pvm.api.env.EnvironmentTests;
import org.jbpm.wire.WireTests;
@@ -35,10 +35,10 @@
public class NonDbTests {
public static Test suite() {
- TestSuite suite = new TestSuite("Test for org.jbpm.pvm");
+ TestSuite suite = new TestSuite("non db tests");
//$JUnit-BEGIN$
suite.addTest(EnvironmentTests.suite());
- suite.addTest(PvmClientTests.suite());
+ suite.addTest(BasicFeaturesTests.suite());
suite.addTest(WireTests.suite());
//$JUnit-END$
return suite;
Copied: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/BasicFeaturesTests.java (from rev 1742, 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/BasicFeaturesTests.java (rev 0)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/BasicFeaturesTests.java 2008-07-29 13:25:51 UTC (rev 1748)
@@ -0,0 +1,57 @@
+/*
+ * 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.api.basicfeatures;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class BasicFeaturesTests {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite("org.jbpm.pvm.api.basicfeatures");
+ //$JUnit-BEGIN$
+ suite.addTestSuite(BasicExecutionFlowTest.class);
+ suite.addTestSuite(TransitionAsWaitStateTest.class);
+ suite.addTestSuite(TransitionBasedConcurrencyTest.class);
+ suite.addTestSuite(ScopeStateTest.class);
+ suite.addTestSuite(SubProcessTest.class);
+ suite.addTestSuite(ExecutionStateTest.class);
+ suite.addTestSuite(ExceptionHandlerTest.class);
+ suite.addTestSuite(FunctionalActivityTest.class);
+ suite.addTestSuite(ScopeVariableDeclarationTest.class);
+ suite.addTestSuite(LoopingTest.class);
+ suite.addTestSuite(TransitionEventsTest.class);
+ suite.addTestSuite(ExternalDecisionTest.class);
+ suite.addTestSuite(VariableTest.class);
+ suite.addTestSuite(ScopeVariableTest.class);
+ suite.addTestSuite(EventTest.class);
+ suite.addTestSuite(AutomaticDecisionTest.class);
+ suite.addTestSuite(EventPropagationTest.class);
+ //$JUnit-END$
+ return suite;
+ }
+
+}
Deleted: 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/PvmClientTests.java 2008-07-29 12:13:03 UTC (rev 1747)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/basicfeatures/PvmClientTests.java 2008-07-29 13:25:51 UTC (rev 1748)
@@ -1,57 +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.pvm.api.basicfeatures;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-
-/**
- * @author Tom Baeyens
- */
-public class PvmClientTests {
-
- public static Test suite() {
- TestSuite suite = new TestSuite("Test for org.jbpm.pvm.client");
- //$JUnit-BEGIN$
- suite.addTestSuite(BasicExecutionFlowTest.class);
- suite.addTestSuite(TransitionAsWaitStateTest.class);
- suite.addTestSuite(TransitionBasedConcurrencyTest.class);
- suite.addTestSuite(ScopeStateTest.class);
- suite.addTestSuite(SubProcessTest.class);
- suite.addTestSuite(ExecutionStateTest.class);
- suite.addTestSuite(ExceptionHandlerTest.class);
- suite.addTestSuite(FunctionalActivityTest.class);
- suite.addTestSuite(ScopeVariableDeclarationTest.class);
- suite.addTestSuite(LoopingTest.class);
- suite.addTestSuite(TransitionEventsTest.class);
- suite.addTestSuite(ExternalDecisionTest.class);
- suite.addTestSuite(VariableTest.class);
- suite.addTestSuite(ScopeVariableTest.class);
- suite.addTestSuite(EventTest.class);
- suite.addTestSuite(AutomaticDecisionTest.class);
- suite.addTestSuite(EventPropagationTest.class);
- //$JUnit-END$
- return suite;
- }
-
-}
Copied: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/svc (from rev 1741, jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/db/svc)
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/svc/DbSvcTests.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/db/svc/DbSvcTests.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/svc/DbSvcTests.java 2008-07-29 13:25:51 UTC (rev 1748)
@@ -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.svc;
+package org.jbpm.pvm.api.db.svc;
import junit.framework.Test;
import junit.framework.TestSuite;
@@ -31,7 +31,7 @@
public class DbSvcTests {
public static Test suite() {
- TestSuite suite = new TestSuite("Test for org.jbpm.pvm.db.svc");
+ TestSuite suite = new TestSuite("org.jbpm.pvm.api.db.svc");
//$JUnit-BEGIN$
suite.addTestSuite(ExecutionServiceTest.class);
suite.addTestSuite(ProcessServiceTest.class);
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/svc/ExecutionServiceTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/db/svc/ExecutionServiceTest.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/svc/ExecutionServiceTest.java 2008-07-29 13:25:51 UTC (rev 1748)
@@ -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.svc;
+package org.jbpm.pvm.api.db.svc;
import java.util.ArrayList;
import java.util.HashMap;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/svc/ManagementServiceTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/db/svc/ManagementServiceTest.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/svc/ManagementServiceTest.java 2008-07-29 13:25:51 UTC (rev 1748)
@@ -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.svc;
+package org.jbpm.pvm.api.db.svc;
import org.jbpm.pvm.test.base.ServiceTestCase;
import org.jbpm.pvm.ManagementService;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/svc/ProcessServiceTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/db/svc/ProcessServiceTest.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/svc/ProcessServiceTest.java 2008-07-29 13:25:51 UTC (rev 1748)
@@ -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.svc;
+package org.jbpm.pvm.api.db.svc;
import java.util.ArrayList;
import java.util.List;
Copied: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/env (from rev 1741, jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/env)
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/env/BasicEnvironmentTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/env/BasicEnvironmentTest.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/env/BasicEnvironmentTest.java 2008-07-29 13:25:51 UTC (rev 1748)
@@ -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.env;
+package org.jbpm.pvm.api.env;
import org.jbpm.pvm.test.base.JbpmTestCase;
import org.jbpm.pvm.env.Context;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/env/EnvironmentClassLoaderTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/env/EnvironmentClassLoaderTest.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/env/EnvironmentClassLoaderTest.java 2008-07-29 13:25:51 UTC (rev 1748)
@@ -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.env;
+package org.jbpm.pvm.api.env;
import org.jbpm.pvm.test.base.JbpmTestCase;
import org.jbpm.pvm.env.Environment;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/env/EnvironmentSearchOrderTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/env/EnvironmentSearchOrderTest.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/env/EnvironmentSearchOrderTest.java 2008-07-29 13:25:51 UTC (rev 1748)
@@ -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.env;
+package org.jbpm.pvm.api.env;
import org.jbpm.pvm.test.base.JbpmTestCase;
import org.jbpm.pvm.env.Environment;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/env/EnvironmentTests.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/env/EnvironmentTests.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/env/EnvironmentTests.java 2008-07-29 13:25:51 UTC (rev 1748)
@@ -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.env;
+package org.jbpm.pvm.api.env;
import junit.framework.Test;
import junit.framework.TestSuite;
@@ -31,7 +31,7 @@
public class EnvironmentTests {
public static Test suite() {
- TestSuite suite = new TestSuite("Test for org.jbpm.pvm.env");
+ TestSuite suite = new TestSuite("org.jbpm.pvm.api.env");
//$JUnit-BEGIN$
suite.addTestSuite(EnvironmentTypeLookupTest.class);
suite.addTestSuite(NestedEnvironmentTest.class);
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/env/EnvironmentTypeLookupTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/env/EnvironmentTypeLookupTest.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/env/EnvironmentTypeLookupTest.java 2008-07-29 13:25:51 UTC (rev 1748)
@@ -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.env;
+package org.jbpm.pvm.api.env;
import org.jbpm.pvm.test.base.JbpmTestCase;
import org.jbpm.pvm.env.Environment;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/env/NestedEnvironmentTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/env/NestedEnvironmentTest.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/env/NestedEnvironmentTest.java 2008-07-29 13:25:51 UTC (rev 1748)
@@ -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.env;
+package org.jbpm.pvm.api.env;
import org.jbpm.pvm.test.base.JbpmTestCase;
import org.jbpm.pvm.env.Environment;
Copied: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/spring (from rev 1741, jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/spring)
Property changes on: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/spring
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/spring/SpringTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/spring/SpringTest.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/spring/SpringTest.java 2008-07-29 13:25:51 UTC (rev 1748)
@@ -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.spring;
+package org.jbpm.pvm.api.spring;
import org.hibernate.Session;
import org.jbpm.pvm.test.base.JbpmTestCase;
@@ -36,7 +36,7 @@
public class SpringTest extends JbpmTestCase {
public void testOne() {
- ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext("org/jbpm/pvm/spring/spring.beans.xml");
+ ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext("org/jbpm/pvm/api/spring/spring.beans.xml");
EnvironmentFactory environmentFactory = (EnvironmentFactory) applicationContext.getBean("environmentFactory");
CommandService commandService = environmentFactory.get(CommandService.class);
Added: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/spring/SpringTests.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/spring/SpringTests.java (rev 0)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/spring/SpringTests.java 2008-07-29 13:25:51 UTC (rev 1748)
@@ -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.jbpm.pvm.api.spring;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class SpringTests {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite("org.jbpm.pvm.api.spring");
+ //$JUnit-BEGIN$
+ suite.addTestSuite(SpringTest.class);
+ //$JUnit-END$
+ return suite;
+ }
+
+}
Copied: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/expr (from rev 1741, jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/expr)
Property changes on: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/expr
___________________________________________________________________
Name: svn:mergeinfo
+
Deleted: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/expr/ExpressionTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/expr/ExpressionTest.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/expr/ExpressionTest.java 2008-07-29 13:25:51 UTC (rev 1748)
@@ -1,72 +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.pvm.expr;
-
-import javax.el.ExpressionFactory;
-
-import org.jbpm.pvm.samples.activities.WaitState;
-import org.jbpm.pvm.test.base.JbpmTestCase;
-import org.jbpm.pvm.client.ClientProcessInstance;
-import org.jbpm.pvm.env.Environment;
-import org.jbpm.pvm.env.EnvironmentFactory;
-import org.jbpm.pvm.env.PvmEnvironmentFactory;
-import org.jbpm.pvm.internal.script.ScriptManager;
-import org.jbpm.pvm.model.ProcessFactory;
-
-
-/**
- * @author Tom Baeyens
- * @author Pascal Verdage
- */
-public class ExpressionTest extends JbpmTestCase
-{
-
- public void testExpressionManagerParsing() {
- EnvironmentFactory environmentFactory = PvmEnvironmentFactory.parseXmlString(
- "<contexts>" +
- " <environment-factory>" +
- " <script-manager default-expression-language='juel'" +
- " default-script-language='juel'" +
- " read-contexts='execution, environment, environment-factory' " +
- " write-context='execution'>" +
- " <script-language name='juel' factory='com.sun.script.juel.JuelScriptEngineFactory' />" +
-// " <script-language name='groovy' factory='com.sun.script.groovy.GroovyScriptEngineFactory' />" +
- " </script-manager>" +
- " </environment-factory>" +
- "</contexts>"
- );
-
- ScriptManager scriptManager = environmentFactory.get(ScriptManager.class);
- ClientProcessInstance execution =
- ProcessFactory.build()
- .node("unused").initial().behaviour(WaitState.class)
- .done().beginProcessInstance();
- execution.setVariable("pv", "hello");
- Environment environment = environmentFactory.openEnvironment();
- try {
- assertEquals("hello", scriptManager.evaluateExpression("#{pv}", execution, null));
- // assertEquals("hello", scriptManager.evaluateExpression("pv", execution, "groovy"));
- } finally {
- environment.close();
- }
- }
-}
Added: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/expr/GroovyExpressionTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/expr/GroovyExpressionTest.java (rev 0)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/expr/GroovyExpressionTest.java 2008-07-29 13:25:51 UTC (rev 1748)
@@ -0,0 +1,68 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.pvm.internal.expr;
+
+import org.jbpm.pvm.client.ClientProcessInstance;
+import org.jbpm.pvm.env.Environment;
+import org.jbpm.pvm.env.EnvironmentFactory;
+import org.jbpm.pvm.env.PvmEnvironmentFactory;
+import org.jbpm.pvm.internal.script.ScriptManager;
+import org.jbpm.pvm.model.ProcessFactory;
+import org.jbpm.pvm.samples.activities.WaitState;
+import org.jbpm.pvm.test.base.JbpmTestCase;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class GroovyExpressionTest extends JbpmTestCase {
+
+ public void testGroovyExpression() {
+ EnvironmentFactory environmentFactory = PvmEnvironmentFactory.parseXmlString(
+ "<contexts>" +
+ " <environment-factory>" +
+ " <script-manager default-expression-language='juel'" +
+ " default-script-language='juel'" +
+ " read-contexts='execution, environment, environment-factory' " +
+ " write-context='execution'>" +
+ " <script-language name='groovy' factory='com.sun.script.groovy.GroovyScriptEngineFactory' />" +
+ " </script-manager>" +
+ " </environment-factory>" +
+ "</contexts>"
+ );
+
+ ScriptManager scriptManager = environmentFactory.get(ScriptManager.class);
+
+ ClientProcessInstance execution = ProcessFactory.build()
+ .node("unused").initial().behaviour(WaitState.class)
+ .done().beginProcessInstance();
+
+ execution.setVariable("pv", "hello");
+
+ Environment environment = environmentFactory.openEnvironment();
+ try {
+ assertEquals("hello", scriptManager.evaluateExpression("pv", execution, "groovy"));
+ } finally {
+ environment.close();
+ }
+ }
+}
Copied: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/expr/JuelExpressionTest.java (from rev 1741, jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/expr/ExpressionTest.java)
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/expr/JuelExpressionTest.java (rev 0)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/expr/JuelExpressionTest.java 2008-07-29 13:25:51 UTC (rev 1748)
@@ -0,0 +1,68 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.pvm.internal.expr;
+
+import org.jbpm.pvm.client.ClientProcessInstance;
+import org.jbpm.pvm.env.Environment;
+import org.jbpm.pvm.env.EnvironmentFactory;
+import org.jbpm.pvm.env.PvmEnvironmentFactory;
+import org.jbpm.pvm.internal.script.ScriptManager;
+import org.jbpm.pvm.model.ProcessFactory;
+import org.jbpm.pvm.samples.activities.WaitState;
+import org.jbpm.pvm.test.base.JbpmTestCase;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class JuelExpressionTest extends JbpmTestCase {
+
+ public void testJuelExpression() {
+ EnvironmentFactory environmentFactory = PvmEnvironmentFactory.parseXmlString(
+ "<contexts>" +
+ " <environment-factory>" +
+ " <script-manager default-expression-language='juel'" +
+ " default-script-language='juel'" +
+ " read-contexts='execution, environment, environment-factory' " +
+ " write-context='execution'>" +
+ " <script-language name='juel' factory='com.sun.script.juel.JuelScriptEngineFactory' />" +
+ " </script-manager>" +
+ " </environment-factory>" +
+ "</contexts>"
+ );
+
+ ScriptManager scriptManager = environmentFactory.get(ScriptManager.class);
+
+ ClientProcessInstance execution = ProcessFactory.build()
+ .node("unused").initial().behaviour(WaitState.class)
+ .done().beginProcessInstance();
+
+ execution.setVariable("pv", "hello");
+
+ Environment environment = environmentFactory.openEnvironment();
+ try {
+ assertEquals("hello", scriptManager.evaluateExpression("#{pv}", execution, null));
+ } finally {
+ environment.close();
+ }
+ }
+}
Property changes on: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/expr/JuelExpressionTest.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Copied: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/ExclusiveTestMessage.java (from rev 1741, jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/jobexecutor/ExclusiveTestMessage.java)
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/ExclusiveTestMessage.java (rev 0)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/ExclusiveTestMessage.java 2008-07-29 13:25:51 UTC (rev 1748)
@@ -0,0 +1,87 @@
+/*
+ * 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.internal.jobexecutor;
+
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Random;
+import java.util.Set;
+
+import org.jbpm.pvm.env.Environment;
+import org.jbpm.pvm.internal.job.MessageImpl;
+import org.jbpm.pvm.internal.log.Log;
+import org.jbpm.pvm.internal.model.ExecutionImpl;
+import org.jbpm.pvm.model.OpenExecution;
+import org.jbpm.pvm.session.DbSession;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class ExclusiveTestMessage extends MessageImpl<Object> {
+
+ private static final long serialVersionUID = 1L;
+ private static final Log log = Log.getLog(ExclusiveTestMessage.class.getName());
+ static Random random = new Random();
+
+ public ExclusiveTestMessage() {
+ }
+
+ public ExclusiveTestMessage(OpenExecution execution) {
+ this.execution = (ExecutionImpl) execution;
+ this.processInstance = (ExecutionImpl) execution.getProcessInstance();
+ this.isExclusive = true;
+ }
+
+ public Object execute(Environment environment) throws Exception {
+ Long threadId = Thread.currentThread().getId();
+ String executionKey = execution.getKey();
+
+ // exclusiveMessageIds maps execution keys to a set of thread ids.
+ // the idea is that for each execution, all the exclusive jobs will
+ // be executed by 1 thread sequentially.
+
+ // in the end, each set should contain exactly 1 element
+ Map<String, Set<Long>> exclusiveThreadIds = (Map<String, Set<Long>>) environment.get("exclusiveThreadIds");
+ Set<Long> groupMessages = exclusiveThreadIds.get(executionKey);
+ if (groupMessages==null) {
+ groupMessages = new HashSet<Long>();
+ exclusiveThreadIds.put(executionKey, groupMessages);
+ }
+ groupMessages.add(threadId);
+
+ // let's assume that an average jobImpl takes between 0 and 150 millis to complete.
+ int workTime = random.nextInt(150);
+ log.debug("executing exclusive message for "+execution+". this is going to take "+workTime+"ms");
+ try {
+ Thread.sleep(workTime);
+ } catch (RuntimeException e) {
+ log.debug("sleeping was interrupted");
+ }
+
+ DbSession dbSession = environment.get(DbSession.class);
+ dbSession.delete(this);
+
+ return null;
+ }
+
+}
Copied: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/FailOnceTestMessage.java (from rev 1741, jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/jobexecutor/FailOnceTestMessage.java)
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/FailOnceTestMessage.java (rev 0)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/FailOnceTestMessage.java 2008-07-29 13:25:51 UTC (rev 1748)
@@ -0,0 +1,75 @@
+/*
+ * 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.internal.jobexecutor;
+
+import java.util.List;
+
+import org.jbpm.pvm.env.Environment;
+import org.jbpm.pvm.internal.job.MessageImpl;
+import org.jbpm.pvm.internal.log.Log;
+import org.jbpm.pvm.internal.model.CommentImpl;
+import org.jbpm.pvm.model.Comment;
+import org.jbpm.pvm.session.DbSession;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class FailOnceTestMessage extends MessageImpl<Object> {
+
+ private static final long serialVersionUID = 1L;
+ private static final Log log = Log.getLog(FailOnceTestMessage.class.getName());
+
+ int messageId;
+
+ public FailOnceTestMessage() {
+ }
+
+ public FailOnceTestMessage(int messageId) {
+ this.messageId = messageId;
+ }
+
+ public Object execute(Environment environment) throws Exception {
+ DbSession dbSession = environment.get(DbSession.class);
+
+ // this message execution should be rolled back
+ Comment comment = new CommentImpl(Integer.toString(messageId));
+ dbSession.save(comment);
+
+ dbSession.delete(this);
+
+ List<Integer> failOnceMessageIds = (List) environment.get("failOnceMessageIds");
+ if (!failOnceMessageIds.contains(messageId)) {
+ // registering the failed message in a non-transactional resource
+ // so the messageId will still be added even after the transaction has rolled back
+ log.debug("adding failonce message "+messageId);
+ failOnceMessageIds.add(messageId);
+
+ throw new RuntimeException("failing once");
+ }
+
+ log.debug("message "+messageId+" now succeeds");
+
+ return null;
+ }
+
+}
Copied: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/FailingTestMessage.java (from rev 1741, jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/jobexecutor/FailingTestMessage.java)
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/FailingTestMessage.java (rev 0)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/FailingTestMessage.java 2008-07-29 13:25:51 UTC (rev 1748)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.pvm.internal.jobexecutor;
+
+import org.jbpm.pvm.env.Environment;
+import org.jbpm.pvm.internal.job.MessageImpl;
+import org.jbpm.pvm.internal.model.CommentImpl;
+import org.jbpm.pvm.model.Comment;
+import org.jbpm.pvm.session.DbSession;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class FailingTestMessage extends MessageImpl<Object> {
+
+ private static final long serialVersionUID = 1L;
+
+ public Object execute(Environment environment) throws Exception {
+ DbSession dbSession = environment.get(DbSession.class);
+
+ // this message execution should be rolled back
+ Comment comment = new CommentImpl("failing update");
+ dbSession.save(comment);
+
+ dbSession.delete(this);
+
+ throw new RuntimeException("ooops");
+ }
+
+}
Copied: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTest.java (from rev 1741, jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/jobexecutor/JobExecutorTest.java)
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTest.java (rev 0)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTest.java 2008-07-29 13:25:51 UTC (rev 1748)
@@ -0,0 +1,361 @@
+/*
+ * 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.internal.jobexecutor;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.Timer;
+import java.util.TimerTask;
+
+import org.hibernate.Session;
+import org.jbpm.pvm.test.base.EnvironmentFactoryTestCase;
+import org.jbpm.pvm.client.ClientProcessDefinition;
+import org.jbpm.pvm.client.ClientProcessInstance;
+import org.jbpm.pvm.env.Environment;
+import org.jbpm.pvm.env.Transaction;
+import org.jbpm.pvm.internal.job.JobImpl;
+import org.jbpm.pvm.internal.jobexecutor.JobDbSession;
+import org.jbpm.pvm.internal.jobexecutor.JobExecutor;
+import org.jbpm.pvm.internal.log.Log;
+import org.jbpm.pvm.internal.model.ProcessDefinitionImpl;
+import org.jbpm.pvm.job.Job;
+import org.jbpm.pvm.model.Comment;
+import org.jbpm.pvm.session.MessageSession;
+import org.jbpm.pvm.session.PvmDbSession;
+
+/**
+ * @author Tom Baeyens
+ */
+public class JobExecutorTest extends EnvironmentFactoryTestCase {
+
+ private static final Log log = Log.getLog(JobExecutorTest.class.getName());
+
+ /**
+ * test the case where the jobExecutor is start and shortly after stopped.
+ * It can appears for example in other tests with auto-start activated
+ * if the test is too short.
+ *
+ * The jobExecutor is registered as active when the run method is invoked.
+ * It happens only after a system context switching. If the jobExecutor is
+ * stopped before that, it won't really be stopped because it has not been
+ * started yet.
+ */
+ public void testImmediateJobExecutorShutdown() throws InterruptedException {
+
+ // if the test fail, there can be a live lock
+ // install a timer that will interrupt if it takes too long
+ // if that happens, it will lead to an interrupted exception and the test will fail
+ final Thread testThread = Thread.currentThread();
+ TimerTask interruptTask = new TimerTask() {
+ public void run() {
+ log.debug("test "+getName()+" took too long. going to interrupt..."+testThread);
+ testThread.interrupt();
+ }
+ };
+ Timer timer = new Timer();
+ timer.schedule(interruptTask, 10000);
+
+ final JobExecutor jobExecutor = getEnvironmentFactory().get(JobExecutor.class);
+ jobExecutor.setIdleInterval(1000);
+ assertFalse(jobExecutor.isActive());
+ jobExecutor.start();
+ jobExecutor.stop();
+ Thread.sleep(800);
+ assertFalse(jobExecutor.isActive());
+ }
+
+ public void testSuccessfulMessageProcessing() {
+ int nbrOfTestMessages = 5;
+ int testTimeoutMillis = 10000;
+ int checkInterval = 500;
+
+ List<Integer> processedMessageIds = (List<Integer>) getEnvironmentFactory().get("processedMessageIds");
+ processedMessageIds.clear();
+
+ JobExecutor jobExecutor = getEnvironmentFactory().get(JobExecutor.class);
+ jobExecutor.start();
+ try {
+ insertTestMessages(nbrOfTestMessages);
+ waitTillNoMoreMessages(jobExecutor, testTimeoutMillis, checkInterval);
+
+ } finally {
+ jobExecutor.stop(true);
+ }
+
+ for (int i=0; i<nbrOfTestMessages; i++) {
+ assertTrue("message "+i+" is not processed", processedMessageIds.contains(i));
+ }
+ }
+
+ public void testMessagesPresentUponJobExecutorStartUp() {
+ int nbrOfTestMessages = 2;
+ int testTimeoutMillis = 5000;
+ int checkInterval = 400;
+
+ insertTestMessages(nbrOfTestMessages);
+
+ List<Integer> processedMessageIds = (List<Integer>) getEnvironmentFactory().get("processedMessageIds");
+ processedMessageIds.clear();
+
+ JobExecutor jobExecutor = getEnvironmentFactory().get(JobExecutor.class);
+ jobExecutor.start();
+ try {
+ waitTillNoMoreMessages(jobExecutor, testTimeoutMillis, checkInterval);
+
+ } finally {
+ jobExecutor.stop(true);
+ }
+
+ for (int i=0; i<nbrOfTestMessages; i++) {
+ assertTrue("message "+i+" is not processed", processedMessageIds.contains(i));
+ }
+ }
+
+ public void testExclusiveMessageProcessing() {
+ int testTimeoutMillis = 10000;
+ int checkInterval = 500;
+ int nbrOfTestMessagesPerExecution = 5;
+ int nbrOfTestExecutions = 1;
+
+ insertExclusiveTestMessages(nbrOfTestExecutions, nbrOfTestMessagesPerExecution);
+
+ JobExecutor jobExecutor = getEnvironmentFactory().get(JobExecutor.class);
+ jobExecutor.start();
+ try {
+
+ waitTillNoMoreMessages(jobExecutor, testTimeoutMillis, checkInterval);
+
+ } finally {
+ jobExecutor.stop(true);
+ }
+
+
+ Environment environment = getEnvironmentFactory().openEnvironment();
+ try {
+ // exclusiveMessageIds maps execution keys to a set of thread ids.
+ // the idea is that for each execution, all the exclusive jobs will
+ // be executed by 1 thread sequentially.
+
+ // in the end, each set should contain exactly 1 element
+ Map<String, Set<Long>> exclusiveThreadIds = (Map) environment.get("exclusiveThreadIds");
+
+ for (int i=0; i<nbrOfTestExecutions; i++) {
+ String executionKey = "execution-"+i;
+ Set<Long> threadIds = exclusiveThreadIds.get(executionKey);
+ assertNotNull("no thread id set for "+executionKey+" in: "+exclusiveThreadIds, threadIds);
+ assertEquals("exclusive messages for "+executionKey+" have been executed by multiple threads: "+threadIds,
+ 1,
+ threadIds.size());
+ }
+ } finally {
+ environment.close();
+ }
+
+ }
+
+ public void testFailOnceMessages() {
+ int nbrOfTestMessages = 7;
+ int testTimeoutMillis = 10000;
+ int checkInterval = 500;
+
+ List<Integer> failOnceMessageIds = (List<Integer>) getEnvironmentFactory().get("failOnceMessageIds");
+ failOnceMessageIds.clear();
+
+ JobExecutor jobExecutor = getEnvironmentFactory().get(JobExecutor.class);
+ jobExecutor.start();
+ try {
+ insertFailOnceTestMessages(nbrOfTestMessages);
+ waitTillNoMoreMessages(jobExecutor, testTimeoutMillis, checkInterval);
+
+ } finally {
+ jobExecutor.stop(true);
+ }
+
+ for (int i=0; i<nbrOfTestMessages; i++) {
+ assertTrue("message "+i+" is not failed once: "+failOnceMessageIds, failOnceMessageIds.contains(i));
+ }
+ assertEquals(nbrOfTestMessages, failOnceMessageIds.size());
+
+ Environment environment = getEnvironmentFactory().openEnvironment();
+ try {
+ Session session = environment.get(Session.class);
+ List<Comment> comments = session.createQuery("from org.jbpm.pvm.internal.model.CommentImpl").list();
+
+ for (Comment comment: comments) {
+ Integer messageId = new Integer(comment.getMessage());
+ assertTrue("message "+messageId+" committed twice", failOnceMessageIds.remove(messageId));
+ // clean up for next tests
+ session.delete(comment);
+ }
+
+ assertTrue("not all messages made a successful commit: "+failOnceMessageIds, failOnceMessageIds.isEmpty());
+ } finally {
+ environment.close();
+ }
+ }
+
+ public void testFailedMessageProcessing() {
+ int testTimeoutMillis = 3000;
+ int checkInterval = 400;
+
+ JobExecutor jobExecutor = getEnvironmentFactory().get(JobExecutor.class);
+ jobExecutor.start();
+ try {
+ Environment environment = getEnvironmentFactory().openEnvironment();
+ try {
+ MessageSession messageSession = environment.get(MessageSession.class);
+ messageSession.send(new FailingTestMessage());
+ } finally {
+ environment.close();
+ }
+
+ waitTillNoMoreMessages(jobExecutor, testTimeoutMillis, checkInterval);
+
+ } finally {
+ jobExecutor.stop(true);
+ }
+
+ Environment environment = getEnvironmentFactory().openEnvironment();
+ try {
+ PvmDbSession pvmDbSession = environment.get(PvmDbSession.class);
+ List<Job> deadJobs = pvmDbSession.findDeadJobs();
+ assertEquals("there should be one dead jobImpl", 1, deadJobs.size());
+
+ Session session = environment.get(Session.class);
+ List commands = session.createQuery("from org.jbpm.pvm.internal.model.CommentImpl").list();
+ assertTrue("command insertion should have been rolled back", commands.isEmpty());
+ } finally {
+ environment.close();
+ }
+ }
+
+ // helper methods ///////////////////////////////////////////////////////////
+
+ void insertTestMessages(int nbrOfTestMessages) {
+ Environment environment = getEnvironmentFactory().openEnvironment();
+ try {
+ MessageSession messageSession = environment.get(MessageSession.class);
+ for (int i=0; i<nbrOfTestMessages; i++) {
+ TestMessage testMessage = new TestMessage(i);
+ messageSession.send(testMessage);
+ }
+ } catch (RuntimeException e) {
+ environment.get(Transaction.class).setRollbackOnly();
+ throw e;
+ } finally {
+ environment.close();
+ }
+ }
+
+ void insertExclusiveTestMessages(int nbrOfTestExecutions, int nbrOfTestMessagesPerExecution) {
+ Environment environment = getEnvironmentFactory().openEnvironment();
+ try {
+ PvmDbSession pvmDbSession = environment.get(PvmDbSession.class);
+ ClientProcessDefinition processDefinition = new ProcessDefinitionImpl();
+ pvmDbSession.save(processDefinition);
+
+ MessageSession messageSession = environment.get(MessageSession.class);
+ for (int i=0; i<nbrOfTestExecutions; i++) {
+ ClientProcessInstance execution = processDefinition.beginProcessInstance("execution-"+i);
+ pvmDbSession.save(execution);
+
+ for (int j=0; j<nbrOfTestMessagesPerExecution; j++) {
+
+ ExclusiveTestMessage testMessage = new ExclusiveTestMessage(execution);
+ messageSession.send(testMessage);
+ }
+ }
+ } catch (RuntimeException e) {
+ environment.get(Transaction.class).setRollbackOnly();
+ throw e;
+ } finally {
+ environment.close();
+ }
+ }
+
+ void insertFailOnceTestMessages(int nbrOfTestMessages) {
+ Environment environment = getEnvironmentFactory().openEnvironment();
+ try {
+ MessageSession messageSession = environment.get(MessageSession.class);
+ for (int i=0; i<nbrOfTestMessages; i++) {
+ FailOnceTestMessage testMessage = new FailOnceTestMessage(i);
+ messageSession.send(testMessage);
+ }
+ } catch (RuntimeException e) {
+ environment.get(Transaction.class).setRollbackOnly();
+ throw e;
+ } finally {
+ environment.close();
+ }
+ }
+
+
+ private void waitTillNoMoreMessages(JobExecutor jobExecutor, int maxWait, int checkInterval) {
+
+ // install a timer that will interrupt if it takes too long
+ // if that happens, it will lead to an interrupted exception and the test will fail
+ TimerTask interruptTask = new TimerTask() {
+ Thread testThread = Thread.currentThread();
+ public void run() {
+ log.debug("test "+getName()+" took too long. going to interrupt..."+testThread);
+ testThread.interrupt();
+ }
+ };
+ Timer timer = new Timer();
+ timer.schedule(interruptTask, maxWait);
+
+ try {
+ boolean jobsAvailable = true;
+ while (jobsAvailable) {
+ log.debug("going to sleep for "+checkInterval+" millis, waiting for the jobImpl executor to process more jobs");
+ Thread.sleep(checkInterval);
+ jobsAvailable = areJobsAvailable();
+ }
+
+ } catch (InterruptedException e) {
+ fail("test execution exceeded treshold of "+maxWait+" milliseconds");
+ } finally {
+ timer.cancel();
+ }
+ }
+
+ boolean areJobsAvailable() {
+ Environment environment = getEnvironmentFactory().openEnvironment();
+ try {
+ JobDbSession jobDbSession = environment.get(JobDbSession.class);
+
+ JobImpl<?> firstAcquirableJob = jobDbSession.findFirstAcquirableJob();
+ if (firstAcquirableJob!=null) {
+ log.debug("found more jobs to process");
+ return true;
+ }
+ } catch (RuntimeException e) {
+ environment.get(Transaction.class).setRollbackOnly();
+ throw e;
+ } finally {
+ environment.close();
+ }
+ log.debug("no more jobs to process");
+ return false;
+ }
+}
Copied: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTests.java (from rev 1741, jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/jobexecutor/JobExecutorTests.java)
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTests.java (rev 0)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTests.java 2008-07-29 13:25:51 UTC (rev 1748)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.pvm.internal.jobexecutor;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class JobExecutorTests {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite("Test for org.jbpm.pvm.jobexecutor");
+ //$JUnit-BEGIN$
+ suite.addTestSuite(JobExecutorTimerSessionTest.class);
+ suite.addTestSuite(JobExecutorTest.class);
+ //$JUnit-END$
+ return suite;
+ }
+
+}
Property changes on: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTests.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTimerSessionTest.java (from rev 1741, jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/jobexecutor/JobExecutorTimerSessionTest.java)
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTimerSessionTest.java (rev 0)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTimerSessionTest.java 2008-07-29 13:25:51 UTC (rev 1748)
@@ -0,0 +1,398 @@
+/**
+ * Copyright (C) 2007 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.internal.jobexecutor;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.jbpm.pvm.test.base.DbTestCase;
+import org.jbpm.pvm.PvmException;
+import org.jbpm.pvm.env.Environment;
+import org.jbpm.pvm.internal.job.JobImpl;
+import org.jbpm.pvm.internal.job.TimerImpl;
+import org.jbpm.pvm.internal.jobexecutor.JobDbSession;
+import org.jbpm.pvm.internal.jobexecutor.JobExecutor;
+import org.jbpm.pvm.internal.model.ExecutionImpl;
+import org.jbpm.pvm.job.Job;
+import org.jbpm.pvm.job.Timer;
+import org.jbpm.pvm.session.PvmDbSession;
+import org.jbpm.pvm.session.TimerSession;
+
+/**
+ * @author Pascal Verdage
+ */
+public class JobExecutorTimerSessionTest extends DbTestCase
+{
+
+ public void setUp() throws Exception {
+ super.setUp();
+ getVariables().clear();
+ // launch jobExecutor
+ Environment.getCurrent().get(JobExecutor.class).setIdleInterval(500000);
+ Environment.getCurrent().get(JobExecutor.class).start();
+ }
+
+ public void tearDown() throws Exception {
+ Environment.getCurrent().get(JobExecutor.class).stop();
+ super.tearDown();
+ }
+
+ /* GETTERS */
+ @SuppressWarnings("unchecked")
+ public static Map<String, Integer> getVariables() {
+ return (Map<String, Integer>) Environment.getCurrent()
+ .getEnvironmentFactory().get("timerVariables");
+ }
+
+ /** get TimerSession if an environment is open */
+ protected static TimerSession getTimerSession() {
+ assertNotNull(Environment.getCurrent());
+ return Environment.getCurrent().get(TimerSession.class);
+ }
+
+ /** get JobDbSession if an environment is open */
+ protected static JobDbSession getJobDbSession() {
+ assertNotNull(Environment.getCurrent());
+ return Environment.getCurrent().get(JobDbSession.class);
+ }
+
+ /** get PvmDbSession if an environment is open */
+ protected static PvmDbSession getPvmDbSession() {
+ assertNotNull(Environment.getCurrent());
+ return Environment.getCurrent().get(PvmDbSession.class);
+ }
+
+ /* Test assertion tools */
+ /** return the number of timers among active jobs */
+ private static int getNbTimer() {
+ int result = 0;
+ List<Timer> timers = getPvmDbSession().findTimers();
+ if (timers != null) {
+ for (Job job : timers) {
+ if (job instanceof TimerImpl) {
+ result++;
+ }
+ }
+ }
+ // List<JobImpl<?>> deadJobs = getPvmDbSession().findAllJobs();
+ // if (deadJobs != null) {
+ // for (JobImpl<?> jobImpl : deadJobs) {
+ // if (jobImpl instanceof TimerImpl) {
+ // result++;
+ // }
+ // }
+ // }
+ return result;
+ }
+
+ private static int TIMEOUT = 60 * 1000; // 1 minutes
+
+ /** This method change the transaction */
+ protected void waitUntilNbTimerEquals(int expected) {
+ int rate = 500; // check every rate millis
+ int result = Integer.MAX_VALUE;
+
+ for (int i = 0; i < TIMEOUT / rate; i++) {
+ try {
+ Thread.sleep(rate);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ fail();
+ }
+ newTransaction();
+ result = getNbTimer();
+ if (result == expected) {
+ break;
+ }
+ }
+ // if false, then the timeout occurred
+ assertEquals(expected, result);
+ }
+
+ protected static void assertNbTimersEquals(int expected) {
+ assertEquals(expected, getNbTimer());
+ }
+
+ /* TimerImpl manipulation tools */
+
+ /** @return the first due timer or null if none */
+ protected TimerImpl findFirstDueTimer() {
+ TimerImpl result = null;
+ JobImpl<?> firstJob = getJobDbSession().findFirstDueJob();
+ if (firstJob instanceof TimerImpl) {
+ result = (TimerImpl) firstJob;
+ } else {
+ List<Timer> timers = getPvmDbSession().findTimers();
+ if (timers != null) {
+ Date dueDate = new Date(Long.MAX_VALUE);
+ for (Timer timer : timers) {
+ if (timer instanceof TimerImpl && timer.getDueDate().before(dueDate)) {
+ dueDate = timer.getDueDate();
+ result = (TimerImpl) timer;
+ }
+ }
+ }
+ }
+ return result;
+ }
+
+ /** create a timer that should not be executed */
+ private TimerImpl createForbiddenTimer(String name, long delay) {
+ return new TestTimer(name, delay, 0);
+ }
+ /** create a timer that should be executed once */
+ private TimerImpl createTimer(String name, Date dueDate) {
+ return new TestTimer(name, dueDate, 1);
+ }
+ /** create a timer that should be executed once */
+ private TimerImpl createTimer(String name, long delay) {
+ return new TestTimer(name, delay, 1);
+ }
+ /** create a timer that should be executed nbExecution times */
+ private TimerImpl createTimer(String name, long delay, long repeatDelay, int nbExecution) {
+ TimerImpl timerImpl = new TestTimer(name, delay, nbExecution);
+ timerImpl.setRepeat(Long.toString(repeatDelay) + " millis");
+ return timerImpl;
+ }
+
+ /* Functionnal tests */
+
+ /** Test all use cases that should throw PvmException for method schedule */
+ public void testScheduleIllegalArgument() {
+ TimerSession timerSession = getTimerSession();
+ TimerImpl timerImpl;
+
+ // null TimerImpl
+ try {
+ timerSession.schedule(null);
+ fail("Should not happen");
+ } catch (PvmException e) {
+ assertTextPresent("null timer", e.getMessage());
+ }
+
+ // no execution
+ try {
+ timerImpl = new TimerImpl();
+ timerSession.schedule(timerImpl);
+ // clean before failure
+ timerSession.cancel(timerImpl);
+ fail("Should not happen");
+ } catch (PvmException e) {
+ assertTextPresent("no execution", e.getMessage());
+ }
+
+ ExecutionImpl execution = new ExecutionImpl();
+
+ // no signal or event
+ try {
+ timerImpl = new TimerImpl();
+ timerImpl.setExecution(execution);
+ timerSession.schedule(timerImpl);
+ // clean before failure
+ timerSession.cancel(timerImpl);
+ fail("Should not happen");
+ } catch (PvmException e) {
+ assertTextPresent("no signalName or eventName", e.getMessage());
+ }
+
+ // a signalName with no activityInstance to signal is valid
+
+ // null dueDate
+ try {
+ timerImpl = createTimer("schedule error 1", null);
+ timerImpl.setExecution(execution);
+
+ timerImpl.setSignalName("timeout");
+ timerSession.schedule(timerImpl);
+ // clean before failure
+ timerSession.cancel(timerImpl);
+ fail("Should not happen");
+ } catch (PvmException e) {
+ assertTextPresent("null date", e.getMessage());
+ }
+
+ // date.getTime() negative
+ try {
+ timerImpl = createTimer("schedule error 2", new Date(-10));
+ timerImpl.setExecution(execution);
+
+ timerImpl.setSignalName("timeout");
+ timerSession.schedule(timerImpl);
+ // clean before failure
+ timerSession.cancel(timerImpl);
+ fail("Should not happen");
+ } catch (PvmException e) {
+ assertTextPresent("negative date", e.getMessage());
+ }
+ }
+
+ /** Test the method cancel */
+ public void testCancel() {
+ TimerSession timerSession;
+ TimerImpl timerImpl;
+
+ // null jobImpl
+ try {
+ getTimerSession().cancel(null);
+ fail();
+ } catch (PvmException e) {
+ // OK
+ }
+
+ // non scheduled jobImpl
+ timerSession = getTimerSession();
+ timerImpl = createForbiddenTimer("cancel 1", 500);
+ timerSession.cancel(timerImpl);
+ assertNbTimersEquals(0);
+
+ // scheduled non-executed jobImpl
+ ExecutionImpl execution = new ExecutionImpl();
+ getPvmDbSession().save(execution);
+
+ timerSession = getTimerSession();
+ timerImpl = createForbiddenTimer("cancel 2", 500);
+ timerImpl.setSignalName("timeout");
+ timerImpl.setExecution(execution);
+
+ timerSession.schedule(timerImpl);
+ newTransaction();
+ assertNbTimersEquals(1);
+ timerSession = getTimerSession();
+ timerSession.cancel(findFirstDueTimer());
+
+ newTransaction();
+ assertNbTimersEquals(0);
+
+ execution = getPvmDbSession().get(ExecutionImpl.class, execution.getDbid());
+ getPvmDbSession().delete(execution);
+
+ /*
+ * scheduled jobImpl with repeat
+ * This is not necessary because in the test, a timer scheduled with
+ * a repeat will be deleted by the instance. So this case is covered
+ * by the test testScheduleRepeatDelay
+ */
+ }
+
+ /** Schedule a jobImpl in the past */
+ public void testSchedulePastJob() {
+ ExecutionImpl execution = new ExecutionImpl();
+ execution = reload(execution);
+ try {
+ TimerImpl timerImpl = createTimer("schedule past jobImpl", -500);
+ timerImpl.setExecution(execution);
+ timerImpl.setEventName("timeout");
+ getTimerSession().schedule(timerImpl);
+ assertNbTimersEquals(1);
+ newTransaction();
+ waitUntilNbTimerEquals(0);
+ } finally {
+ execution = getPvmDbSession().get(ExecutionImpl.class, execution.getDbid());
+ getPvmDbSession().delete(execution);
+ newTransaction();
+ }
+ }
+
+ /** Schedule a jobImpl in the future */
+ public void testScheduleFutureJob() {
+ ExecutionImpl execution = new ExecutionImpl();
+ execution = reload(execution);
+ try {
+ TimerImpl timerImpl = createTimer("schedule future jobImpl", 500);
+ timerImpl.setExecution(execution);
+ timerImpl.setEventName("timeout");
+ getTimerSession().schedule(timerImpl);
+ assertNbTimersEquals(1);
+ newTransaction();
+ waitUntilNbTimerEquals(0);
+ } finally {
+ execution = getPvmDbSession().get(ExecutionImpl.class, execution.getDbid());
+ getPvmDbSession().delete(execution);
+ newTransaction();
+ }
+ }
+
+ /** Test the method schedule with a repeated jobImpl */
+ public void testScheduleRepeatDelay() {
+ ExecutionImpl execution = new ExecutionImpl();
+ execution = reload(execution);
+ try {
+ TimerImpl timerImpl = createTimer("schedule repeat delay", 200, 400, 3);
+ timerImpl.setExecution(execution);
+ timerImpl.setEventName("timeout");
+ getTimerSession().schedule(timerImpl);
+ assertNbTimersEquals(1);
+ newTransaction();
+ waitUntilNbTimerEquals(0);
+ } finally {
+ execution = getPvmDbSession().get(ExecutionImpl.class, execution.getDbid());
+ getPvmDbSession().delete(execution);
+ newTransaction();
+ }
+ }
+
+
+ /* Concurrent tests */
+
+ /** create a timer that should be executed once and increment a variable */
+ private TimerImpl createIncrementingTimer(String name, Date dueDate, String variable) {
+ TestTimer timer = new TestTimer(name, dueDate, 1);
+ timer.setVariableName(variable);
+ timer.setEventName("incrementation");
+ return timer;
+ }
+
+ private void testManyTimers(int nbTimer, long delayBetweenTimers) {
+ ExecutionImpl execution = new ExecutionImpl();
+ execution = reload(execution);
+ try {
+ long startTime = System.currentTimeMillis();
+ for (int i=0; i<nbTimer; i++) {
+ Date dueDate = new Date(startTime + 1000 + i*delayBetweenTimers);
+ String name = "timer " + i;
+ TimerImpl timerImpl = createIncrementingTimer(name, dueDate, name);
+ timerImpl.setExecution(execution);
+ getTimerSession().schedule(timerImpl);
+ }
+
+ newTransaction();
+ assertNbTimersEquals(nbTimer);
+ waitUntilNbTimerEquals(0);
+ int sum = 0;
+ Map<String, Integer> variables = getVariables();
+ if (variables != null) {
+ for (Entry<String, Integer> variable : variables.entrySet()) {
+ assertEquals(variable.getKey(), 1, (int)variable.getValue());
+ sum += variable.getValue();
+ }
+ }
+ assertEquals(nbTimer, sum);
+ } finally {
+ execution = getPvmDbSession().get(ExecutionImpl.class, execution.getDbid());
+ getPvmDbSession().delete(execution);
+ newTransaction();
+ }
+ }
+
+ public void testSeveralTimer() {
+ testManyTimers(20, 100);
+ }
+
+ public void testSimultaneousTimer() {
+ testManyTimers(20, 0);
+ }
+
+}
Copied: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/TestMessage.java (from rev 1741, jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/jobexecutor/TestMessage.java)
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/TestMessage.java (rev 0)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/TestMessage.java 2008-07-29 13:25:51 UTC (rev 1748)
@@ -0,0 +1,67 @@
+/*
+ * 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.internal.jobexecutor;
+
+import java.util.List;
+import java.util.Random;
+
+import org.jbpm.pvm.env.Environment;
+import org.jbpm.pvm.internal.job.MessageImpl;
+import org.jbpm.pvm.internal.log.Log;
+import org.jbpm.pvm.session.DbSession;
+
+/**
+ * @author Tom Baeyens
+ */
+public class TestMessage extends MessageImpl<Object> {
+
+ private static final long serialVersionUID = 1L;
+ private static final Log log = Log.getLog(TestMessage.class.getName());
+ static Random random = new Random();
+
+ int messageId;
+
+ public TestMessage() {
+ }
+
+ public TestMessage(int messageId) {
+ this.messageId = messageId;
+ }
+
+ public Object execute(Environment environment) throws Exception {
+ List<Integer> messageNumberCollector = (List<Integer>) environment.get("processedMessageIds");
+ messageNumberCollector.add(messageId);
+
+ // let's assume that an average jobImpl takes between 0 and 150 millis to complete.
+ int workTime = random.nextInt(150);
+ log.debug("executing test message "+messageId+". this is going to take "+workTime+"ms");
+ try {
+ Thread.sleep(workTime);
+ } catch (RuntimeException e) {
+ log.debug("sleeping was interrupted");
+ }
+
+ DbSession dbSession = environment.get(DbSession.class);
+ dbSession.delete(this);
+ return null;
+ }
+}
Copied: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/TestTimer.java (from rev 1741, jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/jobexecutor/TestTimer.java)
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/TestTimer.java (rev 0)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/TestTimer.java 2008-07-29 13:25:51 UTC (rev 1748)
@@ -0,0 +1,95 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.pvm.internal.jobexecutor;
+
+import java.util.Date;
+import java.util.Map;
+
+import org.jbpm.pvm.test.base.JbpmTestCase;
+import org.jbpm.pvm.env.Environment;
+import org.jbpm.pvm.internal.job.TimerImpl;
+import org.jbpm.pvm.session.TimerSession;
+
+/**
+ * @author Tom Baeyens
+ * @author Pascal Verdage
+ */
+public class TestTimer extends TimerImpl {
+ private static final long serialVersionUID = 1L;
+
+ private String name;
+ private int nbMaxExecution;
+ // used to increment a variable
+ private String variableName;
+
+ private int nbExecution = 0;
+
+ protected TestTimer() {}
+
+ public TestTimer(String name, long delay, int nbMaxExecution) {
+ this(name, new Date(System.currentTimeMillis() + delay), nbMaxExecution);
+ }
+
+ public TestTimer(String name, Date dueDate, int nbMaxExecution) {
+ this.name = name;
+ this.dueDate = dueDate;
+ this.nbMaxExecution = nbMaxExecution;
+ }
+
+ public Boolean execute(Environment environment) throws Exception {
+ Date now = new Date();
+ JbpmTestCase.assertTrue(name+" is executing too soon", now.after(dueDate));
+ nbExecution++;
+ JbpmTestCase.assertTrue(name+" should not be executed",
+ nbExecution <= nbMaxExecution);
+
+ if (variableName != null) {
+ Map<String, Integer> variables =
+ JobExecutorTimerSessionTest.getVariables();
+ if (variables != null) {
+ Integer n = variables.get(variableName);
+ if (n == null) {
+ n = 0;
+ }
+ n++;
+ variables.put(variableName, n);
+ }
+ }
+
+ // reschedule if necessary
+ boolean deleteThisJob = super.execute(environment);
+
+ // cancel the timer if necessary
+ if (nbExecution == nbMaxExecution) {
+ JbpmTestCase.assertNotNull(Environment.getCurrent());
+ TimerSession timerSession = Environment.getCurrent().get(TimerSession.class);
+ JbpmTestCase.assertNotNull(timerSession);
+ timerSession.cancel(this);
+ }
+
+ return deleteThisJob;
+ }
+
+ public void setVariableName(String variableName) {
+ this.variableName = variableName;
+ }
+}
Copied: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/cron (from rev 1741, jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/jobexecutor/cron)
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/cron/CronExpression.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/jobexecutor/cron/CronExpression.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/cron/CronExpression.java 2008-07-29 13:25:51 UTC (rev 1748)
@@ -1,4 +1,4 @@
-package org.jbpm.pvm.jobexecutor.cron;
+package org.jbpm.pvm.internal.jobexecutor.cron;
import java.io.Serializable;
import java.text.ParseException;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/cron/CronTrigger.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/jobexecutor/cron/CronTrigger.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/cron/CronTrigger.java 2008-07-29 13:25:51 UTC (rev 1748)
@@ -18,7 +18,7 @@
/*
* Previously Copyright (c) 2001-2004 James House
*/
-package org.jbpm.pvm.jobexecutor.cron;
+package org.jbpm.pvm.internal.jobexecutor.cron;
import java.text.ParseException;
import java.util.Calendar;
Copied: jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/api/db/svc (from rev 1741, jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/db/svc)
Copied: jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/api/spring (from rev 1741, jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/spring)
Property changes on: jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/api/spring
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/api/spring/spring.beans.xml
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/spring/spring.beans.xml 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/api/spring/spring.beans.xml 2008-07-29 13:25:51 UTC (rev 1748)
@@ -28,7 +28,7 @@
</bean>
<bean id="environmentFactory"
- class="org.jbpm.pvm.internal.spring.SpringEnvironmentFactory"
+ class="org.jbpm.pvm.env.SpringEnvironmentFactory"
scope="singleton" />
<bean id="sessionFactory"
Copied: jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/internal/jobexecutor (from rev 1741, jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/jobexecutor)
Modified: jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/internal/jobexecutor/environment.cfg.xml
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/jobexecutor/environment.cfg.xml 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/internal/jobexecutor/environment.cfg.xml 2008-07-29 13:25:51 UTC (rev 1748)
@@ -12,7 +12,7 @@
<hibernate-configuration>
<properties resource="hibernate.properties" />
<mappings resource="org/jbpm/pvm/pvm.hibernate.mappings.xml" />
- <mapping resource="org/jbpm/pvm/jobexecutor/mappings.hbm.xml" />
+ <mapping resource="org/jbpm/pvm/internal/jobexecutor/mappings.hbm.xml" />
<cache-configuration resource="org/jbpm/pvm/pvm.cache.xml" usage="nonstrict-read-write" />
</hibernate-configuration>
@@ -39,6 +39,5 @@
<message-session />
<timer-session />
- </environment>
-
+ </environment>
</contexts>
Modified: jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/internal/jobexecutor/mappings.hbm.xml
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/jobexecutor/mappings.hbm.xml 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/internal/jobexecutor/mappings.hbm.xml 2008-07-29 13:25:51 UTC (rev 1748)
@@ -4,7 +4,7 @@
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping package="org.jbpm.pvm.jobexecutor" default-access="field">
+<hibernate-mapping package="org.jbpm.pvm.internal.jobexecutor" default-access="field">
<subclass name="TestMessage" extends="org.jbpm.pvm.internal.job.MessageImpl" discriminator-value="T">
<property name="messageId" />
15 years, 9 months
JBoss JBPM SVN: r1747 - in jbpm4/pvm/trunk/modules/core/src/test: java/org/jbpm/pvm/db and 4 other directories.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2008-07-29 08:13:03 -0400 (Tue, 29 Jul 2008)
New Revision: 1747
Added:
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/
jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/internal/db/model/
Removed:
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/db/model/
jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/db/model/
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/internal/db/model/CommentDbTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/DbModelTests.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/HibernateJobDbSessionTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/ProcessCacheDbTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/ProcessDefinitionDbTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/ProcessExecutionDbTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/SessionFactoryDbTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/WireDbTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/WireTest.java
Log:
test suite clean up
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 11:13:37 UTC (rev 1746)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/DbTests.java 2008-07-29 12:13:03 UTC (rev 1747)
@@ -24,9 +24,9 @@
import junit.framework.Test;
import junit.framework.TestSuite;
-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.internal.db.model.DbModelTests;
import org.jbpm.pvm.jobexecutor.JobExecutorTests;
Copied: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model (from rev 1741, jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/db/model)
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/CommentDbTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/db/model/CommentDbTest.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/CommentDbTest.java 2008-07-29 12:13:03 UTC (rev 1747)
@@ -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.model;
+package org.jbpm.pvm.internal.db.model;
import java.util.Date;
import java.util.List;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/DbModelTests.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/db/model/DbModelTests.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/DbModelTests.java 2008-07-29 12:13:03 UTC (rev 1747)
@@ -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.model;
+package org.jbpm.pvm.internal.db.model;
import junit.framework.Test;
import junit.framework.TestSuite;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/HibernateJobDbSessionTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/db/model/HibernateJobDbSessionTest.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/HibernateJobDbSessionTest.java 2008-07-29 12:13:03 UTC (rev 1747)
@@ -1,4 +1,4 @@
-package org.jbpm.pvm.db.model;
+package org.jbpm.pvm.internal.db.model;
import org.jbpm.pvm.test.base.JbpmTestCase;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/ProcessCacheDbTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/db/model/ProcessCacheDbTest.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/ProcessCacheDbTest.java 2008-07-29 12:13:03 UTC (rev 1747)
@@ -11,7 +11,7 @@
* program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301, USA.
**/
-package org.jbpm.pvm.db.model;
+package org.jbpm.pvm.internal.db.model;
import java.util.List;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/ProcessDefinitionDbTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/db/model/ProcessDefinitionDbTest.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/ProcessDefinitionDbTest.java 2008-07-29 12:13:03 UTC (rev 1747)
@@ -11,7 +11,7 @@
* program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301, USA.
**/
-package org.jbpm.pvm.db.model;
+package org.jbpm.pvm.internal.db.model;
import java.util.Date;
import java.util.List;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/ProcessExecutionDbTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/db/model/ProcessExecutionDbTest.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/ProcessExecutionDbTest.java 2008-07-29 12:13:03 UTC (rev 1747)
@@ -11,7 +11,7 @@
* program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301, USA.
**/
-package org.jbpm.pvm.db.model;
+package org.jbpm.pvm.internal.db.model;
import org.jbpm.pvm.test.base.DbTestCase;
import org.jbpm.pvm.internal.model.ExecutionImpl;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/SessionFactoryDbTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/db/model/SessionFactoryDbTest.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/SessionFactoryDbTest.java 2008-07-29 12:13:03 UTC (rev 1747)
@@ -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.model;
+package org.jbpm.pvm.internal.db.model;
import org.hibernate.SessionFactory;
import org.jbpm.pvm.test.base.DbTestCase;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/WireDbTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/db/model/WireDbTest.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/WireDbTest.java 2008-07-29 12:13:03 UTC (rev 1747)
@@ -11,7 +11,7 @@
* program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301, USA.
**/
-package org.jbpm.pvm.db.model;
+package org.jbpm.pvm.internal.db.model;
import java.util.ArrayList;
import java.util.LinkedList;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/WireTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/db/model/WireTest.java 2008-07-29 08:34:34 UTC (rev 1741)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/WireTest.java 2008-07-29 12:13:03 UTC (rev 1747)
@@ -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.model;
+package org.jbpm.pvm.internal.db.model;
import org.hibernate.Session;
import org.jbpm.pvm.test.base.DbTestCase;
Copied: jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/internal/db/model (from rev 1741, jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/db/model)
15 years, 9 months
JBoss JBPM SVN: r1746 - in jbossbpm/impl/jbpm3/trunk/modules: console/scripts and 5 other directories.
by do-not-reply@jboss.org
Author: heiko.braun(a)jboss.com
Date: 2008-07-29 07:13:37 -0400 (Tue, 29 Jul 2008)
New Revision: 1746
Added:
jbossbpm/impl/jbpm3/trunk/modules/console/scripts/
jbossbpm/impl/jbpm3/trunk/modules/console/scripts/assembly-config.xml
jbossbpm/impl/jbpm3/trunk/modules/console/src/main/resources/login/
jbossbpm/impl/jbpm3/trunk/modules/console/src/main/resources/login/jboss-service.xml
jbossbpm/impl/jbpm3/trunk/modules/console/src/main/resources/login/jbpm-console-roles.properties
jbossbpm/impl/jbpm3/trunk/modules/console/src/main/resources/login/jbpm-console-users.properties
Removed:
jbossbpm/impl/jbpm3/trunk/modules/console/src/main/resources/jbpm.mail.templates.xml
Modified:
jbossbpm/impl/jbpm3/trunk/modules/console/pom.xml
jbossbpm/impl/jbpm3/trunk/modules/console/src/main/webapp/WEB-INF/jboss-web.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
Log:
JBPM-1415: Unify login configuration across jBPM modules
Modified: jbossbpm/impl/jbpm3/trunk/modules/console/pom.xml
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/console/pom.xml 2008-07-29 09:49:33 UTC (rev 1745)
+++ jbossbpm/impl/jbpm3/trunk/modules/console/pom.xml 2008-07-29 11:13:37 UTC (rev 1746)
@@ -12,62 +12,85 @@
<!-- $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 - Console</name>
- <groupId>org.jboss.jbpm</groupId>
- <artifactId>jbpm-console</artifactId>
- <packaging>war</packaging>
+ <name>JBoss jBPM - Console</name>
+ <groupId>org.jboss.jbpm</groupId>
+ <artifactId>jbpm-console</artifactId>
+ <packaging>war</packaging>
- <!-- Parent -->
- <parent>
- <groupId>org.jboss.jbpm</groupId>
- <artifactId>jbpm</artifactId>
- <version>3.3.0-SNAPSHOT</version>
- </parent>
-
- <!-- Dependencies -->
- <dependencies>
- <!--
- The exclusions below are defined such that the war is in sync with
- the one produced by 3.2.3.GA
- -->
- <!-- jBPM Dependencies -->
- <dependency>
+ <!-- Parent -->
+ <parent>
<groupId>org.jboss.jbpm</groupId>
- <artifactId>jbpm-jpdl-identity</artifactId>
- <version>${version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.jbpm</groupId>
- <artifactId>jbpm-jbpm4jsf</artifactId>
- <version>${version}</version>
- <scope>provided</scope>
- </dependency>
+ <artifactId>jbpm</artifactId>
+ <version>3.3.0-SNAPSHOT</version>
+ </parent>
- <dependency>
- <groupId>com.sun.facelets</groupId>
- <artifactId>jsf-facelets</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-fileupload</groupId>
- <artifactId>commons-fileupload</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-io</groupId>
- <artifactId>commons-io</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.gravel</groupId>
- <artifactId>gravel</artifactId>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <scope>provided</scope>
- </dependency>
- </dependencies>
+ <!-- Dependencies -->
+ <dependencies>
+ <!--
+ The exclusions below are defined such that the war is in sync with
+ the one produced by 3.2.3.GA
+ -->
+ <!-- jBPM Dependencies -->
+ <dependency>
+ <groupId>org.jboss.jbpm</groupId>
+ <artifactId>jbpm-jpdl-identity</artifactId>
+ <version>${version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.jbpm</groupId>
+ <artifactId>jbpm-jbpm4jsf</artifactId>
+ <version>${version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.facelets</groupId>
+ <artifactId>jsf-facelets</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-fileupload</groupId>
+ <artifactId>commons-fileupload</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.gravel</groupId>
+ <artifactId>gravel</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+
+ <!-- Plugins -->
+ <build>
+ <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>
+ </plugins>
+ </build>
</project>
\ No newline at end of file
Added: jbossbpm/impl/jbpm3/trunk/modules/console/scripts/assembly-config.xml
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/console/scripts/assembly-config.xml (rev 0)
+++ jbossbpm/impl/jbpm3/trunk/modules/console/scripts/assembly-config.xml 2008-07-29 11:13:37 UTC (rev 1746)
@@ -0,0 +1,26 @@
+<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>login</id>
+ <formats>
+ <format>jar</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <fileSets>
+ <fileSet>
+ <directory>src/main/resources/login</directory>
+ <outputDirectory>/META-INF</outputDirectory>
+ <includes>
+ <include>jboss-service.xml</include>
+ <include>jbpm-console-users.properties</include>
+ <include>jbpm-console-roles.properties</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
Property changes on: jbossbpm/impl/jbpm3/trunk/modules/console/scripts/assembly-config.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted: jbossbpm/impl/jbpm3/trunk/modules/console/src/main/resources/jbpm.mail.templates.xml
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/console/src/main/resources/jbpm.mail.templates.xml 2008-07-29 09:49:33 UTC (rev 1745)
+++ jbossbpm/impl/jbpm3/trunk/modules/console/src/main/resources/jbpm.mail.templates.xml 2008-07-29 11:13:37 UTC (rev 1746)
@@ -1,24 +0,0 @@
-<mail-templates>
-
- <variable name="BaseTaskListURL" value="http://localhost:8080/jbpm/home?taskId=" />
-
- <mail-template name='task-assign'>
- <actors>#{taskInstance.actorId}</actors>
- <subject>Task '#{taskInstance.name}'</subject>
- <text><![CDATA[Hi,
-Task '#{taskInstance.name}' has been assigned to you.
-Go for it: #{BaseTaskListURL}#{taskInstance.id}
-Thanks.
----powered by JBoss jBPM---]]></text>
- </mail-template>
-
- <mail-template name='task-reminder'>
- <actors>#{taskInstance.actorId}</actors>
- <subject>Task '#{taskInstance.name}' !</subject>
- <text><![CDATA[Hey,
-Don't forget about #{BaseTaskListURL}#{taskInstance.id}
-Get going !
----powered by JBoss jBPM---]]></text>
- </mail-template>
-
-</mail-templates>
Added: jbossbpm/impl/jbpm3/trunk/modules/console/src/main/resources/login/jboss-service.xml
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/console/src/main/resources/login/jboss-service.xml (rev 0)
+++ jbossbpm/impl/jbpm3/trunk/modules/console/src/main/resources/login/jboss-service.xml 2008-07-29 11:13:37 UTC (rev 1746)
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<server>
+ <!-- The custom JAAS login configuration that installs
+ a Configuration capable of dynamically updating the
+ config settings
+ -->
+ <mbean code="org.jboss.security.auth.login.DynamicLoginConfig"
+ name="org.jboss.jbpm:service=LoginConfig">
+ <attribute name="PolicyConfig" serialDataType="jbxb">
+ <jaas:policy
+ xsi:schemaLocation="urn:jboss:security-config:4.1 resource:security-config_4_1.xsd"
+ xmlns:jaas="urn:jboss:security-config:4.1"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ >
+ <jaas:application-policy name="jbpm-console">
+ <jaas:authentication>
+ <jaas:login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule" flag = "required">
+ <jaas:module-option name="usersProperties">META-INF/jbpm-console-users.properties</jaas:module-option>
+ <jaas:module-option name="rolesProperties">META-INF/jbpm-console-roles.properties</jaas:module-option>
+ </jaas:login-module>
+ </jaas:authentication>
+ </jaas:application-policy>
+ </jaas:policy>
+ </attribute>
+ <depends optional-attribute-name="LoginConfigService">
+ jboss.security:service=XMLLoginConfig
+ </depends>
+ <depends optional-attribute-name="SecurityManagerService">
+ jboss.security:service=JaasSecurityManager
+ </depends>
+ </mbean>
+
+</server>
+
Property changes on: jbossbpm/impl/jbpm3/trunk/modules/console/src/main/resources/login/jboss-service.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbossbpm/impl/jbpm3/trunk/modules/console/src/main/resources/login/jbpm-console-roles.properties
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/console/src/main/resources/login/jbpm-console-roles.properties (rev 0)
+++ jbossbpm/impl/jbpm3/trunk/modules/console/src/main/resources/login/jbpm-console-roles.properties 2008-07-29 11:13:37 UTC (rev 1746)
@@ -0,0 +1,4 @@
+admin=admin,manager,user
+manager=manager,user
+user=user
+shipper=user
\ No newline at end of file
Added: jbossbpm/impl/jbpm3/trunk/modules/console/src/main/resources/login/jbpm-console-users.properties
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/console/src/main/resources/login/jbpm-console-users.properties (rev 0)
+++ jbossbpm/impl/jbpm3/trunk/modules/console/src/main/resources/login/jbpm-console-users.properties 2008-07-29 11:13:37 UTC (rev 1746)
@@ -0,0 +1,4 @@
+admin=admin
+manager=manager
+user=user
+shipper=shipper
\ No newline at end of file
Modified: jbossbpm/impl/jbpm3/trunk/modules/console/src/main/webapp/WEB-INF/jboss-web.xml
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/console/src/main/webapp/WEB-INF/jboss-web.xml 2008-07-29 09:49:33 UTC (rev 1745)
+++ jbossbpm/impl/jbpm3/trunk/modules/console/src/main/webapp/WEB-INF/jboss-web.xml 2008-07-29 11:13:37 UTC (rev 1746)
@@ -8,7 +8,7 @@
Specify the security domain to use. This will be java:/jaas/<name> where
<name> is one of the names configured in your login-config.xml.
-->
- <security-domain>java:/jaas/jbpm</security-domain>
+ <security-domain>java:/jaas/jbpm-console</security-domain>
<resource-ref>
<res-ref-name>jdbc/JbpmDataSource</res-ref-name>
Modified: jbossbpm/impl/jbpm3/trunk/modules/distribution/pom.xml
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/distribution/pom.xml 2008-07-29 09:49:33 UTC (rev 1745)
+++ jbossbpm/impl/jbpm3/trunk/modules/distribution/pom.xml 2008-07-29 11:13:37 UTC (rev 1746)
@@ -53,6 +53,13 @@
</dependency>
<dependency>
<groupId>org.jboss.jbpm</groupId>
+ <artifactId>jbpm-console</artifactId>
+ <classifier>login</classifier>
+ <version>${version}</version>
+ <type>jar</type>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.jbpm</groupId>
<artifactId>jbpm-jpdl-identity</artifactId>
<version>${version}</version>
</dependency>
@@ -155,6 +162,14 @@
<type>jar</type>
<outputDirectory>${project.build.directory}/resources/jbpm-jpdl-identity</outputDirectory>
</artifactItem>
+ <artifactItem>
+ <groupId>org.jboss.jbpm</groupId>
+ <artifactId>jbpm-console</artifactId>
+ <version>${version}</version>
+ <classifier>login</classifier>
+ <type>jar</type>
+ <outputDirectory>${project.build.directory}/resources/jbpm-login</outputDirectory>
+ </artifactItem>
</artifactItems>
</configuration>
</execution>
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:49:33 UTC (rev 1745)
+++ jbossbpm/impl/jbpm3/trunk/modules/distribution/scripts/assembly-deploy-artifacts.xml 2008-07-29 11:13:37 UTC (rev 1746)
@@ -15,7 +15,10 @@
<useStrictFiltering>true</useStrictFiltering>
<unpack>false</unpack>
<excludes>
- <exclude>org.jboss.jbpm:jbpm-console:war</exclude>
+ <exclude>*:war:*</exclude>
+ <exclude>*:ear:*</exclude>
+ <exclude>*:login</exclude>
+ <exclude>*:config</exclude>
</excludes>
</dependencySet>
<dependencySet>
@@ -36,6 +39,14 @@
<include>org.jboss.jbpm:jbpm-bam-console-ear:ear</include>
</includes>
</dependencySet>
+ <dependencySet>
+ <outputDirectory>lib/jbpm-login.sar</outputDirectory>
+ <useStrictFiltering>true</useStrictFiltering>
+ <unpack>true</unpack>
+ <includes>
+ <include>*:login</include>
+ </includes>
+ </dependencySet>
</dependencySets>
<fileSets>
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:49:33 UTC (rev 1745)
+++ jbossbpm/impl/jbpm3/trunk/modules/distribution/scripts/install-definition.xml 2008-07-29 11:13:37 UTC (rev 1746)
@@ -67,8 +67,9 @@
targetdir="$INSTALL_PATH/server/(a){jboss.server.instance}/deploy/jbpm">
<include>hibernate.cfg.xml</include>
</file>
+ <file src="@{deploy.artifacts.dir}/lib/jbpm-login.sar" targetdir="$INSTALL_PATH/server/(a){jboss.server.instance}/deploy/jbpm" />
</pack>
-
+
<!-- jBPM Console -->
<pack name="jBPM3 Console" required="no" installGroups="Main">
<description>The jBPM Console</description>
15 years, 9 months