[jbpm-commits] JBoss JBPM SVN: r3314 - in jbpm4/trunk: modules and 32 other directories.
do-not-reply at jboss.org
do-not-reply at jboss.org
Wed Dec 10 07:36:47 EST 2008
Author: tom.baeyens at jboss.com
Date: 2008-12-10 07:36:46 -0500 (Wed, 10 Dec 2008)
New Revision: 3314
Added:
jbpm4/trunk/modules/examples/
jbpm4/trunk/modules/examples/.classpath
jbpm4/trunk/modules/examples/.project
jbpm4/trunk/modules/examples/pom.xml
jbpm4/trunk/modules/examples/src/
jbpm4/trunk/modules/examples/src/eclipse/
jbpm4/trunk/modules/examples/src/eclipse/.classpath
jbpm4/trunk/modules/examples/src/eclipse/.project
jbpm4/trunk/modules/examples/src/test/
jbpm4/trunk/modules/examples/src/test/java/
jbpm4/trunk/modules/examples/src/test/java/org/
jbpm4/trunk/modules/examples/src/test/java/org/jbpm/
jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/
jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/states/
jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/states/StatesTest.java
jbpm4/trunk/modules/examples/src/test/resources/
jbpm4/trunk/modules/examples/src/test/resources/hibernate.properties
jbpm4/trunk/modules/examples/src/test/resources/jbpm.cfg.xml
jbpm4/trunk/modules/examples/src/test/resources/logging.properties
jbpm4/trunk/modules/examples/src/test/resources/org/
jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/
jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/
jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/states/
jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/states/states.jpdl.xml
jbpm4/trunk/modules/examples/target/
jbpm4/trunk/modules/examples/target/jbpm-examples-4.0.0-SNAPSHOT-sources.jar
jbpm4/trunk/modules/examples/target/jbpm-examples-4.0.0-SNAPSHOT.jar
jbpm4/trunk/modules/examples/target/maven-archiver/
jbpm4/trunk/modules/examples/target/maven-archiver/pom.properties
jbpm4/trunk/modules/examples/target/test-classes/
jbpm4/trunk/modules/examples/target/test-classes/hibernate.properties
jbpm4/trunk/modules/examples/target/test-classes/jbpm.cfg.xml
jbpm4/trunk/modules/examples/target/test-classes/logging.properties
jbpm4/trunk/modules/examples/target/test-classes/org/
jbpm4/trunk/modules/examples/target/test-classes/org/jbpm/
jbpm4/trunk/modules/examples/target/test-classes/org/jbpm/examples/
jbpm4/trunk/modules/examples/target/test-classes/org/jbpm/examples/states/
jbpm4/trunk/modules/examples/target/test-classes/org/jbpm/examples/states/StatesTest.class
jbpm4/trunk/modules/examples/target/test-classes/org/jbpm/examples/states/states.jpdl.xml
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExpressionCondition.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/ExpressionConditionDescriptor.java
Removed:
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/ExpressionDescriptor.java
jbpm4/trunk/modules/test-db/src/test/resources/log4j.xml
Modified:
jbpm4/trunk/build.xml
jbpm4/trunk/modules/distro/assembly-distro-package.xml
jbpm4/trunk/modules/distro/pom.xml
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/ExclusiveConditionActivity.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/xml/ExclusiveBinding.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/script/ScriptManager.java
jbpm4/trunk/modules/pvm/src/main/resources/jbpm.pvm.wire.hbm.xml
jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/DbTestCase.java
jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activities/ExclusiveTest.java
jbpm4/trunk/modules/userguide/.settings/attachedFile.properties
jbpm4/trunk/pom.xml
Log:
introduced exclusive conditions and examples module
Modified: jbpm4/trunk/build.xml
===================================================================
--- jbpm4/trunk/build.xml 2008-12-10 11:31:39 UTC (rev 3313)
+++ jbpm4/trunk/build.xml 2008-12-10 12:36:46 UTC (rev 3314)
@@ -19,6 +19,7 @@
<property name="linux.browser" value="mozilla" />
<property name="distro.installation.dir" value="c:/software" />
<property name="distro.version" value="4.0.0-SNAPSHOT" />
+ <property name="distro.eclipse" value="c:/downloads/eclipse/eclipse-SDK-3.4.1-win32.zip" />
<target name="clean">
<exec executable="cmd">
@@ -59,12 +60,16 @@
</antcall>
</target>
- <target name="distro.install" depends="distro.package">
+ <target name="distro.install" >
<delete dir="${distro.installation.dir}/jbpm-${distro.version}" />
<unzip dest="${distro.installation.dir}" src="modules/distro/target/jbpm-${distro.version}.zip"/>
+ <unzip dest="${distro.installation.dir}/jbpm-${distro.version}" src="${distro.eclipse}"/>
<exec executable="cmd" os="Windows Vista, Windows XP,Windows 2000,Windows 98">
- <arg value="/C start "${windows.browser}" "file://${distro.installation.dir}/jbpm-${distro.version}"" />
+ <arg line="/C start "${distro.installation.dir}/jbpm-${distro.version}/eclipse/eclipse.exe" "-data" "${distro.installation.dir}/jbpm-${distro.version}/workspace"" />
</exec>
+ <exec executable="cmd" os="Windows Vista, Windows XP,Windows 2000,Windows 98">
+ <arg line="/C start "${windows.browser}" "file://${distro.installation.dir}/jbpm-${distro.version}"" />
+ </exec>
</target>
<target name="schemadocs">
Modified: jbpm4/trunk/modules/distro/assembly-distro-package.xml
===================================================================
--- jbpm4/trunk/modules/distro/assembly-distro-package.xml 2008-12-10 11:31:39 UTC (rev 3313)
+++ jbpm4/trunk/modules/distro/assembly-distro-package.xml 2008-12-10 12:36:46 UTC (rev 3314)
@@ -22,6 +22,15 @@
<exclude>jbpm-*</exclude>
</excludes>
</dependencySet>
+ <!--
+ <dependencySet>
+ <includes>
+ <include>org.jbpm.jbpm4:jbpm-workspace:zip</include>
+ </includes>
+ <outputDirectory>workspace</outputDirectory>
+ <unpack>true</unpack>
+ </dependencySet>
+ -->
</dependencySets>
<fileSets>
@@ -106,13 +115,16 @@
<outputDirectory>src</outputDirectory>
</fileSet>
<fileSet>
- <directory>../test-db/src/test/resources</directory>
- <includes>
- <include>jbpm.cfg.xml</include>
- <include>logging.properties</include>
- <include>hibernate.properties</include>
- </includes>
- <outputDirectory>config</outputDirectory>
+ <directory>../examples/src/test/java</directory>
+ <outputDirectory>examples/src</outputDirectory>
</fileSet>
+ <fileSet>
+ <directory>../examples/src/test/resources</directory>
+ <outputDirectory>examples/src</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>../examples/src/eclipse</directory>
+ <outputDirectory>examples</outputDirectory>
+ </fileSet>
</fileSets>
</assembly>
\ No newline at end of file
Modified: jbpm4/trunk/modules/distro/pom.xml
===================================================================
--- jbpm4/trunk/modules/distro/pom.xml 2008-12-10 11:31:39 UTC (rev 3313)
+++ jbpm4/trunk/modules/distro/pom.xml 2008-12-10 12:36:46 UTC (rev 3314)
@@ -71,6 +71,14 @@
<artifactId>jbpm-test-db</artifactId>
<version>${version}</version>
</dependency>
+ <!--
+ <dependency>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-workspace</artifactId>
+ <version>1.0</version>
+ <type>zip</type>
+ </dependency>
+ -->
</dependencies>
<!-- Plugins -->
Added: jbpm4/trunk/modules/examples/.classpath
===================================================================
--- jbpm4/trunk/modules/examples/.classpath (rev 0)
+++ jbpm4/trunk/modules/examples/.classpath 2008-12-10 12:36:46 UTC (rev 3314)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/resources"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+ <classpathentry kind="output" path="target/test-classes"/>
+</classpath>
Added: jbpm4/trunk/modules/examples/.project
===================================================================
--- jbpm4/trunk/modules/examples/.project (rev 0)
+++ jbpm4/trunk/modules/examples/.project 2008-12-10 12:36:46 UTC (rev 3314)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>examples</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ </natures>
+</projectDescription>
Added: jbpm4/trunk/modules/examples/pom.xml
===================================================================
--- jbpm4/trunk/modules/examples/pom.xml (rev 0)
+++ jbpm4/trunk/modules/examples/pom.xml 2008-12-10 12:36:46 UTC (rev 3314)
@@ -0,0 +1,63 @@
+<?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 xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <name>jBPM 4 - Examples</name>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-examples</artifactId>
+ <packaging>jar</packaging>
+
+ <!-- Parent -->
+ <parent>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+
+ <!-- Dependencies -->
+ <dependencies>
+ <dependency>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-api</artifactId>
+ <version>${version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-test-base</artifactId>
+ <version>${version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-jpdl</artifactId>
+ <version>${version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-pvm</artifactId>
+ <version>${version}</version>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+
+ <!-- Plugins -->
+ <build>
+ <plugins>
+ </plugins>
+ </build>
+
+</project>
\ No newline at end of file
Property changes on: jbpm4/trunk/modules/examples/pom.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm4/trunk/modules/examples/src/eclipse/.classpath
===================================================================
--- jbpm4/trunk/modules/examples/src/eclipse/.classpath (rev 0)
+++ jbpm4/trunk/modules/examples/src/eclipse/.classpath 2008-12-10 12:36:46 UTC (rev 3314)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="var" path="JBPM_HOME/lib/antlr-2.7.6.jar"/>
+ <classpathentry kind="var" path="JBPM_HOME/lib/asm-1.5.3.jar"/>
+ <classpathentry kind="var" path="JBPM_HOME/lib/asm-attrs-1.5.3.jar"/>
+ <classpathentry kind="var" path="JBPM_HOME/lib/cglib-2.1_3.jar"/>
+ <classpathentry kind="var" path="JBPM_HOME/lib/commons-collections-2.1.1.jar"/>
+ <classpathentry kind="var" path="JBPM_HOME/lib/commons-logging-1.0.4.jar"/>
+ <classpathentry kind="var" path="JBPM_HOME/lib/dom4j-1.6.1.jar"/>
+ <classpathentry kind="var" path="JBPM_HOME/lib/ehcache-1.2.3.jar"/>
+ <classpathentry kind="var" path="JBPM_HOME/lib/hibernate-3.2.6.ga.jar"/>
+ <classpathentry kind="var" path="JBPM_HOME/lib/hsqldb-1.8.0.7.jar"/>
+ <classpathentry kind="var" path="JBPM_HOME/lib/jboss-j2ee-4.2.1.GA.jar"/>
+ <classpathentry kind="var" path="JBPM_HOME/lib/jta-1.0.1B.jar"/>
+ <classpathentry kind="var" path="JBPM_HOME/lib/juel-2.1.0.jar"/>
+ <classpathentry kind="var" path="JBPM_HOME/lib/juel-engine-2.1.0.jar"/>
+ <classpathentry kind="var" path="JBPM_HOME/lib/juel-impl-2.1.0.jar"/>
+ <classpathentry kind="var" path="JBPM_HOME/lib/junit-3.8.1.jar"/>
+ <classpathentry kind="var" path="JBPM_HOME/lib/livetribe-jsr223-2.0.3.jar"/>
+ <classpathentry kind="var" path="JBPM_HOME/lib/log4j-1.2.14.jar"/>
+ <classpathentry kind="var" path="JBPM_HOME/lib/servlet-api-2.5.jar"/>
+ <classpathentry kind="var" path="JBPM_HOME/lib/spring-2.5.4.jar"/>
+ <classpathentry kind="var" path="JBPM_HOME/jbpm.jar"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Added: jbpm4/trunk/modules/examples/src/eclipse/.project
===================================================================
--- jbpm4/trunk/modules/examples/src/eclipse/.project (rev 0)
+++ jbpm4/trunk/modules/examples/src/eclipse/.project 2008-12-10 12:36:46 UTC (rev 3314)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>examples</name>
+ <comment></comment>
+ <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>
Added: jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/states/StatesTest.java
===================================================================
--- jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/states/StatesTest.java (rev 0)
+++ jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/states/StatesTest.java 2008-12-10 12:36:46 UTC (rev 3314)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.examples.states;
+
+import org.jbpm.Execution;
+import org.jbpm.test.DbTestCase;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class StatesTest extends DbTestCase {
+
+ public void testWaitStatesSequence() {
+ deployJpdlResource("org/jbpm/examples/states/states.jpdl.xml");
+
+ Execution execution = executionService.startExecutionByKey("states");
+ assertEquals("a", execution.getNodeName());
+
+ String executionId = execution.getId();
+ execution = executionService.signalExecutionById(executionId);
+ assertEquals("b", execution.getNodeName());
+
+ execution = executionService.signalExecutionById(executionId);
+ assertEquals("c", execution.getNodeName());
+ }
+
+}
Property changes on: jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/states/StatesTest.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm4/trunk/modules/examples/src/test/resources/hibernate.properties
===================================================================
--- jbpm4/trunk/modules/examples/src/test/resources/hibernate.properties (rev 0)
+++ jbpm4/trunk/modules/examples/src/test/resources/hibernate.properties 2008-12-10 12:36:46 UTC (rev 3314)
@@ -0,0 +1,11 @@
+hibernate.dialect org.hibernate.dialect.HSQLDialect
+hibernate.connection.driver_class org.hsqldb.jdbcDriver
+hibernate.connection.url jdbc:hsqldb:mem:.
+hibernate.connection.username sa
+hibernate.connection.password
+hibernate.hbm2ddl.auto create-drop
+hibernate.cache.use_second_level_cache true
+hibernate.cache.provider_class org.hibernate.cache.HashtableCacheProvider
+# hibernate.show_sql true
+# hibernate.format_sql true
+# hibernate.use_sql_comments true
Added: jbpm4/trunk/modules/examples/src/test/resources/jbpm.cfg.xml
===================================================================
--- jbpm4/trunk/modules/examples/src/test/resources/jbpm.cfg.xml (rev 0)
+++ jbpm4/trunk/modules/examples/src/test/resources/jbpm.cfg.xml 2008-12-10 12:36:46 UTC (rev 3314)
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jbpm-configuration xmlns="http://jbpm.org/xsd/cfg">
+
+ <process-engine>
+
+ <deployer-manager>
+ <assign-file-type>
+ <file extension=".jpdl.xml" type="jpdl" />
+ </assign-file-type>
+ <parse-jpdl />
+ <check-process />
+ <check-problems />
+ <save />
+ </deployer-manager>
+
+ <process-service />
+ <execution-service />
+ <management-service />
+
+ <command-service>
+ <retry-interceptor />
+ <environment-interceptor />
+ <standard-transaction-interceptor />
+ </command-service>
+
+ <hibernate-configuration>
+ <properties resource="hibernate.properties" />
+ <mapping resource="jbpm.pvm.typedefs.hbm.xml" />
+ <mapping resource="jbpm.pvm.wire.hbm.xml" />
+ <mapping resource="jbpm.pvm.definition.hbm.xml" />
+ <mapping resource="jbpm.pvm.execution.hbm.xml" />
+ <mapping resource="jbpm.pvm.variable.hbm.xml" />
+ <mapping resource="jbpm.pvm.job.hbm.xml" />
+ <mapping resource="jbpm.jpdl.hbm.xml" />
+ <cache-configuration resource="jbpm.pvm.cache.xml"
+ usage="nonstrict-read-write" />
+ </hibernate-configuration>
+
+ <hibernate-session-factory />
+
+ <script-manager default-expression-language="juel"
+ default-script-language="juel"
+ read-contexts="execution, environment, process-engine"
+ write-context="">
+ <script-language name="juel" factory="com.sun.script.juel.JuelScriptEngineFactory" />
+ </script-manager>
+
+ <job-executor auto-start="false" />
+ <job-test-helper />
+
+ <id-generator />
+ <variable-types resource="jbpm.pvm.types.xml" />
+
+ <business-calendar>
+ <monday hours="9:00-12:00 and 12:30-17:00"/>
+ <tuesday hours="9:00-12:00 and 12:30-17:00"/>
+ <wednesday hours="9:00-12:00 and 12:30-17:00"/>
+ <thursday hours="9:00-12:00 and 12:30-17:00"/>
+ <friday hours="9:00-12:00 and 12:30-17:00"/>
+ <holiday period="01/07/2008 - 31/08/2008"/>
+ </business-calendar>
+
+ </process-engine>
+
+ <environment>
+ <hibernate-session />
+ <transaction />
+ <pvm-db-session />
+ <job-db-session />
+ <message-session />
+ <timer-session />
+ </environment>
+
+</jbpm-configuration>
Property changes on: jbpm4/trunk/modules/examples/src/test/resources/jbpm.cfg.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm4/trunk/modules/examples/src/test/resources/logging.properties
===================================================================
--- jbpm4/trunk/modules/examples/src/test/resources/logging.properties (rev 0)
+++ jbpm4/trunk/modules/examples/src/test/resources/logging.properties 2008-12-10 12:36:46 UTC (rev 3314)
@@ -0,0 +1,28 @@
+handlers= java.util.logging.ConsoleHandler
+# to add the error triggered file handler
+# handlers= java.util.logging.ConsoleHandler org.jbpm.util.ErrorTriggeredFileHandler
+
+redirect.commons.logging = enabled
+
+java.util.logging.ConsoleHandler.level = FINEST
+java.util.logging.ConsoleHandler.formatter = org.jbpm.log.LogFormatter
+
+# org.jbpm.util.ErrorTriggeredFileHandler.size = 500
+# org.jbpm.util.ErrorTriggeredFileHandler.push = OFF
+# org.jbpm.util.ErrorTriggeredFileHandler.pattern = %h/jbpm%u.log
+
+# For example, set the com.xyz.foo logger to only log SEVERE messages:
+# com.xyz.foo.level = SEVERE
+
+org.jbpm.level=FINEST
+org.jbpm.pvm.internal.tx.level=FINE
+org.jbpm.pvm.internal.wire.level=FINE
+org.jbpm.pvm.internal.util.level=FINE
+
+org.hibernate.level=INFO
+org.hibernate.cfg.HbmBinder.level=SEVERE
+org.hibernate.cfg.SettingsFactory.level=SEVERE
+org.hibernate.SQL.level=FINEST
+# org.hibernate.type.level=FINEST
+# org.hibernate.tool.hbm2ddl.SchemaExport.level=FINEST
+# org.hibernate.transaction.level=FINEST
Added: jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/states/states.jpdl.xml
===================================================================
--- jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/states/states.jpdl.xml (rev 0)
+++ jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/states/states.jpdl.xml 2008-12-10 12:36:46 UTC (rev 3314)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<process name="states" xmlns="http://jbpm.org/4/jpdl">
+
+ <start>
+ <flow to="a" />
+ </start>
+
+ <state name="a">
+ <flow to="b" />
+ </state>
+
+ <state name="b">
+ <flow to="c" />
+ </state>
+
+ <state name="c" />
+
+</process>
Property changes on: jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/states/states.jpdl.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm4/trunk/modules/examples/target/jbpm-examples-4.0.0-SNAPSHOT-sources.jar
===================================================================
(Binary files differ)
Property changes on: jbpm4/trunk/modules/examples/target/jbpm-examples-4.0.0-SNAPSHOT-sources.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: jbpm4/trunk/modules/examples/target/jbpm-examples-4.0.0-SNAPSHOT.jar
===================================================================
(Binary files differ)
Property changes on: jbpm4/trunk/modules/examples/target/jbpm-examples-4.0.0-SNAPSHOT.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: jbpm4/trunk/modules/examples/target/maven-archiver/pom.properties
===================================================================
--- jbpm4/trunk/modules/examples/target/maven-archiver/pom.properties (rev 0)
+++ jbpm4/trunk/modules/examples/target/maven-archiver/pom.properties 2008-12-10 12:36:46 UTC (rev 3314)
@@ -0,0 +1,5 @@
+#Generated by Maven
+#Wed Dec 10 13:19:07 CET 2008
+version=4.0.0-SNAPSHOT
+groupId=org.jbpm.jbpm4
+artifactId=jbpm-examples
Added: jbpm4/trunk/modules/examples/target/test-classes/hibernate.properties
===================================================================
--- jbpm4/trunk/modules/examples/target/test-classes/hibernate.properties (rev 0)
+++ jbpm4/trunk/modules/examples/target/test-classes/hibernate.properties 2008-12-10 12:36:46 UTC (rev 3314)
@@ -0,0 +1,11 @@
+hibernate.dialect org.hibernate.dialect.HSQLDialect
+hibernate.connection.driver_class org.hsqldb.jdbcDriver
+hibernate.connection.url jdbc:hsqldb:mem:.
+hibernate.connection.username sa
+hibernate.connection.password
+hibernate.hbm2ddl.auto create-drop
+hibernate.cache.use_second_level_cache true
+hibernate.cache.provider_class org.hibernate.cache.HashtableCacheProvider
+# hibernate.show_sql true
+# hibernate.format_sql true
+# hibernate.use_sql_comments true
Added: jbpm4/trunk/modules/examples/target/test-classes/jbpm.cfg.xml
===================================================================
--- jbpm4/trunk/modules/examples/target/test-classes/jbpm.cfg.xml (rev 0)
+++ jbpm4/trunk/modules/examples/target/test-classes/jbpm.cfg.xml 2008-12-10 12:36:46 UTC (rev 3314)
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jbpm-configuration xmlns="http://jbpm.org/xsd/cfg">
+
+ <process-engine>
+
+ <deployer-manager>
+ <assign-file-type>
+ <file extension=".jpdl.xml" type="jpdl" />
+ </assign-file-type>
+ <parse-jpdl />
+ <check-process />
+ <check-problems />
+ <save />
+ </deployer-manager>
+
+ <process-service />
+ <execution-service />
+ <management-service />
+
+ <command-service>
+ <retry-interceptor />
+ <environment-interceptor />
+ <standard-transaction-interceptor />
+ </command-service>
+
+ <hibernate-configuration>
+ <properties resource="hibernate.properties" />
+ <mapping resource="jbpm.pvm.typedefs.hbm.xml" />
+ <mapping resource="jbpm.pvm.wire.hbm.xml" />
+ <mapping resource="jbpm.pvm.definition.hbm.xml" />
+ <mapping resource="jbpm.pvm.execution.hbm.xml" />
+ <mapping resource="jbpm.pvm.variable.hbm.xml" />
+ <mapping resource="jbpm.pvm.job.hbm.xml" />
+ <mapping resource="jbpm.jpdl.hbm.xml" />
+ <cache-configuration resource="jbpm.pvm.cache.xml"
+ usage="nonstrict-read-write" />
+ </hibernate-configuration>
+
+ <hibernate-session-factory />
+
+ <script-manager default-expression-language="juel"
+ default-script-language="juel"
+ read-contexts="execution, environment, process-engine"
+ write-context="">
+ <script-language name="juel" factory="com.sun.script.juel.JuelScriptEngineFactory" />
+ </script-manager>
+
+ <job-executor auto-start="false" />
+ <job-test-helper />
+
+ <id-generator />
+ <variable-types resource="jbpm.pvm.types.xml" />
+
+ <business-calendar>
+ <monday hours="9:00-12:00 and 12:30-17:00"/>
+ <tuesday hours="9:00-12:00 and 12:30-17:00"/>
+ <wednesday hours="9:00-12:00 and 12:30-17:00"/>
+ <thursday hours="9:00-12:00 and 12:30-17:00"/>
+ <friday hours="9:00-12:00 and 12:30-17:00"/>
+ <holiday period="01/07/2008 - 31/08/2008"/>
+ </business-calendar>
+
+ </process-engine>
+
+ <environment>
+ <hibernate-session />
+ <transaction />
+ <pvm-db-session />
+ <job-db-session />
+ <message-session />
+ <timer-session />
+ </environment>
+
+</jbpm-configuration>
Property changes on: jbpm4/trunk/modules/examples/target/test-classes/jbpm.cfg.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm4/trunk/modules/examples/target/test-classes/logging.properties
===================================================================
--- jbpm4/trunk/modules/examples/target/test-classes/logging.properties (rev 0)
+++ jbpm4/trunk/modules/examples/target/test-classes/logging.properties 2008-12-10 12:36:46 UTC (rev 3314)
@@ -0,0 +1,28 @@
+handlers= java.util.logging.ConsoleHandler
+# to add the error triggered file handler
+# handlers= java.util.logging.ConsoleHandler org.jbpm.util.ErrorTriggeredFileHandler
+
+redirect.commons.logging = enabled
+
+java.util.logging.ConsoleHandler.level = FINEST
+java.util.logging.ConsoleHandler.formatter = org.jbpm.log.LogFormatter
+
+# org.jbpm.util.ErrorTriggeredFileHandler.size = 500
+# org.jbpm.util.ErrorTriggeredFileHandler.push = OFF
+# org.jbpm.util.ErrorTriggeredFileHandler.pattern = %h/jbpm%u.log
+
+# For example, set the com.xyz.foo logger to only log SEVERE messages:
+# com.xyz.foo.level = SEVERE
+
+org.jbpm.level=FINEST
+org.jbpm.pvm.internal.tx.level=FINE
+org.jbpm.pvm.internal.wire.level=FINE
+org.jbpm.pvm.internal.util.level=FINE
+
+org.hibernate.level=INFO
+org.hibernate.cfg.HbmBinder.level=SEVERE
+org.hibernate.cfg.SettingsFactory.level=SEVERE
+org.hibernate.SQL.level=FINEST
+# org.hibernate.type.level=FINEST
+# org.hibernate.tool.hbm2ddl.SchemaExport.level=FINEST
+# org.hibernate.transaction.level=FINEST
Added: jbpm4/trunk/modules/examples/target/test-classes/org/jbpm/examples/states/StatesTest.class
===================================================================
(Binary files differ)
Property changes on: jbpm4/trunk/modules/examples/target/test-classes/org/jbpm/examples/states/StatesTest.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: jbpm4/trunk/modules/examples/target/test-classes/org/jbpm/examples/states/states.jpdl.xml
===================================================================
--- jbpm4/trunk/modules/examples/target/test-classes/org/jbpm/examples/states/states.jpdl.xml (rev 0)
+++ jbpm4/trunk/modules/examples/target/test-classes/org/jbpm/examples/states/states.jpdl.xml 2008-12-10 12:36:46 UTC (rev 3314)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<process name="states" xmlns="http://jbpm.org/4/jpdl">
+
+ <start>
+ <flow to="a" />
+ </start>
+
+ <state name="a">
+ <flow to="b" />
+ </state>
+
+ <state name="b">
+ <flow to="c" />
+ </state>
+
+ <state name="c" />
+
+</process>
Property changes on: jbpm4/trunk/modules/examples/target/test-classes/org/jbpm/examples/states/states.jpdl.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/ExclusiveConditionActivity.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/ExclusiveConditionActivity.java 2008-12-10 11:31:39 UTC (rev 3313)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/ExclusiveConditionActivity.java 2008-12-10 12:36:46 UTC (rev 3314)
@@ -25,7 +25,6 @@
import org.jbpm.activity.ActivityExecution;
import org.jbpm.jpdl.JpdlException;
-import org.jbpm.jpdl.JpdlExecution;
import org.jbpm.model.Condition;
import org.jbpm.model.Node;
import org.jbpm.model.Transition;
Modified: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/xml/ExclusiveBinding.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/xml/ExclusiveBinding.java 2008-12-10 11:31:39 UTC (rev 3313)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/xml/ExclusiveBinding.java 2008-12-10 12:36:46 UTC (rev 3314)
@@ -23,13 +23,15 @@
import java.util.List;
+import org.jbpm.jpdl.activity.ExclusiveConditionActivity;
import org.jbpm.jpdl.activity.ExclusiveExpressionActivity;
import org.jbpm.jpdl.activity.ExclusiveHandlerActivity;
+import org.jbpm.pvm.internal.model.ExpressionCondition;
import org.jbpm.pvm.internal.model.NodeImpl;
import org.jbpm.pvm.internal.model.TransitionImpl;
import org.jbpm.pvm.internal.util.XmlUtil;
import org.jbpm.pvm.internal.wire.binding.ObjectBinding;
-import org.jbpm.pvm.internal.wire.descriptor.ExpressionDescriptor;
+import org.jbpm.pvm.internal.wire.descriptor.ExpressionConditionDescriptor;
import org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor;
import org.jbpm.pvm.internal.wire.descriptor.ReferenceDescriptor;
import org.jbpm.pvm.internal.xml.Parse;
@@ -84,28 +86,30 @@
Element conditionElement = XmlUtil.element(transitionElement, "condition");
if (conditionElement!=null) {
hasConditions = true;
- }
-
- if (conditionElement.hasAttribute("expr")) {
- String expr = conditionElement.getAttribute("expr");
- ExpressionDescriptor expressionDescriptor = new ExpressionDescriptor(expr);
- transition.setConditionDescriptor(expressionDescriptor);
- } else if (conditionElement.hasAttribute("ref")) {
- String expr = conditionElement.getAttribute("ref");
- ReferenceDescriptor refDescriptor = new ReferenceDescriptor(expr);
- transition.setConditionDescriptor(refDescriptor);
-
- } else if (ObjectBinding.isObjectDescriptor(conditionElement)) {
- ObjectDescriptor conditionDescriptor = (ObjectDescriptor) objectBinding.parse(conditionElement, parse, parser);
- transition.setConditionDescriptor(conditionDescriptor);
-
- } else {
- parse.addProblem("decision must have one of {expr attribute, handler-ref attribute, handler element or transition conditions}: "+XmlUtil.toString(element));
+ if (conditionElement.hasAttribute("expr")) {
+ String expr = conditionElement.getAttribute("expr");
+ String lang = XmlUtil.attribute(conditionElement, "expr-lang");
+ ExpressionConditionDescriptor expressionConditionDescriptor = new ExpressionConditionDescriptor(expr, lang);
+ transition.setConditionDescriptor(expressionConditionDescriptor);
+
+ } else if (conditionElement.hasAttribute("ref")) {
+ String expr = conditionElement.getAttribute("ref");
+ ReferenceDescriptor refDescriptor = new ReferenceDescriptor(expr);
+ transition.setConditionDescriptor(refDescriptor);
+
+ } else if (ObjectBinding.isObjectDescriptor(conditionElement)) {
+ ObjectDescriptor conditionDescriptor = (ObjectDescriptor) objectBinding.parse(conditionElement, parse, parser);
+ transition.setConditionDescriptor(conditionDescriptor);
+ }
}
}
- parse.addProblem("decision '"+element.getAttribute("name")+"' must have one of: expr attribute, handler attribute, handler element or condition expressions");
+ if (hasConditions) {
+ return new ExclusiveConditionActivity();
+ } else {
+ parse.addProblem("exclusive '"+element.getAttribute("name")+"' must have one of: expr attribute, handler attribute, handler element or condition expressions");
+ }
return null;
}
Added: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExpressionCondition.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExpressionCondition.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExpressionCondition.java 2008-12-10 12:36:46 UTC (rev 3314)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.pvm.internal.model;
+
+import org.jbpm.model.Condition;
+import org.jbpm.model.OpenExecution;
+import org.jbpm.pvm.internal.script.ScriptManager;
+
+/**
+ * @author Tom Baeyens
+ */
+public class ExpressionCondition implements Condition {
+
+ private static final long serialVersionUID = 1L;
+
+ protected String expr;
+ protected String lang;
+
+ public ExpressionCondition(String expr, String lang) {
+ this.expr = expr;
+ this.lang = lang;
+ }
+
+ public boolean evaluate(OpenExecution execution) {
+ ScriptManager scriptManager = ScriptManager.getScriptManager();
+ return (Boolean) scriptManager.evaluateExpression(expr, execution, lang);
+ }
+}
Property changes on: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExpressionCondition.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/script/ScriptManager.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/script/ScriptManager.java 2008-12-10 11:31:39 UTC (rev 3313)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/script/ScriptManager.java 2008-12-10 12:36:46 UTC (rev 3314)
@@ -30,6 +30,7 @@
import org.jbpm.Execution;
import org.jbpm.JbpmException;
import org.jbpm.env.Environment;
+import org.jbpm.log.Log;
import org.jbpm.pvm.internal.env.ExecutionContext;
import org.jbpm.pvm.internal.env.ExecutionEnvironment;
import org.jbpm.pvm.internal.wire.WireContext;
@@ -40,7 +41,8 @@
* @author Tom Baeyens
*/
public class ScriptManager {
-
+
+ private static Log log = Log.getLog(ScriptManager.class.getName());
private static final ScriptManager defaultScriptManager = createDefault();
protected String defaultExpressionLanguage;
@@ -109,6 +111,8 @@
throw new JbpmException("no scripting engine configured for language "+language);
}
+ if (log.isDebugEnabled()) log.debug("evaluating "+language+" script :"+script);
+
if (execution==null) {
return evaluate(scriptEngine, script);
}
@@ -137,7 +141,9 @@
scriptEngine.setBindings(bindings, ScriptContext.ENGINE_SCOPE);
try {
- return scriptEngine.eval(script);
+ Object result = scriptEngine.eval(script);
+ log.debug("script evaluated to "+result);
+ return result;
} catch (ScriptException e) {
throw new JbpmException("script evaluation error: "+e.getMessage(), e);
}
Copied: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/ExpressionConditionDescriptor.java (from rev 3305, jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/ExpressionDescriptor.java)
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/ExpressionConditionDescriptor.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/ExpressionConditionDescriptor.java 2008-12-10 12:36:46 UTC (rev 3314)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.pvm.internal.wire.descriptor;
+
+import org.jbpm.pvm.internal.model.ExpressionCondition;
+import org.jbpm.pvm.internal.wire.WireContext;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class ExpressionConditionDescriptor extends AbstractDescriptor {
+
+ private static final long serialVersionUID = 1L;
+
+ String expr;
+ String lang;
+
+ public ExpressionConditionDescriptor() {
+ }
+
+ public ExpressionConditionDescriptor(String expr, String lang) {
+ this.expr = expr;
+ this.lang = lang;
+ }
+
+ public Object construct(WireContext wireContext) {
+ return new ExpressionCondition(expr, lang);
+ }
+
+}
Property changes on: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/ExpressionConditionDescriptor.java
___________________________________________________________________
Name: svn:mergeinfo
+
Deleted: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/ExpressionDescriptor.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/ExpressionDescriptor.java 2008-12-10 11:31:39 UTC (rev 3313)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/ExpressionDescriptor.java 2008-12-10 12:36:46 UTC (rev 3314)
@@ -1,55 +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.descriptor;
-
-import org.jbpm.pvm.internal.script.ScriptManager;
-import org.jbpm.pvm.internal.wire.WireContext;
-
-
-/**
- * @author Tom Baeyens
- */
-public class ExpressionDescriptor extends AbstractDescriptor {
-
- private static final long serialVersionUID = 1L;
-
- String expression;
- String language;
-
- public ExpressionDescriptor() {
- }
-
- public ExpressionDescriptor(String expression) {
- this.expression = expression;
- }
-
- public ExpressionDescriptor(String expression, String language) {
- this.expression = expression;
- this.language = language;
- }
-
- public Object construct(WireContext wireContext) {
- ScriptManager scriptManager = ScriptManager.getScriptManager();
- return scriptManager.evaluate(expression, null, language);
- }
-
-}
Modified: jbpm4/trunk/modules/pvm/src/main/resources/jbpm.pvm.wire.hbm.xml
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/resources/jbpm.pvm.wire.hbm.xml 2008-12-10 11:31:39 UTC (rev 3313)
+++ jbpm4/trunk/modules/pvm/src/main/resources/jbpm.pvm.wire.hbm.xml 2008-12-10 12:36:46 UTC (rev 3314)
@@ -124,9 +124,9 @@
</list>
</subclass>
- <subclass name="ExpressionDescriptor" discriminator-value="expr">
- <property name="expression" column="TEXT_" />
- <property name="language" column="METHOD_" />
+ <subclass name="ExpressionConditionDescriptor" discriminator-value="expr">
+ <property name="expr" column="TEXT_" />
+ <property name="lang" column="METHOD_" />
</subclass>
<subclass name="ProvidedObjectDescriptor" discriminator-value="provided">
Modified: jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/DbTestCase.java
===================================================================
--- jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/DbTestCase.java 2008-12-10 11:31:39 UTC (rev 3313)
+++ jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/DbTestCase.java 2008-12-10 12:36:46 UTC (rev 3314)
@@ -99,6 +99,20 @@
.deploy()
.getProcessDefinitions();
+ return addDeployedProcessDefinition(deployedProcessDefinitions);
+ }
+
+ public ProcessDefinition deployJpdlResource(String resource) {
+ List<ProcessDefinition> deployedProcessDefinitions =
+ processService.createDeployment()
+ .addResource(resource)
+ .deploy()
+ .getProcessDefinitions();
+
+ return addDeployedProcessDefinition(deployedProcessDefinitions);
+ }
+
+ protected ProcessDefinition addDeployedProcessDefinition(List<ProcessDefinition> deployedProcessDefinitions) {
if (processDefinitions==null) {
processDefinitions = new ArrayList<ProcessDefinition>();
}
Modified: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activities/ExclusiveTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activities/ExclusiveTest.java 2008-12-10 11:31:39 UTC (rev 3313)
+++ jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activities/ExclusiveTest.java 2008-12-10 12:36:46 UTC (rev 3314)
@@ -21,7 +21,6 @@
*/
package org.jbpm.test.activities;
-import java.text.NumberFormat;
import java.util.HashMap;
import java.util.Map;
@@ -96,4 +95,40 @@
execution = executionService.startExecutionByKey("Poolcar", variables);
assertEquals("Small car", execution.getNodeName());
}
+
+ public void testExclusiveWithConditions() {
+ deployJpdlXmlString(
+ "<process name='Poolcar'>" +
+ " <start>" +
+ " <flow to='How far?' />" +
+ " </start>" +
+ " <exclusive name='How far?'>" +
+ " <flow to='Big car'>" +
+ " <condition expr='#{distance > 10}' />" +
+ " </flow>" +
+ " <flow to='Small car'>" +
+ " <condition expr='#{distance >= 3}' />" +
+ " </flow>" +
+ " <flow to='No car' />" +
+ " </exclusive>" +
+ " <state name='Big car' />" +
+ " <state name='Small car' />" +
+ " <state name='No car' />" +
+ "</process>"
+ );
+
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("distance", new Integer(69));
+ Execution execution = executionService.startExecutionByKey("Poolcar", variables);
+ assertEquals("Big car", execution.getNodeName());
+
+ variables.put("distance", new Integer(6));
+ execution = executionService.startExecutionByKey("Poolcar", variables);
+ assertEquals("Small car", execution.getNodeName());
+
+ variables.put("distance", new Integer(2));
+ execution = executionService.startExecutionByKey("Poolcar", variables);
+ assertEquals("No car", execution.getNodeName());
+ }
+
}
Deleted: jbpm4/trunk/modules/test-db/src/test/resources/log4j.xml
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/resources/log4j.xml 2008-12-10 11:31:39 UTC (rev 3313)
+++ jbpm4/trunk/modules/test-db/src/test/resources/log4j.xml 2008-12-10 12:36:46 UTC (rev 3314)
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
-
- <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
- <param name="Target" value="System.out" />
- <param name="Threshold" value="TRACE" />
- <layout class="org.apache.log4j.PatternLayout">
- <param name="ConversionPattern" value="%d{HH:mm:ss,SSS} %-5p [%c{1}] %m%n" />
- </layout>
- </appender>
-
- <!-- ================ -->
- <!-- Limit categories -->
- <!-- ================ -->
-
- <category name="org.jbpm">
- <priority value="TRACE" />
- </category>
-
- <category name="org.hibernate">
- <priority value="TRACE" />
- </category>
-
- <root>
- <appender-ref ref="CONSOLE"/>
- <!-- appender-ref ref="FILE"/ -->
- </root>
-
-</log4j:configuration>
Modified: jbpm4/trunk/modules/userguide/.settings/attachedFile.properties
===================================================================
--- jbpm4/trunk/modules/userguide/.settings/attachedFile.properties 2008-12-10 11:31:39 UTC (rev 3313)
+++ jbpm4/trunk/modules/userguide/.settings/attachedFile.properties 2008-12-10 12:36:46 UTC (rev 3314)
@@ -1,2 +1,2 @@
## index of importer -> set(imports)
-#Tue Dec 09 13:47:09 CET 2008
+#Wed Dec 10 09:07:34 CET 2008
Modified: jbpm4/trunk/pom.xml
===================================================================
--- jbpm4/trunk/pom.xml 2008-12-10 11:31:39 UTC (rev 3313)
+++ jbpm4/trunk/pom.xml 2008-12-10 12:36:46 UTC (rev 3314)
@@ -277,8 +277,9 @@
<modules>
<module>modules/db</module>
<module>modules/devguide</module>
+ <module>modules/distro</module>
+ <module>modules/examples</module>
<module>modules/userguide</module>
- <module>modules/distro</module>
</modules>
<build>
<plugins>
More information about the jbpm-commits
mailing list