JBoss JBPM SVN: r3304 - jbpm3/trunk/modules/core/src/test/java/org/jbpm/graph/def.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-12-09 17:16:01 -0500 (Tue, 09 Dec 2008)
New Revision: 3304
Modified:
jbpm3/trunk/modules/core/src/test/java/org/jbpm/graph/def/ExceptionHandlerTest.java
Log:
Remove ex.printStackTrace()
Modified: jbpm3/trunk/modules/core/src/test/java/org/jbpm/graph/def/ExceptionHandlerTest.java
===================================================================
--- jbpm3/trunk/modules/core/src/test/java/org/jbpm/graph/def/ExceptionHandlerTest.java 2008-12-09 22:04:57 UTC (rev 3303)
+++ jbpm3/trunk/modules/core/src/test/java/org/jbpm/graph/def/ExceptionHandlerTest.java 2008-12-09 22:16:01 UTC (rev 3304)
@@ -31,22 +31,31 @@
*/
public class ExceptionHandlerTest extends AbstractJbpmTestCase {
- public static class NoExceptionAction implements ActionHandler {
- public void execute(ExecutionContext executionContext) throws Exception {
+ public static class NoExceptionAction implements ActionHandler
+ {
+ public void execute(ExecutionContext executionContext) throws Exception
+ {
}
- }
- public static class ThrowExceptionAction implements ActionHandler {
- public void execute(ExecutionContext executionContext) throws Exception {
+ }
+
+ public static class ThrowExceptionAction implements ActionHandler
+ {
+ public void execute(ExecutionContext executionContext) throws Exception
+ {
throw new Exception("exception in action handler");
}
}
- public static class ThrowInnerExceptionAction implements ActionHandler {
- public void execute(ExecutionContext executionContext) throws Exception {
+
+ public static class ThrowInnerExceptionAction implements ActionHandler
+ {
+ public void execute(ExecutionContext executionContext) throws Exception
+ {
throw new Exception("exception inside of exception handler");
}
}
- public void testExceptionHandlerThrowingExcption() {
+ public void testExceptionHandlerThrowingExcption()
+ {
String xml =
"<?xml version='1.0' encoding='UTF-8'?>"
@@ -65,14 +74,15 @@
+" </exception-handler>"
+"</process-definition>";
- ProcessDefinition def = ProcessDefinition.parseXmlString(xml);
+ ProcessDefinition def = ProcessDefinition.parseXmlString(xml);
ProcessInstance pi = def.createProcessInstance();
-
- try {
+
+ try
+ {
pi.getRootToken().signal();
}
- catch (DelegationException ex) {
- ex.printStackTrace();
+ catch (DelegationException ex)
+ {
// check that exception is thrown to the client nested in a DelegationException
assertEquals("exception inside of exception handler", ex.getCause().getMessage());
}
@@ -99,10 +109,12 @@
ProcessDefinition def = ProcessDefinition.parseXmlString(xml);
ProcessInstance pi = def.createProcessInstance();
- try {
+ try
+ {
pi.getRootToken().signal();
}
- catch (DelegationException ex) {
+ catch (DelegationException ex)
+ {
// check that exception is thrown to the client nested in a DelegationException
assertEquals(NullPointerException.class, ex.getCause().getClass());
}
17 years, 4 months
JBoss JBPM SVN: r3303 - in jbpm3/trunk/modules/distribution: src/main/resources/installer and 1 other directory.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-12-09 17:04:57 -0500 (Tue, 09 Dec 2008)
New Revision: 3303
Modified:
jbpm3/trunk/modules/distribution/pom.xml
jbpm3/trunk/modules/distribution/src/main/resources/installer/install-definition.xml
Log:
Fix dependency on enterprise sources
Modified: jbpm3/trunk/modules/distribution/pom.xml
===================================================================
--- jbpm3/trunk/modules/distribution/pom.xml 2008-12-09 21:48:46 UTC (rev 3302)
+++ jbpm3/trunk/modules/distribution/pom.xml 2008-12-09 22:04:57 UTC (rev 3303)
@@ -171,7 +171,7 @@
</dependency>
<dependency>
<groupId>org.jbpm.jbpm3</groupId>
- <artifactId>jbpm-enterprise-beans</artifactId>
+ <artifactId>jbpm-enterprise</artifactId>
<classifier>sources</classifier>
<version>${version}</version>
</dependency>
@@ -188,10 +188,10 @@
<artifactId>ant</artifactId>
</dependency>
<dependency>
- <groupId>org.eclipse.birt</groupId>
- <artifactId>report-engine</artifactId>
- <type>zip</type>
- </dependency>
+ <groupId>org.eclipse.birt</groupId>
+ <artifactId>report-engine</artifactId>
+ <type>zip</type>
+ </dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
Modified: jbpm3/trunk/modules/distribution/src/main/resources/installer/install-definition.xml
===================================================================
--- jbpm3/trunk/modules/distribution/src/main/resources/installer/install-definition.xml 2008-12-09 21:48:46 UTC (rev 3302)
+++ jbpm3/trunk/modules/distribution/src/main/resources/installer/install-definition.xml 2008-12-09 22:04:57 UTC (rev 3303)
@@ -168,7 +168,7 @@
<fileset dir="@{deploy.artifacts.dir}/src" targetdir="$INSTALL_PATH/src" override="true">
<include name="jsf-console-sources.jar" />
<include name="jbpm-jpdl-sources.jar" />
- <include name="jbpm-enterprise-beans-sources.jar" />
+ <include name="jbpm-enterprise-sources.jar" />
<include name="jbpm-identity-sources.jar" />
</fileset>
</pack>
17 years, 4 months
JBoss JBPM SVN: r3302 - in jbpm3/trunk: modules/enterprise and 3 other directories.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-12-09 16:48:46 -0500 (Tue, 09 Dec 2008)
New Revision: 3302
Added:
jbpm3/trunk/modules/enterprise/scripts/
jbpm3/trunk/modules/enterprise/scripts/antrun-test-jars.xml
jbpm3/trunk/modules/enterprise/scripts/assembly-config.xml
jbpm3/trunk/modules/enterprise/scripts/assembly-test-dependencies.xml
jbpm3/trunk/modules/enterprise/src/
jbpm3/trunk/modules/enterprise/src/main/
jbpm3/trunk/modules/enterprise/src/test/
Removed:
jbpm3/trunk/modules/enterprise/ear/
jbpm3/trunk/modules/enterprise/jar/scripts/
jbpm3/trunk/modules/enterprise/jar/src/
jbpm3/trunk/modules/enterprise/scripts/antrun-test-jars.xml
jbpm3/trunk/modules/enterprise/scripts/assembly-config.xml
jbpm3/trunk/modules/enterprise/scripts/assembly-test-dependencies.xml
jbpm3/trunk/modules/enterprise/src/main/
jbpm3/trunk/modules/enterprise/src/test/
Modified:
jbpm3/trunk/modules/enterprise/pom.xml
jbpm3/trunk/pom.xml
Log:
Remove jbpm-enterprise.ear
Modified: jbpm3/trunk/modules/enterprise/pom.xml
===================================================================
--- jbpm3/trunk/modules/enterprise/pom.xml 2008-12-09 21:41:52 UTC (rev 3301)
+++ jbpm3/trunk/modules/enterprise/pom.xml 2008-12-09 21:48:46 UTC (rev 3302)
@@ -16,7 +16,7 @@
<name>JBoss jBPM3 - Enterprise</name>
<groupId>org.jbpm.jbpm3</groupId>
<artifactId>jbpm-enterprise</artifactId>
- <packaging>pom</packaging>
+ <packaging>ejb</packaging>
<!-- Parent -->
<parent>
@@ -26,10 +26,348 @@
<relativePath>../../pom.xml</relativePath>
</parent>
- <!-- Modules -->
- <modules>
- <module>jar</module>
- <module>ear</module>
- </modules>
+ <!-- Dependencies -->
+ <dependencies>
+ <!-- jBPM Dependencies -->
+ <dependency>
+ <groupId>org.jbpm.jbpm3</groupId>
+ <artifactId>jbpm-jpdl</artifactId>
+ <version>${version}</version>
+ </dependency>
+ <!-- Provided Dependencies -->
+ <dependency>
+ <groupId>javax.ejb</groupId>
+ <artifactId>ejb-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.jms</groupId>
+ <artifactId>jms</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- Test Dependencies -->
+ <dependency>
+ <groupId>org.apache.cactus</groupId>
+ <artifactId>cactus.core.framework.wrapper.javaEE.14</artifactId>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <artifactId>org.mortbay.jetty</artifactId>
+ <groupId>org.mortbay.jetty</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cactus</groupId>
+ <artifactId>cactus.integration.shared.api</artifactId>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <artifactId>org.mortbay.jetty</artifactId>
+ <groupId>org.mortbay.jetty</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.client</groupId>
+ <artifactId>jbossall-client</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.bpm</groupId>
+ <artifactId>bpm-spec-api</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <!-- Plugins -->
+ <build>
+ <testResources>
+ <testResource>
+ <directory>src/test/resources</directory>
+ <filtering>true</filtering>
+ </testResource>
+ </testResources>
+ <plugins>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>build-test-jars</id>
+ <phase>test-compile</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <property name="tests.output.dir" value="${project.build.directory}" />
+ <property name="tests.resources.dir" value="${basedir}/src/test/resources" />
+ <ant antfile="scripts/antrun-test-jars.xml" target="build-test-jars" />
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>assembly-config</id>
+ <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>
+ <execution>
+ <id>assembly-test-dependencies</id>
+ <phase>generate-test-resources</phase>
+ <goals>
+ <goal>directory-single</goal>
+ </goals>
+ <configuration>
+ <finalName>test-dependencies</finalName>
+ <ignoreDirFormatExtensions>true</ignoreDirFormatExtensions>
+ <appendAssemblyId>false</appendAssemblyId>
+ <descriptors>
+ <descriptor>scripts/assembly-test-dependencies.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <showDeprecation>false</showDeprecation>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <excludes>
+ <exclude>jbpm.cfg.xml</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <argLine>${surefire.jvm.args}</argLine>
+ <systemProperties>
+ <property>
+ <name>log4j.output.dir</name>
+ <value>${basedir}/target</value>
+ </property>
+ </systemProperties>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <!-- Profiles -->
+ <profiles>
+
+ <!--
+ Name: no-jboss-bind-address
+ Descr: Set the default jboss.bind.address command line cannot overwrite pom properties
+ http://jira.codehaus.org/browse/MNG-3546
+ -->
+ <profile>
+ <id>no-jboss-bind-address</id>
+ <activation>
+ <property>
+ <name>!jboss.bind.address</name>
+ </property>
+ </activation>
+ <properties>
+ <jboss.bind.address>localhost</jboss.bind.address>
+ </properties>
+ </profile>
+
+ <!--
+ Name: no-jbpm-target-container
+ Descr: Setup the default database
+ -->
+ <profile>
+ <id>no-jbpm-target-container</id>
+ <activation>
+ <property>
+ <name>!jbpm.target.container</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <systemProperties>
+ <property>
+ <name>jbpm.target.container</name>
+ <value>jboss422</value>
+ </property>
+ <property>
+ <name>log4j.output.dir</name>
+ <value>${basedir}/target</value>
+ </property>
+ </systemProperties>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <!--
+ Name: no-database
+ Descr: Setup the default database
+ -->
+ <profile>
+ <id>no-database</id>
+ <activation>
+ <property>
+ <name>!database</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <excludes>
+ <!-- [JBPM-1708] Enterprise EjbSchedulerTest fails -->
+ <exclude>org/jbpm/enterprise/ejbtimer/EjbSchedulerTest.java</exclude>
+ <!-- [JBPM-1811] JmsMessageTest fails intermitently on HSQLDB -->
+ <exclude>org/jbpm/enterprise/jms/JmsMessageTest.java</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <!--
+ Name: hsqldb
+ Descr: Hypersonic Database Setup
+ -->
+ <profile>
+ <id>hsqldb</id>
+ <activation>
+ <property>
+ <name>database</name>
+ <value>hsqldb</value>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <excludes>
+ <!-- [JBPM-1708] Enterprise EjbSchedulerTest fails -->
+ <exclude>org/jbpm/enterprise/ejbtimer/EjbSchedulerTest.java</exclude>
+ <!-- [JBPM-1811] JmsMessageTest fails intermitently on HSQLDB -->
+ <exclude>org/jbpm/enterprise/jms/JmsMessageTest.java</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <!--
+ Name: mysql
+ Descr: MySQL Database Setup
+ -->
+ <profile>
+ <id>mysql</id>
+ <activation>
+ <property>
+ <name>database</name>
+ <value>mysql</value>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <!--
+ Name: postgresql
+ Descr: PostgreSQL Database Setup
+ -->
+ <profile>
+ <id>postgresql</id>
+ <activation>
+ <property>
+ <name>database</name>
+ <value>postgresql</value>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <!--
+ Name: sybase
+ Descr: Sybase Database Setup
+ -->
+ <profile>
+ <id>sybase</id>
+ <activation>
+ <property>
+ <name>database</name>
+ <value>sybase</value>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <excludes>
+ <!-- [JBPM-1818] Use Sybase instance that supports XA Transaction -->
+ <exclude>org/jbpm/enterprise/ejbtimer/EjbSchedulerTest.java</exclude>
+ <exclude>org/jbpm/enterprise/jta/JtaDbPersistenceTest.java</exclude>
+ <exclude>org/jbpm/enterprise/jms/JmsMessageTest.java</exclude>
+ <!-- [JBPM-1830] Fix AppServerConfigurationsTest for sybase on jboss500 -->
+ <exclude>org/jbpm/enterprise/config/AppServerConfigurationsTest.java</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>
Copied: jbpm3/trunk/modules/enterprise/scripts (from rev 3296, jbpm3/trunk/modules/enterprise/jar/scripts)
Deleted: jbpm3/trunk/modules/enterprise/scripts/antrun-test-jars.xml
===================================================================
--- jbpm3/trunk/modules/enterprise/jar/scripts/antrun-test-jars.xml 2008-12-09 16:17:05 UTC (rev 3296)
+++ jbpm3/trunk/modules/enterprise/scripts/antrun-test-jars.xml 2008-12-09 21:48:46 UTC (rev 3302)
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- ============================================================ -->
-<!-- JBoss, the OpenSource J2EE webOS -->
-<!-- Distributable under LGPL license. -->
-<!-- See terms of license at http://www.gnu.org. -->
-<!-- ============================================================ -->
-
-<!-- $Id$ -->
-
-<project>
-
- <description>jBPM enterprise test archive builder</description>
-
- <!-- ================================================================== -->
- <!-- Building -->
- <!-- ================================================================== -->
-
- <target name="build-test-jars" description="Build the test deployments">
-
- <mkdir dir="${tests.output.dir}/test-libs"/>
-
- <!-- enterprise-test -->
- <war warfile="${tests.output.dir}/test-libs/enterprise-test.war" webxml="${tests.resources.dir}/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/test-classes" />
- <lib dir="${tests.output.dir}/test-dependencies">
- <include name="aspectjrt*.jar"/>
- <include name="cactus*.jar"/>
- <include name="junit*.jar"/>
- </lib>
- <webinf dir="${tests.resources.dir}/WEB-INF">
- <exclude name="web.xml"/>
- </webinf>
- </war>
-
- <!-- Please add alphabetically -->
-
- </target>
-
-</project>
Copied: jbpm3/trunk/modules/enterprise/scripts/antrun-test-jars.xml (from rev 3301, jbpm3/trunk/modules/enterprise/jar/scripts/antrun-test-jars.xml)
===================================================================
--- jbpm3/trunk/modules/enterprise/scripts/antrun-test-jars.xml (rev 0)
+++ jbpm3/trunk/modules/enterprise/scripts/antrun-test-jars.xml 2008-12-09 21:48:46 UTC (rev 3302)
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ============================================================ -->
+<!-- JBoss, the OpenSource J2EE webOS -->
+<!-- Distributable under LGPL license. -->
+<!-- See terms of license at http://www.gnu.org. -->
+<!-- ============================================================ -->
+
+<!-- $Id$ -->
+
+<project>
+
+ <description>jBPM enterprise test archive builder</description>
+
+ <!-- ================================================================== -->
+ <!-- Building -->
+ <!-- ================================================================== -->
+
+ <target name="build-test-jars" description="Build the test deployments">
+
+ <mkdir dir="${tests.output.dir}/test-libs"/>
+
+ <!-- enterprise-test -->
+ <war warfile="${tests.output.dir}/test-libs/enterprise-test.war" webxml="${tests.resources.dir}/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/test-classes" />
+ <lib dir="${tests.output.dir}/test-dependencies">
+ <include name="aspectjrt*.jar"/>
+ <include name="cactus*.jar"/>
+ <include name="junit*.jar"/>
+ </lib>
+ <webinf dir="${tests.resources.dir}/WEB-INF">
+ <exclude name="web.xml"/>
+ </webinf>
+ </war>
+
+ <!-- Please add alphabetically -->
+
+ </target>
+
+</project>
Deleted: jbpm3/trunk/modules/enterprise/scripts/assembly-config.xml
===================================================================
--- jbpm3/trunk/modules/enterprise/jar/scripts/assembly-config.xml 2008-12-09 16:17:05 UTC (rev 3296)
+++ jbpm3/trunk/modules/enterprise/scripts/assembly-config.xml 2008-12-09 21:48:46 UTC (rev 3302)
@@ -1,18 +0,0 @@
-<assembly xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/assembly-1.1.0-SNAPSHOT.xsd">
- <id>config</id>
- <formats>
- <format>jar</format>
- </formats>
- <includeBaseDirectory>false</includeBaseDirectory>
- <fileSets>
- <fileSet>
- <directory>${basedir}/src/main/etc</directory>
- <outputDirectory>/</outputDirectory>
- <includes>
- <include>jbpm.cfg.xml</include>
- <include>hibernate.extra.hbm.xml</include>
- </includes>
- </fileSet>
- </fileSets>
-</assembly>
\ No newline at end of file
Copied: jbpm3/trunk/modules/enterprise/scripts/assembly-config.xml (from rev 3301, jbpm3/trunk/modules/enterprise/jar/scripts/assembly-config.xml)
===================================================================
--- jbpm3/trunk/modules/enterprise/scripts/assembly-config.xml (rev 0)
+++ jbpm3/trunk/modules/enterprise/scripts/assembly-config.xml 2008-12-09 21:48:46 UTC (rev 3302)
@@ -0,0 +1,18 @@
+<assembly xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/assembly-1.1.0-SNAPSHOT.xsd">
+ <id>config</id>
+ <formats>
+ <format>jar</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <fileSets>
+ <fileSet>
+ <directory>${basedir}/src/main/etc</directory>
+ <outputDirectory>/</outputDirectory>
+ <includes>
+ <include>jbpm.cfg.xml</include>
+ <include>hibernate.extra.hbm.xml</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+</assembly>
\ No newline at end of file
Deleted: jbpm3/trunk/modules/enterprise/scripts/assembly-test-dependencies.xml
===================================================================
--- jbpm3/trunk/modules/enterprise/jar/scripts/assembly-test-dependencies.xml 2008-12-09 16:17:05 UTC (rev 3296)
+++ jbpm3/trunk/modules/enterprise/scripts/assembly-test-dependencies.xml 2008-12-09 21:48:46 UTC (rev 3302)
@@ -1,28 +0,0 @@
-<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>test-dependencies</id>
- <formats>
- <format>dir</format>
- </formats>
- <includeBaseDirectory>false</includeBaseDirectory>
-
- <!-- Dependency Sets -->
- <dependencySets>
- <dependencySet>
- <outputDirectory>/</outputDirectory>
- <useStrictFiltering>true</useStrictFiltering>
- <includes>
- <include>aspectj:aspectjrt:jar</include>
- <include>org.apache.cactus:cactus.integration.shared.api</include>
- <include>org.apache.cactus:cactus.core.framework.wrapper.javaEE.14</include>
- <include>org.apache.cactus:cactus.core.framework.javaEE.13-14</include>
- <include>org.apache.cactus:cactus.core.framework.javaEE.12-13-14</include>
- <include>junit:junit</include>
- </includes>
- <unpack>false</unpack>
- <scope>test</scope>
- </dependencySet>
- </dependencySets>
-
-</assembly>
Copied: jbpm3/trunk/modules/enterprise/scripts/assembly-test-dependencies.xml (from rev 3301, jbpm3/trunk/modules/enterprise/jar/scripts/assembly-test-dependencies.xml)
===================================================================
--- jbpm3/trunk/modules/enterprise/scripts/assembly-test-dependencies.xml (rev 0)
+++ jbpm3/trunk/modules/enterprise/scripts/assembly-test-dependencies.xml 2008-12-09 21:48:46 UTC (rev 3302)
@@ -0,0 +1,28 @@
+<assembly xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/assembly-1.1.0-SNAPSHOT.xsd">
+
+ <id>test-dependencies</id>
+ <formats>
+ <format>dir</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+
+ <!-- Dependency Sets -->
+ <dependencySets>
+ <dependencySet>
+ <outputDirectory>/</outputDirectory>
+ <useStrictFiltering>true</useStrictFiltering>
+ <includes>
+ <include>aspectj:aspectjrt:jar</include>
+ <include>org.apache.cactus:cactus.integration.shared.api</include>
+ <include>org.apache.cactus:cactus.core.framework.wrapper.javaEE.14</include>
+ <include>org.apache.cactus:cactus.core.framework.javaEE.13-14</include>
+ <include>org.apache.cactus:cactus.core.framework.javaEE.12-13-14</include>
+ <include>junit:junit</include>
+ </includes>
+ <unpack>false</unpack>
+ <scope>test</scope>
+ </dependencySet>
+ </dependencySets>
+
+</assembly>
Copied: jbpm3/trunk/modules/enterprise/src (from rev 3296, jbpm3/trunk/modules/enterprise/jar/src)
Copied: jbpm3/trunk/modules/enterprise/src/main (from rev 3301, jbpm3/trunk/modules/enterprise/jar/src/main)
Copied: jbpm3/trunk/modules/enterprise/src/test (from rev 3301, jbpm3/trunk/modules/enterprise/jar/src/test)
Modified: jbpm3/trunk/pom.xml
===================================================================
--- jbpm3/trunk/pom.xml 2008-12-09 21:41:52 UTC (rev 3301)
+++ jbpm3/trunk/pom.xml 2008-12-09 21:48:46 UTC (rev 3302)
@@ -31,7 +31,7 @@
<module>modules/core</module>
<module>modules/db</module>
<module>modules/identity</module>
- <module>modules/enterprise/jar</module>
+ <module>modules/enterprise</module>
<module>modules/examples</module>
<module>modules/simulation</module>
<module>modules/integration</module>
17 years, 4 months
JBoss JBPM SVN: r3301 - in jbpm3/trunk: modules/distribution and 6 other directories.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-12-09 16:41:52 -0500 (Tue, 09 Dec 2008)
New Revision: 3301
Added:
jbpm3/trunk/modules/enterprise/jar/src/main/java/org/jbpm/ejb/TimerEntity.java
jbpm3/trunk/modules/enterprise/jar/src/main/java/org/jbpm/ejb/TimerEntityHome.java
Modified:
jbpm3/trunk/modules/distribution/pom.xml
jbpm3/trunk/modules/distribution/scripts/antrun-installer.xml
jbpm3/trunk/modules/distribution/scripts/assembly-deploy-artifacts.xml
jbpm3/trunk/modules/distribution/src/main/resources/installer/install-definition.xml
jbpm3/trunk/modules/enterprise/jar/.project
jbpm3/trunk/modules/enterprise/jar/pom.xml
jbpm3/trunk/modules/enterprise/jar/src/main/java/org/jbpm/ejb/RemoteCommandService.java
jbpm3/trunk/modules/enterprise/jar/src/main/java/org/jbpm/ejb/RemoteCommandServiceHome.java
jbpm3/trunk/modules/enterprise/jar/src/main/java/org/jbpm/ejb/impl/TimerEntityBean.java
jbpm3/trunk/modules/enterprise/jar/src/main/resources/META-INF/ejb-jar.xml
jbpm3/trunk/pom.xml
Log:
decouple jsf-console from jbpm-enterprise.ear
Modified: jbpm3/trunk/modules/distribution/pom.xml
===================================================================
--- jbpm3/trunk/modules/distribution/pom.xml 2008-12-09 21:40:49 UTC (rev 3300)
+++ jbpm3/trunk/modules/distribution/pom.xml 2008-12-09 21:41:52 UTC (rev 3301)
@@ -58,24 +58,18 @@
</dependency>
<dependency>
<groupId>org.jbpm.jbpm3</groupId>
- <artifactId>jbpm-enterprise-beans</artifactId>
+ <artifactId>jbpm-enterprise</artifactId>
<version>${version}</version>
<type>ejb</type>
</dependency>
<dependency>
<groupId>org.jbpm.jbpm3</groupId>
- <artifactId>jbpm-enterprise-beans</artifactId>
+ <artifactId>jbpm-enterprise</artifactId>
<classifier>config</classifier>
<version>${version}</version>
</dependency>
<dependency>
<groupId>org.jbpm.jbpm3</groupId>
- <artifactId>jbpm-enterprise-bundle</artifactId>
- <version>${version}</version>
- <type>ear</type>
- </dependency>
- <dependency>
- <groupId>org.jbpm.jbpm3</groupId>
<artifactId>jbpm-examples</artifactId>
<classifier>examples</classifier>
<version>${version}</version>
@@ -111,6 +105,11 @@
</dependency>
<dependency>
<groupId>org.jbpm.jbpm3</groupId>
+ <artifactId>jsf-console</artifactId>
+ <type>war</type>
+ </dependency>
+ <dependency>
+ <groupId>org.jbpm.jbpm3</groupId>
<artifactId>jbpm-userguide</artifactId>
<version>${version}</version>
<type>jdocbook</type>
Modified: jbpm3/trunk/modules/distribution/scripts/antrun-installer.xml
===================================================================
--- jbpm3/trunk/modules/distribution/scripts/antrun-installer.xml 2008-12-09 21:40:49 UTC (rev 3300)
+++ jbpm3/trunk/modules/distribution/scripts/antrun-installer.xml 2008-12-09 21:41:52 UTC (rev 3301)
@@ -136,7 +136,6 @@
<mkdir dir="${izpack.temp.dir}" />
<!-- http://jira.codehaus.org/browse/IZPACK-151 -->
- <copy file="${deploy.artifacts.lib}/jbpm-enterprise-bundle.ear" tofile="${deploy.artifacts.lib}/jbpm-enterprise-bundle.zip" />
<copy file="${deploy.artifacts.lib}/jbpm-jpdl-config.jar" tofile="${deploy.artifacts.lib}/jbpm-jpdl-config.zip" />
<copy file="${deploy.artifacts.lib}/jbpm-userguide.jdocbook" tofile="${deploy.artifacts.lib}/jbpm-userguide.zip" />
Modified: jbpm3/trunk/modules/distribution/scripts/assembly-deploy-artifacts.xml
===================================================================
--- jbpm3/trunk/modules/distribution/scripts/assembly-deploy-artifacts.xml 2008-12-09 21:40:49 UTC (rev 3300)
+++ jbpm3/trunk/modules/distribution/scripts/assembly-deploy-artifacts.xml 2008-12-09 21:41:52 UTC (rev 3301)
@@ -46,7 +46,7 @@
<outputDirectory>resources/jbpm-enterprise-config</outputDirectory>
<useStrictFiltering>true</useStrictFiltering>
<includes>
- <include>*:jbpm-enterprise-beans:jar:config</include>
+ <include>*:jbpm-enterprise:jar:config</include>
</includes>
<unpack>true</unpack>
</dependencySet>
Modified: jbpm3/trunk/modules/distribution/src/main/resources/installer/install-definition.xml
===================================================================
--- jbpm3/trunk/modules/distribution/src/main/resources/installer/install-definition.xml 2008-12-09 21:40:49 UTC (rev 3300)
+++ jbpm3/trunk/modules/distribution/src/main/resources/installer/install-definition.xml 2008-12-09 21:41:52 UTC (rev 3301)
@@ -116,7 +116,7 @@
<file src="@{deploy.artifacts.dir}/etc/JBossORG-EULA.txt" targetdir="$INSTALL_PATH" override="true" />
<!-- jbpm3/config -->
- <file src="@{deploy.artifacts.dir}/lib/jbpm-jpdl-config.zip" targetdir="$INSTALL_PATH/config"
+ <file src="@{deploy.artifacts.dir}/lib/jbpm-jpdl-config.jar" targetdir="$INSTALL_PATH/config"
unpack="true" override="true" />
<file src="@{deploy.artifacts.dir}/etc/version.info.xml" targetdir="$INSTALL_PATH/config"
override="true" />
@@ -126,7 +126,7 @@
unpack="true" override="true" />
<!-- jbpm3/docs -->
- <file src="@{deploy.artifacts.dir}/lib/jbpm-userguide.zip" targetdir="$INSTALL_PATH/docs/userguide"
+ <file src="@{deploy.artifacts.dir}/lib/jbpm-userguide.jdocbook" targetdir="$INSTALL_PATH/docs/userguide"
unpack="true" override="true" />
<file src="@{deploy.artifacts.dir}/etc/JBossORG-EULA.txt" targetdir="$INSTALL_PATH"
override="true" />
@@ -210,10 +210,14 @@
<file src="@{deploy.artifacts.dir}/lib/jbpm-identity-service.zip" targetdir="${installPath}/server/${jbossTargetServer}/deploy/jbpm/jbpm-service.sar"
unpack="true" override="true" />
- <!-- jbpm/jbpm-enterprise.ear -->
- <file src="@{deploy.artifacts.dir}/lib/jbpm-enterprise-bundle.zip" targetdir="${installPath}/server/${jbossTargetServer}/deploy/jbpm/jbpm-enterprise-bundle.ear"
+ <!-- jbpm/jbpm-enterprise.jar -->
+ <file src="@{deploy.artifacts.dir}/lib/jbpm-enterprise.jar" targetdir="${installPath}/server/${jbossTargetServer}/deploy/jbpm/jbpm-enterprise.jar"
unpack="true" override="true" />
+ <!-- jbpm/jsf-console.war -->
+ <file src="@{deploy.artifacts.dir}/lib/jsf-console.war" targetdir="${installPath}/server/${jbossTargetServer}/deploy/jbpm/jsf-console.war"
+ unpack="true" override="true" />
+
<!-- jbpm/jbpm-userguide.war -->
<file src="@{deploy.artifacts.dir}/lib/jbpm-userguide.zip" targetdir="${installPath}/server/${jbossTargetServer}/deploy/jbpm/jbpm-userguide.war"
unpack="true" override="true" />
Modified: jbpm3/trunk/modules/enterprise/jar/.project
===================================================================
--- jbpm3/trunk/modules/enterprise/jar/.project 2008-12-09 21:40:49 UTC (rev 3300)
+++ jbpm3/trunk/modules/enterprise/jar/.project 2008-12-09 21:41:52 UTC (rev 3301)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>jbpm-enterprise-beans</name>
+ <name>jbpm-enterprise</name>
<comment></comment>
<projects>
</projects>
Modified: jbpm3/trunk/modules/enterprise/jar/pom.xml
===================================================================
--- jbpm3/trunk/modules/enterprise/jar/pom.xml 2008-12-09 21:40:49 UTC (rev 3300)
+++ jbpm3/trunk/modules/enterprise/jar/pom.xml 2008-12-09 21:41:52 UTC (rev 3301)
@@ -13,16 +13,17 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
- <name>JBoss jBPM3 - Enterprise (JAR)</name>
+ <name>JBoss jBPM3 - Enterprise</name>
<groupId>org.jbpm.jbpm3</groupId>
- <artifactId>jbpm-enterprise-beans</artifactId>
+ <artifactId>jbpm-enterprise</artifactId>
<packaging>ejb</packaging>
<!-- Parent -->
<parent>
<groupId>org.jbpm.jbpm3</groupId>
- <artifactId>jbpm-enterprise</artifactId>
+ <artifactId>jbpm</artifactId>
<version>3.3.1-SNAPSHOT</version>
+ <relativePath>../../../pom.xml</relativePath>
</parent>
<!-- Dependencies -->
Modified: jbpm3/trunk/modules/enterprise/jar/src/main/java/org/jbpm/ejb/RemoteCommandService.java
===================================================================
--- jbpm3/trunk/modules/enterprise/jar/src/main/java/org/jbpm/ejb/RemoteCommandService.java 2008-12-09 21:40:49 UTC (rev 3300)
+++ jbpm3/trunk/modules/enterprise/jar/src/main/java/org/jbpm/ejb/RemoteCommandService.java 2008-12-09 21:41:52 UTC (rev 3301)
@@ -23,9 +23,11 @@
import java.rmi.RemoteException;
+import javax.ejb.EJBObject;
+
import org.jbpm.command.Command;
-public interface RemoteCommandService extends javax.ejb.EJBObject {
-
+public interface RemoteCommandService extends EJBObject
+{
public Object execute(Command command) throws RemoteException;
}
Modified: jbpm3/trunk/modules/enterprise/jar/src/main/java/org/jbpm/ejb/RemoteCommandServiceHome.java
===================================================================
--- jbpm3/trunk/modules/enterprise/jar/src/main/java/org/jbpm/ejb/RemoteCommandServiceHome.java 2008-12-09 21:40:49 UTC (rev 3300)
+++ jbpm3/trunk/modules/enterprise/jar/src/main/java/org/jbpm/ejb/RemoteCommandServiceHome.java 2008-12-09 21:41:52 UTC (rev 3301)
@@ -24,9 +24,9 @@
import java.rmi.RemoteException;
import javax.ejb.CreateException;
+import javax.ejb.EJBHome;
-public interface RemoteCommandServiceHome extends javax.ejb.EJBHome {
-
+public interface RemoteCommandServiceHome extends EJBHome
+{
public RemoteCommandService create() throws CreateException, RemoteException;
-
}
Added: jbpm3/trunk/modules/enterprise/jar/src/main/java/org/jbpm/ejb/TimerEntity.java
===================================================================
--- jbpm3/trunk/modules/enterprise/jar/src/main/java/org/jbpm/ejb/TimerEntity.java (rev 0)
+++ jbpm3/trunk/modules/enterprise/jar/src/main/java/org/jbpm/ejb/TimerEntity.java 2008-12-09 21:41:52 UTC (rev 3301)
@@ -0,0 +1,21 @@
+package org.jbpm.ejb;
+
+import java.rmi.RemoteException;
+
+import javax.ejb.EJBObject;
+
+import org.jbpm.graph.exe.ProcessInstance;
+import org.jbpm.graph.exe.Token;
+import org.jbpm.job.Timer;
+
+public interface TimerEntity extends EJBObject
+{
+ public void createTimer(Timer timer) throws RemoteException;
+
+ public void cancelTimer(Timer timer) throws RemoteException;
+
+ public void cancelTimersByName(String timerName, Token token) throws RemoteException;
+
+ public void cancelTimersForProcessInstance(ProcessInstance processInstance) throws RemoteException;
+
+}
\ No newline at end of file
Property changes on: jbpm3/trunk/modules/enterprise/jar/src/main/java/org/jbpm/ejb/TimerEntity.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm3/trunk/modules/enterprise/jar/src/main/java/org/jbpm/ejb/TimerEntityHome.java
===================================================================
--- jbpm3/trunk/modules/enterprise/jar/src/main/java/org/jbpm/ejb/TimerEntityHome.java (rev 0)
+++ jbpm3/trunk/modules/enterprise/jar/src/main/java/org/jbpm/ejb/TimerEntityHome.java 2008-12-09 21:41:52 UTC (rev 3301)
@@ -0,0 +1,19 @@
+package org.jbpm.ejb;
+
+import java.rmi.RemoteException;
+import java.util.Collection;
+
+import javax.ejb.CreateException;
+import javax.ejb.EJBHome;
+import javax.ejb.FinderException;
+
+public interface TimerEntityHome extends EJBHome
+{
+ public TimerEntity create() throws CreateException, RemoteException;
+
+ public TimerEntity findByPrimaryKey(Long timerId) throws FinderException, RemoteException;
+
+ public Collection findByNameAndTokenId(String name, Long tokenId) throws FinderException, RemoteException;
+
+ public Collection findByProcessInstanceId(Long processInstanceId) throws FinderException, RemoteException;
+}
Property changes on: jbpm3/trunk/modules/enterprise/jar/src/main/java/org/jbpm/ejb/TimerEntityHome.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbpm3/trunk/modules/enterprise/jar/src/main/java/org/jbpm/ejb/impl/TimerEntityBean.java
===================================================================
--- jbpm3/trunk/modules/enterprise/jar/src/main/java/org/jbpm/ejb/impl/TimerEntityBean.java 2008-12-09 21:40:49 UTC (rev 3300)
+++ jbpm3/trunk/modules/enterprise/jar/src/main/java/org/jbpm/ejb/impl/TimerEntityBean.java 2008-12-09 21:41:52 UTC (rev 3301)
@@ -24,13 +24,13 @@
import org.jbpm.scheduler.ejbtimer.TimerInfo;
/**
- * Entity bean that interacts with the EJB timer service to schedule jBPM
- * {@linkplain Timer timers}.
+ * Entity bean that interacts with the EJB timer service to schedule jBPM {@linkplain Timer timers}.
*
* <h3>Environment</h3>
*
- * <p>The environment entries and resources available for customization are
- * summarized in the table below.</p>
+ * <p>
+ * The environment entries and resources available for customization are summarized in the table below.
+ * </p>
*
* <table border="1">
* <tr>
@@ -41,9 +41,7 @@
* <tr>
* <td><code>ejb/LocalCommandServiceBean</code></td>
* <td>EJB Reference</td>
- * <td>Link to the local {@linkplain CommandServiceBean session bean} that
- * executes timers on a separate jBPM context.
- * </td>
+ * <td>Link to the local {@linkplain CommandServiceBean session bean} that executes timers on a separate jBPM context.</td>
* </tr>
* </table>
*
@@ -51,145 +49,170 @@
* @author Alejandro Guizar
* @author Fady Matar
*/
-public abstract class TimerEntityBean implements EntityBean, TimedObject {
-
- private EntityContext entityContext;
+public abstract class TimerEntityBean implements EntityBean, TimedObject
+{
+ private EntityContext entityContext;
private LocalCommandService commandService;
private static final Log log = LogFactory.getLog(TimerEntityBean.class);
- public abstract Long getTimerId();
+ public abstract Long getTimerId();
- public abstract void setTimerId(Long timerId);
+ public abstract void setTimerId(Long timerId);
- public abstract String getName();
+ public abstract String getName();
- public abstract void setName(String name);
+ public abstract void setName(String name);
- public abstract Long getTokenId();
+ public abstract Long getTokenId();
- public abstract void setTokenId(Long tokenId);
+ public abstract void setTokenId(Long tokenId);
- public abstract Long getProcessInstanceId();
+ public abstract Long getProcessInstanceId();
- public abstract void setProcessInstanceId(Long processInstanceId);
+ public abstract void setProcessInstanceId(Long processInstanceId);
- public abstract String getDiscriminator();
+ public abstract String getDiscriminator();
- public abstract void setDiscriminator(String discriminator);
+ public abstract void setDiscriminator(String discriminator);
- public void ejbActivate() {
- try {
+ public void ejbActivate()
+ {
+ try
+ {
Context initial = new InitialContext();
- LocalCommandServiceHome commandServiceHome = (LocalCommandServiceHome) initial
- .lookup("java:comp/env/ejb/LocalCommandServiceBean");
+ LocalCommandServiceHome commandServiceHome = (LocalCommandServiceHome)initial.lookup("java:comp/env/ejb/LocalCommandServiceBean");
commandService = commandServiceHome.create();
}
- catch (NamingException e) {
+ catch (NamingException e)
+ {
throw new EJBException("failed to retrieve command service home", e);
}
- catch (CreateException e) {
+ catch (CreateException e)
+ {
throw new EJBException("command service creation failed", e);
}
- }
+ }
- public void ejbPassivate() {
- commandService = null;
- }
+ public void ejbPassivate()
+ {
+ commandService = null;
+ }
- public void ejbRemove() {
- commandService = null;
- }
+ public void ejbRemove()
+ {
+ commandService = null;
+ }
- public void ejbLoad() {}
+ public void ejbLoad()
+ {
+ }
- public void ejbStore() {}
+ public void ejbStore()
+ {
+ }
- public void setEntityContext(EntityContext entityContext) {
- this.entityContext = entityContext;
- }
+ public void setEntityContext(EntityContext entityContext)
+ {
+ this.entityContext = entityContext;
+ }
- public void unsetEntityContext() {
- entityContext = null;
- }
+ public void unsetEntityContext()
+ {
+ entityContext = null;
+ }
- /**
- * No ejbCreate operation is allowed. One approach of ensuring that an EJB is
- * set as read-only.
- *
- * @throws CreateException
- */
- public Long ejbCreate() throws CreateException {
- throw new CreateException("direct creation of timer entities is prohibited");
- }
+ /**
+ * No ejbCreate operation is allowed. One approach of ensuring that an EJB is set as read-only.
+ *
+ * @throws CreateException
+ */
+ public Long ejbCreate() throws CreateException
+ {
+ throw new CreateException("direct creation of timer entities is prohibited");
+ }
- public void ejbPostCreate() {}
+ public void ejbPostCreate()
+ {
+ }
- public void ejbTimeout(javax.ejb.Timer ejbTimer) {
- log.debug(ejbTimer + " fired");
- TimerInfo timerInfo = (TimerInfo) ejbTimer.getInfo();
- Timer timer = (Timer) commandService.execute(new ExecuteTimerCommand(timerInfo.getTimerId()));
- // if the timer has repeat
- if (timer.getRepeat() != null) {
- // create a new timer
- log.debug("scheduling timer for repeat on " + timer.getDueDate());
- createTimer(timer);
- }
- }
+ public void ejbTimeout(javax.ejb.Timer ejbTimer)
+ {
+ log.debug(ejbTimer + " fired");
+ TimerInfo timerInfo = (TimerInfo)ejbTimer.getInfo();
+ Timer timer = (Timer)commandService.execute(new ExecuteTimerCommand(timerInfo.getTimerId()));
+ // if the timer has repeat
+ if (timer.getRepeat() != null)
+ {
+ // create a new timer
+ log.debug("scheduling timer for repeat on " + timer.getDueDate());
+ createTimer(timer);
+ }
+ }
- public void createTimer(org.jbpm.job.Timer timer) {
- TimerService timerService = entityContext.getTimerService();
- javax.ejb.Timer ejbTimer = timerService.createTimer(timer.getDueDate(), new TimerInfo(timer));
- log.debug("created " + ejbTimer);
- }
+ public void createTimer(org.jbpm.job.Timer timer)
+ {
+ TimerService timerService = entityContext.getTimerService();
+ javax.ejb.Timer ejbTimer = timerService.createTimer(timer.getDueDate(), new TimerInfo(timer));
+ log.debug("created " + ejbTimer);
+ }
- public void cancelTimer(org.jbpm.job.Timer timer) {
- long timerId = timer.getId();
- Collection timers = entityContext.getTimerService().getTimers();
+ public void cancelTimer(org.jbpm.job.Timer timer)
+ {
+ long timerId = timer.getId();
+ Collection timers = entityContext.getTimerService().getTimers();
log.debug("retrieved " + timers.size() + " ejb timer(s) by id " + timerId);
int count = 0;
- for (Iterator i = timers.iterator(); i.hasNext();) {
- javax.ejb.Timer ejbTimer = (javax.ejb.Timer) i.next();
- TimerInfo timerInfo = (TimerInfo) ejbTimer.getInfo();
- if (timerInfo.getTimerId() == timerId) {
+ for (Iterator i = timers.iterator(); i.hasNext();)
+ {
+ javax.ejb.Timer ejbTimer = (javax.ejb.Timer)i.next();
+ TimerInfo timerInfo = (TimerInfo)ejbTimer.getInfo();
+ if (timerInfo.getTimerId() == timerId)
+ {
ejbTimer.cancel();
++count;
}
- }
- log.debug("canceled " + count + " ejb timer(s) by id " + timerId);
- }
+ }
+ log.debug("canceled " + count + " ejb timer(s) by id " + timerId);
+ }
- public void cancelTimersByName(String timerName, Token token) {
- Collection timers = entityContext.getTimerService().getTimers();
- log.debug("retrieved " + timers.size() + " ejb timer(s) by name '" + timerName + "' for " + token);
+ public void cancelTimersByName(String timerName, Token token)
+ {
+ Collection timers = entityContext.getTimerService().getTimers();
+ log.debug("retrieved " + timers.size() + " ejb timer(s) by name '" + timerName + "' for " + token);
- int count = 0;
- for (Iterator i = timers.iterator(); i.hasNext();) {
- javax.ejb.Timer ejbTimer = (javax.ejb.Timer) i.next();
- TimerInfo timerInfo = (TimerInfo) ejbTimer.getInfo();
- if (timerInfo.matchesName(timerName, token)) {
- ejbTimer.cancel();
- ++count;
- }
- }
- log.debug("canceled " + count + " ejb timer(s) by name '" + timerName + "' for " + token);
- }
+ int count = 0;
+ for (Iterator i = timers.iterator(); i.hasNext();)
+ {
+ javax.ejb.Timer ejbTimer = (javax.ejb.Timer)i.next();
+ TimerInfo timerInfo = (TimerInfo)ejbTimer.getInfo();
+ if (timerInfo.matchesName(timerName, token))
+ {
+ ejbTimer.cancel();
+ ++count;
+ }
+ }
+ log.debug("canceled " + count + " ejb timer(s) by name '" + timerName + "' for " + token);
+ }
- public void cancelTimersForProcessInstance(ProcessInstance processInstance) {
- Collection timers = entityContext.getTimerService().getTimers();
- log.debug("retrieved " + timers.size() + " timer(s) for " + processInstance);
+ public void cancelTimersForProcessInstance(ProcessInstance processInstance)
+ {
+ Collection timers = entityContext.getTimerService().getTimers();
+ log.debug("retrieved " + timers.size() + " timer(s) for " + processInstance);
- int count = 0;
- for (Iterator i = timers.iterator(); i.hasNext();) {
- javax.ejb.Timer ejbTimer = (javax.ejb.Timer) i.next();
- TimerInfo timerInfo = (TimerInfo) ejbTimer.getInfo();
- if (timerInfo.matchesProcessInstance(processInstance)) {
- ejbTimer.cancel();
- ++count;
- }
- }
- log.debug("canceled " + count + " ejb timer(s) for " + processInstance);
- }
+ int count = 0;
+ for (Iterator i = timers.iterator(); i.hasNext();)
+ {
+ javax.ejb.Timer ejbTimer = (javax.ejb.Timer)i.next();
+ TimerInfo timerInfo = (TimerInfo)ejbTimer.getInfo();
+ if (timerInfo.matchesProcessInstance(processInstance))
+ {
+ ejbTimer.cancel();
+ ++count;
+ }
+ }
+ log.debug("canceled " + count + " ejb timer(s) for " + processInstance);
+ }
}
Modified: jbpm3/trunk/modules/enterprise/jar/src/main/resources/META-INF/ejb-jar.xml
===================================================================
--- jbpm3/trunk/modules/enterprise/jar/src/main/resources/META-INF/ejb-jar.xml 2008-12-09 21:40:49 UTC (rev 3300)
+++ jbpm3/trunk/modules/enterprise/jar/src/main/resources/META-INF/ejb-jar.xml 2008-12-09 21:41:52 UTC (rev 3301)
@@ -224,6 +224,8 @@
<description>Interacts with the EJB timer service to schedule jBPM timers.</description>
<display-name>jBPM Timer Entity Bean</display-name>
<ejb-name>TimerEntityBean</ejb-name>
+ <home>org.jbpm.ejb.TimerEntityHome</home>
+ <remote>org.jbpm.ejb.TimerEntity</remote>
<local-home>org.jbpm.ejb.LocalTimerEntityHome</local-home>
<local>org.jbpm.ejb.LocalTimerEntity</local>
<ejb-class>org.jbpm.ejb.impl.TimerEntityBean</ejb-class>
Modified: jbpm3/trunk/pom.xml
===================================================================
--- jbpm3/trunk/pom.xml 2008-12-09 21:40:49 UTC (rev 3300)
+++ jbpm3/trunk/pom.xml 2008-12-09 21:41:52 UTC (rev 3301)
@@ -31,7 +31,7 @@
<module>modules/core</module>
<module>modules/db</module>
<module>modules/identity</module>
- <module>modules/enterprise</module>
+ <module>modules/enterprise/jar</module>
<module>modules/examples</module>
<module>modules/simulation</module>
<module>modules/integration</module>
@@ -70,7 +70,7 @@
<jaxen.version>1.1.1</jaxen.version>
<jbpm.designer.version>3.1.5</jbpm.designer.version>
<jbpm.gwt-console.version>1.0.0-SNAPSHOT</jbpm.gwt-console.version>
- <jbpm.jsf-console.version>3.3.0.GA</jbpm.jsf-console.version>
+ <jbpm.jsf-console.version>3.3.1-SNAPSHOT</jbpm.jsf-console.version>
<jboss.bpm.spec.version>1.0.0-SNAPSHOT</jboss.bpm.spec.version>
<jboss.client.version>4.2.2.GA</jboss.client.version>
<jboss.gravel.version>1.0.0.GA</jboss.gravel.version>
17 years, 4 months
JBoss JBPM SVN: r3300 - projects/jsf-console/trunk/console/src/main/webapp/WEB-INF.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-12-09 16:40:49 -0500 (Tue, 09 Dec 2008)
New Revision: 3300
Modified:
projects/jsf-console/trunk/console/src/main/webapp/WEB-INF/jboss-web.xml
Log:
Add <ejb-ref>
Modified: projects/jsf-console/trunk/console/src/main/webapp/WEB-INF/jboss-web.xml
===================================================================
--- projects/jsf-console/trunk/console/src/main/webapp/WEB-INF/jboss-web.xml 2008-12-09 21:40:13 UTC (rev 3299)
+++ projects/jsf-console/trunk/console/src/main/webapp/WEB-INF/jboss-web.xml 2008-12-09 21:40:49 UTC (rev 3300)
@@ -21,6 +21,11 @@
<jndi-name>java:JmsXA</jndi-name>
</resource-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/TimerEntityBean</ejb-ref-name>
+ <jndi-name>java:ejb/TimerEntityBean</jndi-name>
+ </ejb-ref>
+
<!-- workaround for "mapped-name is required" exception in JBoss 5.0.0.CR1 -->
<message-destination-ref>
<message-destination-ref-name>jms/JobQueue</message-destination-ref-name>
17 years, 4 months
JBoss JBPM SVN: r3299 - jbpm4/trunk/modules/distro.
by do-not-reply@jboss.org
Author: koen.aers(a)jboss.com
Date: 2008-12-09 16:40:13 -0500 (Tue, 09 Dec 2008)
New Revision: 3299
Modified:
jbpm4/trunk/modules/distro/pom.xml
Log:
revert to 4.0.0.SNAPSHOT
Modified: jbpm4/trunk/modules/distro/pom.xml
===================================================================
--- jbpm4/trunk/modules/distro/pom.xml 2008-12-09 21:33:53 UTC (rev 3298)
+++ jbpm4/trunk/modules/distro/pom.xml 2008-12-09 21:40:13 UTC (rev 3299)
@@ -39,7 +39,7 @@
<groupId>org.jbpm.jbpm4</groupId>
<artifactId>jbpm-gpd</artifactId>
<type>zip</type>
- <version>4.6.0-SNAPSHOT</version>
+ <version>4.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.jbpm.jbpm4</groupId>
17 years, 4 months
JBoss JBPM SVN: r3298 - in projects/jsf-console/trunk: console and 2 other directories.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-12-09 16:33:53 -0500 (Tue, 09 Dec 2008)
New Revision: 3298
Modified:
projects/jsf-console/trunk/console/pom.xml
projects/jsf-console/trunk/console/src/main/webapp/WEB-INF/web.xml
projects/jsf-console/trunk/jbpm4jsf/pom.xml
projects/jsf-console/trunk/pom.xml
Log:
version=3.3.1-SNAPSHOT
Modified: projects/jsf-console/trunk/console/pom.xml
===================================================================
--- projects/jsf-console/trunk/console/pom.xml 2008-12-09 21:02:47 UTC (rev 3297)
+++ projects/jsf-console/trunk/console/pom.xml 2008-12-09 21:33:53 UTC (rev 3298)
@@ -10,8 +10,7 @@
<!-- ====================================================================== -->
<!-- $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">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<name>JBoss jBPM3 - Console</name>
<groupId>org.jbpm.jbpm3</groupId>
@@ -22,8 +21,8 @@
<parent>
<groupId>org.jbpm.jbpm3</groupId>
<artifactId>jsf-console-parent</artifactId>
- <version>3.3.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
+ <version>3.3.1-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
</parent>
<!-- Dependencies -->
@@ -38,10 +37,6 @@
<groupId>javax.faces</groupId>
<artifactId>jsf-impl</artifactId>
</exclusion>
- <exclusion>
- <groupId>org.jbpm.jbpm3</groupId>
- <artifactId>jbpm-identity</artifactId>
- </exclusion>
</exclusions>
</dependency>
<dependency>
@@ -56,8 +51,7 @@
<!-- Provided Dependencies -->
<dependency>
<groupId>org.jbpm.jbpm3</groupId>
- <artifactId>jbpm-core</artifactId>
- <version>${jbpm.version}</version>
+ <artifactId>jbpm-jpdl</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
Modified: projects/jsf-console/trunk/console/src/main/webapp/WEB-INF/web.xml
===================================================================
--- projects/jsf-console/trunk/console/src/main/webapp/WEB-INF/web.xml 2008-12-09 21:02:47 UTC (rev 3297)
+++ projects/jsf-console/trunk/console/src/main/webapp/WEB-INF/web.xml 2008-12-09 21:33:53 UTC (rev 3298)
@@ -1,203 +1,176 @@
<?xml version="1.0" encoding="UTF-8"?>
-<web-app version="2.4"
- xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" >
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+ <!--
+ * Force initialization of the hibernate sessions in jbpm.
+ * This will create the DB tables on new installations.
+ * If that's not needed the listener can be removed.
+ -->
+ <listener>
+ <listener-class>org.jbpm.web.BootstrapListener</listener-class>
+ </listener>
- <!--
- * Force initialization of the hibernate sessions in jbpm.
- * This will create the DB tables on new installations.
- * If that's not needed the listener can be removed.
- -->
- <listener>
- <listener-class>
- org.jbpm.web.BootstrapListener
- </listener-class>
- </listener>
+ <servlet>
+ <description>Enable the JSF servlet. See faces-config.xml for Faces-specific configuration</description>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
- <servlet>
- <description>Enable the JSF servlet. See faces-config.xml for Faces-specific configuration</description>
- <servlet-name>Faces Servlet</servlet-name>
- <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
- <load-on-startup>1</load-on-startup>
- </servlet>
+ <!-- Mapping for all plain pages. -->
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
- <!-- Mapping for all plain pages. -->
- <servlet-mapping>
- <servlet-name>Faces Servlet</servlet-name>
- <url-pattern>*.jsf</url-pattern>
- </servlet-mapping>
+ <!-- This mapping is for the process images. -->
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>/sa/pi/*</url-pattern>
+ </servlet-mapping>
- <!-- This mapping is for the process images. -->
- <servlet-mapping>
- <servlet-name>Faces Servlet</servlet-name>
- <url-pattern>/sa/pi/*</url-pattern>
- </servlet-mapping>
+ <context-param>
+ <description> Use Documents Saved as *.xhtml </description>
+ <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+ <param-value>.xhtml</param-value>
+ </context-param>
- <context-param>
- <description> Use Documents Saved as *.xhtml </description>
- <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
- <param-value>.xhtml</param-value>
- </context-param>
+ <context-param>
+ <description> Facelets debug output </description>
+ <param-name>facelets.DEVELOPMENT</param-name>
+ <param-value>false</param-value>
+ </context-param>
- <context-param>
- <description> Facelets debug output </description>
- <param-name>facelets.DEVELOPMENT</param-name>
- <param-value>false</param-value>
- </context-param>
+ <!-- A simple JSP to redirect to the basic search page. -->
+ <welcome-file-list>
+ <welcome-file>index.jsp</welcome-file>
+ </welcome-file-list>
- <!-- A simple JSP to redirect to the basic search page. -->
- <welcome-file-list>
- <welcome-file>index.jsp</welcome-file>
- </welcome-file-list>
+ <servlet>
+ <description> This is the GDP's deployer servlet </description>
+ <servlet-name>GDP Deployer Servlet</servlet-name>
+ <servlet-class>org.jbpm.web.ProcessUploadServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
- <servlet>
- <description> This is the GDP's deployer servlet </description>
- <servlet-name>GDP Deployer Servlet</servlet-name>
- <servlet-class>org.jbpm.web.ProcessUploadServlet</servlet-class>
- <load-on-startup>1</load-on-startup>
- </servlet>
+ <servlet-mapping>
+ <servlet-name>GDP Deployer Servlet</servlet-name>
+ <url-pattern>/upload/*</url-pattern>
+ </servlet-mapping>
- <servlet-mapping>
- <servlet-name>GDP Deployer Servlet</servlet-name>
- <url-pattern>/upload/*</url-pattern>
- </servlet-mapping>
+ <!--
+ This role list should be changed to include all the relevant roles for your
+ environment.
+ -->
+ <security-role>
+ <role-name>admin</role-name>
+ </security-role>
+ <security-role>
+ <role-name>user</role-name>
+ </security-role>
- <!--
- This role list should be changed to include all the relevant roles for your
- environment.
- -->
- <security-role>
- <role-name>admin</role-name>
- </security-role>
- <security-role>
- <role-name>user</role-name>
- </security-role>
+ <!--
+ Security constraints - optionally customize the role name to require a login before access is allowed to the application. Also, be sure to edit jboss-web.xml to
+ configure the security domain if you are deploying inside JBoss AS.
+ -->
+ <security-constraint>
+ <web-resource-collection>
+ <web-resource-name>Secure Area</web-resource-name>
+ <url-pattern>/sa/*</url-pattern>
+ <http-method>GET</http-method>
+ <http-method>POST</http-method>
+ </web-resource-collection>
+ <auth-constraint>
+ <role-name>user</role-name>
+ </auth-constraint>
+ </security-constraint>
- <!--
- Security constraints - optionally customize the role name to require
- a login before access is allowed to the application.
+ <!-- Example Login page - lists user names -->
+ <login-config>
+ <auth-method>FORM</auth-method>
+ <form-login-config>
+ <form-login-page>/ua/login-example.jsf</form-login-page>
+ <form-error-page>/ua/login-example.jsf?error=true</form-error-page>
+ </form-login-config>
+ </login-config>
- Also, be sure to edit jboss-web.xml to configure the security domain if you are
- deploying inside JBoss AS.
- -->
- <security-constraint>
- <web-resource-collection>
- <web-resource-name>Secure Area</web-resource-name>
- <url-pattern>/sa/*</url-pattern>
- <http-method>GET</http-method>
- <http-method>POST</http-method>
- </web-resource-collection>
- <auth-constraint>
- <role-name>user</role-name>
- </auth-constraint>
- </security-constraint>
+ <!-- Login configuration option #1 - use the login page ==>
+ <login-config>
+ <auth-method>FORM</auth-method>
+ <form-login-config>
+ <form-login-page>/ua/login.jsf</form-login-page>
+ <form-error-page>/ua/login.jsf?error=true</form-error-page>
+ </form-login-config>
+ </login-config>
+ <!== Login configuration option #1 -->
- <!-- Example Login page - lists user names -->
- <login-config>
- <auth-method>FORM</auth-method>
- <form-login-config>
- <form-login-page>/ua/login-example.jsf</form-login-page>
- <form-error-page>/ua/login-example.jsf?error=true</form-error-page>
- </form-login-config>
- </login-config>
+ <!--
+ Login configuration option #2 - use basic auth ==>
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ <realm-name>jBPM Administration Console</realm-name>
+ </login-config>
+ <!== Login configuration option #2 -->
- <!-- Login configuration option #1 - use the login page ==>
- <login-config>
- <auth-method>FORM</auth-method>
- <form-login-config>
- <form-login-page>/ua/login.jsf</form-login-page>
- <form-error-page>/ua/login.jsf?error=true</form-error-page>
- </form-login-config>
- </login-config>
- <!== Login configuration option #1 -->
+ <!-- Job executor launcher ==>
+ <listener>
+ <description>
+ Starts the job executor on servlet context initialization and stops it on servlet context destruction.
+ </description>
+ <listener-class>org.jbpm.web.JobExecutorLauncher</listener-class>
+ </listener> <!== Job executor launcher -->
- <!-- Login configuration option #2 - use basic auth ==>
- <login-config>
- <auth-method>BASIC</auth-method>
- <realm-name>jBPM Administration Console</realm-name>
- </login-config>
- <!== Login configuration option #2 -->
-
- <!-- Job executor launcher ==>
- <listener>
- <description>
- Starts the job executor on servlet context initialization and stops it on
- servlet context destruction.
- </description>
- <listener-class>org.jbpm.web.JobExecutorLauncher</listener-class>
- </listener>
- <!== Job executor launcher -->
-
- <listener>
- <description>
+ <listener>
+ <description>
Closes the jBPM configuration on servlet context destruction, releasing
application resources. This listener should appear after the job executor
launcher to avoid reopening the configuration.
</description>
- <listener-class>org.jbpm.web.JbpmConfigurationCloser</listener-class>
- </listener>
+ <listener-class>org.jbpm.web.JbpmConfigurationCloser</listener-class>
+ </listener>
- <!-- Job executor servlet ==>
- <servlet>
- <description>
- This servlet has the purpose of executing pending jobs. Deprecated,
- replaced by JobExecutorLauncher.
- </description>
- <servlet-name>JobExecutorServlet</servlet-name>
- <servlet-class>org.jbpm.job.executor.JobExecutorServlet</servlet-class>
- <load-on-startup>1</load-on-startup>
- </servlet>
- <servlet-mapping>
- <servlet-name>JobExecutorServlet</servlet-name>
- <url-pattern>/jobs</url-pattern>
- </servlet-mapping>
- <!== Job executor servlet -->
+ <resource-ref>
+ <description>
+ Logical name of the data source that provides connections to the persistence service.
+ Must match the hibernate.connection.datasource property in the Hibernate
+ configuration file.
+ </description>
+ <res-ref-name>jdbc/JbpmDataSource</res-ref-name>
+ <res-type>javax.sql.DataSource</res-type>
+ <res-auth>Container</res-auth>
+ </resource-ref>
- <resource-ref>
- <description>
- Logical name of the data source that provides connections to the persistence service.
- Must match the hibernate.connection.datasource property in the Hibernate
- configuration file.
- </description>
- <res-ref-name>jdbc/JbpmDataSource</res-ref-name>
- <res-type>javax.sql.DataSource</res-type>
- <res-auth>Container</res-auth>
- </resource-ref>
+ <resource-ref>
+ <description>
+ Logical name of the factory that provides JMS connections to the message service.
+ Required for processes that contain asynchronous continuations.
+ </description>
+ <res-ref-name>jms/JbpmConnectionFactory</res-ref-name>
+ <res-type>javax.jms.ConnectionFactory</res-type>
+ <res-auth>Container</res-auth>
+ </resource-ref>
- <resource-ref>
- <description>
- Logical name of the factory that provides JMS connections to the message service.
- Required for processes that contain asynchronous continuations.
- </description>
- <res-ref-name>jms/JbpmConnectionFactory</res-ref-name>
- <res-type>javax.jms.ConnectionFactory</res-type>
- <res-auth>Container</res-auth>
- </resource-ref>
+ <ejb-ref>
+ <description>
+ Link to the local entity bean that implements the scheduler service. Required for
+ processes that contain timers.
+ </description>
+ <ejb-ref-name>ejb/TimerEntityBean</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>org.jbpm.ejb.TimerEntityHome</home>
+ <remote>org.jbpm.ejb.TimerEntity</remote>
+ </ejb-ref>
- <ejb-local-ref>
- <description>
- Link to the local entity bean that implements the scheduler service. Required for
- processes that contain timers.
- </description>
- <ejb-ref-name>ejb/TimerEntityBean</ejb-ref-name>
- <ejb-ref-type>Entity</ejb-ref-type>
- <local-home>org.jbpm.ejb.LocalTimerEntityHome</local-home>
- <local>org.jbpm.ejb.LocalTimerEntity</local>
- <ejb-link>TimerEntityBean</ejb-link>
- </ejb-local-ref>
+ <message-destination-ref>
+ <description>
+ The message service sends job messages to the queue referenced here. To ensure
+ this is the same queue from which the JobListenerBean receives messages, the
+ message-destination-link element points to a common logical destination, JobQueue.
+ </description>
+ <message-destination-ref-name>jms/JobQueue</message-destination-ref-name>
+ <message-destination-type>javax.jms.Queue</message-destination-type>
+ <message-destination-usage>Produces</message-destination-usage>
+ <message-destination-link>JobQueue</message-destination-link>
+ </message-destination-ref>
- <message-destination-ref>
- <description>
- The message service sends job messages to the queue referenced here. To ensure
- this is the same queue from which the JobListenerBean receives messages, the
- message-destination-link element points to a common logical destination, JobQueue.
- </description>
- <message-destination-ref-name>jms/JobQueue</message-destination-ref-name>
- <message-destination-type>javax.jms.Queue</message-destination-type>
- <message-destination-usage>Produces</message-destination-usage>
- <message-destination-link>JobQueue</message-destination-link>
- </message-destination-ref>
-
</web-app>
Modified: projects/jsf-console/trunk/jbpm4jsf/pom.xml
===================================================================
--- projects/jsf-console/trunk/jbpm4jsf/pom.xml 2008-12-09 21:02:47 UTC (rev 3297)
+++ projects/jsf-console/trunk/jbpm4jsf/pom.xml 2008-12-09 21:33:53 UTC (rev 3298)
@@ -24,8 +24,8 @@
<parent>
<groupId>org.jbpm.jbpm3</groupId>
<artifactId>jsf-console-parent</artifactId>
- <version>3.3.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
+ <version>3.3.1-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
</parent>
<!-- Dependencies -->
@@ -34,7 +34,7 @@
<dependency>
<groupId>org.jbpm.jbpm3</groupId>
<artifactId>jbpm-identity</artifactId>
- <version>${jbpm.version}</version>
+ <scope>provided</scope>
</dependency>
<dependency>
Modified: projects/jsf-console/trunk/pom.xml
===================================================================
--- projects/jsf-console/trunk/pom.xml 2008-12-09 21:02:47 UTC (rev 3297)
+++ projects/jsf-console/trunk/pom.xml 2008-12-09 21:33:53 UTC (rev 3298)
@@ -10,20 +10,19 @@
<!-- ====================================================================== -->
<!-- $Id: pom.xml 7412 2008-06-06 13:42:30Z thomas.diesler(a)jboss.com $ -->
-<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">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<name>JBoss jBPM3</name>
<groupId>org.jbpm.jbpm3</groupId>
<artifactId>jsf-console-parent</artifactId>
<packaging>pom</packaging>
- <version>3.3.0-SNAPSHOT</version>
+ <version>3.3.1-SNAPSHOT</version>
<!-- Parent -->
<parent>
<groupId>org.jbpm</groupId>
<artifactId>jbpm-parent</artifactId>
- <version>1.0.0.GA</version>
+ <version>1.0.1.GA</version>
</parent>
<!-- Modules -->
@@ -34,13 +33,13 @@
<!-- Properties -->
<properties>
- <commons.fileupload.version>1.2.1</commons.fileupload.version>
+ <commons.fileupload.version>1.2.1</commons.fileupload.version>
<commons.io.version>1.4</commons.io.version>
<commons.logging.version>1.1.1</commons.logging.version>
<javax.el.version>1.2</javax.el.version>
<javax.faces.version>1.2_03</javax.faces.version>
<javax.servlet.version>2.5</javax.servlet.version>
- <jbpm.version>3.3.0.CR1</jbpm.version>
+ <jbpm.version>3.3.1-SNAPSHOT</jbpm.version>
<jboss.gravel.version>1.0.0.GA</jboss.gravel.version>
<junit.version>3.8.1</junit.version>
<sun.facelets.version>1.1.14</sun.facelets.version>
@@ -49,8 +48,17 @@
<!-- DependencyManagement -->
<dependencyManagement>
<dependencies>
-
- <dependency>
+ <dependency>
+ <groupId>org.jbpm.jbpm3</groupId>
+ <artifactId>jbpm-jpdl</artifactId>
+ <version>${jbpm.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jbpm.jbpm3</groupId>
+ <artifactId>jbpm-identity</artifactId>
+ <version>${jbpm.version}</version>
+ </dependency>
+ <dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>${commons.fileupload.version}</version>
@@ -60,30 +68,17 @@
<artifactId>commons-io</artifactId>
<version>${commons.io.version}</version>
</dependency>
- <dependency>
+ <dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>${commons.logging.version}</version>
</dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>${javax.servlet.version}</version>
- </dependency>
-
<dependency>
- <groupId>org.jboss.gravel</groupId>
- <artifactId>gravel</artifactId>
- <version>${jboss.gravel.version}</version>
- </dependency>
-
- <dependency>
<groupId>com.sun.facelets</groupId>
<artifactId>jsf-facelets</artifactId>
<version>${sun.facelets.version}</version>
</dependency>
-
- <dependency>
+ <dependency>
<groupId>javax.el</groupId>
<artifactId>el-api</artifactId>
<version>${javax.el.version}</version>
@@ -98,36 +93,17 @@
<artifactId>jsf-impl</artifactId>
<version>${javax.faces.version}</version>
</dependency>
- </dependencies>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>${javax.servlet.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.gravel</groupId>
+ <artifactId>gravel</artifactId>
+ <version>${jboss.gravel.version}</version>
+ </dependency>
+ </dependencies>
</dependencyManagement>
- <!-- Dependencies -->
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <!-- DistributionManagement -->
- <distributionManagement>
- <site>
- <id>jbws.dyndns.org</id>
- <url>file:///home/tdiesler/workspace/jbpm-site</url>
- </site>
- </distributionManagement>
-
- <!-- Repositories -->
- <repositories>
- <repository>
- <id>repository.jboss.org</id>
- <url>http://repository.jboss.org/maven2</url>
- </repository>
- </repositories>
- </project>
+</project>
17 years, 4 months
JBoss JBPM SVN: r3297 - in jbpm4/trunk/modules: jpdl/src/main/java/org/jbpm/jpdl and 10 other directories.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2008-12-09 16:02:47 -0500 (Tue, 09 Dec 2008)
New Revision: 3297
Added:
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/ExclusiveHandler.java
Removed:
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/DecisionHandler.java
Modified:
jbpm4/trunk/modules/distro/pom.xml
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/ExclusiveHandlerActivity.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/xml/ExclusiveBinding.java
jbpm4/trunk/modules/jpdl/src/main/resources/jbpm.jpdl.hbm.xml
jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/controlflow/DecisionHandlerTest.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/CheckProblemsDeployer.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/env/PvmEnvironmentFactoryParser.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/InvokeBinding.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/ObjectBinding.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/SubscribeBinding.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/xml/WireParser.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/xml/Parser.java
jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activities/ExclusiveTest.java
Log:
exclusive handler
Modified: jbpm4/trunk/modules/distro/pom.xml
===================================================================
--- jbpm4/trunk/modules/distro/pom.xml 2008-12-09 16:17:05 UTC (rev 3296)
+++ jbpm4/trunk/modules/distro/pom.xml 2008-12-09 21:02:47 UTC (rev 3297)
@@ -39,7 +39,7 @@
<groupId>org.jbpm.jbpm4</groupId>
<artifactId>jbpm-gpd</artifactId>
<type>zip</type>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.6.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.jbpm.jbpm4</groupId>
Deleted: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/DecisionHandler.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/DecisionHandler.java 2008-12-09 16:17:05 UTC (rev 3296)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/DecisionHandler.java 2008-12-09 21:02:47 UTC (rev 3297)
@@ -1,34 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.jpdl;
-
-import org.jbpm.model.OpenExecution;
-
-
-/**
- * @author Tom Baeyens
- */
-public interface DecisionHandler {
-
- /** the name of the selected outgoing transition */
- String decide(OpenExecution execution);
-}
Added: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/ExclusiveHandler.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/ExclusiveHandler.java (rev 0)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/ExclusiveHandler.java 2008-12-09 21:02:47 UTC (rev 3297)
@@ -0,0 +1,34 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.jpdl;
+
+import org.jbpm.model.OpenExecution;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public interface ExclusiveHandler {
+
+ /** the name of the selected outgoing transition */
+ String select(OpenExecution execution);
+}
Modified: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/ExclusiveHandlerActivity.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/ExclusiveHandlerActivity.java 2008-12-09 16:17:05 UTC (rev 3296)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/ExclusiveHandlerActivity.java 2008-12-09 21:02:47 UTC (rev 3297)
@@ -24,7 +24,7 @@
import org.jbpm.JbpmException;
import org.jbpm.activity.ActivityExecution;
import org.jbpm.env.Environment;
-import org.jbpm.jpdl.DecisionHandler;
+import org.jbpm.jpdl.ExclusiveHandler;
import org.jbpm.jpdl.JpdlException;
import org.jbpm.model.Node;
import org.jbpm.model.Transition;
@@ -38,29 +38,29 @@
private static final long serialVersionUID = 1L;
- protected String decisionHandlerName;
- protected Descriptor decisionHandlerDescriptor;
+ protected String exclusiveHandlerName;
+ protected Descriptor exclusiveHandlerDescriptor;
public void execute(ActivityExecution execution) throws Exception {
Node node = execution.getNode();
String transitionName = null;
Object object = null;
- if (decisionHandlerDescriptor!=null) {
- object = WireContext.create(decisionHandlerDescriptor);
- } else if (decisionHandlerName!=null) {
+ if (exclusiveHandlerDescriptor!=null) {
+ object = WireContext.create(exclusiveHandlerDescriptor);
+ } else if (exclusiveHandlerName!=null) {
Environment environment = Environment.getCurrent();
- object = environment.get(decisionHandlerName);
+ object = environment.get(exclusiveHandlerName);
}
if (object==null) {
throw new JpdlException("decision handler for "+node+" is null");
}
- if (! (object instanceof DecisionHandler)) {
- throw new JpdlException("handler for exclusive is not a "+DecisionHandler.class.getName()+": "+object.getClass().getName());
+ if (! (object instanceof ExclusiveHandler)) {
+ throw new JpdlException("handler for exclusive is not a "+ExclusiveHandler.class.getName()+": "+object.getClass().getName());
}
- DecisionHandler decisionHandler = (DecisionHandler) object;
- transitionName = decisionHandler.decide(execution);
+ ExclusiveHandler exclusiveHandler = (ExclusiveHandler) object;
+ transitionName = exclusiveHandler.select(execution);
Transition transition = node.getOutgoingTransition(transitionName);
if (transition==null) {
@@ -70,10 +70,10 @@
execution.take(transition);
}
- public void setDecisionHandlerName(String decisionHandlerName) {
- this.decisionHandlerName = decisionHandlerName;
+ public void setExclusiveHandlerName(String exclusiveHandlerName) {
+ this.exclusiveHandlerName = exclusiveHandlerName;
}
- public void setDecisionHandlerDescriptor(Descriptor decisionHandlerDescriptor) {
- this.decisionHandlerDescriptor = decisionHandlerDescriptor;
+ public void setExclusiveHandlerDescriptor(Descriptor exclusiveHandlerDescriptor) {
+ this.exclusiveHandlerDescriptor = exclusiveHandlerDescriptor;
}
}
Modified: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/xml/ExclusiveBinding.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/xml/ExclusiveBinding.java 2008-12-09 16:17:05 UTC (rev 3296)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/xml/ExclusiveBinding.java 2008-12-09 21:02:47 UTC (rev 3297)
@@ -57,18 +57,18 @@
}
if (element.hasAttribute("handler-ref")) {
- String decisionHandlerName = element.getAttribute("handler-ref");
+ String exclusiveHandlerName = element.getAttribute("handler-ref");
ExclusiveHandlerActivity exclusiveHandlerActivity = new ExclusiveHandlerActivity();
- exclusiveHandlerActivity.setDecisionHandlerName(decisionHandlerName);
+ exclusiveHandlerActivity.setExclusiveHandlerName(exclusiveHandlerName);
return exclusiveHandlerActivity;
}
Element handlerElement = XmlUtil.element(element, "handler");
if (handlerElement!=null) {
ExclusiveHandlerActivity exclusiveHandlerActivity = new ExclusiveHandlerActivity();
- ObjectDescriptor decisionHandlerDescriptor = (ObjectDescriptor)
+ ObjectDescriptor exclusiveHandlerDescriptor = (ObjectDescriptor)
objectBinding.parse(handlerElement, parse, parser);
- exclusiveHandlerActivity.setDecisionHandlerDescriptor(decisionHandlerDescriptor);
+ exclusiveHandlerActivity.setExclusiveHandlerDescriptor(exclusiveHandlerDescriptor);
return exclusiveHandlerActivity;
}
Modified: jbpm4/trunk/modules/jpdl/src/main/resources/jbpm.jpdl.hbm.xml
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/resources/jbpm.jpdl.hbm.xml 2008-12-09 16:17:05 UTC (rev 3296)
+++ jbpm4/trunk/modules/jpdl/src/main/resources/jbpm.jpdl.hbm.xml 2008-12-09 21:02:47 UTC (rev 3297)
@@ -22,7 +22,15 @@
<property name="expr" column="EXPR_" />
<property name="lang" column="LANG_" />
</subclass>
- <subclass name="org.jbpm.jpdl.activity.ExclusiveHandlerActivity" discriminator-value="excl-handler" />
+ <subclass name="org.jbpm.jpdl.activity.ExclusiveHandlerActivity" discriminator-value="excl-handler">
+ <property name="exclusiveHandlerName" column="EXCLNAME_" />
+ <many-to-one name="exclusiveHandlerDescriptor"
+ column="EXCLDESCR_"
+ cascade="all"
+ class="org.jbpm.pvm.internal.wire.descriptor.AbstractDescriptor"
+ foreign-key="FK_ACT_EXCLDESCR"
+ index="IDX_ACT_EXCLDESCR" />
+ </subclass>
<subclass name="org.jbpm.jpdl.activity.StateActivity" discriminator-value="state" />
<subclass name="org.jbpm.jpdl.activity.EndActivity" discriminator-value="end" />
</class>
Modified: jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/controlflow/DecisionHandlerTest.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/controlflow/DecisionHandlerTest.java 2008-12-09 16:17:05 UTC (rev 3296)
+++ jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/controlflow/DecisionHandlerTest.java 2008-12-09 21:02:47 UTC (rev 3297)
@@ -23,7 +23,7 @@
import org.jbpm.client.ClientExecution;
import org.jbpm.client.ClientProcessDefinition;
-import org.jbpm.jpdl.DecisionHandler;
+import org.jbpm.jpdl.ExclusiveHandler;
import org.jbpm.jpdl.JpdlTestCase;
import org.jbpm.model.OpenExecution;
@@ -33,9 +33,9 @@
*/
public class DecisionHandlerTest extends JpdlTestCase {
- public static class GpsDecisionHandler implements DecisionHandler {
+ public static class GpsDecisionHandler implements ExclusiveHandler {
String theWayToGo;
- public String decide(OpenExecution execution) {
+ public String select(OpenExecution execution) {
return theWayToGo;
}
}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/CheckProblemsDeployer.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/CheckProblemsDeployer.java 2008-12-09 16:17:05 UTC (rev 3296)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/CheckProblemsDeployer.java 2008-12-09 21:02:47 UTC (rev 3297)
@@ -22,6 +22,8 @@
package org.jbpm.pvm.internal.deploy;
import org.jbpm.JbpmException;
+import org.jbpm.Problem;
+import org.jbpm.log.Log;
import org.jbpm.pvm.internal.svc.DeploymentImpl;
@@ -29,9 +31,17 @@
* @author Tom Baeyens
*/
public class CheckProblemsDeployer implements Deployer {
+
+ private static final Log log = Log.getLog(CheckProblemsDeployer.class.getName());
public void deploy(DeploymentImpl deployment) {
if (deployment.hasProblems()) {
+ for (Problem problem: deployment.getProblems()) {
+ Throwable cause = problem.getCause();
+ if (cause!=null) {
+ log.debug("deployment exception", cause);
+ }
+ }
throw new JbpmException("problems during deployment: "+deployment.getProblemsText());
}
}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/env/PvmEnvironmentFactoryParser.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/env/PvmEnvironmentFactoryParser.java 2008-12-09 16:17:05 UTC (rev 3296)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/env/PvmEnvironmentFactoryParser.java 2008-12-09 21:02:47 UTC (rev 3297)
@@ -46,8 +46,8 @@
private static final long serialVersionUID = 1L;
- WireParser environmentFactoryXmlParser = new WireParser();
- WireParser environmentXmlParser = new WireParser();
+ Parser environmentFactoryXmlParser = new WireParser();
+ Parser environmentXmlParser = new WireParser();
protected static PvmEnvironmentFactoryParser INSTANCE = new PvmEnvironmentFactoryParser();
@@ -109,16 +109,16 @@
return null;
}
- public WireParser getEnvironmentFactoryXmlParser() {
+ public Parser getEnvironmentFactoryXmlParser() {
return environmentFactoryXmlParser;
}
- public void setEnvironmentFactoryXmlParser(WireParser applicationWireXmlParser) {
+ public void setEnvironmentFactoryXmlParser(Parser applicationWireXmlParser) {
this.environmentFactoryXmlParser = applicationWireXmlParser;
}
- public WireParser getEnvironmentXmlParser() {
+ public Parser getEnvironmentXmlParser() {
return environmentXmlParser;
}
- public void setEnvironmentXmlParser(WireParser blockWireXmlParser) {
+ public void setEnvironmentXmlParser(Parser blockWireXmlParser) {
this.environmentXmlParser = blockWireXmlParser;
}
}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/InvokeBinding.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/InvokeBinding.java 2008-12-09 16:17:05 UTC (rev 3296)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/InvokeBinding.java 2008-12-09 21:02:47 UTC (rev 3297)
@@ -26,7 +26,6 @@
import org.jbpm.pvm.internal.util.XmlUtil;
import org.jbpm.pvm.internal.wire.descriptor.ArgDescriptor;
import org.jbpm.pvm.internal.wire.operation.InvokeOperation;
-import org.jbpm.pvm.internal.wire.xml.WireParser;
import org.jbpm.pvm.internal.xml.Parse;
import org.jbpm.pvm.internal.xml.Parser;
import org.w3c.dom.Element;
@@ -52,7 +51,7 @@
parse.addProblem("invoke must have method : "+XmlUtil.toString(element));
}
List<Element> argElements = XmlUtil.elements(element, "arg");
- WireParser wireParser = (WireParser) parser;
+ Parser wireParser = (Parser) parser;
List<ArgDescriptor> argDescriptors = wireParser.parseArgs(argElements, parse);
invokeOperation.setArgDescriptors(argDescriptors);
return invokeOperation;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/ObjectBinding.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/ObjectBinding.java 2008-12-09 16:17:05 UTC (rev 3296)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/ObjectBinding.java 2008-12-09 21:02:47 UTC (rev 3297)
@@ -64,7 +64,7 @@
public Object parse(Element element, Parse parse, Parser parser) {
ObjectDescriptor descriptor = new ObjectDescriptor();
- WireParser wireParser = (WireParser) parser;
+ Parser wireParser = (Parser) parser;
String className = XmlUtil.attribute(element, "class");
String factoryObjectName = XmlUtil.attribute(element, "factory");
Element factoryElement = XmlUtil.element(element, "factory");
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/SubscribeBinding.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/SubscribeBinding.java 2008-12-09 16:17:05 UTC (rev 3296)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/SubscribeBinding.java 2008-12-09 21:02:47 UTC (rev 3297)
@@ -26,7 +26,6 @@
import org.jbpm.pvm.internal.util.XmlUtil;
import org.jbpm.pvm.internal.wire.descriptor.ArgDescriptor;
import org.jbpm.pvm.internal.wire.operation.SubscribeOperation;
-import org.jbpm.pvm.internal.wire.xml.WireParser;
import org.jbpm.pvm.internal.xml.Parse;
import org.jbpm.pvm.internal.xml.Parser;
import org.w3c.dom.Element;
@@ -74,7 +73,7 @@
String methodName = XmlUtil.attribute(element, "method");
subscribeOperation.setMethodName(methodName);
List<Element> argElements = XmlUtil.elements(element, "arg");
- WireParser wireParser = (WireParser) parser;
+ Parser wireParser = (Parser) parser;
List<ArgDescriptor> argDescriptors = wireParser.parseArgs(argElements, parse);
subscribeOperation.setArgDescriptors(argDescriptors);
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/xml/WireParser.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/xml/WireParser.java 2008-12-09 16:17:05 UTC (rev 3296)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/xml/WireParser.java 2008-12-09 21:02:47 UTC (rev 3297)
@@ -1,7 +1,6 @@
package org.jbpm.pvm.internal.wire.xml;
import java.net.URL;
-import java.util.ArrayList;
import java.util.Enumeration;
import java.util.List;
@@ -25,7 +24,6 @@
import org.jbpm.pvm.internal.wire.binding.SetBinding;
import org.jbpm.pvm.internal.wire.binding.StringBinding;
import org.jbpm.pvm.internal.wire.descriptor.AbstractDescriptor;
-import org.jbpm.pvm.internal.wire.descriptor.ArgDescriptor;
import org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor;
import org.jbpm.pvm.internal.xml.Bindings;
import org.jbpm.pvm.internal.xml.Parse;
@@ -261,36 +259,6 @@
// other methods ////////////////////////////////////////////////////////////
- /**
- * Parses the list of arguments of a method.
- * This method creates a list of {@link ArgDescriptor} from the given list of DOM elements
- * @param argElements the list of argument DOM elements
- * @param parse Parse object that contains all information for the current parse operation.
- * @return the list of ArgDescriptor created from the DOM elements
- * @see ArgDescriptor
- */
- public List<ArgDescriptor> parseArgs(List<Element> argElements, Parse parse) {
- List<ArgDescriptor> args = null;
- if (argElements!=null) {
- if (argElements.size()>0) {
- args = new ArrayList<ArgDescriptor>(argElements.size());
- }
- for (Element argElement: argElements) {
- ArgDescriptor argDescriptor = new ArgDescriptor();
- argDescriptor.setTypeName(XmlUtil.attribute(argElement, "type"));
- Element descriptorElement = XmlUtil.element(argElement);
- if (descriptorElement==null) {
- parse.addProblem("arg must contain exactly one descriptor element out of "+bindings.getTagNames(CATEGORY_DESCRIPTOR)+" as contents:"+XmlUtil.toString((Element) argElement.getParentNode()));
- } else {
- Descriptor descriptor = (Descriptor) parseElement(descriptorElement, parse, CATEGORY_DESCRIPTOR);
- argDescriptor.setDescriptor(descriptor);
- }
- args.add(argDescriptor);
- }
- }
- return args;
- }
-
static {
// default descriptor parsers ///////////////////////////////////////////////
defaultBindings = new Bindings();
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/xml/Parser.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/xml/Parser.java 2008-12-09 16:17:05 UTC (rev 3296)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/xml/Parser.java 2008-12-09 21:02:47 UTC (rev 3297)
@@ -35,6 +35,9 @@
import org.jbpm.pvm.internal.stream.StreamInput;
import org.jbpm.pvm.internal.util.UrlEntity;
import org.jbpm.pvm.internal.util.XmlUtil;
+import org.jbpm.pvm.internal.wire.Descriptor;
+import org.jbpm.pvm.internal.wire.descriptor.ArgDescriptor;
+import org.jbpm.pvm.internal.wire.xml.WireParser;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.xml.sax.EntityResolver;
@@ -512,4 +515,30 @@
return object;
}
+
+ public List<ArgDescriptor> parseArgs(List<Element> argElements, Parse parse) {
+ return parseArgs(argElements, parse, WireParser.CATEGORY_DESCRIPTOR);
+ }
+
+ public List<ArgDescriptor> parseArgs(List<Element> argElements, Parse parse, String category) {
+ List<ArgDescriptor> args = null;
+ if (argElements!=null) {
+ if (argElements.size()>0) {
+ args = new ArrayList<ArgDescriptor>(argElements.size());
+ }
+ for (Element argElement: argElements) {
+ ArgDescriptor argDescriptor = new ArgDescriptor();
+ argDescriptor.setTypeName(XmlUtil.attribute(argElement, "type"));
+ Element descriptorElement = XmlUtil.element(argElement);
+ if (descriptorElement==null) {
+ parse.addProblem("arg must contain exactly one descriptor element out of "+bindings.getTagNames(category)+" as contents:"+XmlUtil.toString((Element) argElement.getParentNode()));
+ } else {
+ Descriptor descriptor = (Descriptor) parseElement(descriptorElement, parse, category);
+ argDescriptor.setDescriptor(descriptor);
+ }
+ args.add(argDescriptor);
+ }
+ }
+ return args;
+ }
}
Modified: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activities/ExclusiveTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activities/ExclusiveTest.java 2008-12-09 16:17:05 UTC (rev 3296)
+++ jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activities/ExclusiveTest.java 2008-12-09 21:02:47 UTC (rev 3297)
@@ -21,10 +21,13 @@
*/
package org.jbpm.test.activities;
+import java.text.NumberFormat;
import java.util.HashMap;
import java.util.Map;
import org.jbpm.Execution;
+import org.jbpm.jpdl.ExclusiveHandler;
+import org.jbpm.model.OpenExecution;
import org.jbpm.test.DbTestCase;
@@ -33,7 +36,7 @@
*/
public class ExclusiveTest extends DbTestCase {
- public void testWaitStatesSequence() {
+ public void testExclusiveExpression() {
deployJpdlXmlString(
"<process name='Poolcar'>" +
" <start>" +
@@ -57,4 +60,40 @@
execution = executionService.startExecutionByKey("Poolcar", variables);
assertEquals("Small car", execution.getNodeName());
}
+
+ public static class DistanceHandler implements ExclusiveHandler {
+ public String select(OpenExecution execution) {
+ String distance = (String) execution.getVariable("distance");
+ if (new Integer(distance) < 10) {
+ return "nearby";
+ }
+ return "far";
+ }
+ }
+
+ public void testExclusiveHandler() {
+ deployJpdlXmlString(
+ "<process name='Poolcar'>" +
+ " <start>" +
+ " <flow to='How far?' />" +
+ " </start>" +
+ " <exclusive name='How far?'>" +
+ " <handler class='"+DistanceHandler.class.getName()+"' />" +
+ " <flow name='far' to='Big car' />" +
+ " <flow name='nearby' to='Small car' />" +
+ " </exclusive>" +
+ " <state name='Big car' />" +
+ " <state name='Small car' />" +
+ "</process>"
+ );
+
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("distance", "69");
+ Execution execution = executionService.startExecutionByKey("Poolcar", variables);
+ assertEquals("Big car", execution.getNodeName());
+
+ variables.put("distance", "3");
+ execution = executionService.startExecutionByKey("Poolcar", variables);
+ assertEquals("Small car", execution.getNodeName());
+ }
}
17 years, 4 months
JBoss JBPM SVN: r3296 - jbpm4/trunk.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2008-12-09 11:17:05 -0500 (Tue, 09 Dec 2008)
New Revision: 3296
Modified:
jbpm4/trunk/build.xml
Log:
added distro install
Modified: jbpm4/trunk/build.xml
===================================================================
--- jbpm4/trunk/build.xml 2008-12-09 16:07:44 UTC (rev 3295)
+++ jbpm4/trunk/build.xml 2008-12-09 16:17:05 UTC (rev 3296)
@@ -17,7 +17,8 @@
<property name="windows.browser" value="C:/Program Files/Mozilla Firefox/firefox.exe" />
<property name="macos.browser" value="/usr/bin/open" />
<property name="linux.browser" value="mozilla" />
- <property name="distro.installation.dir" value="c:/software" />
+ <property name="distro.installation.dir" value="c:/software" />
+ <property name="distro.version" value="4.0.0-SNAPSHOT" />
<target name="clean">
<exec executable="cmd">
@@ -58,9 +59,12 @@
</antcall>
</target>
- <target name="distro.install">
- <delete dir="${distro.installation.dir}/jbpm-4.0.0*" />
- <unzip dest="${distro.installation.dir}" src="modules/distro/package/jbpm-4.0.0*.zip"/>
+ <target name="distro.install" depends="distro.package">
+ <delete dir="${distro.installation.dir}/jbpm-${distro.version}" />
+ <unzip dest="${distro.installation.dir}" src="modules/distro/target/jbpm-${distro.version}.zip"/>
+ <exec executable="cmd" os="Windows Vista, Windows XP,Windows 2000,Windows 98">
+ <arg value="/C start "${windows.browser}" "file://${distro.installation.dir}/jbpm-${distro.version}"" />
+ </exec>
</target>
<target name="schemadocs">
17 years, 4 months
JBoss JBPM SVN: r3295 - in jbpm4/trunk: modules/jpdl/src/main/java/org/jbpm/jpdl/xml and 9 other directories.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2008-12-09 11:07:44 -0500 (Tue, 09 Dec 2008)
New Revision: 3295
Added:
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/script/WriteBinding.java
jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activities/ExclusiveTest.java
jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch06-Scripting.xml
Modified:
jbpm4/trunk/build.xml
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/xml/ExclusiveBinding.java
jbpm4/trunk/modules/jpdl/src/main/resources/jbpm.jpdl.hbm.xml
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ScopeInstanceImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/script/EnvironmentBindings.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/ScriptManagerBinding.java
jbpm4/trunk/modules/test-db/src/test/resources/jbpm.cfg.xml
jbpm4/trunk/modules/userguide/.settings/attachedFile.properties
jbpm4/trunk/modules/userguide/src/main/docbook/en/master.xml
jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch04-Jpdl.xml
Log:
exclusive
Modified: jbpm4/trunk/build.xml
===================================================================
--- jbpm4/trunk/build.xml 2008-12-09 15:42:37 UTC (rev 3294)
+++ jbpm4/trunk/build.xml 2008-12-09 16:07:44 UTC (rev 3295)
@@ -17,6 +17,7 @@
<property name="windows.browser" value="C:/Program Files/Mozilla Firefox/firefox.exe" />
<property name="macos.browser" value="/usr/bin/open" />
<property name="linux.browser" value="mozilla" />
+ <property name="distro.installation.dir" value="c:/software" />
<target name="clean">
<exec executable="cmd">
@@ -57,6 +58,11 @@
</antcall>
</target>
+ <target name="distro.install">
+ <delete dir="${distro.installation.dir}/jbpm-4.0.0*" />
+ <unzip dest="${distro.installation.dir}" src="modules/distro/package/jbpm-4.0.0*.zip"/>
+ </target>
+
<target name="schemadocs">
<exec executable="cmd" dir="modules/api">
<arg line="/C mvn -Pschemadocs package" />
Modified: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/xml/ExclusiveBinding.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/xml/ExclusiveBinding.java 2008-12-09 15:42:37 UTC (rev 3294)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/xml/ExclusiveBinding.java 2008-12-09 16:07:44 UTC (rev 3295)
@@ -45,7 +45,7 @@
static ObjectBinding objectBinding = new ObjectBinding();
public ExclusiveBinding() {
- super("decision");
+ super("exclusive");
}
public Object parse(Element element, Parse parse, Parser parser) {
@@ -73,7 +73,7 @@
}
boolean hasConditions = false;
- List<Element> transitionElements = XmlUtil.elements(element, "transition");
+ List<Element> transitionElements = XmlUtil.elements(element, "flow");
NodeImpl node = parse.findObject(NodeImpl.class);
List<TransitionImpl> transitions = (List) node.getOutgoingTransitions();
Modified: jbpm4/trunk/modules/jpdl/src/main/resources/jbpm.jpdl.hbm.xml
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/resources/jbpm.jpdl.hbm.xml 2008-12-09 15:42:37 UTC (rev 3294)
+++ jbpm4/trunk/modules/jpdl/src/main/resources/jbpm.jpdl.hbm.xml 2008-12-09 16:07:44 UTC (rev 3295)
@@ -18,7 +18,10 @@
<discriminator column="CLASS_" />
<subclass name="org.jbpm.jpdl.activity.StartActivity" discriminator-value="start" />
<subclass name="org.jbpm.jpdl.activity.ExclusiveConditionActivity" discriminator-value="excl-cond" />
- <subclass name="org.jbpm.jpdl.activity.ExclusiveExpressionActivity" discriminator-value="excl-expr" />
+ <subclass name="org.jbpm.jpdl.activity.ExclusiveExpressionActivity" discriminator-value="excl-expr">
+ <property name="expr" column="EXPR_" />
+ <property name="lang" column="LANG_" />
+ </subclass>
<subclass name="org.jbpm.jpdl.activity.ExclusiveHandlerActivity" discriminator-value="excl-handler" />
<subclass name="org.jbpm.jpdl.activity.StateActivity" discriminator-value="state" />
<subclass name="org.jbpm.jpdl.activity.EndActivity" discriminator-value="end" />
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ScopeInstanceImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ScopeInstanceImpl.java 2008-12-09 15:42:37 UTC (rev 3294)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ScopeInstanceImpl.java 2008-12-09 16:07:44 UTC (rev 3295)
@@ -205,7 +205,7 @@
for (String key: variables.keySet()) {
Object value = variables.get(key);
setVariable(key, value);
- }
+ }
}
}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/script/EnvironmentBindings.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/script/EnvironmentBindings.java 2008-12-09 15:42:37 UTC (rev 3294)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/script/EnvironmentBindings.java 2008-12-09 16:07:44 UTC (rev 3295)
@@ -22,13 +22,11 @@
package org.jbpm.pvm.internal.script;
import java.util.Collection;
-import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.script.Bindings;
-import org.jbpm.Execution;
import org.jbpm.env.Context;
import org.jbpm.env.Environment;
@@ -40,6 +38,7 @@
protected String[] readContextNames;
protected String writeContextName;
+ protected Map<String, WriteBinding> writeBindings;
protected Environment environment;
public EnvironmentBindings(String[] readContextNames, String writeContextName) {
Added: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/script/WriteBinding.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/script/WriteBinding.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/script/WriteBinding.java 2008-12-09 16:07:44 UTC (rev 3295)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.pvm.internal.script;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class WriteBinding {
+
+ protected String scriptVariable;
+ protected String contextName;
+ protected String contextVariableName;
+
+
+}
Property changes on: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/script/WriteBinding.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/ScriptManagerBinding.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/ScriptManagerBinding.java 2008-12-09 15:42:37 UTC (rev 3294)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/ScriptManagerBinding.java 2008-12-09 16:07:44 UTC (rev 3295)
@@ -21,7 +21,6 @@
*/
package org.jbpm.pvm.internal.wire.binding;
-import java.util.Arrays;
import java.util.List;
import javax.script.ScriptEngineFactory;
Added: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activities/ExclusiveTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activities/ExclusiveTest.java (rev 0)
+++ jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activities/ExclusiveTest.java 2008-12-09 16:07:44 UTC (rev 3295)
@@ -0,0 +1,60 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.test.activities;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.jbpm.Execution;
+import org.jbpm.test.DbTestCase;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class ExclusiveTest extends DbTestCase {
+
+ public void testWaitStatesSequence() {
+ deployJpdlXmlString(
+ "<process name='Poolcar'>" +
+ " <start>" +
+ " <flow to='How far?' />" +
+ " </start>" +
+ " <exclusive name='How far?' expr='#{distance}'>" +
+ " <flow name='far' to='Big car' />" +
+ " <flow name='nearby' to='Small car' />" +
+ " </exclusive>" +
+ " <state name='Big car' />" +
+ " <state name='Small car' />" +
+ "</process>"
+ );
+
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("distance", "far");
+ Execution execution = executionService.startExecutionByKey("Poolcar", variables);
+ assertEquals("Big car", execution.getNodeName());
+
+ variables.put("distance", "nearby");
+ execution = executionService.startExecutionByKey("Poolcar", variables);
+ assertEquals("Small car", execution.getNodeName());
+ }
+}
Property changes on: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activities/ExclusiveTest.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbpm4/trunk/modules/test-db/src/test/resources/jbpm.cfg.xml
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/resources/jbpm.cfg.xml 2008-12-09 15:42:37 UTC (rev 3294)
+++ jbpm4/trunk/modules/test-db/src/test/resources/jbpm.cfg.xml 2008-12-09 16:07:44 UTC (rev 3295)
@@ -39,6 +39,13 @@
<hibernate-session-factory />
+ <script-manager default-expression-language="juel"
+ default-script-language="juel"
+ read-contexts="execution, environment, process-engine"
+ write-context="">
+ <script-language name="juel" factory="com.sun.script.juel.JuelScriptEngineFactory" />
+ </script-manager>
+
<job-executor auto-start="false" />
<job-test-helper />
Modified: jbpm4/trunk/modules/userguide/.settings/attachedFile.properties
===================================================================
--- jbpm4/trunk/modules/userguide/.settings/attachedFile.properties 2008-12-09 15:42:37 UTC (rev 3294)
+++ jbpm4/trunk/modules/userguide/.settings/attachedFile.properties 2008-12-09 16:07:44 UTC (rev 3295)
@@ -1,2 +1,2 @@
## index of importer -> set(imports)
-#Mon Dec 08 10:14:36 CET 2008
+#Tue Dec 09 13:47:09 CET 2008
Modified: jbpm4/trunk/modules/userguide/src/main/docbook/en/master.xml
===================================================================
--- jbpm4/trunk/modules/userguide/src/main/docbook/en/master.xml 2008-12-09 15:42:37 UTC (rev 3294)
+++ jbpm4/trunk/modules/userguide/src/main/docbook/en/master.xml 2008-12-09 16:07:44 UTC (rev 3295)
@@ -6,6 +6,7 @@
<!ENTITY ch03-Services SYSTEM "modules/ch03-Services.xml">
<!ENTITY ch04-Jpdl SYSTEM "modules/ch04-Jpdl.xml">
<!ENTITY ch05-Gpd SYSTEM "modules/ch05-Gpd.xml">
+ <!ENTITY ch06-Scripting SYSTEM "modules/ch06-Scripting.xml">
]>
<book lang="en">
@@ -21,5 +22,6 @@
&ch03-Services;
&ch04-Jpdl;
&ch05-Gpd;
+ &ch06-Scripting;
</book>
\ No newline at end of file
Modified: jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch04-Jpdl.xml
===================================================================
--- jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch04-Jpdl.xml 2008-12-09 15:42:37 UTC (rev 3294)
+++ jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch04-Jpdl.xml 2008-12-09 16:07:44 UTC (rev 3295)
@@ -138,7 +138,7 @@
<entry>any text</entry>
<entry></entry>
<entry>optional</entry>
- <entry>name of the start activity. Since a start activity
+ <entry>name of the activity. Since a start activity
cannot have incoming flows, the name is optional.
</entry>
</row>
@@ -170,6 +170,7 @@
<para>A wait state. Process execution will wait until an external trigger is
provided through the API.
</para>
+ <para>Example: TODO</para>
</section>
<section id="exclusive">
@@ -178,6 +179,66 @@
activity has multiple outgoing flows and when an execution arrives in an exclusive
activity, an automatic evaluation will decide which outgoing flow is taken.
</para>
+ <para>An exclusive activity should be configured in one of the three following ways:
+ </para>
+ <section id="exclusiveexpression">
+ <title>Exclusive expression</title>
+ <para>An exclusive expression evaluates to a String representing the name of
+ an outgoing flow.
+ </para>
+ <table><title><literal>exclusive</literal> attributes:</title>
+ <tgroup cols="5" rowsep="1" colsep="1">
+ <thead>
+ <row>
+ <entry>Attribute</entry>
+ <entry>Type</entry>
+ <entry>Default</entry>
+ <entry>Required?</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><literal>expr</literal></entry>
+ <entry>script</entry>
+ <entry></entry>
+ <entry><emphasis role="bold">required</emphasis></entry>
+ <entry>script that will be evaluated in the specified
+ expression language.
+ </entry>
+ </row>
+ <row>
+ <entry><literal>lang</literal></entry>
+ <entry>expression language</entry>
+ <entry>the <literal>default-expression-language</literal> taken from the <link linkend="scripting"><literal>script-manager</literal> configuration</link></entry>
+ <entry>optional</entry>
+ <entry>the language in which <literal>expr</literal> is
+ to be evaluated.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <para>Example:
+ </para>
+ <programlisting><process name="Poolcar">
+ <start>
+ <flow to="How far?" />
+ </start>
+ <exclusive name="How far?" <emphasis role="bold">expr="#{distance}"</emphasis>>
+ <flow name="far" to="Big car" />
+ <flow name="nearby" to="Small car" />
+ </exclusive>
+ <state name="Big car" />
+ <state name="Small car" />
+</process></programlisting>
+ </section>
+ <para>When you start an new process instance like this
+ </para>
+ <programlisting>Map<String, Object> variables = new HashMap<String, Object>();
+variables.put("distance", "far");
+Execution execution = executionService.startExecutionByKey("Poolcar", variables);</programlisting>
+ <para>then the new execution will go to node <literal>Big car</literal>.</para>
</section>
<section id="end">
@@ -185,6 +246,53 @@
<para>Ends the execution.
</para>
</section>
+
+ <section id="commonactivitycontents">
+ <title>Common activity contents</title>
+ <para>Unless specified otherwise above, all activities also include this
+ content model:
+ </para>
+ <table><title>Common activity attributes:</title>
+ <tgroup cols="5" rowsep="1" colsep="1">
+ <thead>
+ <row>
+ <entry>Attribute</entry>
+ <entry>Type</entry>
+ <entry>Default</entry>
+ <entry>Required?</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><literal>name</literal></entry>
+ <entry>any text</entry>
+ <entry></entry>
+ <entry><emphasis role="bold">required</emphasis></entry>
+ <entry>name of the activity</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table><title>Common activity elements:</title>
+ <tgroup cols="3" rowsep="1" colsep="1">
+ <thead>
+ <row>
+ <entry>Element</entry>
+ <entry>Multiplicity</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><literal>flow</literal></entry>
+ <entry>0..*</entry>
+ <entry>the outgoing flows</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
</section>
</chapter>
Added: jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch06-Scripting.xml
===================================================================
--- jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch06-Scripting.xml (rev 0)
+++ jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch06-Scripting.xml 2008-12-09 16:07:44 UTC (rev 3295)
@@ -0,0 +1,18 @@
+<chapter id="scripting">
+ <title>Scripting</title>
+
+ <para>Scripting in jBPM is based on JSR 223: Scripting for the JavaTM Platform.
+ Scripting engines can be configured like this:
+ </para>
+ <programlisting><script-manager default-expression-language="juel"
+ default-script-language="juel"
+ read-contexts="execution, environment, process-engine"
+ write-context="">
+ <script-language name="juel" factory="com.sun.script.juel.JuelScriptEngineFactory" />
+</script-manager></programlisting>
+ <para>A jPDL process definition can contain scripts and expressions. All
+ of the configured scripting engines can be used in each situation. But
+ scripts and expressions each have their own default.
+ </para>
+
+</chapter>
Property changes on: jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch06-Scripting.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
17 years, 4 months