JBoss JBPM SVN: r2043 - in jbpm3/trunk: hudson/hudson-home/jobs/jBPM-Matrix and 1 other directories.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-08-28 15:57:23 -0400 (Thu, 28 Aug 2008)
New Revision: 2043
Modified:
jbpm3/trunk/hudson/ant.properties.example
jbpm3/trunk/hudson/build.xml
jbpm3/trunk/hudson/hudson-home/jobs/jBPM-Matrix/command.sh
jbpm3/trunk/modules/distribution/src/main/resources/installer/auto-install-jboss422.xml
Log:
Use jboss.zip
Modified: jbpm3/trunk/hudson/ant.properties.example
===================================================================
--- jbpm3/trunk/hudson/ant.properties.example 2008-08-28 17:40:56 UTC (rev 2042)
+++ jbpm3/trunk/hudson/ant.properties.example 2008-08-28 19:57:23 UTC (rev 2043)
@@ -25,18 +25,10 @@
hudson.admin.port=8150
hudson.http.port=8180
-hudson.jboss422.url=https://svn.jboss.org/repos/jbossas/tags/JBoss_4_2_2_GA
-hudson.jboss422.build=jboss-4.2.2.GA
-hudson.jboss422.rev=HEAD
+hudson.jboss422.zip=/home/tdiesler/Download/Java/jboss/jboss-4.2.2.GA.zip
+hudson.jboss423.zip=/home/tdiesler/Download/Java/jboss/jboss-4.2.3.GA.zip
+hudson.jboss500.zip=/home/tdiesler/Download/Java/jboss/jboss-5.0.0.CR1.zip
-hudson.jboss423.url=https://svn.jboss.org/repos/jbossas/tags/JBoss_4_2_3_GA
-hudson.jboss423.build=jboss-4.2.3.GA
-hudson.jboss423.rev=HEAD
-
-hudson.jboss500.url=https://svn.jboss.org/repos/jbossas/tags/JBoss_5_0_0_CR1
-hudson.jboss500.build=jboss-5.0.0.CR1
-hudson.jboss500.rev=HEAD
-
hudson.mail.recipients=
hudson.smtp.host=localhost
Modified: jbpm3/trunk/hudson/build.xml
===================================================================
--- jbpm3/trunk/hudson/build.xml 2008-08-28 17:40:56 UTC (rev 2042)
+++ jbpm3/trunk/hudson/build.xml 2008-08-28 19:57:23 UTC (rev 2043)
@@ -38,8 +38,11 @@
<target name="init-hudson" depends="init">
- <property name="hudson.tomcat" value="${hudson.root}/jbpm-hudson-${version.id}/apache-tomcat"/>
- <property name="hudson.home" value="${hudson.root}/jbpm-hudson-${version.id}/hudson-home"/>
+ <property name="hudson.base" value="${hudson.root}/jbpm-hudson-${version.id}"/>
+ <property name="hudson.tomcat" value="${hudson.base}/apache-tomcat"/>
+ <property name="hudson.home" value="${hudson.base}/hudson-home"/>
+ <property name="hudson.jboss" value="${hudson.base}/jboss"/>
+
<echo/>
<echo message="hudson.root = ${hudson.root}"/>
<echo message="hudson.home = ${hudson.home}"/>
@@ -67,6 +70,7 @@
<get src="${jboss.repository}/apache-tomcat/${apache-tomcat}/lib/apache-tomcat.zip" dest="${thirdparty.dir}/apache-tomcat.zip" usetimestamp="true" verbose="true"/>
<get src="https://hudson.dev.java.net/files/documents/${sun-hudson}/hudson.war" dest="${thirdparty.dir}/hudson.war" usetimestamp="true" verbose="true"/>
+ <!-- Install Tomcat -->
<mkdir dir="${hudson.root}"/>
<unzip src="${thirdparty.dir}/apache-tomcat.zip" dest="${hudson.root}"/>
<move file="${hudson.root}/apache-tomcat-${apache-tomcat}" tofile="${hudson.tomcat}"/>
@@ -87,6 +91,17 @@
<filter token="hudson.home" value="${hudson.home}"/>
</filterset>
</copy>
+
+ <!-- Get/Copy Target Container -->
+ <get src="http://downloads.sourceforge.net/jboss/jboss-4.2.2.GA.zip" dest="${thirdparty.dir}/jboss-4.2.2.GA.zip" usetimestamp="true" verbose="true"/>
+ <get src="http://downloads.sourceforge.net/jboss/jboss-4.2.3.GA.zip" dest="${thirdparty.dir}/jboss-4.2.3.GA.zip" usetimestamp="true" verbose="true"/>
+ <get src="http://downloads.sourceforge.net/jboss/jboss-5.0.0.CR1.zip" dest="${thirdparty.dir}/jboss-5.0.0.CR1.zip" usetimestamp="true" verbose="true"/>
+ <copy todir="${hudson.base}/jboss" overwrite="true">
+ <fileset dir="${thirdparty.dir}">
+ <include name="jboss-*.zip"/>
+ </fileset>
+ </copy>
+
</target>
<!--
@@ -124,6 +139,7 @@
<filterset>
<filter token="hudson.jbpm.url" value="${hudson.jbpm.url}"/>
<filter token="hudson.home" value="${hudson.home}"/>
+ <filter token="hudson.jboss" value="${hudson.jboss}"/>
<filter token="version.id" value="${version.id}"/>
<filtersfile file="${hudson.dir}/ant.properties"/>
</filterset>
Modified: jbpm3/trunk/hudson/hudson-home/jobs/jBPM-Matrix/command.sh
===================================================================
--- jbpm3/trunk/hudson/hudson-home/jobs/jBPM-Matrix/command.sh 2008-08-28 17:40:56 UTC (rev 2042)
+++ jbpm3/trunk/hudson/hudson-home/jobs/jBPM-Matrix/command.sh 2008-08-28 19:57:23 UTC (rev 2043)
@@ -2,60 +2,31 @@
WORKSPACE=`pwd`
JBPMDIR=$WORKSPACE/jbpm
-JBOSSDIR=$WORKSPACE/$CONTAINER
DISTRODIR=$JBPMDIR/modules/distribution/target
JBOSS_BINDADDR=(a)jboss.bind.address@
case "$CONTAINER" in
- jboss422*)
- JBOSS_BUILD=(a)hudson.jboss422.build@
- JBOSS_SVN=(a)hudson.jboss422.url@
- JBOSS_REV=(a)hudson.jboss422.rev@
- ;;
+ jboss422*)
+ JBOSS_BUILD=jboss-4.2.2.GA
+ ;;
- jboss423*)
- JBOSS_BUILD=(a)hudson.jboss423.build@
- JBOSS_SVN=(a)hudson.jboss423.url@
- JBOSS_REV=(a)hudson.jboss423.rev@
- ;;
+ jboss423*)
+ JBOSS_BUILD=jboss-4.2.3.GA
+ ;;
- jboss500*)
- JBOSS_BUILD=(a)hudson.jboss500.build@
- JBOSS_SVN=(a)hudson.jboss500.url@
- JBOSS_REV=(a)hudson.jboss500.rev@
- ;;
+ jboss500*)
+ JBOSS_BUILD=jboss-5.0.0.CR1
+ ;;
esac
-JBOSS_INSTANCE=$JBOSSDIR/build/output/$JBOSS_BUILD
-ENVIRONMENT="-Djboss.bind.address=$JBOSS_BINDADDR -Djboss.home=$JBOSS_INSTANCE"
-
#
-# checkout with an explicit version
-#
-if [ ! -d "$JBOSSDIR" ]; then
- cd $WORKSPACE
- svn co -r$JBOSS_REV $JBOSS_SVN $CONTAINER
-else
- cd $WORKSPACE
- svn up -r$JBOSS_REV $CONTAINER
-fi
-
-
+# Unzip the JBoss build
#
-# Build target container
-#
-if [ ! -d $JBOSS_INSTANCE ]; then
- cd $JBOSSDIR
- ./build/build.sh clean main
-fi
+rm -rf $JBOSS_BUILD
+unzip -q @hudson.jboss(a)/$JBOSS_BUILD.zip
-#
-# Verify build
-#
-if [ ! -d $JBOSS_INSTANCE ]; then
- echo "Cannot find expected build: $JBOSS_INSTANCE"
- exit 1
-fi
+JBOSS_HOME=$WORKSPACE/$JBOSS_BUILD
+ENVIRONMENT="-Djboss.bind.address=$JBOSS_BINDADDR -Djboss.home=$JBOSS_HOME"
#
# Build distro
@@ -67,18 +38,19 @@
#
# Deploy distro
#
-java -jar $DISTRODIR/jbpm-distribution-@version.id(a)-install.jar $DISTRODIR/resources/auto-install-$CONTAINER.xml
+sed s/JBOSS_HOME/$JBOSS_HOME/ < $DISTRODIR/resources/auto-install-$CONTAINER.xml > auto-install.xml
+java -jar $DISTRODIR/jbpm-distribution-@version.id(a)-izpack.jar auto-install.xml
#
# start jbossas
#
-$JBPMDIR/hudson/jboss/bin/jboss.sh $JBOSS_INSTANCE start $JBOSS_BINDADDR
+$JBPMDIR/hudson/jboss/bin/jboss.sh $JBOSS_HOME start $JBOSS_BINDADDR
# Was it successfully started?
$JBPMDIR/hudson/jboss/bin/http-spider.sh $JBOSS_BINDADDR:8080 $WORKSPACE
if [ -e $WORKSPACE/spider.failed ]; then
- tail -n 100 $JBOSS_INSTANCE/server/@jboss.server.instance(a)/log/server.log
- $JBPMDIR/hudson/jboss/bin/jboss.sh $JBOSS_INSTANCE stop $JBOSS_BINDADDR
+ tail -n 100 $JBOSS_HOME/server/@jboss.server.instance(a)/log/server.log
+ $JBPMDIR/hudson/jboss/bin/jboss.sh $JBOSS_HOME stop $JBOSS_BINDADDR
exit 1
fi
@@ -97,6 +69,6 @@
#
# stop jbossas
#
-$JBPMDIR/hudson/jboss/bin/jboss.sh $JBOSS_INSTANCE stop
-cp $JBOSS_INSTANCE/server/@jboss.server.instance(a)/log/boot.log $WORKSPACE/jboss-boot.log
-cp $JBOSS_INSTANCE/server/@jboss.server.instance(a)/log/server.log $WORKSPACE/jboss-server.log
+$JBPMDIR/hudson/jboss/bin/jboss.sh $JBOSS_HOME stop
+cp $JBOSS_HOME/server/@jboss.server.instance(a)/log/boot.log $WORKSPACE/jboss-boot.log
+cp $JBOSS_HOME/server/@jboss.server.instance(a)/log/server.log $WORKSPACE/jboss-server.log
Modified: jbpm3/trunk/modules/distribution/src/main/resources/installer/auto-install-jboss422.xml
===================================================================
--- jbpm3/trunk/modules/distribution/src/main/resources/installer/auto-install-jboss422.xml 2008-08-28 17:40:56 UTC (rev 2042)
+++ jbpm3/trunk/modules/distribution/src/main/resources/installer/auto-install-jboss422.xml 2008-08-28 19:57:23 UTC (rev 2043)
@@ -1,7 +1,7 @@
<AutomatedInstallation langpack="eng">
<com.izforge.izpack.panels.HelloPanel />
<com.izforge.izpack.panels.TargetPanel>
- <installpath>@jboss422.home@</installpath>
+ <installpath>JBOSS_HOME</installpath>
</com.izforge.izpack.panels.TargetPanel>
<com.izforge.izpack.panels.TreePacksPanel>
<pack name="jBPM3" index="0" selected="true" />
17 years, 8 months
JBoss JBPM SVN: r2042 - in jbpm3/trunk: modules/distribution and 6 other directories.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-08-28 13:40:56 -0400 (Thu, 28 Aug 2008)
New Revision: 2042
Added:
jbpm3/trunk/modules/distribution/src/main/resources/installer/auto-install-jboss423.xml
jbpm3/trunk/modules/distribution/src/main/resources/installer/auto-install-jboss500.xml
jbpm3/trunk/modules/jpdl/identity/scripts/
jbpm3/trunk/modules/jpdl/identity/scripts/assembly-config.xml
Removed:
jbpm3/trunk/modules/distribution/scripts/antrun-jbpm-config.xml
jbpm3/trunk/modules/distribution/src/main/resources/installer/auto-install-jboss421.xml
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/scripts/install-definition.xml
jbpm3/trunk/modules/jpdl/core/pom.xml
jbpm3/trunk/modules/jpdl/core/scripts/assembly-config.xml
jbpm3/trunk/modules/jpdl/identity/pom.xml
jbpm3/trunk/pom.xml
Log:
cleanup the distro
Modified: jbpm3/trunk/modules/distribution/pom.xml
===================================================================
--- jbpm3/trunk/modules/distribution/pom.xml 2008-08-28 14:29:09 UTC (rev 2041)
+++ jbpm3/trunk/modules/distribution/pom.xml 2008-08-28 17:40:56 UTC (rev 2042)
@@ -27,37 +27,30 @@
<!-- Dependencies -->
<dependencies>
<dependency>
- <groupId>org.jboss.bpm</groupId>
- <artifactId>jboss-bpm-api</artifactId>
- </dependency>
- <dependency>
<groupId>org.jboss.jbpm</groupId>
<artifactId>jbpm-jpdl-core</artifactId>
- <classifier>config</classifier>
<version>${version}</version>
</dependency>
<dependency>
<groupId>org.jboss.jbpm</groupId>
- <artifactId>jbpm-console</artifactId>
+ <artifactId>jbpm-jpdl-core</artifactId>
+ <classifier>config</classifier>
<version>${version}</version>
- <type>war</type>
</dependency>
<dependency>
<groupId>org.jboss.jbpm</groupId>
- <artifactId>jbpm-console</artifactId>
- <classifier>login</classifier>
+ <artifactId>jbpm-jpdl-identity</artifactId>
<version>${version}</version>
- <type>jar</type>
</dependency>
<dependency>
<groupId>org.jboss.jbpm</groupId>
<artifactId>jbpm-jpdl-identity</artifactId>
+ <classifier>config</classifier>
<version>${version}</version>
</dependency>
<dependency>
<groupId>org.jboss.jbpm</groupId>
- <artifactId>jbpm-jpdl-identity</artifactId>
- <classifier>config</classifier>
+ <artifactId>jbpm-jpdl-integration</artifactId>
<version>${version}</version>
</dependency>
<dependency>
@@ -93,79 +86,26 @@
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
- <id>jbpm config</id>
+ <id>izpack</id>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
- <ant antfile="scripts/antrun-jbpm-config.xml" />
- </tasks>
- </configuration>
- </execution>
- <execution>
- <id>installer</id>
- <phase>package</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <tasks>
<property name="maven.runtime.classpath" refid="maven.runtime.classpath" />
<property name="product.name" value="${project.name}" />
<property name="product.short.name" value="${artifactId}" />
<property name="product.version" value="${project.version}" />
- <property name="jboss421.home" value="${jboss421.home}" />
<property name="jboss422.home" value="${jboss422.home}" />
+ <property name="jboss423.home" value="${jboss423.home}" />
<property name="jboss500.home" value="${jboss500.home}" />
- <property name="jboss501.home" value="${jboss501.home}" />
<ant antfile="scripts/antrun-installer.xml" target="installer" />
</tasks>
</configuration>
</execution>
</executions>
</plugin>
- <plugin>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>copy-dependencies</id>
- <phase>generate-resources</phase>
- <goals>
- <goal>unpack</goal>
- </goals>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>org.jboss.jbpm</groupId>
- <artifactId>jbpm-jpdl-core</artifactId>
- <version>${version}</version>
- <classifier>config</classifier>
- <type>jar</type>
- <outputDirectory>${project.build.directory}/resources/jbpm-jpdl-core</outputDirectory>
- </artifactItem>
- <artifactItem>
- <groupId>org.jboss.jbpm</groupId>
- <artifactId>jbpm-jpdl-identity</artifactId>
- <version>${version}</version>
- <classifier>config</classifier>
- <type>jar</type>
- <outputDirectory>${project.build.directory}/resources/jbpm-jpdl-identity</outputDirectory>
- </artifactItem>
- <artifactItem>
- <groupId>org.jboss.jbpm</groupId>
- <artifactId>jbpm-console</artifactId>
- <version>${version}</version>
- <classifier>login</classifier>
- <type>jar</type>
- <outputDirectory>${project.build.directory}/resources/jbpm-login</outputDirectory>
- </artifactItem>
- </artifactItems>
- </configuration>
- </execution>
- </executions>
- </plugin>
</plugins>
</build>
</project>
\ No newline at end of file
Modified: jbpm3/trunk/modules/distribution/scripts/antrun-installer.xml
===================================================================
--- jbpm3/trunk/modules/distribution/scripts/antrun-installer.xml 2008-08-28 14:29:09 UTC (rev 2041)
+++ jbpm3/trunk/modules/distribution/scripts/antrun-installer.xml 2008-08-28 17:40:56 UTC (rev 2042)
@@ -30,22 +30,19 @@
<target name="init">
<echo />
- <echo message="jboss421.home=${jboss421.home}" />
<echo message="jboss422.home=${jboss422.home}" />
+ <echo message="jboss423.home=${jboss423.home}" />
<echo message="jboss500.home=${jboss500.home}" />
- <echo message="jboss501.home=${jboss501.home}" />
<property name="jboss.server.instance" value="default" />
- <property name="jboss421.available.file" value="${jboss421.home}/client/jboss-client.jar" />
<property name="jboss422.available.file" value="${jboss422.home}/client/jboss-client.jar" />
+ <property name="jboss423.available.file" value="${jboss423.home}/client/jboss-client.jar" />
<property name="jboss500.available.file" value="${jboss500.home}/client/jboss-client.jar" />
- <property name="jboss501.available.file" value="${jboss501.home}/client/jboss-client.jar" />
- <available property="jboss421.available" file="${jboss421.available.file}" />
<available property="jboss422.available" file="${jboss422.available.file}" />
+ <available property="jboss423.available" file="${jboss423.available.file}" />
<available property="jboss500.available" file="${jboss500.available.file}" />
- <available property="jboss501.available" file="${jboss501.available.file}" />
</target>
@@ -75,7 +72,7 @@
<!-- Run installer build -->
<echo message="Running IzPack to build the installer..." />
- <izpack input="${basedir}/scripts/install-definition.xml" output="${output.dir}/${product.short.name}-${product.version}-install.jar" installerType="standard"
+ <izpack input="${basedir}/scripts/install-definition.xml" output="${output.dir}/${product.short.name}-${product.version}-izpack.jar" installerType="standard"
inheritAll="true" basedir="${izpack.temp.dir}" />
<!-- Clean working directory -->
Deleted: jbpm3/trunk/modules/distribution/scripts/antrun-jbpm-config.xml
===================================================================
--- jbpm3/trunk/modules/distribution/scripts/antrun-jbpm-config.xml 2008-08-28 14:29:09 UTC (rev 2041)
+++ jbpm3/trunk/modules/distribution/scripts/antrun-jbpm-config.xml 2008-08-28 17:40:56 UTC (rev 2042)
@@ -1,99 +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 default="main">
-
- <property name="project.resources.directory" value="${basedir}/src/main/resources"/>
- <property name="project.build.directory" value="${basedir}/target"/>
- <property name="project.build.resources.directory" value="${project.build.directory}/resources"/>
- <property name="project.build.classes.directory" value="${project.build.directory}/classes"/>
-
- <property name="thirdparty.dir" value="${project.build.directory}/thirdparty"/>
-
- <!-- ================================================================== -->
- <!-- Initialization -->
- <!-- ================================================================== -->
-
- <target name="init">
- </target>
-
- <!-- Compile resource files -->
- <target name="main" depends="init">
-
- <!--
-
- jBPM Hibernate configuration. Will be concatenated from
- various module contributions:
-
- - hibernate.cfg.xml
-
- -->
-
- <echo>==================</echo>
- <echo message="Concat ${project.build.classes.directory}/hibernate.cfg.xml"/>
- <echo>==================</echo>
-
- <concat destfile="${project.build.classes.directory}/hibernate.cfg.xml">
- <header trimleading="yes"><?xml version='1.0' encoding='utf-8'?>
-
- <!DOCTYPE hibernate-configuration PUBLIC
- "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
- "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
-
- <hibernate-configuration>
- <session-factory>
- </header>
- <fileset file="${project.build.resources.directory}/jbpm-jpdl-core/hibernate.properties.xml"/>
- <fileset file="${project.build.resources.directory}/jbpm-jpdl-core/hibernate.mapping.xml"/>
- <fileset file="${project.build.resources.directory}/jbpm-jpdl-identity/hibernate.mapping.xml"/>
- <fileset file="${project.build.resources.directory}/jbpm-jpdl-core/hibernate.cache.xml"/>
- <footer trimleading="yes">
- </session-factory>
- </hibernate-configuration>
- </footer>
- </concat>
-
- <!--
- Remaining JBPM configuration:
-
- - jbpm.cfg.xml
- - jbpm.mail.templates.xml
- - log4j.xml
- -->
-
- <copy todir="${project.build.classes.directory}">
- <fileset dir="${project.build.resources.directory}/jbpm-jpdl-core">
- <include name="jbpm.cfg.xml"/>
- <include name="jbpm.mail.templates.xml"/>
- <include name="log4j.xml"/>
- </fileset>
- </copy>
-
- <!--
-
- Create a config jar directory, so that files stay editable:
-
- - jbpm-config.jar
-
- -->
-
- <mkdir dir="${project.build.directory}/deploy-artifacts/lib/jbpm-config.jar"/>
- <copy todir="${project.build.directory}/deploy-artifacts/lib/jbpm-config.jar">
- <fileset dir="${project.build.classes.directory}">
- <include name="*.xml"/>
- </fileset>
- </copy>
-
- </target>
-
-</project>
Modified: jbpm3/trunk/modules/distribution/scripts/assembly-deploy-artifacts.xml
===================================================================
--- jbpm3/trunk/modules/distribution/scripts/assembly-deploy-artifacts.xml 2008-08-28 14:29:09 UTC (rev 2041)
+++ jbpm3/trunk/modules/distribution/scripts/assembly-deploy-artifacts.xml 2008-08-28 17:40:56 UTC (rev 2042)
@@ -14,29 +14,7 @@
<outputFileNameMapping>${artifact.artifactId}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
<useStrictFiltering>true</useStrictFiltering>
<unpack>false</unpack>
- <excludes>
- <exclude>*:war:*</exclude>
- <exclude>*:login</exclude>
- <exclude>*:config</exclude>
- </excludes>
</dependencySet>
- <dependencySet>
- <outputDirectory>lib/jbpm-console.war</outputDirectory>
- <outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
- <useStrictFiltering>true</useStrictFiltering>
- <unpack>true</unpack>
- <includes>
- <include>org.jboss.jbpm:jbpm-console:war</include>
- </includes>
- </dependencySet>
- <dependencySet>
- <outputDirectory>lib/jbpm-login.sar</outputDirectory>
- <useStrictFiltering>true</useStrictFiltering>
- <unpack>true</unpack>
- <includes>
- <include>*:login</include>
- </includes>
- </dependencySet>
</dependencySets>
<fileSets>
Modified: jbpm3/trunk/modules/distribution/scripts/install-definition.xml
===================================================================
--- jbpm3/trunk/modules/distribution/scripts/install-definition.xml 2008-08-28 14:29:09 UTC (rev 2041)
+++ jbpm3/trunk/modules/distribution/scripts/install-definition.xml 2008-08-28 17:40:56 UTC (rev 2042)
@@ -52,29 +52,23 @@
<pack name="jBPM3" required="yes" installGroups="Main">
<description>The jBPM Main Components</description>
<fileset dir="@{deploy.artifacts.dir}/lib" targetdir="$INSTALL_PATH/server/(a){jboss.server.instance}/deploy/jbpm" >
- <include name="jbpm-api.jar"/>
+ <include name="jboss-bpm-api.jar"/>
<include name="jbpm-jbpm4jsf.jar"/>
<include name="jbpm-jpdl-core.jar"/>
<include name="jbpm-jpdl-identity.jar"/>
+ <include name="jbpm-jpdl-integration.jar"/>
</fileset>
</pack>
<!-- jBPM Distro config -->
<pack name="jBPM3 Config" required="yes" installGroups="Main">
<description>The jBPM default configuration</description>
- <file src="@{deploy.artifacts.dir}/lib/jbpm-config.jar"
+ <file src="@{deploy.artifacts.dir}/lib/jbpm-jpdl-core-config.jar"
targetdir="$INSTALL_PATH/server/(a){jboss.server.instance}/deploy/jbpm">
<include>hibernate.cfg.xml</include>
</file>
- <file src="@{deploy.artifacts.dir}/lib/jbpm-login.sar" targetdir="$INSTALL_PATH/server/(a){jboss.server.instance}/deploy/jbpm" />
</pack>
- <!-- jBPM Console -->
- <pack name="jBPM3 Console" required="no" installGroups="Main">
- <description>The jBPM Console</description>
- <file src="@{deploy.artifacts.dir}/lib/jbpm-console.war" targetdir="$INSTALL_PATH/server/(a){jboss.server.instance}/deploy/jbpm" />
- </pack>
-
<!-- jBPM Hypersonic Database -->
<pack name="jBPM3 Hypersonic Database Scripts" required="no" installGroups="Main">
<description>The Hypersonic Database Scripts</description>
Deleted: jbpm3/trunk/modules/distribution/src/main/resources/installer/auto-install-jboss421.xml
===================================================================
--- jbpm3/trunk/modules/distribution/src/main/resources/installer/auto-install-jboss421.xml 2008-08-28 14:29:09 UTC (rev 2041)
+++ jbpm3/trunk/modules/distribution/src/main/resources/installer/auto-install-jboss421.xml 2008-08-28 17:40:56 UTC (rev 2042)
@@ -1,15 +0,0 @@
-<AutomatedInstallation langpack="eng">
- <com.izforge.izpack.panels.HelloPanel />
- <com.izforge.izpack.panels.TargetPanel>
- <installpath>@jboss421.home@</installpath>
- </com.izforge.izpack.panels.TargetPanel>
- <com.izforge.izpack.panels.TreePacksPanel>
- <pack name="jBPM3" index="0" selected="true" />
- <pack name="jBPM3 Config" index="1" selected="true" />
- <pack name="jBPM3 Console" index="2" selected="true" />
- <pack name="jBPM3 Hypersonic Database Scripts" index="3" selected="true" />
- </com.izforge.izpack.panels.TreePacksPanel>
- <com.izforge.izpack.panels.SummaryPanel />
- <com.izforge.izpack.panels.InstallPanel />
- <com.izforge.izpack.panels.FinishPanel />
-</AutomatedInstallation>
\ No newline at end of file
Copied: jbpm3/trunk/modules/distribution/src/main/resources/installer/auto-install-jboss423.xml (from rev 2041, jbpm3/trunk/modules/distribution/src/main/resources/installer/auto-install-jboss421.xml)
===================================================================
--- jbpm3/trunk/modules/distribution/src/main/resources/installer/auto-install-jboss423.xml (rev 0)
+++ jbpm3/trunk/modules/distribution/src/main/resources/installer/auto-install-jboss423.xml 2008-08-28 17:40:56 UTC (rev 2042)
@@ -0,0 +1,15 @@
+<AutomatedInstallation langpack="eng">
+ <com.izforge.izpack.panels.HelloPanel />
+ <com.izforge.izpack.panels.TargetPanel>
+ <installpath>@jboss423.home@</installpath>
+ </com.izforge.izpack.panels.TargetPanel>
+ <com.izforge.izpack.panels.TreePacksPanel>
+ <pack name="jBPM3" index="0" selected="true" />
+ <pack name="jBPM3 Config" index="1" selected="true" />
+ <pack name="jBPM3 Console" index="2" selected="true" />
+ <pack name="jBPM3 Hypersonic Database Scripts" index="3" selected="true" />
+ </com.izforge.izpack.panels.TreePacksPanel>
+ <com.izforge.izpack.panels.SummaryPanel />
+ <com.izforge.izpack.panels.InstallPanel />
+ <com.izforge.izpack.panels.FinishPanel />
+</AutomatedInstallation>
\ No newline at end of file
Added: jbpm3/trunk/modules/distribution/src/main/resources/installer/auto-install-jboss500.xml
===================================================================
--- jbpm3/trunk/modules/distribution/src/main/resources/installer/auto-install-jboss500.xml (rev 0)
+++ jbpm3/trunk/modules/distribution/src/main/resources/installer/auto-install-jboss500.xml 2008-08-28 17:40:56 UTC (rev 2042)
@@ -0,0 +1,15 @@
+<AutomatedInstallation langpack="eng">
+ <com.izforge.izpack.panels.HelloPanel />
+ <com.izforge.izpack.panels.TargetPanel>
+ <installpath>@jboss500.home@</installpath>
+ </com.izforge.izpack.panels.TargetPanel>
+ <com.izforge.izpack.panels.TreePacksPanel>
+ <pack name="jBPM3" index="0" selected="true" />
+ <pack name="jBPM3 Config" index="1" selected="true" />
+ <pack name="jBPM3 Console" index="2" selected="true" />
+ <pack name="jBPM3 Hypersonic Database Scripts" index="3" selected="true" />
+ </com.izforge.izpack.panels.TreePacksPanel>
+ <com.izforge.izpack.panels.SummaryPanel />
+ <com.izforge.izpack.panels.InstallPanel />
+ <com.izforge.izpack.panels.FinishPanel />
+</AutomatedInstallation>
\ No newline at end of file
Property changes on: jbpm3/trunk/modules/distribution/src/main/resources/installer/auto-install-jboss500.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbpm3/trunk/modules/jpdl/core/pom.xml
===================================================================
--- jbpm3/trunk/modules/jpdl/core/pom.xml 2008-08-28 14:29:09 UTC (rev 2041)
+++ jbpm3/trunk/modules/jpdl/core/pom.xml 2008-08-28 17:40:56 UTC (rev 2042)
@@ -128,9 +128,7 @@
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<excludes>
- <exclude>hibernate.properties.xml</exclude>
- <exclude>hibernate.mapping.xml</exclude>
- <exclude>hibernate.cache.xml</exclude>
+ <exclude>hibernate.*</exclude>
<exclude>jbpm.cfg.xml</exclude>
<exclude>jbpm.mail.templates.xml</exclude>
</excludes>
Modified: jbpm3/trunk/modules/jpdl/core/scripts/assembly-config.xml
===================================================================
--- jbpm3/trunk/modules/jpdl/core/scripts/assembly-config.xml 2008-08-28 14:29:09 UTC (rev 2041)
+++ jbpm3/trunk/modules/jpdl/core/scripts/assembly-config.xml 2008-08-28 17:40:56 UTC (rev 2042)
@@ -14,6 +14,7 @@
<include>jbpm.cfg.xml</include>
<include>jbpm.mail.templates.xml</include>
</includes>
+ <!-- exclude the dummy extra mappings -->
<excludes>
<exclude>hibernate.extra.hbm.xml</exclude>
</excludes>
Modified: jbpm3/trunk/modules/jpdl/identity/pom.xml
===================================================================
--- jbpm3/trunk/modules/jpdl/identity/pom.xml 2008-08-28 14:29:09 UTC (rev 2041)
+++ jbpm3/trunk/modules/jpdl/identity/pom.xml 2008-08-28 17:40:56 UTC (rev 2042)
@@ -64,6 +64,24 @@
<build>
<plugins>
<plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <finalName>${project.build.finalName}</finalName>
+ <appendAssemblyId>true</appendAssemblyId>
+ <descriptors>
+ <descriptor>scripts/assembly-config.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<showDeprecation>false</showDeprecation>
Added: jbpm3/trunk/modules/jpdl/identity/scripts/assembly-config.xml
===================================================================
--- jbpm3/trunk/modules/jpdl/identity/scripts/assembly-config.xml (rev 0)
+++ jbpm3/trunk/modules/jpdl/identity/scripts/assembly-config.xml 2008-08-28 17:40:56 UTC (rev 2042)
@@ -0,0 +1,17 @@
+<assembly xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/assembly-1.1.0-SNAPSHOT.xsd">
+ <id>config</id>
+ <formats>
+ <format>jar</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <fileSets>
+ <fileSet>
+ <directory>src/main/resources</directory>
+ <outputDirectory>/</outputDirectory>
+ <includes>
+ <include>hibernate.extra.hbm.xml</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+</assembly>
\ No newline at end of file
Property changes on: jbpm3/trunk/modules/jpdl/identity/scripts/assembly-config.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbpm3/trunk/pom.xml
===================================================================
--- jbpm3/trunk/pom.xml 2008-08-28 14:29:09 UTC (rev 2041)
+++ jbpm3/trunk/pom.xml 2008-08-28 17:40:56 UTC (rev 2042)
@@ -28,7 +28,6 @@
<!-- Modules -->
<modules>
<module>modules/jpdl</module>
- <module>modules/console</module>
<module>modules/enterprise</module>
<module>modules/jbpm4jsf</module>
</modules>
17 years, 8 months
JBoss JBPM SVN: r2041 - jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2008-08-28 10:29:09 -0400 (Thu, 28 Aug 2008)
New Revision: 2041
Modified:
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/ExecutionService.java
Log:
finished renaming key to id in some of the parameters and javadocs
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/ExecutionService.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/ExecutionService.java 2008-08-28 14:17:03 UTC (rev 2040)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/ExecutionService.java 2008-08-28 14:29:09 UTC (rev 2041)
@@ -32,26 +32,26 @@
public interface ExecutionService {
/** starts a new execution for the ProcessDefinition with the given processDefinitionDbid.
- * @param processDefinitionKey the {@link ProcessDefinition#getKey() unique key} of the process definition. */
- Execution startExecution(String processDefinitionKey);
+ * @param processDefinitionId the {@link ProcessDefinition#getId() unique id} of the process definition. */
+ Execution startExecution(String processDefinitionId);
/** starts a new execution for the ProcessDefinition with the given processDefinitionDbid.
- * @param processDefinitionKey the {@link ProcessDefinition#getKey() unique key} of the process definition.
- * @param executionRef is a user provided reference for the new execution that must be unique over all
+ * @param processDefinitionId the {@link ProcessDefinition#getId() unique id} of the process definition.
+ * @param executionKey is a user provided reference for the new execution that must be unique over all
* process versions with the same name. */
- Execution startExecution(String processDefinitionKey, String executionRef);
+ Execution startExecution(String processDefinitionId, String executionKey);
/** starts a new execution for the ProcessDefinition with the given processDefinitionDbid.
- * @param processDefinitionKey the {@link ProcessDefinition#getKey() unique key} of the process definition.
+ * @param processDefinitionId the {@link ProcessDefinition#getId() unique id} of the process definition.
* @param variables are the initial values of the process variables that will be set before the execution starts. */
- Execution startExecution(String processDefinitionKey, Map<String, Object> variables);
+ Execution startExecution(String processDefinitionId, Map<String, Object> variables);
/** starts a new execution for the ProcessDefinition with the given processDefinitionDbid.
- * @param processDefinitionKey the {@link ProcessDefinition#getKey() unique key} of the process definition.
+ * @param processDefinitionId the {@link ProcessDefinition#getId() unique id} of the process definition.
* @param variables are the initial values of the process variables that will be set before the execution starts.
- * @param executionRef is a user provided reference for the new execution that must be unique over all
+ * @param executionKey is a user provided reference for the new execution that must be unique over all
* process versions with the same name. */
- Execution startExecution(String processDefinitionKey, Map<String, Object> variables, String executionRef);
+ Execution startExecution(String processDefinitionId, Map<String, Object> variables, String executionKey);
/** starts a new execution in the latest version of the given process definition.
* @param processDefinitionName is the name of the process definition for which the latest version will be taken. */
@@ -59,9 +59,9 @@
/** starts a new execution in the latest version of the given processDefinitionName.
* @param processDefinitionName is the name of the process definition for which the latest version will be taken.
- * @param executionRef is a user provided reference for the new execution that must be unique over all
+ * @param executionKey is a user provided reference for the new execution that must be unique over all
* process versions with the same name. */
- Execution startExecutionInLatest(String processDefinitionName, String executionRef);
+ Execution startExecutionInLatest(String processDefinitionName, String executionKey);
/** starts a new execution in the latest version of the given processDefinitionName.
* @param processDefinitionName is the name of the process definition for which the latest version will be taken.
@@ -71,9 +71,9 @@
/** starts a new execution in the latest version of the given processDefinitionName.
* @param processDefinitionName is the name of the process definition for which the latest version will be taken.
* @param variables are the initial values of the process variables that will be set before the execution starts.
- * @param executionRef is a user provided reference for the new execution that must be unique over all
+ * @param executionKey is a user provided reference for the new execution that must be unique over all
* process versions with the same name. */
- Execution startExecutionInLatest(String processDefinitionName, Map<String, Object> variables, String executionRef);
+ Execution startExecutionInLatest(String processDefinitionName, Map<String, Object> variables, String executionKey);
/** the execution with the given database primary key */
// TODO REMOVE
17 years, 8 months
JBoss JBPM SVN: r2040 - in jbpm4/pvm/trunk/modules/core/src: main/java/org/jbpm/pvm/env and 14 other directories.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2008-08-28 10:17:03 -0400 (Thu, 28 Aug 2008)
New Revision: 2040
Added:
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/deploy/CreateId.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/DefaultIdGenerator.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/CreateIdBinding.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/IdGeneratorBinding.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/model/IdGenerator.java
Removed:
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/deploy/CreateKey.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/CreateKeyBinding.java
Modified:
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/Deployment.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/Execution.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/ExecutionService.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/ProcessDefinition.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/env/Environment.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/cmd/FindExecutionCmd.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/cmd/SignalCmd.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/cmd/StartExecutionCmd.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/hibernate/HibernatePvmDbSession.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorThread.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/ProcessDefinitionImpl.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/svc/CommandExecutionService.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/session/PvmDbSession.java
jbpm4/pvm/trunk/modules/core/src/main/resources/org/jbpm/pvm/hibernate.definition.hbm.xml
jbpm4/pvm/trunk/modules/core/src/main/resources/org/jbpm/pvm/hibernate.execution.hbm.xml
jbpm4/pvm/trunk/modules/core/src/main/resources/org/jbpm/pvm/pvm.wire.bindings.xml
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/svc/ExecutionServiceTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex02/BasicProcessPersistenceTest.java
jbpm4/pvm/trunk/modules/core/src/test/resources/environment.cfg.xml
Log:
introduction of the execution keys and ids
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/Deployment.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/Deployment.java 2008-08-28 10:31:07 UTC (rev 2039)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/Deployment.java 2008-08-28 14:17:03 UTC (rev 2040)
@@ -63,9 +63,6 @@
protected Map<String, Document> documents;
protected ProcessDefinition processDefinition;
- /** user provided short reference for the process definition
- * that can be used by the KeyGenerator */
- protected String processDefinitionRef;
public Deployment() {
}
@@ -245,10 +242,4 @@
public void setName(String name) {
this.name = name;
}
- public String getProcessDefinitionRef() {
- return processDefinitionRef;
- }
- public void setProcessDefinitionRef(String processDefinitionRef) {
- this.processDefinitionRef = processDefinitionRef;
- }
}
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/Execution.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/Execution.java 2008-08-28 10:31:07 UTC (rev 2039)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/Execution.java 2008-08-28 14:17:03 UTC (rev 2040)
@@ -121,16 +121,19 @@
long getDbid();
+ /** the externally given name or id of this execution. The id of a main
+ * path of execution is null. Can be used to differentiate concurrent
+ * paths of execution e.g. the shipping and billing paths. */
+ String getName();
- /** the meaningful but optional business key that is unique within one
+ /** the optional user provided business key that is unique within one
* process definition. This could be for instance the order number.
* It's a user defined identifier for one execution within the scope of
* a single process definition. */
String getKey();
- /** the name of this execution. The name of a main
- * path of execution is null. */
- String getName();
+ /** a globally unique identifier for this execution. */
+ String getId();
/** represents the current position in the process by indicating the
* name of the current node. */
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/ExecutionService.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/ExecutionService.java 2008-08-28 10:31:07 UTC (rev 2039)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/ExecutionService.java 2008-08-28 14:17:03 UTC (rev 2040)
@@ -76,35 +76,52 @@
Execution startExecutionInLatest(String processDefinitionName, Map<String, Object> variables, String executionRef);
/** the execution with the given database primary key */
+ // TODO REMOVE
Execution findExecution(long executionDbid);
/** the execution that is uniquely defined by the process definition and the business key. */
Execution findExecution(String processDefinitionName, String executionKey);
+ /** the execution that is uniquely defined by the process definition and the business key. */
+ Execution findExecution(String executionId);
+
/** provides an external trigger to an execution. */
+ // TODO REMOVE
Execution signalExecution(long executionDbid);
/** provides a named external trigger to an execution. */
+ // TODO REMOVE
Execution signalExecution(long executionDbid, String signalName);
/** provides a named external trigger to an execution with parameters. */
+ // TODO REMOVE
Execution signalExecution(long executionDbid, String signalName, Map<String, Object> parameters);
/** provides a external trigger to an execution with parameters. */
+ // TODO REMOVE
Execution signalExecution(long executionDbid, Map<String, Object> parameters);
+
- /** provides an external trigger to an execution. */
- Execution signalExecution(String processDefinitionName, String executionKey);
-
/** provides a named external trigger to an execution. */
Execution signalExecution(String processDefinitionName, String executionKey, String signalName);
/** provides a named external trigger to an execution with parameters. */
Execution signalExecution(String processDefinitionName, String executionKey, String signalName, Map<String, Object> parameters);
+
+ /** provides an external trigger to an execution. */
+ Execution signalExecution(String executionId);
+
+ /** provides a named external trigger to an execution. */
+ Execution signalExecution(String executionId, String signalName);
+
+ /** provides a named external trigger to an execution with parameters. */
+ Execution signalExecution(String executionId, String signalName, Map<String, Object> parameters);
+
/** provides a external trigger to an execution with parameters. */
- Execution signalExecution(String processDefinitionName, String executionKey, Map<String, Object> parameters);
+ Execution signalExecution(String executionId, Map<String, Object> parameters);
+
/** creates or overwrites a variable value on the referenced execution */
Execution setVariable(long executionDbid, String name, Object value);
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/ProcessDefinition.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/ProcessDefinition.java 2008-08-28 10:31:07 UTC (rev 2039)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/ProcessDefinition.java 2008-08-28 14:17:03 UTC (rev 2040)
@@ -32,26 +32,32 @@
*/
public interface ProcessDefinition extends Serializable {
- /** the unique key for this process definition. */
- String getKey();
+ /** the optional package name of this process. This can be used to create
+ * hierarchy of process categories for easy lookup. This is a
+ * similar way of grouping and creating a structure as in Java.
+ * We recommend the same conventions as with Java package names. */
+ String getPackageName();
/** the short display name given to this process definition.
* Multiple process definitions can have the same as long
* as they are given a different {@link #version}. */
String getName();
- /** the description name given to this process definition.
- * Multiple process definitions can have the same */
- String getDescription();
+ /** the user defined short representation of the name. Just
+ * like the name, multiple versions of a process definition
+ * can have the same key. */
+ String getKey();
- /** the package name of this process. This can be used to create
- * hierarchy of process categories for easy lookup. This is a
- * similar way of grouping and creating a structure as in Java.
- * We recommend the same conventions as with Java package names. */
- String getPackageName();
+ /** the unique id for this process definition. */
+ String getId();
/** automatically assigned during deployment of a process that
* represents the sequence number for process definitions with
* the same {@link ObservableElement#getName() name}. */
int getVersion();
+
+ /** the description name given to this process definition.
+ * Multiple process definitions can have the same */
+ String getDescription();
+
}
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/env/Environment.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/env/Environment.java 2008-08-28 10:31:07 UTC (rev 2039)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/env/Environment.java 2008-08-28 14:17:03 UTC (rev 2040)
@@ -24,7 +24,9 @@
import java.io.Serializable;
import java.util.Stack;
+import org.jbpm.pvm.PvmException;
+
/**
* maintains contextual information for a thread in a set of
* {@link Context}s.
@@ -145,6 +147,7 @@
*/
public abstract <T> T get(Class<T> type);
+
/** searches an object based on type. The search doesn take superclasses of the context elements
* into account.
* @return the first object of the given type or null in case no such element was found.
@@ -180,7 +183,51 @@
public static Environment getCurrent() {
return currentEnvironment.get();
}
+
+ public static <T> T getFromCurrent(Class<T> type) {
+ return getFromCurrent(type, true);
+ }
+ public static <T> T getFromCurrent(Class<T> type, boolean required) {
+ Environment environment = getCurrent();
+ if (environment==null) {
+ if (required) {
+ throw new PvmException("no environment to get "+type.getName());
+ }
+ return null;
+ }
+ T object = environment.get(type);
+ if (object==null) {
+ if (required) {
+ throw new PvmException("no "+type.getName()+" in current environment");
+ }
+ return null;
+ }
+ return object;
+ }
+
+ public static Object getFromCurrent(String name) {
+ return getFromCurrent(name, true);
+ }
+
+ public static Object getFromCurrent(String name, boolean required) {
+ Environment environment = getCurrent();
+ if (environment==null) {
+ if (required) {
+ throw new PvmException("no environment to get '"+name+"'");
+ }
+ return null;
+ }
+ Object object = environment.get(name);
+ if (object==null) {
+ if (required) {
+ throw new PvmException("no '"+name+"' in current environment");
+ }
+ return null;
+ }
+ return object;
+ }
+
static Stack<Environment> getStack() {
// lazy initialize the current environment stack
Stack<Environment> stack = currentEnvironmentStack.get();
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/cmd/FindExecutionCmd.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/cmd/FindExecutionCmd.java 2008-08-28 10:31:07 UTC (rev 2039)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/cmd/FindExecutionCmd.java 2008-08-28 14:17:03 UTC (rev 2040)
@@ -35,23 +35,31 @@
private static final long serialVersionUID = 1L;
protected long executionDbid;
+ protected String executionId;
protected String processDefinitionName;
- protected String key;
+ protected String executionKey;
- public FindExecutionCmd(String processDefinitionName, String key) {
+ public FindExecutionCmd(String processDefinitionName, String executionKey) {
this.processDefinitionName = processDefinitionName;
- this.key = key;
+ this.executionKey = executionKey;
}
+ // TODO: REMOVE
public FindExecutionCmd(long executionDbid) {
this.executionDbid = executionDbid;
}
+ public FindExecutionCmd(String executionId) {
+ this.executionId = executionId;
+ }
+
public Execution execute(Environment environment) throws Exception {
PvmDbSession pvmDbSession = environment.get(PvmDbSession.class);
- if (processDefinitionName!=null) {
- return pvmDbSession.findExecutionByKey(key);
- }
+ if (executionId!=null) {
+ return pvmDbSession.findExecutionById(executionId);
+ } else if (processDefinitionName!=null && executionKey!=null){
+ return pvmDbSession.findExecutionByKey(processDefinitionName, executionKey);
+ }
return pvmDbSession.get(ExecutionImpl.class, executionDbid);
}
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/cmd/SignalCmd.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/cmd/SignalCmd.java 2008-08-28 10:31:07 UTC (rev 2039)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/cmd/SignalCmd.java 2008-08-28 14:17:03 UTC (rev 2040)
@@ -42,13 +42,15 @@
protected String executionKey;
protected String signalName;
protected Map<String, Object> parameters;
-
+
+ // TODO REMOVE
public SignalCmd(long executionDbid, String signalName, Map<String, Object> parameters) {
this.executionDbid = executionDbid;
this.signalName = signalName;
this.parameters = parameters;
}
+ // TODO REMOVE
public SignalCmd(String processDefinitionName, String executionKey, String signalName, Map<String, Object> parameters) {
if (processDefinitionName==null) {
throw new PvmException("processDefinitionName is null");
@@ -61,6 +63,15 @@
this.parameters = parameters;
}
+ public SignalCmd(String executionKey, String signalName, Map<String, Object> parameters) {
+ if (executionKey==null) {
+ throw new PvmException("executionKey is null");
+ }
+ this.executionKey = executionKey;
+ this.signalName = signalName;
+ this.parameters = parameters;
+ }
+
public Execution execute(Environment environment) throws Exception {
ClientExecution execution = null;
@@ -71,9 +82,9 @@
throw new PvmException("execution "+executionDbid+" does not exist");
}
} else {
- execution = pvmDbSession.findExecutionByKey(executionKey);
+ execution = pvmDbSession.findExecutionById(executionKey);
if (execution==null) {
- throw new PvmException("execution for process "+processDefinitionName+" with executionKey "+executionKey+" does not exist");
+ throw new PvmException("execution "+executionKey+" does not exist");
}
}
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/cmd/StartExecutionCmd.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/cmd/StartExecutionCmd.java 2008-08-28 10:31:07 UTC (rev 2039)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/cmd/StartExecutionCmd.java 2008-08-28 14:17:03 UTC (rev 2040)
@@ -38,11 +38,11 @@
private static final long serialVersionUID = 1L;
- protected String processDefinitionKey;
+ protected String processDefinitionId;
protected String executionKey;
- public StartExecutionCmd(String processDefinitionKey, Map<String, Object> variables, String executionKey) {
- this.processDefinitionKey = processDefinitionKey;
+ public StartExecutionCmd(String processDefinitionId, Map<String, Object> variables, String executionKey) {
+ this.processDefinitionId = processDefinitionId;
this.variables = variables;
this.executionKey = executionKey;
}
@@ -52,9 +52,9 @@
ClientProcessDefinition processDefinition = null;
- processDefinition = pvmDbSession.findProcessDefinitionByKey(processDefinitionKey);
+ processDefinition = pvmDbSession.findProcessDefinitionById(processDefinitionId);
if (processDefinition==null) {
- throw new PvmException("no process definition with key '"+processDefinitionKey+"'");
+ throw new PvmException("no process definition with key '"+processDefinitionId+"'");
}
ClientProcessInstance processInstance = processDefinition.createProcessInstance(executionKey);
@@ -66,10 +66,10 @@
}
public String getProcessDefinitionKey() {
- return processDefinitionKey;
+ return processDefinitionId;
}
public void setProcessDefinitionKey(String processDefinitionKey) {
- this.processDefinitionKey = processDefinitionKey;
+ this.processDefinitionId = processDefinitionKey;
}
public String getExecutionKey() {
return executionKey;
Copied: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/deploy/CreateId.java (from rev 1997, jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/deploy/CreateKey.java)
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/deploy/CreateId.java (rev 0)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/deploy/CreateId.java 2008-08-28 14:17:03 UTC (rev 2040)
@@ -0,0 +1,48 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.pvm.internal.deploy;
+
+import org.jbpm.pvm.Deployment;
+import org.jbpm.pvm.internal.model.ProcessDefinitionImpl;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class CreateId implements Deployer {
+
+ public void deploy(Deployment deployment) {
+ ProcessDefinitionImpl processDefinition = (ProcessDefinitionImpl) deployment.getProcessDefinition();
+
+ String key = processDefinition.getKey();
+ if (key==null) {
+ key = processDefinition.getName();
+ }
+
+ // replace any non-word character with an underscore
+ key = key.replaceAll("\\W", "_");
+
+ String id = key+":"+processDefinition.getVersion();
+
+ processDefinition.setId(id);
+ }
+}
Property changes on: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/deploy/CreateId.java
___________________________________________________________________
Name: svn:mergeinfo
+
Deleted: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/deploy/CreateKey.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/deploy/CreateKey.java 2008-08-28 10:31:07 UTC (rev 2039)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/deploy/CreateKey.java 2008-08-28 14:17:03 UTC (rev 2040)
@@ -1,45 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.pvm.internal.deploy;
-
-import org.jbpm.pvm.Deployment;
-import org.jbpm.pvm.internal.model.ProcessDefinitionImpl;
-
-
-/**
- * @author Tom Baeyens
- */
-public class CreateKey implements Deployer {
-
- public void deploy(Deployment deployment) {
- ProcessDefinitionImpl processDefinition = (ProcessDefinitionImpl) deployment.getProcessDefinition();
-
- String ref = deployment.getProcessDefinitionRef();
- if (ref==null) {
- ref = processDefinition.getName();
- }
-
- String key = ref+"-"+processDefinition.getVersion();
-
- processDefinition.setKey(key);
- }
-}
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/hibernate/HibernatePvmDbSession.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/hibernate/HibernatePvmDbSession.java 2008-08-28 10:31:07 UTC (rev 2039)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/hibernate/HibernatePvmDbSession.java 2008-08-28 14:17:03 UTC (rev 2040)
@@ -70,19 +70,28 @@
return processDefinition;
}
- public ClientProcessDefinition findProcessDefinitionByKey(String processDefinitionKey) {
+ public ClientProcessDefinition findProcessDefinitionById(String processDefinitionId) {
// query definition can be found at the bottom of resource org/jbpm/pvm/hibernate.definition.hbm.xml
- Query query = session.getNamedQuery("findProcessDefinitionsByKey");
- query.setString("key", processDefinitionKey);
+ Query query = session.getNamedQuery("findProcessDefinitionsById");
+ query.setString("id", processDefinitionId);
query.setMaxResults(1);
ClientProcessDefinition processDefinition = (ClientProcessDefinition) query.uniqueResult();
return processDefinition;
}
- public ClientExecution findExecutionByKey(String executionKey) {
+ public ClientExecution findExecutionById(String executionId) {
// query definition can be found at the bottom of resource org/jbpm/pvm/hibernate.execution.hbm.xml
+ Query query = session.getNamedQuery("findExecutionById");
+ query.setString("id", executionId);
+ query.setMaxResults(1);
+ return (ClientExecution) query.uniqueResult();
+ }
+
+ public Execution findExecutionByKey(String processDefinitionName, String executionKey) {
+ // query definition can be found at the bottom of resource org/jbpm/pvm/hibernate.execution.hbm.xml
Query query = session.getNamedQuery("findExecutionByKey");
- query.setString("key", executionKey);
+ query.setString("processDefinitionName", processDefinitionName);
+ query.setString("executionKey", executionKey);
query.setMaxResults(1);
return (ClientExecution) query.uniqueResult();
}
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorThread.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorThread.java 2008-08-28 10:31:07 UTC (rev 2039)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorThread.java 2008-08-28 14:17:03 UTC (rev 2040)
@@ -55,7 +55,7 @@
log.trace("taking jobs from queue");
Collection<Long> jobDbids = null;
jobDbids = queue.take();
- log.debug("took jobImpl(s) "+jobDbids+" from queue");
+ log.debug("took job(s) "+jobDbids+" from queue");
for (Long jobDbid: jobDbids) {
CommandService commandService = jobExecutor.getCommandExecutor();
@@ -64,7 +64,7 @@
} catch (InterruptedException e) {
log.trace("waiting for acquired jobs got interrupted");
} catch (Exception e) {
- log.error("exception in jobImpl executor thread", e);
+ log.error("exception in job executor thread", e);
}
}
}
Added: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/DefaultIdGenerator.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/DefaultIdGenerator.java (rev 0)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/DefaultIdGenerator.java 2008-08-28 14:17:03 UTC (rev 2040)
@@ -0,0 +1,62 @@
+/*
+ * 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.model;
+
+import org.hibernate.Session;
+import org.jbpm.pvm.Execution;
+import org.jbpm.pvm.ProcessDefinition;
+import org.jbpm.pvm.env.Environment;
+import org.jbpm.pvm.model.IdGenerator;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class DefaultIdGenerator implements IdGenerator {
+
+ public String createId(ProcessDefinition processDefinition, Execution parent, Execution execution) {
+
+ String base = null;
+ if (parent!=null) {
+ base = parent.getId();
+ } else {
+ base = processDefinition.getId();
+ }
+
+ String executionPart = null;
+ if (execution.getKey()!=null) {
+ executionPart = execution.getKey();
+
+ } else if (execution.getName()!=null) {
+ executionPart = execution.getName();
+
+ } else {
+ ExecutionImpl executionImpl = (ExecutionImpl) execution;
+ Session session = Environment.getFromCurrent(Session.class);
+ session.save(executionImpl);
+ executionPart = Long.toString(executionImpl.getDbid());
+ }
+
+ return base+"/"+executionPart;
+ }
+
+}
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java 2008-08-28 10:31:07 UTC (rev 2039)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java 2008-08-28 14:17:03 UTC (rev 2040)
@@ -65,6 +65,7 @@
import org.jbpm.pvm.listener.EventListenerExecution;
import org.jbpm.pvm.model.Comment;
import org.jbpm.pvm.model.Event;
+import org.jbpm.pvm.model.IdGenerator;
import org.jbpm.pvm.model.Node;
import org.jbpm.pvm.model.ObservableElement;
import org.jbpm.pvm.model.OpenExecution;
@@ -95,9 +96,18 @@
protected long dbid;
protected int dbversion;
+ /** an optional name for this execution. can be used to
+ * differentiate concurrent paths of execution like e.g.
+ * the 'shipping' and 'billing' paths. */
+ protected String name;
+
+ /** a key for this execution. typically this is an externally provided reference
+ * that is unique within the scope of the process definition. */
protected String key;
- protected String name;
-
+
+ /** a unique id for this execution. */
+ protected String id;
+
/** @see Execution */
protected String state;
@@ -183,8 +193,13 @@
this.processDefinition = processDefinition;
this.node = (NodeImpl) processDefinition.getInitial();
this.processInstance = this;
+ this.state = STATE_CREATED;
this.key = key;
- this.state = STATE_CREATED;
+
+ IdGenerator keyGenerator = Environment.getFromCurrent(IdGenerator.class, false);
+ if (keyGenerator!=null) {
+ this.id = keyGenerator.createId(processDefinition, null, this);
+ }
}
// execution method : start /////////////////////////////////////////////////
@@ -1155,7 +1170,7 @@
}
public Execution createExecution(String name, Execution parent) {
- throw new UnsupportedOperationException();
+ return ((ExecutionImpl)parent).createExecution(name);
}
/** @see Execution#createProcessInstance(String) */
@@ -1179,6 +1194,12 @@
addExecution(childExecution);
// invalidate the cached executionsMap
executionsMap = null;
+
+ IdGenerator keyGenerator = Environment.getFromCurrent(IdGenerator.class, false);
+ if (keyGenerator!=null) {
+ childExecution.id = keyGenerator.createId(processDefinition, this, childExecution);
+ }
+
return childExecution;
}
@@ -1465,4 +1486,10 @@
public void setKey(String key) {
this.key = key;
}
+ public String getId() {
+ return id;
+ }
+ public void setId(String id) {
+ this.id = id;
+ }
}
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/ProcessDefinitionImpl.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/ProcessDefinitionImpl.java 2008-08-28 10:31:07 UTC (rev 2039)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/ProcessDefinitionImpl.java 2008-08-28 14:17:03 UTC (rev 2040)
@@ -43,13 +43,19 @@
private static final long serialVersionUID = 1L;
private static final Log log = Log.getLog(ProcessDefinitionImpl.class.getName());
+ /** user provided short reference for the process definition that
+ * has the same scope as the name. Multiple versions of the same
+ * process can have the same key. The key is used to build the
+ * globally unique execution ids. */
+ protected String key;
+
+ /** the unique id (e.g. combination of name and versionnumber) for this
+ * process definition. */
+ protected String id;
+
/** the version number of the process definitions with the same name.*/
protected int version;
- /** the unique key (e.g. combination of name and versionnumber) for this
- * process definition that is exposed to the users. */
- protected String key;
-
/** optional package name similar to the Java package name. */
protected String packageName;
@@ -179,4 +185,10 @@
public void setKey(String key) {
this.key = key;
}
+ public String getId() {
+ return id;
+ }
+ public void setId(String id) {
+ this.id = id;
+ }
}
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/svc/CommandExecutionService.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/svc/CommandExecutionService.java 2008-08-28 10:31:07 UTC (rev 2039)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/svc/CommandExecutionService.java 2008-08-28 14:17:03 UTC (rev 2040)
@@ -45,20 +45,20 @@
protected CommandService commandService;
- public Execution startExecution(String processDefinitionKey){
- return commandService.execute(new StartExecutionCmd(processDefinitionKey, null, null));
+ public Execution startExecution(String processDefinitionId){
+ return commandService.execute(new StartExecutionCmd(processDefinitionId, null, null));
}
- public Execution startExecution(String processDefinitionKey, String executionKey) {
- return commandService.execute(new StartExecutionCmd(processDefinitionKey, null, executionKey));
+ public Execution startExecution(String processDefinitionId, String executionKey) {
+ return commandService.execute(new StartExecutionCmd(processDefinitionId, null, executionKey));
}
- public Execution startExecution(String processDefinitionKey, Map<String, Object> variables){
- return commandService.execute(new StartExecutionCmd(processDefinitionKey, variables, null));
+ public Execution startExecution(String processDefinitionId, Map<String, Object> variables){
+ return commandService.execute(new StartExecutionCmd(processDefinitionId, variables, null));
}
- public Execution startExecution(String processDefinitionKey, Map<String, Object> variables, String executionKey){
- return commandService.execute(new StartExecutionCmd(processDefinitionKey, variables, executionKey));
+ public Execution startExecution(String processDefinitionId, Map<String, Object> variables, String executionKey){
+ return commandService.execute(new StartExecutionCmd(processDefinitionId, variables, executionKey));
}
public Execution startExecutionInLatest(String processDefinitionName) {
@@ -76,7 +76,17 @@
public Execution startExecutionInLatest(String processDefinitionName, Map<String, Object> variables, String executionKey){
return commandService.execute(new StartExecutionInLatestCmd(processDefinitionName, variables, executionKey));
}
+
+ public Execution signalExecution(String executionId) {
+ return null;
+ }
+
+ public Execution signalExecution(String executionId, Map<String, Object> parameters) {
+ return null;
+ }
+
+
public Execution signalExecution(long executionDbid) {
return commandService.execute(new SignalCmd(executionDbid, null, null));
}
@@ -132,6 +142,10 @@
public Execution findExecution(String processDefinitionName, String key) {
return commandService.execute(new FindExecutionCmd(processDefinitionName, key));
}
+
+ public Execution findExecution(String executionId) {
+ return commandService.execute(new FindExecutionCmd(executionId));
+ }
public Object getVariable(long executionDbid, String variableName) {
return commandService.execute(new GetVariableCmd(executionDbid, variableName));
Copied: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/CreateIdBinding.java (from rev 1997, jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/CreateKeyBinding.java)
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/CreateIdBinding.java (rev 0)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/CreateIdBinding.java 2008-08-28 14:17:03 UTC (rev 2040)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.pvm.internal.wire.binding;
+
+import org.jbpm.pvm.internal.deploy.CreateId;
+import org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor;
+import org.jbpm.pvm.internal.xml.Parse;
+import org.jbpm.pvm.internal.xml.Parser;
+import org.w3c.dom.Element;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class CreateIdBinding extends WireDescriptorBinding {
+
+ public CreateIdBinding() {
+ super("create-id");
+ }
+
+ public Object parse(Element element, Parse parse, Parser parser) {
+ return new ObjectDescriptor(CreateId.class);
+ }
+
+}
Property changes on: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/CreateIdBinding.java
___________________________________________________________________
Name: svn:mergeinfo
+
Deleted: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/CreateKeyBinding.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/CreateKeyBinding.java 2008-08-28 10:31:07 UTC (rev 2039)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/CreateKeyBinding.java 2008-08-28 14:17:03 UTC (rev 2040)
@@ -1,44 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.pvm.internal.wire.binding;
-
-import org.jbpm.pvm.internal.deploy.CreateKey;
-import org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor;
-import org.jbpm.pvm.internal.xml.Parse;
-import org.jbpm.pvm.internal.xml.Parser;
-import org.w3c.dom.Element;
-
-
-/**
- * @author Tom Baeyens
- */
-public class CreateKeyBinding extends WireDescriptorBinding {
-
- public CreateKeyBinding() {
- super("create-key");
- }
-
- public Object parse(Element element, Parse parse, Parser parser) {
- return new ObjectDescriptor(CreateKey.class);
- }
-
-}
Added: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/IdGeneratorBinding.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/IdGeneratorBinding.java (rev 0)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/IdGeneratorBinding.java 2008-08-28 14:17:03 UTC (rev 2040)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.pvm.internal.wire.binding;
+
+import org.jbpm.pvm.internal.model.DefaultIdGenerator;
+import org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor;
+import org.jbpm.pvm.internal.xml.Parse;
+import org.jbpm.pvm.internal.xml.Parser;
+import org.w3c.dom.Element;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class IdGeneratorBinding extends WireDescriptorBinding {
+
+ public IdGeneratorBinding() {
+ super("id-generator");
+ }
+
+ public Object parse(Element element, Parse parse, Parser parser) {
+ return new ObjectDescriptor(DefaultIdGenerator.class);
+ }
+
+}
Added: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/model/IdGenerator.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/model/IdGenerator.java (rev 0)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/model/IdGenerator.java 2008-08-28 14:17:03 UTC (rev 2040)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.pvm.model;
+
+import org.jbpm.pvm.Execution;
+import org.jbpm.pvm.ProcessDefinition;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public interface IdGenerator {
+
+ /** generates a unique id for the given execution. */
+ String createId(ProcessDefinition processDefinition, Execution parent, Execution execution);
+
+}
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/session/PvmDbSession.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/session/PvmDbSession.java 2008-08-28 10:31:07 UTC (rev 2039)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/session/PvmDbSession.java 2008-08-28 14:17:03 UTC (rev 2040)
@@ -23,6 +23,7 @@
import java.util.List;
+import org.jbpm.pvm.Execution;
import org.jbpm.pvm.client.ClientExecution;
import org.jbpm.pvm.client.ClientProcessDefinition;
import org.jbpm.pvm.job.Job;
@@ -46,19 +47,24 @@
/** latest version of the processDefinition with the given name. */
ClientProcessDefinition findLatestProcessDefinitionByName(String name);
- /** the process definition uniquely identified by the given processDefinitionKey. */
- ClientProcessDefinition findProcessDefinitionByKey(String processDefinitionKey);
+ /** the process definition uniquely identified by the given
+ * processDefinition id. */
+ ClientProcessDefinition findProcessDefinitionById(String processDefinitionId);
/** the execution uniquely identified by the given executionKey. */
- ClientExecution findExecutionByKey(String executionKey);
+ ClientExecution findExecutionById(String executionId);
+ /** the execution uniquely identified by the given processDefinition name
+ * and the execution key. */
+ Execution findExecutionByKey(String processDefinitionName, String executionKey);
+
/** timers */
List<Timer> findTimers();
/** timers */
List<Message> findMessages();
- /** the jobs for which all the retries have failed and which will not be picked up
- * any more by the jobImpl executor */
+ /** the jobs for which all the retries have failed and which will not be
+ * picked up any more by the jobImpl executor */
public List<Job> findDeadJobs();
}
Modified: jbpm4/pvm/trunk/modules/core/src/main/resources/org/jbpm/pvm/hibernate.definition.hbm.xml
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/resources/org/jbpm/pvm/hibernate.definition.hbm.xml 2008-08-28 10:31:07 UTC (rev 2039)
+++ jbpm4/pvm/trunk/modules/core/src/main/resources/org/jbpm/pvm/hibernate.definition.hbm.xml 2008-08-28 14:17:03 UTC (rev 2040)
@@ -60,7 +60,8 @@
</set>
<!-- ProcessDefinitionImpl part ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
- <property name="key" column="KEY_" unique="true" />
+ <property name="key" column="KEY_" />
+ <property name="id" column="ID_" unique="true" />
<property name="packageName" column="PACKAGE_" />
<property name="version" column="VERSION_" />
@@ -408,11 +409,11 @@
]]>
</query>
- <query name="findProcessDefinitionsByKey">
+ <query name="findProcessDefinitionsById">
<![CDATA[
select process
from org.jbpm.pvm.internal.model.ProcessDefinitionImpl as process
- where process.key = :key
+ where process.id = :id
]]>
</query>
Modified: jbpm4/pvm/trunk/modules/core/src/main/resources/org/jbpm/pvm/hibernate.execution.hbm.xml
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/resources/org/jbpm/pvm/hibernate.execution.hbm.xml 2008-08-28 10:31:07 UTC (rev 2039)
+++ jbpm4/pvm/trunk/modules/core/src/main/resources/org/jbpm/pvm/hibernate.execution.hbm.xml 2008-08-28 14:17:03 UTC (rev 2040)
@@ -37,8 +37,10 @@
<one-to-many class="org.jbpm.pvm.internal.job.TimerImpl" />
</set>
+ <property name="name" column="NAME_" />
<property name="key" column="KEY_" />
- <property name="name" column="NAME_" />
+ <property name="id" column="ID_" unique="true" />
+
<property name="state" column="STATE_" />
<property name="priority" column="PRIORITY_" />
@@ -114,11 +116,20 @@
<!-- ### QUERIES ######################################################## -->
+ <query name="findExecutionById">
+ <![CDATA[
+ select execution
+ from org.jbpm.pvm.internal.model.ExecutionImpl as execution
+ where execution.id = :id
+ ]]>
+ </query>
+
<query name="findExecutionByKey">
<![CDATA[
select execution
from org.jbpm.pvm.internal.model.ExecutionImpl as execution
- where execution.key = :key
+ where execution.key = :executionKey
+ and execution.processDefinition.name = :processDefinitionName
]]>
</query>
Modified: jbpm4/pvm/trunk/modules/core/src/main/resources/org/jbpm/pvm/pvm.wire.bindings.xml
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/resources/org/jbpm/pvm/pvm.wire.bindings.xml 2008-08-28 10:31:07 UTC (rev 2039)
+++ jbpm4/pvm/trunk/modules/core/src/main/resources/org/jbpm/pvm/pvm.wire.bindings.xml 2008-08-28 14:17:03 UTC (rev 2040)
@@ -36,6 +36,7 @@
<binding class="org.jbpm.pvm.internal.wire.binding.JobTestHelperBinding" />
<binding class="org.jbpm.pvm.internal.wire.binding.ScriptManagerBinding" />
<binding class="org.jbpm.pvm.internal.wire.binding.BusinessCalendarBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.IdGeneratorBinding" />
<!-- hibernate bindings -->
<binding class="org.jbpm.pvm.internal.wire.binding.HibernateConfigurationBinding" />
<binding class="org.jbpm.pvm.internal.wire.binding.SeamHibernateSessionBinding" />
@@ -60,7 +61,7 @@
<binding class="org.jbpm.pvm.internal.wire.binding.CreateProcessBinding" />
<binding class="org.jbpm.pvm.internal.wire.binding.VerifyVersionBinding" />
<binding class="org.jbpm.pvm.internal.wire.binding.SaveProcessBinding" />
- <binding class="org.jbpm.pvm.internal.wire.binding.CreateKeyBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.CreateIdBinding" />
<!-- ############################ -->
<!-- ### Interceptor bindings ### -->
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/svc/ExecutionServiceTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/svc/ExecutionServiceTest.java 2008-08-28 10:31:07 UTC (rev 2039)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/svc/ExecutionServiceTest.java 2008-08-28 14:17:03 UTC (rev 2040)
@@ -85,15 +85,15 @@
processDefinition.setName("nuclear fusion");
processDefinition.setVersion(1);
Deployment deployment = new Deployment(processDefinition);
- deployment.setProcessDefinitionRef("NCLFU");
+ processDefinition.setKey("NCLFU");
processService.deploy(deployment);
ProcessDefinition deployed = processService.findProcessDefinition("nuclear fusion", 1);
- String processDefinitionKey = deployed.getKey();
+ String processDefinitionId = deployed.getId();
ExecutionService executionService = getEnvironmentFactory().get(ExecutionService.class);
- Execution execution = executionService.startExecution(processDefinitionKey);
+ Execution execution = executionService.startExecution(processDefinitionId);
assertNotNull(execution);
// TODO fix after refactoring
@@ -131,7 +131,7 @@
processService.deploy(new Deployment(processDefinition));
ProcessDefinition deployed = processService.findProcessDefinition("nuclear fusion", 1);
- String processDefinitionKey = deployed.getKey();
+ String processDefinitionId = deployed.getId();
Map<String, Object> variables = new HashMap<String, Object>();
variables.put("a", new Integer(1));
@@ -139,7 +139,7 @@
ExecutionService executionService = getEnvironmentFactory().get(ExecutionService.class);
- Execution execution = executionService.startExecution(processDefinitionKey, variables);
+ Execution execution = executionService.startExecution(processDefinitionId, variables);
long executionDbid = execution.getDbid();
assertEquals(new Integer(1), executionService.getVariable(executionDbid, "a"));
@@ -150,34 +150,34 @@
ProcessService processService = getEnvironmentFactory().get(ProcessService.class);
ProcessDefinitionImpl processDefinition = new ProcessDefinitionImpl();
- processDefinition.setName("nuclear fusion");
+ processDefinition.setName("NuclearFusion");
processDefinition.setVersion(1);
processService.deploy(new Deployment(processDefinition));
ExecutionService executionService = getEnvironmentFactory().get(ExecutionService.class);
- executionService.startExecutionInLatest("nuclear fusion", null, "the first time");
-
- assertNotNull(executionService.findExecution("nuclear fusion", "the first time"));
+ Execution execution = executionService.startExecutionInLatest("NuclearFusion", "TheFirstTime");
+ assertEquals("NuclearFusion:1/TheFirstTime", execution.getId());
+ assertNotNull(executionService.findExecution("NuclearFusion:1/TheFirstTime"));
}
public void testStartExecutionByDbidWithKey() {
ProcessService processService = getEnvironmentFactory().get(ProcessService.class);
ProcessDefinitionImpl processDefinition = new ProcessDefinitionImpl();
- processDefinition.setName("nuclear fusion");
+ processDefinition.setName("NuclearFusion");
processDefinition.setVersion(1);
Deployment deployment = new Deployment(processDefinition);
processService.deploy(deployment);
- ProcessDefinition deployed = processService.findProcessDefinition("nuclear fusion", 1);
- String processDefinitionKey = deployed.getKey();
+ ProcessDefinition deployed = processService.findProcessDefinition("NuclearFusion", 1);
+ String processDefinitionId = deployed.getId();
ExecutionService executionService = getEnvironmentFactory().get(ExecutionService.class);
- executionService.startExecution(processDefinitionKey, null, "the first time");
+ executionService.startExecution(processDefinitionId, null, "the first time");
- assertNotNull(executionService.findExecution("nuclear fusion", "the first time"));
+ assertNotNull(executionService.findExecution("NuclearFusion", "the first time"));
}
public void testFindExecution() {
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTest.java 2008-08-28 10:31:07 UTC (rev 2039)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTest.java 2008-08-28 14:17:03 UTC (rev 2040)
@@ -30,6 +30,10 @@
import java.util.TimerTask;
import org.hibernate.Session;
+import org.jbpm.pvm.Deployment;
+import org.jbpm.pvm.ProcessService;
+import org.jbpm.pvm.activity.ActivityExecution;
+import org.jbpm.pvm.activity.ExternalActivity;
import org.jbpm.pvm.client.ClientProcessDefinition;
import org.jbpm.pvm.client.ClientProcessInstance;
import org.jbpm.pvm.env.Environment;
@@ -40,6 +44,7 @@
import org.jbpm.pvm.internal.model.ProcessDefinitionImpl;
import org.jbpm.pvm.job.Job;
import org.jbpm.pvm.model.Comment;
+import org.jbpm.pvm.model.ProcessFactory;
import org.jbpm.pvm.session.MessageSession;
import org.jbpm.pvm.session.PvmDbSession;
import org.jbpm.pvm.test.base.DbTestCase;
@@ -81,7 +86,7 @@
}
for (int i=0; i<nbrOfTestMessages; i++) {
- assertTrue("message "+i+" is not processed", processedMessageIds.contains(i));
+ assertTrue("message "+i+" is not processed: "+processedMessageIds, processedMessageIds.contains(i));
}
}
@@ -237,27 +242,48 @@
});
}
// helper methods ///////////////////////////////////////////////////////////
+
+ public static class InsertMessageCmd implements Command<Object> {
+ private static final long serialVersionUID = 1L;
+ int i;
+ public InsertMessageCmd(int i) {
+ this.i = i;
+ }
+ public Object execute(Environment environment) throws Exception {
+ MessageSession messageSession = environment.get(MessageSession.class);
+ CommandMessage commandMessage = TestMessageCommand.createMessage(i);
+ messageSession.send(commandMessage);
+ return null;
+ }
+ }
void insertTestMessages() {
- commandService.execute(new Command<Object>() {
- public Object execute(Environment environment) throws Exception {
- MessageSession messageSession = environment.get(MessageSession.class);
- for (int i=0; i<nbrOfTestMessages; i++) {
- CommandMessage commandMessage = TestMessageCommand.createMessage(i);
- messageSession.send(commandMessage);
- }
- return null;
- }
- });
+ for (int i=0; i<nbrOfTestMessages; i++) {
+ commandService.execute(new InsertMessageCmd(i));
+ }
}
+
+ public static class WaitState implements ExternalActivity {
+ private static final long serialVersionUID = 1L;
+ public void execute(ActivityExecution execution) throws Exception {
+ execution.waitForSignal();
+ }
+ public void signal(ActivityExecution execution, String signalName, Map<String, Object> parameters) throws Exception {
+ execution.take(signalName);
+ }
+ }
void insertExclusiveTestMessages() {
commandService.execute(new Command<Object>() {
public Object execute(Environment environment) throws Exception {
+ ClientProcessDefinition processDefinition = ProcessFactory.build("excl")
+ .node("initial").initial().behaviour(WaitState.class)
+ .done();
+ Deployment deployment = new Deployment(processDefinition);
+ ProcessService processService = environment.get(ProcessService.class);
+ processService.deploy(deployment);
+
PvmDbSession pvmDbSession = environment.get(PvmDbSession.class);
- ClientProcessDefinition processDefinition = new ProcessDefinitionImpl();
- pvmDbSession.save(processDefinition);
-
MessageSession messageSession = environment.get(MessageSession.class);
for (int i=0; i<nbrOfTestExecutions; i++) {
ClientProcessInstance execution = processDefinition.beginProcessInstance("execution-"+i);
@@ -274,17 +300,25 @@
Environment environment = getEnvironmentFactory().openEnvironment();
}
+
+ public static class InsertFailOnceTestMsgCmd implements Command<Object> {
+ private static final long serialVersionUID = 1L;
+ int i;
+ public InsertFailOnceTestMsgCmd(int i) {
+ this.i = i;
+ }
+ public Object execute(Environment environment) throws Exception {
+ MessageSession messageSession = environment.get(MessageSession.class);
+ CommandMessage commandMessage = FailOnceTestCommand.createMessage(i);
+ messageSession.send(commandMessage);
+ return null;
+ }
+ }
+
void insertFailOnceTestMessages() {
- commandService.execute(new Command<Object>() {
- public Object execute(Environment environment) throws Exception {
- MessageSession messageSession = environment.get(MessageSession.class);
- for (int i=0; i<nbrOfTestMessages; i++) {
- CommandMessage commandMessage = FailOnceTestCommand.createMessage(i);
- messageSession.send(commandMessage);
- }
- return null;
- }
- });
+ for (int i=0; i<nbrOfTestMessages; i++) {
+ commandService.execute(new InsertFailOnceTestMsgCmd(i));
+ }
}
private void waitTillNoMoreMessages(JobExecutor jobExecutor) {
@@ -328,6 +362,12 @@
}
return false;
}
- });
+
+
+ public void signal(ActivityExecution execution, String signalName, Map<String, Object> parameters) throws Exception {
+ }
+
+ public void execute(ActivityExecution execution) throws Exception {
+ } });
}
}
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex02/BasicProcessPersistenceTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex02/BasicProcessPersistenceTest.java 2008-08-28 10:31:07 UTC (rev 2039)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex02/BasicProcessPersistenceTest.java 2008-08-28 14:17:03 UTC (rev 2040)
@@ -60,15 +60,15 @@
ExecutionService executionService = ExamplesConfiguration.getExecutionService();
- Execution execution = executionService.startExecutionInLatest("basic", "one");
+ Execution execution = executionService.startExecutionInLatest("basic-1/one");
assertEquals("a", execution.getNodeName());
- execution = executionService.signalExecution("basic", "one");
+ execution = executionService.signalExecution("basic-1/one");
assertEquals("b", execution.getNodeName());
- execution = executionService.signalExecution("basic", "one");
+ execution = executionService.signalExecution("basic-1/one");
assertEquals("e", execution.getNodeName());
}
Modified: jbpm4/pvm/trunk/modules/core/src/test/resources/environment.cfg.xml
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/resources/environment.cfg.xml 2008-08-28 10:31:07 UTC (rev 2039)
+++ jbpm4/pvm/trunk/modules/core/src/test/resources/environment.cfg.xml 2008-08-28 14:17:03 UTC (rev 2040)
@@ -7,7 +7,7 @@
<deployer-manager resource="pvm.language.deployers.xml">
<language name="api">
<verify-version />
- <create-key />
+ <create-id />
<save-process />
</language>
</deployer-manager>
@@ -22,8 +22,6 @@
<standard-transaction-interceptor />
</command-service>
- <job-executor threads="1" auto-start="false" />
-
<hibernate-configuration>
<properties resource="hibernate.properties" />
<mappings resource="org/jbpm/pvm/pvm.hibernate.mappings.xml" />
@@ -32,8 +30,12 @@
<hibernate-session-factory />
+ <id-generator />
+
<variable-types resource="org/jbpm/pvm/pvm.types.xml" />
+ <job-executor auto-start="false" />
+
</environment-factory>
<environment>
17 years, 8 months
JBoss JBPM SVN: r2039 - jbpm3/trunk.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-08-28 06:31:07 -0400 (Thu, 28 Aug 2008)
New Revision: 2039
Removed:
jbpm3/trunk/.classpath
Modified:
jbpm3/trunk/.project
Log:
Remove java nature from root
Deleted: jbpm3/trunk/.classpath
===================================================================
--- jbpm3/trunk/.classpath 2008-08-28 10:16:48 UTC (rev 2038)
+++ jbpm3/trunk/.classpath 2008-08-28 10:31:07 UTC (rev 2039)
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="output" path="target/classes"/>
-</classpath>
Modified: jbpm3/trunk/.project
===================================================================
--- jbpm3/trunk/.project 2008-08-28 10:16:48 UTC (rev 2038)
+++ jbpm3/trunk/.project 2008-08-28 10:31:07 UTC (rev 2039)
@@ -5,13 +5,7 @@
<projects>
</projects>
<buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
</buildSpec>
<natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
17 years, 8 months
JBoss JBPM SVN: r2038 - in jbpm3/trunk/hudson: hudson-home/jobs/jBPM-Matrix and 1 other directory.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-08-28 06:16:48 -0400 (Thu, 28 Aug 2008)
New Revision: 2038
Modified:
jbpm3/trunk/hudson/ant.properties.example
jbpm3/trunk/hudson/hudson-home/jobs/jBPM-Matrix/command.sh
jbpm3/trunk/hudson/hudson-home/jobs/jBPM-Matrix/config.xml
Log:
Add jboss-4.2.3 axis
Modified: jbpm3/trunk/hudson/ant.properties.example
===================================================================
--- jbpm3/trunk/hudson/ant.properties.example 2008-08-28 10:10:00 UTC (rev 2037)
+++ jbpm3/trunk/hudson/ant.properties.example 2008-08-28 10:16:48 UTC (rev 2038)
@@ -25,25 +25,21 @@
hudson.admin.port=8150
hudson.http.port=8180
-hudson.jboss421.url=https://svn.jboss.org/repos/jbossas/tags/JBoss_4_2_1_GA
-hudson.jboss421.build=jboss-4.2.1.GA
-hudson.jboss421.rev=HEAD
-
hudson.jboss422.url=https://svn.jboss.org/repos/jbossas/tags/JBoss_4_2_2_GA
hudson.jboss422.build=jboss-4.2.2.GA
hudson.jboss422.rev=HEAD
+hudson.jboss423.url=https://svn.jboss.org/repos/jbossas/tags/JBoss_4_2_3_GA
+hudson.jboss423.build=jboss-4.2.3.GA
+hudson.jboss423.rev=HEAD
+
hudson.jboss500.url=https://svn.jboss.org/repos/jbossas/tags/JBoss_5_0_0_CR1
hudson.jboss500.build=jboss-5.0.0.CR1
hudson.jboss500.rev=HEAD
-hudson.jboss501.url=https://svn.jboss.org/repos/jbossas/trunk
-hudson.jboss501.build=jboss-5.0.0.CR2
-hudson.jboss501.rev=HEAD
-
hudson.mail.recipients=
hudson.smtp.host=localhost
# Hudson (1.251)
apache-tomcat=5.5.20
-sun-hudson=2402/108356
\ No newline at end of file
+sun-hudson=2402/108356
Modified: jbpm3/trunk/hudson/hudson-home/jobs/jBPM-Matrix/command.sh
===================================================================
--- jbpm3/trunk/hudson/hudson-home/jobs/jBPM-Matrix/command.sh 2008-08-28 10:10:00 UTC (rev 2037)
+++ jbpm3/trunk/hudson/hudson-home/jobs/jBPM-Matrix/command.sh 2008-08-28 10:16:48 UTC (rev 2038)
@@ -7,18 +7,18 @@
JBOSS_BINDADDR=(a)jboss.bind.address@
case "$CONTAINER" in
- jboss421*)
- JBOSS_BUILD=(a)hudson.jboss421.build@
- JBOSS_SVN=(a)hudson.jboss421.url@
- JBOSS_REV=(a)hudson.jboss421.rev@
- ;;
-
jboss422*)
JBOSS_BUILD=(a)hudson.jboss422.build@
JBOSS_SVN=(a)hudson.jboss422.url@
JBOSS_REV=(a)hudson.jboss422.rev@
;;
+ jboss423*)
+ JBOSS_BUILD=(a)hudson.jboss423.build@
+ JBOSS_SVN=(a)hudson.jboss423.url@
+ JBOSS_REV=(a)hudson.jboss423.rev@
+ ;;
+
jboss500*)
JBOSS_BUILD=(a)hudson.jboss500.build@
JBOSS_SVN=(a)hudson.jboss500.url@
Modified: jbpm3/trunk/hudson/hudson-home/jobs/jBPM-Matrix/config.xml
===================================================================
--- jbpm3/trunk/hudson/hudson-home/jobs/jBPM-Matrix/config.xml 2008-08-28 10:10:00 UTC (rev 2037)
+++ jbpm3/trunk/hudson/hudson-home/jobs/jBPM-Matrix/config.xml 2008-08-28 10:16:48 UTC (rev 2038)
@@ -30,8 +30,8 @@
<axis>
<name>container</name>
<values>
- <string>jboss421</string>
<string>jboss422</string>
+ <string>jboss423</string>
<string>jboss500</string>
</values>
</axis>
17 years, 8 months
JBoss JBPM SVN: r2037 - in jbpm3/trunk: modules/jpdl/core and 5 other directories.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-08-28 06:10:00 -0400 (Thu, 28 Aug 2008)
New Revision: 2037
Added:
jbpm3/trunk/modules/jpdl/core/src/main/resources/hibernate.extra.hbm.xml
jbpm3/trunk/modules/jpdl/identity/src/main/resources/hibernate.extra.hbm.xml
jbpm3/trunk/modules/jpdl/identity/src/main/resources/identity.gif
Removed:
jbpm3/trunk/modules/jpdl/identity/src/main/resources/hibernate.mapping.xml
jbpm3/trunk/modules/jpdl/identity/src/main/resources/org/
jbpm3/trunk/modules/jpdl/identity/src/main/scripts/
Modified:
jbpm3/trunk/modules/jpdl/core/pom.xml
jbpm3/trunk/modules/jpdl/core/scripts/antrun-jbpm-config.xml
jbpm3/trunk/modules/jpdl/core/scripts/assembly-config.xml
jbpm3/trunk/modules/jpdl/core/src/main/resources/hibernate.mapping.xml
jbpm3/trunk/modules/jpdl/identity/pom.xml
jbpm3/trunk/pom.xml
Log:
Add hibernate.extra.hbm.xml to externalize module specific mappings
Modified: jbpm3/trunk/modules/jpdl/core/pom.xml
===================================================================
--- jbpm3/trunk/modules/jpdl/core/pom.xml 2008-08-28 05:46:43 UTC (rev 2036)
+++ jbpm3/trunk/modules/jpdl/core/pom.xml 2008-08-28 10:10:00 UTC (rev 2037)
@@ -99,16 +99,6 @@
<!-- Plugins -->
<build>
- <resources>
- <resource>
- <targetPath>/</targetPath>
- <filtering>false</filtering>
- <directory>${basedir}/src/main/resources</directory>
- <excludes>
- <exclude>hibernate.*.xml</exclude>
- </excludes>
- </resource>
- </resources>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
@@ -211,93 +201,5 @@
<!-- Profiles -->
<profiles>
-
- <!--
- Name: no-database
- Descr: Setup the default database
- -->
- <profile>
- <id>no-database</id>
- <activation>
- <property>
- <name>!database</name>
- </property>
- </activation>
- <properties>
- <database>hsqldb</database>
- </properties>
- <dependencies>
- <dependency>
- <groupId>hsqldb</groupId>
- <artifactId>hsqldb</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
- </profile>
-
- <!--
- Name: hsqldb
- Descr: Hypersonic Database Setup
- -->
- <profile>
- <id>hsqldb</id>
- <activation>
- <property>
- <name>database</name>
- <value>hsqldb</value>
- </property>
- </activation>
- <dependencies>
- <dependency>
- <groupId>hsqldb</groupId>
- <artifactId>hsqldb</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
- </profile>
-
- <!--
- Name: mysql
- Descr: MySQL Database Setup
- -->
- <profile>
- <id>mysql</id>
- <activation>
- <property>
- <name>database</name>
- <value>mysql</value>
- </property>
- </activation>
- <dependencies>
- <dependency>
- <groupId>mysql</groupId>
- <artifactId>mysql-connector-java</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
- </profile>
-
- <!--
- Name: postgresql
- Descr: MySQL Database Setup
- -->
- <profile>
- <id>postgresql</id>
- <activation>
- <property>
- <name>database</name>
- <value>postgresql</value>
- </property>
- </activation>
- <dependencies>
- <dependency>
- <groupId>postgresql</groupId>
- <artifactId>postgresql</artifactId>
- <classifier>jdbc3</classifier>
- <scope>test</scope>
- </dependency>
- </dependencies>
- </profile>
-
</profiles>
-</project>
\ No newline at end of file
+</project>
Modified: jbpm3/trunk/modules/jpdl/core/scripts/antrun-jbpm-config.xml
===================================================================
--- jbpm3/trunk/modules/jpdl/core/scripts/antrun-jbpm-config.xml 2008-08-28 05:46:43 UTC (rev 2036)
+++ jbpm3/trunk/modules/jpdl/core/scripts/antrun-jbpm-config.xml 2008-08-28 10:10:00 UTC (rev 2037)
@@ -15,9 +15,8 @@
<property name="project.build.directory" value="${basedir}/target"/>
<property name="project.resources.directory" value="${basedir}/src/main/resources"/>
- <!-- Concat hibernate.cfg.xml -->
- <target name="concat">
-
+ <target name="check-database">
+
<property name="hibernate.properties.xml" value="hibernate.properties.${database}.xml"/>
<available property="database.properties.available" file="${project.resources.directory}/${hibernate.properties.xml}"/>
<fail message="${hibernate.properties.xml} not available" unless="database.properties.available"/>
@@ -26,6 +25,11 @@
<echo message="Concat hibernate.cfg.xml using ${hibernate.properties.xml}" />
<echo/>
+ </target>
+
+ <target name="concat" depends="check-database">
+
+ <!-- Concat hibernate.cfg.xml -->
<concat destfile="${project.build.directory}/classes/hibernate.cfg.xml">
<header trimleading="yes"><![CDATA[<?xml version='1.0' encoding='utf-8'?>
Modified: jbpm3/trunk/modules/jpdl/core/scripts/assembly-config.xml
===================================================================
--- jbpm3/trunk/modules/jpdl/core/scripts/assembly-config.xml 2008-08-28 05:46:43 UTC (rev 2036)
+++ jbpm3/trunk/modules/jpdl/core/scripts/assembly-config.xml 2008-08-28 10:10:00 UTC (rev 2037)
@@ -10,14 +10,22 @@
<directory>src/main/resources</directory>
<outputDirectory>/</outputDirectory>
<includes>
- <include>hibernate.properties.xml</include>
- <include>hibernate.mapping.xml</include>
- <include>hibernate.cache.xml</include>
+ <include>hibernate.*</include>
<include>jbpm.cfg.xml</include>
<include>jbpm.mail.templates.xml</include>
</includes>
+ <excludes>
+ <exclude>hibernate.extra.hbm.xml</exclude>
+ </excludes>
</fileSet>
<fileSet>
+ <directory>target/classes</directory>
+ <outputDirectory>/</outputDirectory>
+ <includes>
+ <include>hibernate.cfg.xml</include>
+ </includes>
+ </fileSet>
+ <fileSet>
<directory>src/test/resources</directory>
<outputDirectory>/</outputDirectory>
<includes>
Added: jbpm3/trunk/modules/jpdl/core/src/main/resources/hibernate.extra.hbm.xml
===================================================================
--- jbpm3/trunk/modules/jpdl/core/src/main/resources/hibernate.extra.hbm.xml (rev 0)
+++ jbpm3/trunk/modules/jpdl/core/src/main/resources/hibernate.extra.hbm.xml 2008-08-28 10:10:00 UTC (rev 2037)
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping>
+
+ <!-- ################################################## -->
+ <!-- # Additional mappings defined per module go here # -->
+ <!-- ################################################## -->
+
+</hibernate-mapping>
Property changes on: jbpm3/trunk/modules/jpdl/core/src/main/resources/hibernate.extra.hbm.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbpm3/trunk/modules/jpdl/core/src/main/resources/hibernate.mapping.xml
===================================================================
--- jbpm3/trunk/modules/jpdl/core/src/main/resources/hibernate.mapping.xml 2008-08-28 05:46:43 UTC (rev 2036)
+++ jbpm3/trunk/modules/jpdl/core/src/main/resources/hibernate.mapping.xml 2008-08-28 10:10:00 UTC (rev 2037)
@@ -1,26 +1,27 @@
-<!-- ############################################ -->
+ <!-- ############################################ -->
<!-- # mapping files with external dependencies # -->
<!-- ############################################ -->
+ <!-- Additional mappings defined per module go here -->
+ <mapping resource="hibernate.extra.hbm.xml" />
+
<!-- following mapping files have a dependency on -->
<!-- 'jbpm-identity.jar', mapping files -->
<!-- of the pluggable jbpm identity component. -->
<!-- Uncomment the following 3 lines if you -->
<!-- want to use the jBPM identity mgmgt -->
<!-- component. -->
- <!-- identity mappings (begin) ===
+ <!--
<mapping resource="org/jbpm/identity/User.hbm.xml"/>
<mapping resource="org/jbpm/identity/Group.hbm.xml"/>
<mapping resource="org/jbpm/identity/Membership.hbm.xml"/>
- ==== identity mappings (end) -->
+ -->
- <!-- following mapping files have a dependency on -->
- <!-- the JCR API -->
- <!-- jcr mappings (begin) ===
+ <!-- following mapping files have a dependency on the JCR API -->
+ <!--
<mapping resource="org/jbpm/context/exe/variableinstance/JcrNodeInstance.hbm.xml"/>
- ==== jcr mappings (end) -->
+ -->
-
<!-- ###################### -->
<!-- # jbpm mapping files # -->
<!-- ###################### -->
Modified: jbpm3/trunk/modules/jpdl/identity/pom.xml
===================================================================
--- jbpm3/trunk/modules/jpdl/identity/pom.xml 2008-08-28 05:46:43 UTC (rev 2036)
+++ jbpm3/trunk/modules/jpdl/identity/pom.xml 2008-08-28 10:10:00 UTC (rev 2037)
@@ -10,152 +10,74 @@
<!-- ====================================================================== -->
<!-- $Id$ -->
-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <name>JBoss jBPM - jPDL Identity</name>
+ <groupId>org.jboss.jbpm</groupId>
+ <artifactId>jbpm-jpdl-identity</artifactId>
+ <packaging>jar</packaging>
- <name>JBoss jBPM - jPDL Identity</name>
- <groupId>org.jboss.jbpm</groupId>
- <artifactId>jbpm-jpdl-identity</artifactId>
- <packaging>jar</packaging>
-
<!-- Parent -->
- <parent>
- <groupId>org.jboss.jbpm</groupId>
- <artifactId>jbpm-jpdl</artifactId>
- <version>3.3.0-SNAPSHOT</version>
- </parent>
+ <parent>
+ <groupId>org.jboss.jbpm</groupId>
+ <artifactId>jbpm-jpdl</artifactId>
+ <version>3.3.0-SNAPSHOT</version>
+ </parent>
<!-- Dependencies -->
- <dependencies>
+ <dependencies>
<!-- jBPM Dependencies -->
- <dependency>
- <groupId>org.jboss.jbpm</groupId>
- <artifactId>jbpm-jpdl-core</artifactId>
- <version>${version}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.jbpm</groupId>
- <artifactId>jbpm-jpdl-core</artifactId>
- <classifier>config</classifier>
- <version>${version}</version>
- </dependency>
+ <dependency>
+ <groupId>org.jboss.jbpm</groupId>
+ <artifactId>jbpm-jpdl-core</artifactId>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.jbpm</groupId>
+ <artifactId>jbpm-jpdl-core</artifactId>
+ <classifier>config</classifier>
+ <version>${version}</version>
+ </dependency>
<!-- Provided Dependencies -->
- <dependency>
- <groupId>org.apache.ant</groupId>
- <artifactId>ant</artifactId>
- <scope>provided</scope>
- </dependency>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant</artifactId>
+ <scope>provided</scope>
+ </dependency>
<!-- Test Dependencies -->
- <dependency>
- <groupId>hsqldb</groupId>
- <artifactId>hsqldb</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
<!-- Plugins -->
- <build>
- <resources>
- <resource>
- <targetPath>/</targetPath>
- <filtering>false</filtering>
- <directory>${basedir}/src/main/resources</directory>
- <excludes>
- <exclude>hibernate.mapping.xml</exclude>
- </excludes>
- </resource>
- </resources>
-
- <plugins>
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>single</goal>
- </goals>
- <configuration>
- <finalName>${project.build.finalName}</finalName>
- <appendAssemblyId>true</appendAssemblyId>
- <descriptors>
- <descriptor>src/main/scripts/assembly-config.xml</descriptor>
- </descriptors>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <showDeprecation>false</showDeprecation>
- </configuration>
- </plugin>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <excludes>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <showDeprecation>false</showDeprecation>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <excludes>
<!-- Tests not part of AllTests -->
- <exclude>org/jbpm/identity/IdentityDbTestCase.java</exclude>
- </excludes>
- </configuration>
- </plugin>
-
- <plugin>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>copy-dependencies</id>
- <phase>generate-resources</phase>
- <goals>
- <goal>unpack</goal>
- </goals>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>org.jboss.jbpm</groupId>
- <artifactId>jbpm-jpdl-core</artifactId>
- <version>${version}</version>
- <classifier>config</classifier>
- <type>jar</type>
- <outputDirectory>${project.build.directory}/resources/jbpm-jpdl-core</outputDirectory>
- </artifactItem>
- </artifactItems>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <phase>generate-resources</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <tasks>
- <ant antfile="src/main/scripts/antrun-jbpm-config.xml"/>
- </tasks>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-</project>
+ <exclude>org/jbpm/identity/IdentityDbTestCase.java</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Added: jbpm3/trunk/modules/jpdl/identity/src/main/resources/hibernate.extra.hbm.xml
===================================================================
--- jbpm3/trunk/modules/jpdl/identity/src/main/resources/hibernate.extra.hbm.xml (rev 0)
+++ jbpm3/trunk/modules/jpdl/identity/src/main/resources/hibernate.extra.hbm.xml 2008-08-28 10:10:00 UTC (rev 2037)
@@ -0,0 +1,78 @@
+<?xml version="1.0"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping auto-import="false" default-access="field">
+
+ <class name="org.jbpm.identity.User"
+ table="JBPM_ID_USER"
+ discriminator-value="U">
+ <id name="id" column="ID_"><generator class="native" /></id>
+ <discriminator type="char" column="CLASS_"/>
+ <property name="name" column="NAME_"/>
+ <property name="email" column="EMAIL_"/>
+ <property name="password" column="PASSWORD_"/>
+ <set name="memberships" cascade="all">
+ <key column="USER_" />
+ <one-to-many class="org.jbpm.identity.Membership" />
+ </set>
+ <set name="permissions" cascade="all" table="JBPM_ID_PERMISSIONS">
+ <key column="ENTITY_" foreign-key="none" />
+ <element type="org.jbpm.identity.hibernate.PermissionUserType">
+ <column name="CLASS_"/>
+ <column name="NAME_"/>
+ <column name="ACTION_"/>
+ </element>
+ </set>
+ </class>
+
+ <class name="org.jbpm.identity.Group"
+ table="JBPM_ID_GROUP"
+ discriminator-value="G">
+ <id name="id" column="ID_"><generator class="native" /></id>
+ <discriminator type="char" column="CLASS_"/>
+ <property name="name" column="NAME_"/>
+ <property name="type" column="TYPE_"/>
+ <many-to-one name="parent" column="PARENT_" foreign-key="FK_ID_GRP_PARENT"/>
+ <set name="children" cascade="all">
+ <key column="PARENT_" />
+ <one-to-many class="org.jbpm.identity.Group" />
+ </set>
+ <set name="memberships" cascade="all">
+ <key column="GROUP_" />
+ <one-to-many class="org.jbpm.identity.Membership" />
+ </set>
+ <set name="permissions" cascade="all" table="JBPM_ID_PERMISSIONS" >
+ <key column="ENTITY_" foreign-key="none" />
+ <element type="org.jbpm.identity.hibernate.PermissionUserType">
+ <column name="CLASS_"/>
+ <column name="NAME_"/>
+ <column name="ACTION_"/>
+ </element>
+ </set>
+ </class>
+
+ <class name="org.jbpm.identity.Membership"
+ table="JBPM_ID_MEMBERSHIP"
+ discriminator-value="M">
+ <id name="id" column="ID_"><generator class="native" /></id>
+ <discriminator type="char" column="CLASS_"/>
+ <property name="name" column="NAME_"/>
+ <property name="role" column="ROLE_"/>
+ <many-to-one name="user" column="USER_" cascade="save-update"
+ foreign-key="FK_ID_MEMSHIP_USR"/>
+ <many-to-one name="group" column="GROUP_" cascade="save-update"
+ foreign-key="FK_ID_MEMSHIP_GRP"/>
+ <set name="permissions" cascade="all" table="JBPM_ID_PERMISSIONS">
+ <key column="ENTITY_" foreign-key="none" />
+ <element type="org.jbpm.identity.hibernate.PermissionUserType">
+ <column name="CLASS_"/>
+ <column name="NAME_"/>
+ <column name="ACTION_"/>
+ </element>
+ </set>
+ </class>
+
+</hibernate-mapping>
Property changes on: jbpm3/trunk/modules/jpdl/identity/src/main/resources/hibernate.extra.hbm.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted: jbpm3/trunk/modules/jpdl/identity/src/main/resources/hibernate.mapping.xml
===================================================================
--- jbpm3/trunk/modules/jpdl/identity/src/main/resources/hibernate.mapping.xml 2008-08-28 05:46:43 UTC (rev 2036)
+++ jbpm3/trunk/modules/jpdl/identity/src/main/resources/hibernate.mapping.xml 2008-08-28 10:10:00 UTC (rev 2037)
@@ -1,16 +0,0 @@
-<!--
- ==================================================================================
- START org.jboss.jbpm:jbpm-jpdl-identity src/main/resources/hibernate.cfg.xml
- ==================================================================================
--->
-
- <!-- identity mappings -->
- <mapping resource="org/jbpm/identity/User.hbm.xml"/>
- <mapping resource="org/jbpm/identity/Group.hbm.xml"/>
- <mapping resource="org/jbpm/identity/Membership.hbm.xml"/>
-
-<!--
- ==================================================================================
- END org.jboss.jbpm:jbpm-jpdl-identity src/main/resources/hibernate.cfg.xml
- ==================================================================================
- -->
\ No newline at end of file
Copied: jbpm3/trunk/modules/jpdl/identity/src/main/resources/identity.gif (from rev 2036, jbpm3/trunk/modules/jpdl/identity/src/main/resources/org/jbpm/identity/identity.gif)
===================================================================
(Binary files differ)
Modified: jbpm3/trunk/pom.xml
===================================================================
--- jbpm3/trunk/pom.xml 2008-08-28 05:46:43 UTC (rev 2036)
+++ jbpm3/trunk/pom.xml 2008-08-28 10:10:00 UTC (rev 2037)
@@ -402,6 +402,12 @@
<url>http://repository.jboss.org/maven2</url>
</repository>
</repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>gwt-maven</id>
+ <url>http://gwt-maven.googlecode.com/svn/trunk/mavenrepo</url>
+ </pluginRepository>
+ </pluginRepositories>
<!-- Profiles -->
<profiles>
@@ -444,11 +450,93 @@
</plugins>
</build>
</profile>
+
+ <!--
+ Name: no-database
+ Descr: Setup the default database
+ -->
+ <profile>
+ <id>no-database</id>
+ <activation>
+ <property>
+ <name>!database</name>
+ </property>
+ </activation>
+ <properties>
+ <database>hsqldb</database>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>hsqldb</groupId>
+ <artifactId>hsqldb</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+
+ <!--
+ Name: hsqldb
+ Descr: Hypersonic Database Setup
+ -->
+ <profile>
+ <id>hsqldb</id>
+ <activation>
+ <property>
+ <name>database</name>
+ <value>hsqldb</value>
+ </property>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>hsqldb</groupId>
+ <artifactId>hsqldb</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+
+ <!--
+ Name: mysql
+ Descr: MySQL Database Setup
+ -->
+ <profile>
+ <id>mysql</id>
+ <activation>
+ <property>
+ <name>database</name>
+ <value>mysql</value>
+ </property>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>mysql</groupId>
+ <artifactId>mysql-connector-java</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+
+ <!--
+ Name: postgresql
+ Descr: MySQL Database Setup
+ -->
+ <profile>
+ <id>postgresql</id>
+ <activation>
+ <property>
+ <name>database</name>
+ <value>postgresql</value>
+ </property>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>postgresql</groupId>
+ <artifactId>postgresql</artifactId>
+ <classifier>jdbc3</classifier>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ </profile>
</profiles>
- <pluginRepositories>
- <pluginRepository>
- <id>gwt-maven</id>
- <url>http://gwt-maven.googlecode.com/svn/trunk/mavenrepo</url>
- </pluginRepository>
- </pluginRepositories>
-</project>
\ No newline at end of file
+
+</project>
17 years, 8 months
JBoss JBPM SVN: r2036 - in jbpm3/trunk: modules/jpdl/core and 1 other directory.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-08-28 01:46:43 -0400 (Thu, 28 Aug 2008)
New Revision: 2036
Modified:
jbpm3/trunk/modules/jpdl/core/pom.xml
jbpm3/trunk/pom.xml
Log:
Add PostgreSQL Axis
Modified: jbpm3/trunk/modules/jpdl/core/pom.xml
===================================================================
--- jbpm3/trunk/modules/jpdl/core/pom.xml 2008-08-28 05:30:06 UTC (rev 2035)
+++ jbpm3/trunk/modules/jpdl/core/pom.xml 2008-08-28 05:46:43 UTC (rev 2036)
@@ -294,7 +294,6 @@
<groupId>postgresql</groupId>
<artifactId>postgresql</artifactId>
<classifier>jdbc3</classifier>
- <version>7.4</version>
<scope>test</scope>
</dependency>
</dependencies>
Modified: jbpm3/trunk/pom.xml
===================================================================
--- jbpm3/trunk/pom.xml 2008-08-28 05:30:06 UTC (rev 2035)
+++ jbpm3/trunk/pom.xml 2008-08-28 05:46:43 UTC (rev 2036)
@@ -76,6 +76,7 @@
<!-- Database Driver Versions -->
<hsqldb.version>1.8.0.7</hsqldb.version>
<mysql.connector.version>5.1.6</mysql.connector.version>
+ <postgresql.version>7.4</postgresql.version>
</properties>
<!-- DependencyManagement -->
@@ -151,17 +152,17 @@
<artifactId>dumbster</artifactId>
<version>${dumbster.version}</version>
</dependency>
- <dependency>
- <groupId>com.google.gwt</groupId>
- <artifactId>gwt-servlet</artifactId>
- <version>${gwt.version}</version>
- </dependency>
- <dependency>
- <groupId>com.google.gwt</groupId>
- <artifactId>gwt-user</artifactId>
- <version>${gwt.version}</version>
- </dependency>
<dependency>
+ <groupId>com.google.gwt</groupId>
+ <artifactId>gwt-servlet</artifactId>
+ <version>${gwt.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.google.gwt</groupId>
+ <artifactId>gwt-user</artifactId>
+ <version>${gwt.version}</version>
+ </dependency>
+ <dependency>
<groupId>jasperreports</groupId>
<artifactId>jasperreports</artifactId>
<version>${jasper.reports.version}</version>
@@ -362,6 +363,12 @@
<artifactId>mysql-connector-java</artifactId>
<version>${mysql.connector.version}</version>
</dependency>
+ <dependency>
+ <groupId>postgresql</groupId>
+ <artifactId>postgresql</artifactId>
+ <classifier>jdbc3</classifier>
+ <version>${postgresql.version}</version>
+ </dependency>
</dependencies>
</dependencyManagement>
@@ -438,11 +445,10 @@
</build>
</profile>
</profiles>
-
- <pluginRepositories>
+ <pluginRepositories>
<pluginRepository>
<id>gwt-maven</id>
<url>http://gwt-maven.googlecode.com/svn/trunk/mavenrepo</url>
</pluginRepository>
</pluginRepositories>
-</project>
+</project>
\ No newline at end of file
17 years, 8 months
JBoss JBPM SVN: r2035 - in jbpm3/trunk: modules/jpdl/core and 1 other directories.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-08-28 01:30:06 -0400 (Thu, 28 Aug 2008)
New Revision: 2035
Added:
jbpm3/trunk/modules/jpdl/core/src/main/resources/hibernate.properties.postgresql.xml
Modified:
jbpm3/trunk/hudson/hudson-home/jobs/jBPM-Matrix/command.sh
jbpm3/trunk/hudson/hudson-home/jobs/jBPM-Matrix/config.xml
jbpm3/trunk/modules/jpdl/core/pom.xml
Log:
Add PostgreSQL Axis
Modified: jbpm3/trunk/hudson/hudson-home/jobs/jBPM-Matrix/command.sh
===================================================================
--- jbpm3/trunk/hudson/hudson-home/jobs/jBPM-Matrix/command.sh 2008-08-28 04:34:55 UTC (rev 2034)
+++ jbpm3/trunk/hudson/hudson-home/jobs/jBPM-Matrix/command.sh 2008-08-28 05:30:06 UTC (rev 2035)
@@ -18,6 +18,12 @@
JBOSS_SVN=(a)hudson.jboss422.url@
JBOSS_REV=(a)hudson.jboss422.rev@
;;
+
+ jboss500*)
+ JBOSS_BUILD=(a)hudson.jboss500.build@
+ JBOSS_SVN=(a)hudson.jboss500.url@
+ JBOSS_REV=(a)hudson.jboss500.rev@
+ ;;
esac
JBOSS_INSTANCE=$JBOSSDIR/build/output/$JBOSS_BUILD
Modified: jbpm3/trunk/hudson/hudson-home/jobs/jBPM-Matrix/config.xml
===================================================================
--- jbpm3/trunk/hudson/hudson-home/jobs/jBPM-Matrix/config.xml 2008-08-28 04:34:55 UTC (rev 2034)
+++ jbpm3/trunk/hudson/hudson-home/jobs/jBPM-Matrix/config.xml 2008-08-28 05:30:06 UTC (rev 2035)
@@ -32,6 +32,7 @@
<values>
<string>jboss421</string>
<string>jboss422</string>
+ <string>jboss500</string>
</values>
</axis>
<axis>
@@ -39,6 +40,7 @@
<values>
<string>hsqldb</string>
<string>mysql</string>
+ <string>postgresql</string>
</values>
</axis>
<axis>
Modified: jbpm3/trunk/modules/jpdl/core/pom.xml
===================================================================
--- jbpm3/trunk/modules/jpdl/core/pom.xml 2008-08-28 04:34:55 UTC (rev 2034)
+++ jbpm3/trunk/modules/jpdl/core/pom.xml 2008-08-28 05:30:06 UTC (rev 2035)
@@ -277,5 +277,28 @@
</dependencies>
</profile>
+ <!--
+ Name: postgresql
+ Descr: MySQL Database Setup
+ -->
+ <profile>
+ <id>postgresql</id>
+ <activation>
+ <property>
+ <name>database</name>
+ <value>postgresql</value>
+ </property>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>postgresql</groupId>
+ <artifactId>postgresql</artifactId>
+ <classifier>jdbc3</classifier>
+ <version>7.4</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+
</profiles>
</project>
\ No newline at end of file
Added: jbpm3/trunk/modules/jpdl/core/src/main/resources/hibernate.properties.postgresql.xml
===================================================================
--- jbpm3/trunk/modules/jpdl/core/src/main/resources/hibernate.properties.postgresql.xml (rev 0)
+++ jbpm3/trunk/modules/jpdl/core/src/main/resources/hibernate.properties.postgresql.xml 2008-08-28 05:30:06 UTC (rev 2035)
@@ -0,0 +1,13 @@
+
+ <!-- hibernate dialect -->
+ <property name="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</property>
+
+ <!-- JDBC connection properties (begin) -->
+ <property name="hibernate.connection.driver_class">org.postgresql.Driver</property>
+ <property name="hibernate.connection.url">jdbc:postgresql://localhost:5432/jbpmtest</property>
+ <property name="hibernate.connection.username">jbpmtest</property>
+ <property name="hibernate.connection.password"></property>
+
+ <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
+
+ <property name="hibernate.hbm2ddl.auto">create</property>
Property changes on: jbpm3/trunk/modules/jpdl/core/src/main/resources/hibernate.properties.postgresql.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
17 years, 8 months
JBoss JBPM SVN: r2034 - jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/persistence/jta.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2008-08-28 00:34:55 -0400 (Thu, 28 Aug 2008)
New Revision: 2034
Modified:
jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/persistence/jta/JtaDbPersistenceService.java
jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/persistence/jta/JtaDbPersistenceServiceFactory.java
Log:
[JBPM-1694] moved UserTransaction lookup to persistence service factory
Modified: jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/persistence/jta/JtaDbPersistenceService.java
===================================================================
--- jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/persistence/jta/JtaDbPersistenceService.java 2008-08-27 14:43:43 UTC (rev 2033)
+++ jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/persistence/jta/JtaDbPersistenceService.java 2008-08-28 04:34:55 UTC (rev 2034)
@@ -21,8 +21,6 @@
*/
package org.jbpm.persistence.jta;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
import javax.transaction.SystemException;
import javax.transaction.UserTransaction;
@@ -51,7 +49,7 @@
}
protected boolean isTransactionActive() {
- return isJtaTxCreated();
+ return isJtaTxCreated();
}
public void close() {
@@ -69,8 +67,8 @@
void beginJtaTransaction() {
try {
- log.debug("start user JTA transaction");
- userTransaction = getUserTransaction();
+ log.debug("start user JTA transaction");
+ userTransaction = ((JtaDbPersistenceServiceFactory) persistenceServiceFactory).getUserTransaction();
userTransaction.begin();
} catch (Exception e) {
throw new JbpmException("couldn't start JTA transaction", e);
@@ -95,27 +93,6 @@
}
}
- UserTransaction getUserTransaction() {
- String jndiName = persistenceServiceFactory.getConfiguration().getProperty("jta.UserTransaction");
- if (jndiName == null) {
- /*
- * EJB 2.1 section 20.9 The container must make the UserTransaction interface available to the
- * enterprise beans that are allowed to use this interface (only session and message-
- * driven beans with bean-managed transaction demarcation are allowed to use this
- * interface) in JNDI under the name java:comp/UserTransaction.
- * J2EE 1.4 section 4.2.1.1 The J2EE platform must provide an object implementing the
- * UserTransaction interface to all web components. The platform must publish the
- * UserTransaction object in JNDI under the name java:comp/UserTransaction.
- */
- jndiName = "java:comp/UserTransaction";
- }
- try {
- return (UserTransaction) new InitialContext().lookup(jndiName);
- } catch (NamingException e) {
- throw new JbpmException("couldn't lookup UserTransaction in JNDI with name "+jndiName, e);
- }
- }
-
int getJtaTransactionStatus() {
try {
return userTransaction.getStatus();
Modified: jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/persistence/jta/JtaDbPersistenceServiceFactory.java
===================================================================
--- jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/persistence/jta/JtaDbPersistenceServiceFactory.java 2008-08-27 14:43:43 UTC (rev 2033)
+++ jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/persistence/jta/JtaDbPersistenceServiceFactory.java 2008-08-28 04:34:55 UTC (rev 2034)
@@ -21,6 +21,11 @@
*/
package org.jbpm.persistence.jta;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.transaction.UserTransaction;
+
+import org.jbpm.JbpmException;
import org.jbpm.persistence.db.DbPersistenceServiceFactory;
import org.jbpm.svc.Service;
@@ -47,6 +52,8 @@
private static final long serialVersionUID = 1L;
+ private UserTransaction userTransaction;
+
public JtaDbPersistenceServiceFactory() {
setCurrentSessionEnabled(true);
setTransactionEnabled(false);
@@ -55,4 +62,28 @@
public Service openService() {
return new JtaDbPersistenceService(this);
}
+
+ public UserTransaction getUserTransaction() {
+ if (userTransaction == null) {
+ String jndiName = getConfiguration().getProperty("jta.UserTransaction");
+ if (jndiName == null) {
+ /*
+ * EJB 2.1 section 20.9 The container must make the UserTransaction interface available to the
+ * enterprise beans that are allowed to use this interface (only session and message-
+ * driven beans with bean-managed transaction demarcation are allowed to use this
+ * interface) in JNDI under the name java:comp/UserTransaction.
+ * J2EE 1.4 section 4.2.1.1 The J2EE platform must provide an object implementing the
+ * UserTransaction interface to all web components. The platform must publish the
+ * UserTransaction object in JNDI under the name java:comp/UserTransaction.
+ */
+ jndiName = "java:comp/UserTransaction";
+ }
+ try {
+ userTransaction = (UserTransaction) new InitialContext().lookup(jndiName);
+ } catch (NamingException e) {
+ throw new JbpmException("could not retrieve user transaction with name "+jndiName, e);
+ }
+ }
+ return userTransaction;
+ }
}
17 years, 8 months