JBoss JBPM SVN: r3045 - in jbpm4/trunk: modules/api and 1 other directory.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2008-11-24 04:24:16 -0500 (Mon, 24 Nov 2008)
New Revision: 3045
Modified:
jbpm4/trunk/build.xml
jbpm4/trunk/modules/api/pom.xml
Log:
switched to relative paths for the xsddoc ant task
Modified: jbpm4/trunk/build.xml
===================================================================
--- jbpm4/trunk/build.xml 2008-11-22 09:36:41 UTC (rev 3044)
+++ jbpm4/trunk/build.xml 2008-11-24 09:24:16 UTC (rev 3045)
@@ -57,12 +57,12 @@
</antcall>
</target>
- <target name="jpdlxsddoc">
- <exec executable="cmd" dir="modules/jpdl">
+ <target name="schemadocs">
+ <exec executable="cmd" dir="modules/api">
<arg line="/C mvn package" />
</exec>
<antcall target="show.html">
- <param name="page" value="modules/jpdl/target/doc/jpdlxsd/index.html"/>
+ <param name="page" value="modules/api/target/doc/schemadoc/index.html"/>
</antcall>
</target>
Modified: jbpm4/trunk/modules/api/pom.xml
===================================================================
--- jbpm4/trunk/modules/api/pom.xml 2008-11-22 09:36:41 UTC (rev 3044)
+++ jbpm4/trunk/modules/api/pom.xml 2008-11-24 09:24:16 UTC (rev 3045)
@@ -57,10 +57,11 @@
</goals>
<configuration>
<tasks>
+ <echo message="basedir: ${basedir}" />
<taskdef name="xsddoc" classname="net.sf.xframe.xsddoc.Task" classpathref="maven.plugin.classpath" />
- <mkdir dir="${basedir}/target/doc/schemadoc" />
- <xsddoc out="${basedir}/target/doc/schemadoc" title="jBPM 4 Schema's" verbose="false">
- <fileset dir="${basedir}/src/main/resources" />
+ <mkdir dir="target/doc/schemadoc" />
+ <xsddoc out="target/doc/schemadoc" title="jBPM 4 Schema's" verbose="false">
+ <fileset dir="src/main/resources" />
</xsddoc>
</tasks>
</configuration>
17 years, 5 months
JBoss JBPM SVN: r3044 - in jbpm3/trunk/modules: distribution/src/main/resources/installer and 1 other directories.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-11-22 04:36:41 -0500 (Sat, 22 Nov 2008)
New Revision: 3044
Modified:
jbpm3/trunk/modules/distribution/pom.xml
jbpm3/trunk/modules/distribution/src/main/resources/installer/install-definition.xml
jbpm3/trunk/modules/integration/jboss42/pom.xml
Log:
Install API integration
Modified: jbpm3/trunk/modules/distribution/pom.xml
===================================================================
--- jbpm3/trunk/modules/distribution/pom.xml 2008-11-22 07:00:38 UTC (rev 3043)
+++ jbpm3/trunk/modules/distribution/pom.xml 2008-11-22 09:36:41 UTC (rev 3044)
@@ -82,6 +82,11 @@
</dependency>
<dependency>
<groupId>org.jbpm.jbpm3</groupId>
+ <artifactId>jbpm-integration-api</artifactId>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jbpm.jbpm3</groupId>
<artifactId>jbpm-integration-jboss42</artifactId>
<classifier>config</classifier>
<version>${version}</version>
@@ -103,6 +108,10 @@
<version>${version}</version>
<type>jdocbook</type>
</dependency>
+ <dependency>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-spec-api</artifactId>
+ </dependency>
<!-- jBPM Projects -->
<dependency>
Modified: jbpm3/trunk/modules/distribution/src/main/resources/installer/install-definition.xml
===================================================================
--- jbpm3/trunk/modules/distribution/src/main/resources/installer/install-definition.xml 2008-11-22 07:00:38 UTC (rev 3043)
+++ jbpm3/trunk/modules/distribution/src/main/resources/installer/install-definition.xml 2008-11-22 09:36:41 UTC (rev 3044)
@@ -144,7 +144,9 @@
<include name="jbpm-enterprise-bundle.ear" />
<include name="jbpm-jpdl.jar" />
<include name="jbpm-identity.jar" />
+ <include name="jbpm-integration-api" />
<include name="jbpm-integration-jboss42.jar" />
+ <include name="jbpm-spec-api.jar" />
<include name="jsf-console.war" />
<include name="activation.jar" />
<include name="antlr.jar" />
@@ -184,7 +186,9 @@
<fileset dir="@{deploy.artifacts.dir}/lib" targetdir="${installPath}/server/${jbossTargetServer}/deploy/jbpm/jbpm-service.sar" override="true">
<include name="jbpm-jpdl.jar" />
<include name="jbpm-identity.jar" />
+ <include name="jbpm-integration-api.jar" />
<include name="jbpm-integration-jboss42.jar" />
+ <include name="jbpm-spec-api.jar" />
</fileset>
<file src="@{deploy.artifacts.dir}/lib/jbpm-identity-service.zip" targetdir="${installPath}/server/${jbossTargetServer}/deploy/jbpm/jbpm-service.sar"
unpack="true" override="true" />
Modified: jbpm3/trunk/modules/integration/jboss42/pom.xml
===================================================================
--- jbpm3/trunk/modules/integration/jboss42/pom.xml 2008-11-22 07:00:38 UTC (rev 3043)
+++ jbpm3/trunk/modules/integration/jboss42/pom.xml 2008-11-22 09:36:41 UTC (rev 3044)
@@ -42,6 +42,10 @@
<artifactId>jbpm-jpdl</artifactId>
<version>${version}</version>
</dependency>
+ <dependency>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-spec-api</artifactId>
+ </dependency>
<dependency>
<groupId>jboss</groupId>
17 years, 5 months
JBoss JBPM SVN: r3043 - jbpm3/trunk/modules/enterprise/jar.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-11-22 02:00:38 -0500 (Sat, 22 Nov 2008)
New Revision: 3043
Modified:
jbpm3/trunk/modules/enterprise/jar/pom.xml
Log:
[JBPM-1830] Fix AppServerConfigurationsTest exclude
Modified: jbpm3/trunk/modules/enterprise/jar/pom.xml
===================================================================
--- jbpm3/trunk/modules/enterprise/jar/pom.xml 2008-11-21 20:29:11 UTC (rev 3042)
+++ jbpm3/trunk/modules/enterprise/jar/pom.xml 2008-11-22 07:00:38 UTC (rev 3043)
@@ -363,7 +363,7 @@
<exclude>org/jbpm/enterprise/jta/JtaDbPersistenceTest.java</exclude>
<exclude>org/jbpm/enterprise/jms/JmsMessageTest.java</exclude>
<!-- [JBPM-1830] Fix AppServerConfigurationsTest for sybase on jboss500 -->
- <exclude>org/jbpm/enterprise/AppServerConfigurationsTest.java</exclude>
+ <exclude>org/jbpm/enterprise/config/AppServerConfigurationsTest.java</exclude>
</excludes>
</configuration>
</plugin>
17 years, 5 months
JBoss JBPM SVN: r3042 - in jbpm4/trunk/modules: api/src/main/java/org/jbpm/session and 12 other directories.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2008-11-21 15:29:11 -0500 (Fri, 21 Nov 2008)
New Revision: 3042
Added:
jbpm4/trunk/modules/devguide/.project
jbpm4/trunk/modules/userguide/.project
jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch03-Services.xml
Removed:
jbpm4/trunk/modules/api/src/main/java/org/jbpm/ResourceManager.java
jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch03-Configuration.xml
jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch04-Services.xml
Modified:
jbpm4/trunk/modules/api/src/main/java/org/jbpm/Deployment.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/ProcessEngine.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/session/PvmDbSession.java
jbpm4/trunk/modules/api/src/main/resources/jpdl.xsd
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/cfg/JbpmConfiguration.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/DeleteProcessDefinitionCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/hibernate/HibernatePvmDbSession.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/DeploymentImpl.java
jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/DbTestCase.java
jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/basicfeatures/ConfigurationTest.java
jbpm4/trunk/modules/test-db/src/test/resources/hibernate.properties
jbpm4/trunk/modules/test-db/src/test/resources/logging.properties
jbpm4/trunk/modules/userguide/src/main/docbook/en/master.xml
Log:
userguide docs
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/Deployment.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/Deployment.java 2008-11-21 18:36:09 UTC (rev 3041)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/Deployment.java 2008-11-21 20:29:11 UTC (rev 3042)
@@ -30,8 +30,8 @@
/** a deployment unit, containing all information to create a process
- * definition that will be deployed in the persistent store of the
- * Process Virtual Machine.
+ * definition that will be deployed in the persistent process repository
+ * of the Process Virtual Machine.
*
* @author Tom Baeyens
*/
@@ -55,5 +55,6 @@
Deployment addDirectory(File directory);
Deployment addDirectoryCanonical(File directory);
- List<ProcessDefinition> deploy();
+ ProcessDefinition deploy();
+ List<ProcessDefinition> deployAll();
}
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/ProcessEngine.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/ProcessEngine.java 2008-11-21 18:36:09 UTC (rev 3041)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/ProcessEngine.java 2008-11-21 20:29:11 UTC (rev 3042)
@@ -21,13 +21,23 @@
*/
package org.jbpm;
+import java.util.Map;
+/** central starting point for all process engine API
+ * interactions.
+ *
+ * @author Tom Baeyens
+ */
public interface ProcessEngine {
ProcessService getProcessService();
+ ProcessService getProcessService(Map<String, Object> txResources);
ExecutionService getExecutionService();
+ ExecutionService getExecutionService(Map<String, Object> txResources);
TaskService getTaskService();
+ TaskService getTaskService(Map<String, Object> txResources);
ManagementService getManagementService();
+ ManagementService getManagementService(Map<String, Object> txResources);
- ResourceManager getResourceManager();
+ <T> T get(Class<T> type);
}
Deleted: jbpm4/trunk/modules/api/src/main/java/org/jbpm/ResourceManager.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/ResourceManager.java 2008-11-21 18:36:09 UTC (rev 3041)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/ResourceManager.java 2008-11-21 20:29:11 UTC (rev 3042)
@@ -1,40 +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;
-
-/** can be used to provide transactional reasources
- * like JDBC connection or hibernate session to
- * the method invocations on a service.
- *
- * TODO what about subsequent service method invocations ?
- * will a provided resource only be used once in the next method invocation.
- * Or will the the resource be available for the remainder of the thread.
- * In other words: should interceptor that propagates these resources into the
- * environment clean them from the thread local or not ?
- *
- * @author Tom Baeyens
- */
-public interface ResourceManager {
-
- void addResource(Object object);
- void addResource(String name, Object object);
-}
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/session/PvmDbSession.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/session/PvmDbSession.java 2008-11-21 18:36:09 UTC (rev 3041)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/session/PvmDbSession.java 2008-11-21 20:29:11 UTC (rev 3042)
@@ -73,4 +73,7 @@
/** delete the process instance */
void deleteProcessInstance(String processInstanceId);
+
+ /** delete process definition */
+ void deleteProcessDefinition(String processDefinitionId, boolean deleteProcessInstances);
}
Modified: jbpm4/trunk/modules/api/src/main/resources/jpdl.xsd
===================================================================
--- jbpm4/trunk/modules/api/src/main/resources/jpdl.xsd 2008-11-21 18:36:09 UTC (rev 3041)
+++ jbpm4/trunk/modules/api/src/main/resources/jpdl.xsd 2008-11-21 20:29:11 UTC (rev 3042)
@@ -53,6 +53,12 @@
be deployed with the same name, as long as they have a different
version.</documentation></annotation>
</attribute>
+ <attribute name="key" type="string">
+ <annotation><documentation>The key can be used to provide a short
+ acronym that will replace the name as the basis for the generated
+ process definition id
+ </documentation></annotation>
+ </attribute>
<attribute name="version" type="int">
<annotation><documentation>Indicates the sequence number of this
version for all processes with the same name. By specifying a version
Added: jbpm4/trunk/modules/devguide/.project
===================================================================
--- jbpm4/trunk/modules/devguide/.project (rev 0)
+++ jbpm4/trunk/modules/devguide/.project 2008-11-21 20:29:11 UTC (rev 3042)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>devguide</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ </natures>
+</projectDescription>
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/cfg/JbpmConfiguration.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/cfg/JbpmConfiguration.java 2008-11-21 18:36:09 UTC (rev 3041)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/cfg/JbpmConfiguration.java 2008-11-21 20:29:11 UTC (rev 3042)
@@ -24,6 +24,7 @@
import java.io.File;
import java.io.InputStream;
import java.net.URL;
+import java.util.Map;
import java.util.Set;
import org.jbpm.Configuration;
@@ -31,7 +32,6 @@
import org.jbpm.ManagementService;
import org.jbpm.ProcessEngine;
import org.jbpm.ProcessService;
-import org.jbpm.ResourceManager;
import org.jbpm.TaskService;
import org.jbpm.env.Context;
import org.jbpm.env.Environment;
@@ -137,20 +137,36 @@
public ExecutionService getExecutionService() {
return environmentFactoryCtxWireContext.get(ExecutionService.class);
}
+
+ public ExecutionService getExecutionService(Map<String, Object> txResources) {
+ // TODO Auto-generated method stub
+ return null;
+ }
public ManagementService getManagementService() {
return environmentFactoryCtxWireContext.get(ManagementService.class);
}
+ public ManagementService getManagementService(Map<String, Object> txResources) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
public ProcessService getProcessService() {
return environmentFactoryCtxWireContext.get(ProcessService.class);
}
+ public ProcessService getProcessService(Map<String, Object> txResources) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
public TaskService getTaskService() {
return environmentFactoryCtxWireContext.get(TaskService.class);
}
- public ResourceManager getResourceManager() {
+ public TaskService getTaskService(Map<String, Object> txResources) {
+ // TODO Auto-generated method stub
return null;
}
@@ -239,5 +255,4 @@
public WireDefinition getEnvironmentCtxWireDefinition() {
return environmentCtxWireDefinition;
}
-
}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/DeleteProcessDefinitionCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/DeleteProcessDefinitionCmd.java 2008-11-21 18:36:09 UTC (rev 3041)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/DeleteProcessDefinitionCmd.java 2008-11-21 20:29:11 UTC (rev 3042)
@@ -24,6 +24,7 @@
import java.util.List;
import org.jbpm.JbpmException;
+import org.jbpm.ProcessDefinition;
import org.jbpm.cmd.Command;
import org.jbpm.env.Environment;
import org.jbpm.session.PvmDbSession;
@@ -44,23 +45,16 @@
}
public DeleteProcessDefinitionCmd(String processDefinitionId, boolean deleteProcessInstances) {
- this.deleteProcessInstances = deleteProcessInstances;
this.processDefinitionId = processDefinitionId;
+ this.deleteProcessInstances = deleteProcessInstances;
}
public Void execute(Environment environment) {
PvmDbSession pvmDbSession = Environment.getFromCurrent(PvmDbSession.class);
- List<String> processInstanceIds = pvmDbSession.findProcessInstanceIds(processDefinitionId);
-
- if (deleteProcessInstances) {
- for (String processInstanceId : processInstanceIds) {
- pvmDbSession.deleteProcessInstance(processInstanceId);
- }
- } else {
- if (processInstanceIds.size()>0) {
- throw new JbpmException("still "+processInstanceIds.size()+" process instances for process definition "+processDefinitionId);
- }
+ if (pvmDbSession==null) {
+ throw new JbpmException("no PvmDbSession configured");
}
+ pvmDbSession.deleteProcessDefinition(processDefinitionId, deleteProcessInstances);
return null;
}
}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/hibernate/HibernatePvmDbSession.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/hibernate/HibernatePvmDbSession.java 2008-11-21 18:36:09 UTC (rev 3041)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/hibernate/HibernatePvmDbSession.java 2008-11-21 20:29:11 UTC (rev 3042)
@@ -25,6 +25,8 @@
import org.hibernate.Query;
import org.jbpm.Execution;
+import org.jbpm.JbpmException;
+import org.jbpm.ProcessDefinition;
import org.jbpm.client.ClientExecution;
import org.jbpm.client.ClientProcessDefinition;
import org.jbpm.job.Job;
@@ -135,4 +137,21 @@
log.debug("deleting process instance "+processInstanceId);
session.delete(processInstance);
}
+
+ public void deleteProcessDefinition(String processDefinitionId, boolean deleteProcessInstances) {
+ List<String> processInstanceIds = findProcessInstanceIds(processDefinitionId);
+
+ if (deleteProcessInstances) {
+ for (String processInstanceId : processInstanceIds) {
+ deleteProcessInstance(processInstanceId);
+ }
+ } else {
+ if (processInstanceIds.size()>0) {
+ throw new JbpmException("still "+processInstanceIds.size()+" process instances for process definition "+processDefinitionId);
+ }
+ }
+
+ ProcessDefinition processDefinition = findProcessDefinitionById(processDefinitionId);
+ session.delete(processDefinition);
+ }
}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/DeploymentImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/DeploymentImpl.java 2008-11-21 18:36:09 UTC (rev 3041)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/DeploymentImpl.java 2008-11-21 20:29:11 UTC (rev 3042)
@@ -304,7 +304,15 @@
return this;
}
- public List<ProcessDefinition> deploy() {
+ public ProcessDefinition deploy() {
+ List<ProcessDefinition> deployedProcessDefinitions = processServiceImpl.deploy(this);
+ if (deployedProcessDefinitions.size()>0) {
+ return deployedProcessDefinitions.get(0);
+ }
+ return null;
+ }
+
+ public List<ProcessDefinition> deployAll() {
return processServiceImpl.deploy(this);
}
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-11-21 18:36:09 UTC (rev 3041)
+++ jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/DbTestCase.java 2008-11-21 20:29:11 UTC (rev 3042)
@@ -75,7 +75,7 @@
public void tearDown() throws Exception {
if (processDefinitions!=null) {
for (ProcessDefinition processDefinition : processDefinitions) {
- processService.deleteProcessDefinition(processDefinition.getId());
+ processService.deleteProcessDefinitionAndInstances(processDefinition.getId());
}
}
@@ -85,7 +85,7 @@
}
public void deployJpdlXmlString(String jpdlXmlString) {
- List<ProcessDefinition> deployedProcessDefinitions =
+ ProcessDefinition deployedProcessDefinition =
processService.createDeployment()
.setLanguage("jpdl")
.addString("xmlstring.jpdl.xml", jpdlXmlString)
@@ -95,6 +95,6 @@
processDefinitions = new ArrayList<ProcessDefinition>();
}
- processDefinitions.addAll(deployedProcessDefinitions);
+ processDefinitions.add(deployedProcessDefinition);
}
}
Modified: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/basicfeatures/ConfigurationTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/basicfeatures/ConfigurationTest.java 2008-11-21 18:36:09 UTC (rev 3041)
+++ jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/basicfeatures/ConfigurationTest.java 2008-11-21 20:29:11 UTC (rev 3042)
@@ -36,12 +36,14 @@
assertNotNull(processEngine);
}
+ /*
public void testResourceConfiguration() {
ProcessEngine processEngine = new Configuration()
- .setResource("my-jbpm-configuration.cfg.xml")
+ .setResource("my-jbpm-configuration.xml")
.buildProcessEngine();
assertNotNull(processEngine);
}
+ */
public void testMinimalConfiguration() {
ProcessEngine processEngine = new Configuration()
Modified: jbpm4/trunk/modules/test-db/src/test/resources/hibernate.properties
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/resources/hibernate.properties 2008-11-21 18:36:09 UTC (rev 3041)
+++ jbpm4/trunk/modules/test-db/src/test/resources/hibernate.properties 2008-11-21 20:29:11 UTC (rev 3042)
@@ -7,5 +7,5 @@
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
+# hibernate.format_sql true
+# hibernate.use_sql_comments true
Modified: jbpm4/trunk/modules/test-db/src/test/resources/logging.properties
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/resources/logging.properties 2008-11-21 18:36:09 UTC (rev 3041)
+++ jbpm4/trunk/modules/test-db/src/test/resources/logging.properties 2008-11-21 20:29:11 UTC (rev 3042)
@@ -22,7 +22,7 @@
org.hibernate.level=INFO
org.hibernate.cfg.HbmBinder.level=SEVERE
org.hibernate.cfg.SettingsFactory.level=SEVERE
-# org.hibernate.SQL.level=FINEST
+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/userguide/.project
===================================================================
--- jbpm4/trunk/modules/userguide/.project (rev 0)
+++ jbpm4/trunk/modules/userguide/.project 2008-11-21 20:29:11 UTC (rev 3042)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>userguide</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ </natures>
+</projectDescription>
Modified: jbpm4/trunk/modules/userguide/src/main/docbook/en/master.xml
===================================================================
--- jbpm4/trunk/modules/userguide/src/main/docbook/en/master.xml 2008-11-21 18:36:09 UTC (rev 3041)
+++ jbpm4/trunk/modules/userguide/src/main/docbook/en/master.xml 2008-11-21 20:29:11 UTC (rev 3042)
@@ -3,8 +3,7 @@
<!DOCTYPE book [
<!ENTITY ch01-Introduction SYSTEM "modules/ch01-Introduction.xml">
<!ENTITY ch02-Environments SYSTEM "modules/ch02-Environments.xml">
- <!ENTITY ch03-Configuration SYSTEM "modules/ch03-Configuration.xml">
- <!ENTITY ch04-Services SYSTEM "modules/ch04-Services.xml">
+ <!ENTITY ch03-Services SYSTEM "modules/ch03-Services.xml">
]>
<book lang="en">
@@ -16,7 +15,7 @@
<toc />
&ch01-Introduction;
- &ch02-Configuration;
+ &ch02-Environments;
&ch03-Services;
</book>
\ No newline at end of file
Deleted: jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch03-Configuration.xml
===================================================================
--- jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch03-Configuration.xml 2008-11-21 18:36:09 UTC (rev 3041)
+++ jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch03-Configuration.xml 2008-11-21 20:29:11 UTC (rev 3042)
@@ -1,10 +0,0 @@
-<chapter id="configuration">
- <title>Configuration</title>
-
- <para>Interacting with jBPM occurs through <link linkend="services">services</link>.
- The service interfaces can be obtained from the <literal>ProcessEngine</literal>
- which is build from a <literal>Configuration</literal>.
- </para>
-
-
-</chapter>
\ No newline at end of file
Added: jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch03-Services.xml
===================================================================
--- jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch03-Services.xml (rev 0)
+++ jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch03-Services.xml 2008-11-21 20:29:11 UTC (rev 3042)
@@ -0,0 +1,124 @@
+<chapter id="services">
+ <title>Services</title>
+
+ <para>Interacting with jBPM occurs through <link linkend="services">services</link>.
+ The service interfaces can be obtained from the <literal>ProcessEngine</literal>
+ which is build from a <literal>Configuration</literal>.
+ </para>
+
+ <section id="processengine">
+ <title>ProcessEngine</title>
+
+ <para>A <literal>ProcessEngine</literal> is thread safe and can be stored in a
+ static member field or even better in JNDI or some other central location.
+ One <literal>ProcessEngine</literal> object can be used by all requests and
+ threads in an application. Here's how you can obtain a <literal>ProcessEngine</literal>
+ </para>
+
+ <programlisting>ProcessEngine processEngine = new Configuration()
+ .buildProcessEngine();</programlisting>
+
+ <para>The previous code snippet shows how to build a <literal>ProcessEngine</literal>
+ from the default configuration file <literal>jbpm.cfg.xml</literal> which is
+ expected in the root of the classpath. If you want to specify another
+ resource location, use the <literal>setResource</literal> method like this:
+ </para>
+
+ <programlisting>ProcessEngine processEngine = new Configuration()
+ .setResource("my-own-configuration-file.xml")
+ .buildProcessEngine();</programlisting>
+
+ <para>There are other <literal>setXxxx</literal> methods that allow to specify
+ the configuration content as an <literal>InputStream</literal>, an
+ <literal>xmlString</literal>, <literal>InputSource</literal>,
+ <literal>URL</literal> or <literal>File</literal>.
+ </para>
+
+ <para>From a <literal>ProcessEngine</literal> the following services
+ can be obtained:
+ </para>
+
+ <programlisting>ProcessService processService = processEngine.getProcessService();
+ExecutionService executionService = processEngine.getExecutionService();
+ManagementService managementService = processEngine.getManagementService();
+TaskService taskService = processEngine.getTaskService();</programlisting>
+ </section>
+
+ <section id="deployingaprocess">
+ <title>Deploying a process</title>
+ <para>A jPDL process file like e.g. <literal>order.jpdl.xml</literal> that is
+ accessible as a resource on the classpath can be deployed programmatically with the
+ <literal>ProcessService</literal> like this:
+ </para>
+ <programlisting>processService.createDeployment()
+ .setLanguage("jpdl")
+ .addResource("order.jpdl.xml")
+ .deploy();</programlisting>
+ <para>Analogue to the <literal>addResource</literal> method above, the source of
+ the processes definitions XML can be picked up from a file, url, string,
+ input stream, zip or jar archive and a directory.
+ </para>
+ <para>During deployment, an <literal>id</literal> is assigned to the process
+ definition. Process definition properties <literal>name</literal> and
+ <literal>id</literal> are important for referencing the deployed process
+ definition later on. The <literal>id</literal> is based on the <literal>name</literal>
+ or <literal>key</literal> and <literal>version</literal>.
+ </para>
+ <para>If a <literal>key</literal> is provided, the <literal>id</literal>
+ will be <literal>{key}:{version}</literal>, otherwise it's
+ <literal>{name}:{version}</literal>. If no <literal>version</literal> is specified,
+ a <literal>version</literal> (<literal>int</literal>) will be assigned. For version
+ assignment, the versions of all deployed process definitions with the same name will
+ be taken into account. The assigned <literal>version</literal> will be one higher
+ then the highest <literal>version</literal> number of deployed process definitions
+ with the same name. If no similarly named process definitions have been deployed,
+ version number 1 is assigned.
+ </para>
+ <para>For example, the first time when the process</para>
+ <programlisting><process name="order">
+...
+</process></programlisting>
+ <para>is deployed, version 1 will be assigned and the generated <literal>id</literal>
+ will be <literal>order:1</literal> The second time when this process is deployed,
+ version 2 will be assigned and the generated id will be <literal>order:2</literal>
+ </para>
+ <para>The generated id will also replace all non digits and non [a-Z] characters
+ with underscores. So the first time when process</para>
+ <programlisting><process name="Insurance claim">
+...
+</process></programlisting>
+ <para>is deployed, the assigned id will be <literal>Insurance_claim:1</literal>
+ </para>
+ <para>To get short <literal>id</literal>s, a <literal>key</literal> like this:</para>
+ <programlisting><process name="Insurance claim" key="ICL">
+...
+</process></programlisting>
+ <para>resulting in id <literal>ICL:1</literal> being generated.</para>
+ <para>The <literal>ProcessService</literal> groups all methods that access
+ the repository of process definitions.
+ </para>
+ </section>
+
+ <section id="startinganewprocessinstance">
+ <title>Starting a new process instance</title>
+ <para>Starting a new process instance for a given
+ </para>
+ </section>
+
+ <section id="singallingawaitingexecution">
+ <title>Starting a new process instance</title>
+ <para>
+ </para>
+ </section>
+
+ <section id="taskservice">
+ <title>TaskService</title>
+ <para></para>
+ </section>
+
+ <section id="managementservice">
+ <title>ManagementService</title>
+ <para></para>
+ </section>
+
+</chapter>
\ No newline at end of file
Deleted: jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch04-Services.xml
===================================================================
--- jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch04-Services.xml 2008-11-21 18:36:09 UTC (rev 3041)
+++ jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch04-Services.xml 2008-11-21 20:29:11 UTC (rev 3042)
@@ -1,7 +0,0 @@
-<chapter id="services">
- <title>Services</title>
-
- <para>
- </para>
-
-</chapter>
\ No newline at end of file
17 years, 5 months
JBoss JBPM SVN: r3041 - jbpm3/trunk/modules/enterprise/jar/src/test/java/org/jbpm/enterprise/config.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-11-21 13:36:09 -0500 (Fri, 21 Nov 2008)
New Revision: 3041
Modified:
jbpm3/trunk/modules/enterprise/jar/src/test/java/org/jbpm/enterprise/config/ContainerProvidedJarsTest.java
Log:
Test deployed jars explicitly
Modified: jbpm3/trunk/modules/enterprise/jar/src/test/java/org/jbpm/enterprise/config/ContainerProvidedJarsTest.java
===================================================================
--- jbpm3/trunk/modules/enterprise/jar/src/test/java/org/jbpm/enterprise/config/ContainerProvidedJarsTest.java 2008-11-21 17:38:10 UTC (rev 3040)
+++ jbpm3/trunk/modules/enterprise/jar/src/test/java/org/jbpm/enterprise/config/ContainerProvidedJarsTest.java 2008-11-21 18:36:09 UTC (rev 3041)
@@ -74,8 +74,7 @@
File jbpmDir = new File(serverHomeDir + "/deploy/jbpm");
assertTrue("jBPM dir exists: " + jbpmDir, jbpmDir.exists());
- // Store the deployed jars in a string builder
- String deployedJars = getDeployedJars(jbpmDir).toString();
+ List<String> deployedJars = getDeployedJars(jbpmDir);
// Iterate over the known server provided jars
List<String> matchingJars = new ArrayList<String>();
@@ -89,7 +88,7 @@
continue;
}
- if (deployedJars.indexOf(line) > 0)
+ if (deployedJars.contains(line))
{
matchingJars.add(line);
}
@@ -112,7 +111,10 @@
String fileName = file.getName();
if (fileName.endsWith(".jar"))
+ {
+ fileName = fileName.substring(0, fileName.length() - 4);
deployedJars.add(fileName);
+ }
}
return deployedJars;
}
17 years, 5 months
JBoss JBPM SVN: r3040 - in jbpm3/trunk/modules: core/src/main/java/org/jbpm/command and 7 other directories.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-11-21 12:38:10 -0500 (Fri, 21 Nov 2008)
New Revision: 3040
Added:
jbpm3/trunk/modules/core/src/main/java/org/jbpm/command/DeleteProcessDefinitionCommand.java
jbpm3/trunk/modules/integration/jboss42/scripts/
jbpm3/trunk/modules/integration/jboss42/scripts/assembly-config.xml
Removed:
jbpm3/trunk/modules/core/src/main/java/org/jbpm/command/DeleteProcessdefinitionCommand.java
Modified:
jbpm3/trunk/modules/core/src/main/java/org/jbpm/JbpmConfiguration.java
jbpm3/trunk/modules/distribution/pom.xml
jbpm3/trunk/modules/distribution/scripts/assembly-deploy-artifacts.xml
jbpm3/trunk/modules/distribution/src/main/resources/installer/install-definition.xml
jbpm3/trunk/modules/enterprise/ear/pom.xml
jbpm3/trunk/modules/integration/jboss42/pom.xml
jbpm3/trunk/modules/integration/jboss42/src/main/java/org/jbpm/integration/jboss42/PARSubDeployer.java
Log:
Integrate PAR deployer with installer
Modified: jbpm3/trunk/modules/core/src/main/java/org/jbpm/JbpmConfiguration.java
===================================================================
--- jbpm3/trunk/modules/core/src/main/java/org/jbpm/JbpmConfiguration.java 2008-11-21 16:18:49 UTC (rev 3039)
+++ jbpm3/trunk/modules/core/src/main/java/org/jbpm/JbpmConfiguration.java 2008-11-21 17:38:10 UTC (rev 3040)
@@ -50,16 +50,14 @@
* configuration of one jBPM instance.
*
* <p>
- * During process execution, jBPM might need to use some services. A
- * JbpmConfiguration contains the knowledge on how to create those services.
+ * During process execution, jBPM might need to use some services. A JbpmConfiguration contains the knowledge on how to
+ * create those services.
* </p>
*
* <p>
- * A JbpmConfiguration is a thread safe object and serves as a factory for
- * {@link org.jbpm.JbpmContext}s, which means one JbpmConfiguration can be used
- * to create {@link org.jbpm.JbpmContext}s for all threads. The single
- * JbpmConfiguration can be maintained in a static member or in the JNDI tree if
- * that is available.
+ * A JbpmConfiguration is a thread safe object and serves as a factory for {@link org.jbpm.JbpmContext}s, which means
+ * one JbpmConfiguration can be used to create {@link org.jbpm.JbpmContext}s for all threads. The single
+ * JbpmConfiguration can be maintained in a static member or in the JNDI tree if that is available.
* </p>
*
* <p>
@@ -90,9 +88,8 @@
* </pre>
*
* </li>
- * <li>By specifying a custom implementation of an object factory. This can be
- * used to specify a JbpmConfiguration in other bean-style notations such as
- * used by JBoss Microcontainer or Spring.
+ * <li>By specifying a custom implementation of an object factory. This can be used to specify a JbpmConfiguration in
+ * other bean-style notations such as used by JBoss Microcontainer or Spring.
*
* <pre>
* ObjectFactory of = new <i>MyCustomObjectFactory</i>();
@@ -105,8 +102,7 @@
* </p>
*
* <p>
- * JbpmConfigurations can be configured using a spring-like XML notation (in
- * relax ng compact notation):
+ * JbpmConfigurations can be configured using a spring-like XML notation (in relax ng compact notation):
* </p>
*
* <pre>
@@ -240,7 +236,8 @@
* </p>
*
* <p>
- * Other configuration properties <table>
+ * Other configuration properties
+ * <table>
* <tr>
* <td>jbpm.files.dir</td>
* <td></td>
@@ -252,7 +249,8 @@
* </table>
* </p>
*/
-public class JbpmConfiguration implements Serializable {
+public class JbpmConfiguration implements Serializable
+{
private static final long serialVersionUID = 1L;
@@ -264,34 +262,41 @@
private ThreadLocal jbpmContextStacks = new ThreadLocal();
private JobExecutor jobExecutor;
- public JbpmConfiguration(ObjectFactory objectFactory) {
+ public JbpmConfiguration(ObjectFactory objectFactory)
+ {
this.objectFactory = objectFactory;
}
- public static JbpmConfiguration getInstance() {
+ public static JbpmConfiguration getInstance()
+ {
return getInstance(null);
}
- public static JbpmConfiguration getInstance(String resource) {
+ public static JbpmConfiguration getInstance(String resource)
+ {
JbpmConfiguration instance = null;
- synchronized (instances) {
- if (resource == null) {
+ synchronized (instances)
+ {
+ if (resource == null)
+ {
resource = "jbpm.cfg.xml";
}
- instance = (JbpmConfiguration) instances.get(resource);
- if (instance == null) {
+ instance = (JbpmConfiguration)instances.get(resource);
+ if (instance == null)
+ {
- if (defaultObjectFactory != null) {
- log.debug("creating jbpm configuration from given default object factory '"
- + defaultObjectFactory
- + "'");
+ if (defaultObjectFactory != null)
+ {
+ log.debug("creating jbpm configuration from given default object factory '" + defaultObjectFactory + "'");
instance = new JbpmConfiguration(defaultObjectFactory);
}
- else {
+ else
+ {
- try {
+ try
+ {
log.info("using jbpm configuration resource '" + resource + "'");
InputStream jbpmCfgXmlStream = ClassLoaderUtil.getJbpmConfigurationStream(resource);
@@ -301,7 +306,8 @@
// will be confused if the resource is not found and not loaded,
// without
// any notice)
- if (jbpmCfgXmlStream == null && !"jbpm.cfg.xml".equals(resource)) {
+ if (jbpmCfgXmlStream == null && !"jbpm.cfg.xml".equals(resource))
+ {
log.warn("jbpm configuration resource '" + resource + "' is not available");
}
@@ -309,10 +315,9 @@
instance = createJbpmConfiguration(objectFactory);
}
- catch (RuntimeException e) {
- throw new JbpmException("couldn't parse jbpm configuration from resource '"
- + resource
- + "'", e);
+ catch (RuntimeException e)
+ {
+ throw new JbpmException("couldn't parse jbpm configuration from resource '" + resource + "'", e);
}
}
@@ -323,25 +328,29 @@
return instance;
}
- public static boolean hasInstance(String resource) {
+ public static boolean hasInstance(String resource)
+ {
boolean hasInstance = false;
- if (resource == null) {
+ if (resource == null)
+ {
resource = "jbpm.cfg.xml";
}
- if ((instances != null) && (instances.containsKey(resource))) {
+ if ((instances != null) && (instances.containsKey(resource)))
+ {
hasInstance = true;
}
return hasInstance;
}
- protected static ObjectFactory parseObjectFactory(InputStream inputStream) {
+ protected static ObjectFactory parseObjectFactory(InputStream inputStream)
+ {
log.debug("loading defaults in jbpm configuration");
ObjectFactoryParser objectFactoryParser = new ObjectFactoryParser();
ObjectFactoryImpl objectFactoryImpl = new ObjectFactoryImpl();
- objectFactoryParser.parseElementsFromResource("org/jbpm/default.jbpm.cfg.xml",
- objectFactoryImpl);
+ objectFactoryParser.parseElementsFromResource("org/jbpm/default.jbpm.cfg.xml", objectFactoryImpl);
- if (inputStream != null) {
+ if (inputStream != null)
+ {
log.debug("loading specific configuration...");
objectFactoryParser.parseElementsStream(inputStream, objectFactoryImpl);
}
@@ -352,26 +361,31 @@
/**
* create an ObjectFacotory from an XML string.
*/
- public static JbpmConfiguration parseXmlString(String xml) {
+ public static JbpmConfiguration parseXmlString(String xml)
+ {
log.debug("creating jbpm configuration from xml string");
InputStream inputStream = null;
- if (xml != null) {
+ if (xml != null)
+ {
inputStream = new ByteArrayInputStream(xml.getBytes());
}
ObjectFactory objectFactory = parseObjectFactory(inputStream);
return createJbpmConfiguration(objectFactory);
}
- protected static JbpmConfiguration createJbpmConfiguration(ObjectFactory objectFactory) {
+ protected static JbpmConfiguration createJbpmConfiguration(ObjectFactory objectFactory)
+ {
JbpmConfiguration jbpmConfiguration = new JbpmConfiguration(objectFactory);
// now we make the bean jbpm.configuration always availble
- if (objectFactory instanceof ObjectFactoryImpl) {
- ObjectFactoryImpl objectFactoryImpl = (ObjectFactoryImpl) objectFactory;
+ if (objectFactory instanceof ObjectFactoryImpl)
+ {
+ ObjectFactoryImpl objectFactoryImpl = (ObjectFactoryImpl)objectFactory;
ObjectInfo jbpmConfigurationInfo = new ValueInfo("jbpmConfiguration", jbpmConfiguration);
objectFactoryImpl.addObjectInfo(jbpmConfigurationInfo);
- if (getHideStaleObjectExceptions(objectFactory)) {
+ if (getHideStaleObjectExceptions(objectFactory))
+ {
StaleObjectLogConfigurer.hideStaleObjectExceptions();
}
}
@@ -379,286 +393,350 @@
return jbpmConfiguration;
}
- private static boolean getHideStaleObjectExceptions(ObjectFactory objectFactory) {
- if (!objectFactory.hasObject("jbpm.hide.stale.object.exceptions")) {
+ private static boolean getHideStaleObjectExceptions(ObjectFactory objectFactory)
+ {
+ if (!objectFactory.hasObject("jbpm.hide.stale.object.exceptions"))
+ {
return true;
}
Object object = objectFactory.createObject("jbpm.hide.stale.object.exceptions");
- return object instanceof Boolean ? ((Boolean) object).booleanValue() : true;
+ return object instanceof Boolean ? ((Boolean)object).booleanValue() : true;
}
- public static JbpmConfiguration parseInputStream(InputStream inputStream) {
+ public static JbpmConfiguration parseInputStream(InputStream inputStream)
+ {
ObjectFactory objectFactory = parseObjectFactory(inputStream);
log.debug("creating jbpm configuration from input stream");
return createJbpmConfiguration(objectFactory);
}
- public static JbpmConfiguration parseResource(String resource) {
+ public static JbpmConfiguration parseResource(String resource)
+ {
InputStream inputStream = null;
log.debug("creating jbpm configuration from resource '" + resource + "'");
- if (resource != null) {
+ if (resource != null)
+ {
inputStream = ClassLoaderUtil.getJbpmConfigurationStream(resource);
}
ObjectFactory objectFactory = parseObjectFactory(inputStream);
return createJbpmConfiguration(objectFactory);
}
- public JbpmContext createJbpmContext() {
+ public JbpmContext createJbpmContext()
+ {
return createJbpmContext(JbpmContext.DEFAULT_JBPM_CONTEXT_NAME);
}
- public JbpmContext createJbpmContext(String name) {
- JbpmContext jbpmContext = (JbpmContext) objectFactory.createObject(name);
+ public JbpmContext createJbpmContext(String name)
+ {
+ JbpmContext jbpmContext = (JbpmContext)objectFactory.createObject(name);
jbpmContext.jbpmConfiguration = this;
jbpmContextCreated(jbpmContext);
return jbpmContext;
}
- public ServiceFactory getServiceFactory(String serviceName) {
+ public ServiceFactory getServiceFactory(String serviceName)
+ {
return getServiceFactory(serviceName, JbpmContext.DEFAULT_JBPM_CONTEXT_NAME);
}
- public ServiceFactory getServiceFactory(String serviceName, String jbpmContextName) {
+ public ServiceFactory getServiceFactory(String serviceName, String jbpmContextName)
+ {
ServiceFactory serviceFactory = null;
JbpmContext jbpmContext = createJbpmContext(jbpmContextName);
- try {
+ try
+ {
serviceFactory = jbpmContext.getServices().getServiceFactory(serviceName);
}
- finally {
+ finally
+ {
jbpmContext.close();
}
return serviceFactory;
}
- public static ClassLoader getProcessClassLoader(ProcessDefinition processDefinition) {
+ public static ClassLoader getProcessClassLoader(ProcessDefinition processDefinition)
+ {
ProcessClassLoaderFactory factory = null;
- if (Configs.hasObject("jbpm.processClassLoader")) {
- factory = (ProcessClassLoaderFactory) Configs.getObject("jbpm.processClassLoader");
+ if (Configs.hasObject("jbpm.processClassLoader"))
+ {
+ factory = (ProcessClassLoaderFactory)Configs.getObject("jbpm.processClassLoader");
}
- else {
+ else
+ {
factory = new DefaultProcessClassLoaderFactory();
}
return factory.getProcessClassLoader(processDefinition);
}
/**
- * gives the jbpm domain model access to configuration information via the
- * current JbpmContext.
+ * gives the jbpm domain model access to configuration information via the current JbpmContext.
*/
- public abstract static class Configs {
+ public abstract static class Configs
+ {
- public static ObjectFactory getObjectFactory() {
+ public static ObjectFactory getObjectFactory()
+ {
ObjectFactory objectFactory = null;
JbpmContext jbpmContext = JbpmContext.getCurrentJbpmContext();
- if (jbpmContext != null) {
+ if (jbpmContext != null)
+ {
objectFactory = jbpmContext.objectFactory;
}
- else {
+ else
+ {
objectFactory = getInstance().objectFactory;
}
return objectFactory;
}
- public static void setDefaultObjectFactory(ObjectFactory objectFactory) {
+ public static void setDefaultObjectFactory(ObjectFactory objectFactory)
+ {
defaultObjectFactory = objectFactory;
}
- public static boolean hasObject(String name) {
+ public static boolean hasObject(String name)
+ {
ObjectFactory objectFactory = getObjectFactory();
return objectFactory.hasObject(name);
}
- public static synchronized Object getObject(String name) {
+ public static synchronized Object getObject(String name)
+ {
ObjectFactory objectFactory = getObjectFactory();
return objectFactory.createObject(name);
}
- public static String getString(String name) {
- return (String) getObject(name);
+ public static String getString(String name)
+ {
+ return (String)getObject(name);
}
- public static long getLong(String name) {
- return ((Long) getObject(name)).longValue();
+ public static long getLong(String name)
+ {
+ return ((Long)getObject(name)).longValue();
}
- public static int getInt(String name) {
- return ((Integer) getObject(name)).intValue();
+ public static int getInt(String name)
+ {
+ return ((Integer)getObject(name)).intValue();
}
- public static boolean getBoolean(String name) {
- return ((Boolean) getObject(name)).booleanValue();
+ public static boolean getBoolean(String name)
+ {
+ return ((Boolean)getObject(name)).booleanValue();
}
}
- public void cleanSchema() {
+ public void cleanSchema()
+ {
cleanSchema(JbpmContext.DEFAULT_JBPM_CONTEXT_NAME);
}
- public void cleanSchema(String jbpmContextName) {
+ public void cleanSchema(String jbpmContextName)
+ {
JbpmContext jbpmContext = createJbpmContext(jbpmContextName);
- try {
+ try
+ {
Services services = jbpmContext.getServices();
- DbPersistenceServiceFactory persistenceServiceFactory = (DbPersistenceServiceFactory) services.getServiceFactory(Services.SERVICENAME_PERSISTENCE);
+ DbPersistenceServiceFactory persistenceServiceFactory = (DbPersistenceServiceFactory)services.getServiceFactory(Services.SERVICENAME_PERSISTENCE);
persistenceServiceFactory.cleanSchema();
}
- finally {
+ finally
+ {
jbpmContext.close();
}
}
- public void createSchema() {
+ public void createSchema()
+ {
createSchema(JbpmContext.DEFAULT_JBPM_CONTEXT_NAME);
}
- public void createSchema(String jbpmContextName) {
+ public void createSchema(String jbpmContextName)
+ {
JbpmContext jbpmContext = createJbpmContext(jbpmContextName);
- try {
+ try
+ {
Services services = jbpmContext.getServices();
- DbPersistenceServiceFactory persistenceServiceFactory = (DbPersistenceServiceFactory) services.getServiceFactory(Services.SERVICENAME_PERSISTENCE);
+ DbPersistenceServiceFactory persistenceServiceFactory = (DbPersistenceServiceFactory)services.getServiceFactory(Services.SERVICENAME_PERSISTENCE);
persistenceServiceFactory.createSchema();
}
- finally {
+ finally
+ {
jbpmContext.close();
}
}
- public void dropSchema() {
+ public void dropSchema()
+ {
dropSchema(JbpmContext.DEFAULT_JBPM_CONTEXT_NAME);
}
- public void dropSchema(String jbpmContextName) {
+ public void dropSchema(String jbpmContextName)
+ {
log.warn("Dropping schema: " + jbpmContextName);
JbpmContext jbpmContext = createJbpmContext(jbpmContextName);
- try {
+ try
+ {
Services services = jbpmContext.getServices();
- DbPersistenceServiceFactory persistenceServiceFactory = (DbPersistenceServiceFactory) services.getServiceFactory(Services.SERVICENAME_PERSISTENCE);
+ DbPersistenceServiceFactory persistenceServiceFactory = (DbPersistenceServiceFactory)services.getServiceFactory(Services.SERVICENAME_PERSISTENCE);
persistenceServiceFactory.dropSchema();
}
- finally {
+ finally
+ {
jbpmContext.close();
}
}
- public void close() {
+ public void close()
+ {
close(JbpmContext.DEFAULT_JBPM_CONTEXT_NAME);
}
- public void close(String jbpmContextName) {
+ public void close(String jbpmContextName)
+ {
JbpmContext jbpmContext = createJbpmContext(jbpmContextName);
- try {
+ try
+ {
- synchronized (instances) {
+ synchronized (instances)
+ {
Iterator iter = instances.keySet().iterator();
- while (iter.hasNext()) {
- String resource = (String) iter.next();
- if (this == instances.get(resource)) {
+ while (iter.hasNext())
+ {
+ String resource = (String)iter.next();
+ if (this == instances.get(resource))
+ {
instances.remove(resource);
break;
}
}
}
- if (jobExecutor != null) {
+ if (jobExecutor != null)
+ {
jobExecutor.stop();
}
Map serviceFactories = jbpmContext.getServices().getServiceFactories();
- if (serviceFactories != null) {
+ if (serviceFactories != null)
+ {
Iterator iter = serviceFactories.values().iterator();
- while (iter.hasNext()) {
- ServiceFactory serviceFactory = (ServiceFactory) iter.next();
+ while (iter.hasNext())
+ {
+ ServiceFactory serviceFactory = (ServiceFactory)iter.next();
serviceFactory.close();
}
}
}
- finally {
+ finally
+ {
jbpmContext.close();
}
}
- static JbpmConfiguration getCurrentJbpmConfiguration() {
+ static JbpmConfiguration getCurrentJbpmConfiguration()
+ {
JbpmConfiguration currentJbpmConfiguration = null;
Stack stack = getJbpmConfigurationStack();
- if (!stack.isEmpty()) {
- currentJbpmConfiguration = (JbpmConfiguration) stack.peek();
+ if (!stack.isEmpty())
+ {
+ currentJbpmConfiguration = (JbpmConfiguration)stack.peek();
}
return currentJbpmConfiguration;
}
- static synchronized Stack getJbpmConfigurationStack() {
- Stack stack = (Stack) jbpmConfigurationsStacks.get();
- if (stack == null) {
+ static synchronized Stack getJbpmConfigurationStack()
+ {
+ Stack stack = (Stack)jbpmConfigurationsStacks.get();
+ if (stack == null)
+ {
stack = new Stack();
jbpmConfigurationsStacks.set(stack);
}
return stack;
}
- synchronized void pushJbpmConfiguration() {
+ synchronized void pushJbpmConfiguration()
+ {
getJbpmConfigurationStack().push(this);
}
- synchronized void popJbpmConfiguration() {
+ synchronized void popJbpmConfiguration()
+ {
getJbpmConfigurationStack().remove(this);
}
- public JbpmContext getCurrentJbpmContext() {
+ public JbpmContext getCurrentJbpmContext()
+ {
JbpmContext currentJbpmContext = null;
Stack stack = getJbpmContextStack();
- if (!stack.isEmpty()) {
- currentJbpmContext = (JbpmContext) stack.peek();
+ if (!stack.isEmpty())
+ {
+ currentJbpmContext = (JbpmContext)stack.peek();
}
return currentJbpmContext;
}
- Stack getJbpmContextStack() {
- Stack stack = (Stack) jbpmContextStacks.get();
- if (stack == null) {
+ Stack getJbpmContextStack()
+ {
+ Stack stack = (Stack)jbpmContextStacks.get();
+ if (stack == null)
+ {
stack = new Stack();
jbpmContextStacks.set(stack);
}
return stack;
}
- void pushJbpmContext(JbpmContext jbpmContext) {
+ void pushJbpmContext(JbpmContext jbpmContext)
+ {
getJbpmContextStack().push(jbpmContext);
}
- void popJbpmContext(JbpmContext jbpmContext) {
+ void popJbpmContext(JbpmContext jbpmContext)
+ {
Stack stack = getJbpmContextStack();
- if (stack.isEmpty()) {
- throw new JbpmException(
- "closed JbpmContext more then once... check your try-finally's around JbpmContexts blocks");
+ if (stack.isEmpty())
+ {
+ throw new JbpmException("closed JbpmContext more then once... check your try-finally's around JbpmContexts blocks");
}
- JbpmContext popped = (JbpmContext) stack.pop();
- if (jbpmContext != popped) {
- throw new JbpmException(
- "closed JbpmContext in different order then they were created... check your try-finally's around JbpmContexts blocks");
+ JbpmContext popped = (JbpmContext)stack.pop();
+ if (jbpmContext != popped)
+ {
+ throw new JbpmException("closed JbpmContext in different order then they were created... check your try-finally's around JbpmContexts blocks");
}
}
- void jbpmContextCreated(JbpmContext jbpmContext) {
+ void jbpmContextCreated(JbpmContext jbpmContext)
+ {
pushJbpmConfiguration();
pushJbpmContext(jbpmContext);
}
- void jbpmContextClosed(JbpmContext jbpmContext) {
+ void jbpmContextClosed(JbpmContext jbpmContext)
+ {
popJbpmConfiguration();
popJbpmContext(jbpmContext);
}
- public void startJobExecutor() {
+ public void startJobExecutor()
+ {
getJobExecutor().start();
}
- public synchronized JobExecutor getJobExecutor() {
- if (jobExecutor == null) {
- try {
- jobExecutor = (JobExecutor) this.objectFactory.createObject("jbpm.job.executor");
+ public synchronized JobExecutor getJobExecutor()
+ {
+ if (jobExecutor == null)
+ {
+ try
+ {
+ jobExecutor = (JobExecutor)this.objectFactory.createObject("jbpm.job.executor");
}
- catch (ClassCastException e) {
- throw new JbpmException("jbpm configuration object under key 'jbpm.job.executor' is not a "
- + JobExecutor.class.getName(), e);
+ catch (ClassCastException e)
+ {
+ throw new JbpmException("jbpm configuration object under key 'jbpm.job.executor' is not a " + JobExecutor.class.getName(), e);
}
}
return jobExecutor;
Copied: jbpm3/trunk/modules/core/src/main/java/org/jbpm/command/DeleteProcessDefinitionCommand.java (from rev 3038, jbpm3/trunk/modules/core/src/main/java/org/jbpm/command/DeleteProcessdefinitionCommand.java)
===================================================================
--- jbpm3/trunk/modules/core/src/main/java/org/jbpm/command/DeleteProcessDefinitionCommand.java (rev 0)
+++ jbpm3/trunk/modules/core/src/main/java/org/jbpm/command/DeleteProcessDefinitionCommand.java 2008-11-21 17:38:10 UTC (rev 3040)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.command;
+
+import org.jbpm.JbpmContext;
+
+/**
+ * Delete a proces definition by ID
+ *
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class DeleteProcessDefinitionCommand extends AbstractGetObjectBaseCommand
+{
+
+ private static final long serialVersionUID = -1908847549444051495L;
+
+ private long id;
+
+ public DeleteProcessDefinitionCommand(long id)
+ {
+ super();
+ this.id = id;
+ }
+
+ public Object execute(JbpmContext jbpmContext) throws Exception
+ {
+ jbpmContext.getGraphSession().deleteProcessDefinition(id);
+ return Boolean.TRUE;
+ }
+
+}
Deleted: jbpm3/trunk/modules/core/src/main/java/org/jbpm/command/DeleteProcessdefinitionCommand.java
===================================================================
--- jbpm3/trunk/modules/core/src/main/java/org/jbpm/command/DeleteProcessdefinitionCommand.java 2008-11-21 16:18:49 UTC (rev 3039)
+++ jbpm3/trunk/modules/core/src/main/java/org/jbpm/command/DeleteProcessdefinitionCommand.java 2008-11-21 17:38:10 UTC (rev 3040)
@@ -1,50 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.command;
-
-import org.jbpm.JbpmContext;
-
-/**
- * Delete a proces definition by ID
- *
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-public class DeleteProcessdefinitionCommand extends AbstractGetObjectBaseCommand
-{
-
- private static final long serialVersionUID = -1908847549444051495L;
-
- private long id;
-
- public DeleteProcessdefinitionCommand(long id)
- {
- super();
- this.id = id;
- }
-
- public Object execute(JbpmContext jbpmContext) throws Exception
- {
- jbpmContext.getGraphSession().deleteProcessDefinition(id);
- return Boolean.TRUE;
- }
-
-}
Modified: jbpm3/trunk/modules/distribution/pom.xml
===================================================================
--- jbpm3/trunk/modules/distribution/pom.xml 2008-11-21 16:18:49 UTC (rev 3039)
+++ jbpm3/trunk/modules/distribution/pom.xml 2008-11-21 17:38:10 UTC (rev 3040)
@@ -30,17 +30,11 @@
<dependencies>
<dependency>
<groupId>org.jbpm.jbpm3</groupId>
- <artifactId>jbpm-jpdl</artifactId>
+ <artifactId>jbpm-db</artifactId>
<version>${version}</version>
</dependency>
<dependency>
<groupId>org.jbpm.jbpm3</groupId>
- <artifactId>jbpm-jpdl</artifactId>
- <classifier>config</classifier>
- <version>${version}</version>
- </dependency>
- <dependency>
- <groupId>org.jbpm.jbpm3</groupId>
<artifactId>jbpm-enterprise-beans</artifactId>
<version>${version}</version>
<type>ejb</type>
@@ -59,19 +53,19 @@
</dependency>
<dependency>
<groupId>org.jbpm.jbpm3</groupId>
- <artifactId>jbpm-identity</artifactId>
+ <artifactId>jbpm-examples</artifactId>
+ <classifier>examples</classifier>
<version>${version}</version>
</dependency>
<dependency>
<groupId>org.jbpm.jbpm3</groupId>
<artifactId>jbpm-identity</artifactId>
- <classifier>config</classifier>
<version>${version}</version>
</dependency>
<dependency>
<groupId>org.jbpm.jbpm3</groupId>
- <artifactId>jbpm-examples</artifactId>
- <classifier>examples</classifier>
+ <artifactId>jbpm-identity</artifactId>
+ <classifier>config</classifier>
<version>${version}</version>
</dependency>
<dependency>
@@ -83,15 +77,32 @@
</dependency>
<dependency>
<groupId>org.jbpm.jbpm3</groupId>
- <artifactId>jbpm-userguide</artifactId>
+ <artifactId>jbpm-integration-jboss42</artifactId>
<version>${version}</version>
- <type>jdocbook</type>
</dependency>
<dependency>
<groupId>org.jbpm.jbpm3</groupId>
- <artifactId>jbpm-db</artifactId>
+ <artifactId>jbpm-integration-jboss42</artifactId>
+ <classifier>config</classifier>
<version>${version}</version>
</dependency>
+ <dependency>
+ <groupId>org.jbpm.jbpm3</groupId>
+ <artifactId>jbpm-jpdl</artifactId>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jbpm.jbpm3</groupId>
+ <artifactId>jbpm-jpdl</artifactId>
+ <classifier>config</classifier>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jbpm.jbpm3</groupId>
+ <artifactId>jbpm-userguide</artifactId>
+ <version>${version}</version>
+ <type>jdocbook</type>
+ </dependency>
<!-- jBPM Projects -->
<dependency>
Modified: jbpm3/trunk/modules/distribution/scripts/assembly-deploy-artifacts.xml
===================================================================
--- jbpm3/trunk/modules/distribution/scripts/assembly-deploy-artifacts.xml 2008-11-21 16:18:49 UTC (rev 3039)
+++ jbpm3/trunk/modules/distribution/scripts/assembly-deploy-artifacts.xml 2008-11-21 17:38:10 UTC (rev 3040)
@@ -50,6 +50,14 @@
</includes>
<unpack>true</unpack>
</dependencySet>
+ <dependencySet>
+ <outputDirectory>resources/jbpm-integration-config</outputDirectory>
+ <useStrictFiltering>true</useStrictFiltering>
+ <includes>
+ <include>*:jbpm-integration-jboss42:jar:config</include>
+ </includes>
+ <unpack>true</unpack>
+ </dependencySet>
<!-- examples -->
<dependencySet>
Modified: jbpm3/trunk/modules/distribution/src/main/resources/installer/install-definition.xml
===================================================================
--- jbpm3/trunk/modules/distribution/src/main/resources/installer/install-definition.xml 2008-11-21 16:18:49 UTC (rev 3039)
+++ jbpm3/trunk/modules/distribution/src/main/resources/installer/install-definition.xml 2008-11-21 17:38:10 UTC (rev 3040)
@@ -144,6 +144,7 @@
<include name="jbpm-enterprise-bundle.ear" />
<include name="jbpm-jpdl.jar" />
<include name="jbpm-identity.jar" />
+ <include name="jbpm-integration-jboss42.jar" />
<include name="jsf-console.war" />
<include name="activation.jar" />
<include name="antlr.jar" />
@@ -173,11 +174,18 @@
<description>The jBPM3 Server Components</description>
<!-- jbpm/jbpm-service.sar -->
- <fileset dir="@{deploy.artifacts.dir}/resources/jbpm-enterprise-config" targetdir="${installPath}/server/${jbossTargetServer}/deploy/jbpm/jbpm-service.sar"
- override="true">
+ <fileset dir="@{deploy.artifacts.dir}/resources/jbpm-enterprise-config" targetdir="${installPath}/server/${jbossTargetServer}/deploy/jbpm/jbpm-service.sar" override="true">
<include name="jbpm.cfg.xml" />
<include name="hibernate.extra.hbm.xml" />
</fileset>
+ <fileset dir="@{deploy.artifacts.dir}/resources/jbpm-integration-config" targetdir="${installPath}/server/${jbossTargetServer}/deploy/jbpm/jbpm-service.sar" override="true">
+ <include name="par-deployer.xml" />
+ </fileset>
+ <fileset dir="@{deploy.artifacts.dir}/lib" targetdir="${installPath}/server/${jbossTargetServer}/deploy/jbpm/jbpm-service.sar" override="true">
+ <include name="jbpm-jpdl.jar" />
+ <include name="jbpm-identity.jar" />
+ <include name="jbpm-integration-jboss42.jar" />
+ </fileset>
<file src="@{deploy.artifacts.dir}/lib/jbpm-identity-service.zip" targetdir="${installPath}/server/${jbossTargetServer}/deploy/jbpm/jbpm-service.sar"
unpack="true" override="true" />
Modified: jbpm3/trunk/modules/enterprise/ear/pom.xml
===================================================================
--- jbpm3/trunk/modules/enterprise/ear/pom.xml 2008-11-21 16:18:49 UTC (rev 3039)
+++ jbpm3/trunk/modules/enterprise/ear/pom.xml 2008-11-21 17:38:10 UTC (rev 3040)
@@ -44,48 +44,6 @@
<artifactId>jsf-console</artifactId>
<type>war</type>
</dependency>
- <dependency>
- <groupId>org.jbpm.jbpm3</groupId>
- <artifactId>jbpm-jpdl</artifactId>
- <version>${version}</version>
- <exclusions>
- <exclusion>
- <groupId>bsh</groupId>
- <artifactId>bsh</artifactId>
- </exclusion>
- <exclusion>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </exclusion>
- <exclusion>
- <groupId>dom4j</groupId>
- <artifactId>dom4j</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.ant</groupId>
- <artifactId>ant</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.jackrabbit</groupId>
- <artifactId>jackrabbit-core</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.jbpm.jbpm3</groupId>
- <artifactId>jbpm-identity</artifactId>
- <version>${version}</version>
- <exclusions>
- <exclusion>
- <groupId>org.jbpm.jbpm3</groupId>
- <artifactId>jbpm-jpdl</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
</dependencies>
<!-- Plugins -->
@@ -102,18 +60,6 @@
<bundleFileName>jbpm-enterprise-beans.jar</bundleFileName>
<unpack>true</unpack>
</ejbModule>
- <jarModule>
- <groupId>org.jbpm.jbpm3</groupId>
- <artifactId>jbpm-jpdl</artifactId>
- <bundleFileName>jbpm-jpdl.jar</bundleFileName>
- <includeInApplicationXml>true</includeInApplicationXml>
- </jarModule>
- <jarModule>
- <groupId>org.jbpm.jbpm3</groupId>
- <artifactId>jbpm-identity</artifactId>
- <bundleFileName>jbpm-identity.jar</bundleFileName>
- <includeInApplicationXml>true</includeInApplicationXml>
- </jarModule>
<webModule>
<groupId>org.jbpm.jbpm3</groupId>
<artifactId>jsf-console</artifactId>
Modified: jbpm3/trunk/modules/integration/jboss42/pom.xml
===================================================================
--- jbpm3/trunk/modules/integration/jboss42/pom.xml 2008-11-21 16:18:49 UTC (rev 3039)
+++ jbpm3/trunk/modules/integration/jboss42/pom.xml 2008-11-21 17:38:10 UTC (rev 3040)
@@ -36,8 +36,14 @@
<!-- Dependencies -->
<dependencies>
- <!-- jboss thirdparty dependencies -->
+ <!-- jBPM Dependencies -->
<dependency>
+ <groupId>org.jbpm.jbpm3</groupId>
+ <artifactId>jbpm-jpdl</artifactId>
+ <version>${version}</version>
+ </dependency>
+
+ <dependency>
<groupId>jboss</groupId>
<artifactId>jboss-system</artifactId>
<version>${jboss.version}</version>
@@ -63,4 +69,28 @@
<version>${jboss.common.version}</version>
</dependency>
</dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>assembly-config</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <finalName>${project.build.finalName}</finalName>
+ <appendAssemblyId>true</appendAssemblyId>
+ <descriptors>
+ <descriptor>scripts/assembly-config.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
</project>
Added: jbpm3/trunk/modules/integration/jboss42/scripts/assembly-config.xml
===================================================================
--- jbpm3/trunk/modules/integration/jboss42/scripts/assembly-config.xml (rev 0)
+++ jbpm3/trunk/modules/integration/jboss42/scripts/assembly-config.xml 2008-11-21 17:38:10 UTC (rev 3040)
@@ -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>${basedir}/src/main/etc</directory>
+ <outputDirectory>/</outputDirectory>
+ <includes>
+ <include>par-deployer.xml</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+</assembly>
\ No newline at end of file
Property changes on: jbpm3/trunk/modules/integration/jboss42/scripts/assembly-config.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbpm3/trunk/modules/integration/jboss42/src/main/java/org/jbpm/integration/jboss42/PARSubDeployer.java
===================================================================
--- jbpm3/trunk/modules/integration/jboss42/src/main/java/org/jbpm/integration/jboss42/PARSubDeployer.java 2008-11-21 16:18:49 UTC (rev 3039)
+++ jbpm3/trunk/modules/integration/jboss42/src/main/java/org/jbpm/integration/jboss42/PARSubDeployer.java 2008-11-21 17:38:10 UTC (rev 3040)
@@ -23,66 +23,138 @@
//$Id$
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.net.URL;
+
import org.jboss.deployment.DeploymentException;
import org.jboss.deployment.DeploymentInfo;
import org.jboss.deployment.SubDeployerSupport;
+import org.jbpm.JbpmConfiguration;
+import org.jbpm.JbpmContext;
+import org.jbpm.command.DeleteProcessDefinitionCommand;
+import org.jbpm.command.DeployProcessCommand;
+import org.jbpm.graph.def.ProcessDefinition;
/**
* A deployer service that manages jBPM Process Archive Deployments
- *
+ *
* @author Thomas.Diesler(a)jboss.org
* @since 03-May-2007
*/
public class PARSubDeployer extends SubDeployerSupport implements PARSubDeployerMBean
{
/** The suffixes we accept, along with their relative order */
- private static final String[] DEFAULT_ENHANCED_SUFFIXES = new String[] {
- "900:-process.xml"
- };
-
+ private static final String[] DEFAULT_ENHANCED_SUFFIXES = new String[] { "900:-process.xml" };
+
+ private JbpmConfiguration jbpmConfiguration;
+
public PARSubDeployer()
{
setEnhancedSuffixes(DEFAULT_ENHANCED_SUFFIXES);
}
@Override
- public boolean accepts(DeploymentInfo di)
+ protected void startService() throws Exception
{
- boolean accepts = super.accepts(di);
- if (accepts == true)
- {
- log.info("Accept: " + di);
- }
- return accepts;
+ super.startService();
+
+ // Deployer works with the default configuration
+ jbpmConfiguration = JbpmConfiguration.getInstance();
}
@Override
+ @SuppressWarnings("unchecked")
public void create(DeploymentInfo di) throws DeploymentException
{
super.create(di);
+
+ URL pdURL = getProcessDefinitionURL(di);
+ log.info("Deploy ProcessDefinition: " + pdURL);
+
+ JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
+ try
+ {
+ // Get the process definition from the URL
+ String pdXML = getProcessDefinition(pdURL);
+
+ // Deploy through the DeployProcessCommand
+ DeployProcessCommand command = new DeployProcessCommand(pdXML);
+ ProcessDefinition procDef = (ProcessDefinition)command.execute(jbpmContext);
+
+ // Remember the procDef ID
+ di.context.put(ProcessDefinition.class.getName(), new Long(procDef.getId()));
+ }
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
+ catch (Exception ex)
+ {
+ throw new DeploymentException("Cannot deploy: " + pdURL, ex);
+ }
+ finally
+ {
+ jbpmContext.close();
+ }
}
@Override
public void destroy(DeploymentInfo di) throws DeploymentException
{
+ URL pdURL = getProcessDefinitionURL(di);
+ log.info("Undeploy ProcessDefinition: " + pdURL);
+
+ Long procID = (Long)di.context.get(ProcessDefinition.class.getName());
+ if (procID != null)
+ {
+ JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
+ try
+ {
+ // Undeploy through the DeleteProcessDefinitionCommand
+ DeleteProcessDefinitionCommand command = new DeleteProcessDefinitionCommand(procID);
+ command.execute(jbpmContext);
+ }
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
+ catch (Exception ex)
+ {
+ throw new DeploymentException("Cannot deploy: " + pdURL, ex);
+ }
+ finally
+ {
+ jbpmContext.close();
+ }
+ }
super.destroy(di);
}
- @Override
- public void init(DeploymentInfo di) throws DeploymentException
+ private URL getProcessDefinitionURL(DeploymentInfo di)
{
- super.init(di);
+ URL pdURL = di.localUrl != null ? di.localUrl : di.url;
+ if (pdURL == null)
+ throw new IllegalStateException("Cannot obtain process definition URL");
+
+ return pdURL;
}
- @Override
- public void start(DeploymentInfo di) throws DeploymentException
+ private String getProcessDefinition(URL pdURL) throws IOException
{
- super.start(di);
+ BufferedReader br = new BufferedReader(new InputStreamReader(pdURL.openStream()));
+ StringWriter strwr = new StringWriter();
+ PrintWriter pwr = new PrintWriter(strwr);
+ String line = br.readLine();
+ while (line != null)
+ {
+ pwr.println(line);
+ line = br.readLine();
+ }
+ String pdXML = strwr.toString();
+ return pdXML;
}
-
- @Override
- public void stop(DeploymentInfo di) throws DeploymentException
- {
- super.stop(di);
- }
}
\ No newline at end of file
17 years, 5 months
JBoss JBPM SVN: r3039 - jbpm3/trunk/modules/enterprise/jar.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-11-21 11:18:49 -0500 (Fri, 21 Nov 2008)
New Revision: 3039
Modified:
jbpm3/trunk/modules/enterprise/jar/pom.xml
Log:
Fix enterprise excludes
Modified: jbpm3/trunk/modules/enterprise/jar/pom.xml
===================================================================
--- jbpm3/trunk/modules/enterprise/jar/pom.xml 2008-11-21 15:59:34 UTC (rev 3038)
+++ jbpm3/trunk/modules/enterprise/jar/pom.xml 2008-11-21 16:18:49 UTC (rev 3039)
@@ -259,9 +259,9 @@
<configuration>
<excludes>
<!-- [JBPM-1708] Enterprise EjbSchedulerTest fails -->
- <exclude>org/jbpm/scheduler/ejbtimer/EjbSchedulerTest.java</exclude>
+ <exclude>org/jbpm/enterprise/ejbtimer/EjbSchedulerTest.java</exclude>
<!-- [JBPM-1811] JmsMessageTest fails intermitently on HSQLDB -->
- <exclude>org/jbpm/msg/jms/JmsMessageTest.java</exclude>
+ <exclude>org/jbpm/enterprise/jms/JmsMessageTest.java</exclude>
</excludes>
</configuration>
</plugin>
@@ -288,9 +288,9 @@
<configuration>
<excludes>
<!-- [JBPM-1708] Enterprise EjbSchedulerTest fails -->
- <exclude>org/jbpm/scheduler/ejbtimer/EjbSchedulerTest.java</exclude>
+ <exclude>org/jbpm/enterprise/ejbtimer/EjbSchedulerTest.java</exclude>
<!-- [JBPM-1811] JmsMessageTest fails intermitently on HSQLDB -->
- <exclude>org/jbpm/msg/jms/JmsMessageTest.java</exclude>
+ <exclude>org/jbpm/enterprise/jms/JmsMessageTest.java</exclude>
</excludes>
</configuration>
</plugin>
@@ -359,9 +359,9 @@
<configuration>
<excludes>
<!-- [JBPM-1818] Use Sybase instance that supports XA Transaction -->
- <exclude>org/jbpm/scheduler/ejbtimer/EjbSchedulerTest.java</exclude>
- <exclude>org/jbpm/persistence/jta/JtaDbPersistenceTest.java</exclude>
- <exclude>org/jbpm/msg/jms/JmsMessageTest.java</exclude>
+ <exclude>org/jbpm/enterprise/ejbtimer/EjbSchedulerTest.java</exclude>
+ <exclude>org/jbpm/enterprise/jta/JtaDbPersistenceTest.java</exclude>
+ <exclude>org/jbpm/enterprise/jms/JmsMessageTest.java</exclude>
<!-- [JBPM-1830] Fix AppServerConfigurationsTest for sybase on jboss500 -->
<exclude>org/jbpm/enterprise/AppServerConfigurationsTest.java</exclude>
</excludes>
17 years, 5 months
JBoss JBPM SVN: r3038 - in jbpm4/trunk/modules: api/src/main/resources and 17 other directories.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2008-11-21 10:59:34 -0500 (Fri, 21 Nov 2008)
New Revision: 3038
Added:
jbpm4/trunk/modules/api/src/main/resources/
jbpm4/trunk/modules/api/src/main/resources/cfg.xsd
jbpm4/trunk/modules/api/src/main/resources/jpdl.xsd
jbpm4/trunk/modules/devguide/src/
jbpm4/trunk/modules/devguide/src/main/
jbpm4/trunk/modules/devguide/src/main/diagrams/
jbpm4/trunk/modules/devguide/src/main/diagrams/diagrams.mdzip
jbpm4/trunk/modules/devguide/src/main/diagrams/images.ppt
jbpm4/trunk/modules/devguide/src/main/docbook/
jbpm4/trunk/modules/devguide/src/main/docbook/en/
jbpm4/trunk/modules/devguide/src/main/docbook/en/images/
jbpm4/trunk/modules/devguide/src/main/docbook/en/images/apis.png
jbpm4/trunk/modules/devguide/src/main/docbook/en/images/ch04.execution.states.png
jbpm4/trunk/modules/devguide/src/main/docbook/en/images/ch09.persistent.process.png
jbpm4/trunk/modules/devguide/src/main/docbook/en/images/class.diagram.process.definition.png
jbpm4/trunk/modules/devguide/src/main/docbook/en/images/class.diagram.process.execution.png
jbpm4/trunk/modules/devguide/src/main/docbook/en/images/composite.node.png
jbpm4/trunk/modules/devguide/src/main/docbook/en/images/execution.automatic.wait1.png
jbpm4/trunk/modules/devguide/src/main/docbook/en/images/execution.automatic.wait2.png
jbpm4/trunk/modules/devguide/src/main/docbook/en/images/execution.automatic.wait3.png
jbpm4/trunk/modules/devguide/src/main/docbook/en/images/execution.concurrency.png
jbpm4/trunk/modules/devguide/src/main/docbook/en/images/execution.loan.archive.png
jbpm4/trunk/modules/devguide/src/main/docbook/en/images/execution.loan.end.png
jbpm4/trunk/modules/devguide/src/main/docbook/en/images/execution.loan.evaluate.png
jbpm4/trunk/modules/devguide/src/main/docbook/en/images/initial.in.composite.png
jbpm4/trunk/modules/devguide/src/main/docbook/en/images/interceptors.png
jbpm4/trunk/modules/devguide/src/main/docbook/en/images/loan.db.png
jbpm4/trunk/modules/devguide/src/main/docbook/en/images/loan.execution.png
jbpm4/trunk/modules/devguide/src/main/docbook/en/images/process.ab.png
jbpm4/trunk/modules/devguide/src/main/docbook/en/images/process.anatomy.classes.png
jbpm4/trunk/modules/devguide/src/main/docbook/en/images/process.automatic.png
jbpm4/trunk/modules/devguide/src/main/docbook/en/images/process.loan.png
jbpm4/trunk/modules/devguide/src/main/docbook/en/images/process.propagate.png
jbpm4/trunk/modules/devguide/src/main/docbook/en/images/process.structure.classes.png
jbpm4/trunk/modules/devguide/src/main/docbook/en/images/self.transition.png
jbpm4/trunk/modules/devguide/src/main/docbook/en/images/transactions.png
jbpm4/trunk/modules/devguide/src/main/docbook/en/images/transition.inheritence.png
jbpm4/trunk/modules/devguide/src/main/docbook/en/images/transition.into.composite.png
jbpm4/trunk/modules/devguide/src/main/docbook/en/images/transition.out.of.composite.png
jbpm4/trunk/modules/devguide/src/main/docbook/en/images/transition.png
jbpm4/trunk/modules/devguide/src/main/docbook/en/images/transition.to.inner.png
jbpm4/trunk/modules/devguide/src/main/docbook/en/images/transition.to.outer.png
jbpm4/trunk/modules/devguide/src/main/docbook/en/master.xml
jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/
jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch01-Introduction.xml
jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch02-ExecutionModes.xml
jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch03-Architecture.xml
jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch04-ImplementingBasicActivities.xml
jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch05-ProcessAnatomy.xml
jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch06-ImplementingAdvancedActivities.xml
jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch07-Variables.xml
jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch08-Timers.xml
jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch09-AsynchronousContinuations.xml
jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch10-SoftwareLogging.xml
jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/chxx-DelegationClasses.xml
jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/chxx-Environment.xml
jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/chxx-History.xml
jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/chxx-Persistence.xml
jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/chxx-ProcessLanguages.xml
jbpm4/trunk/modules/userguide/src/
jbpm4/trunk/modules/userguide/src/main/
jbpm4/trunk/modules/userguide/src/main/diagrams/
jbpm4/trunk/modules/userguide/src/main/diagrams/diagrams.mdzip
jbpm4/trunk/modules/userguide/src/main/diagrams/images.ppt
jbpm4/trunk/modules/userguide/src/main/docbook/
jbpm4/trunk/modules/userguide/src/main/docbook/en/
jbpm4/trunk/modules/userguide/src/main/docbook/en/images/
jbpm4/trunk/modules/userguide/src/main/docbook/en/master.xml
jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/
jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch01-Introduction.xml
jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch02-Environments.xml
jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch03-Configuration.xml
jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch04-Services.xml
Removed:
jbpm4/trunk/modules/jpdl/src/main/resources/org/jbpm/jpdl/jpdl.xsd
jbpm4/trunk/modules/pvm/src/main/resources/org/jbpm/pvm/wire.xsd
Log:
jbpm-configuration and userguide-devguide split
Added: jbpm4/trunk/modules/api/src/main/resources/cfg.xsd
===================================================================
--- jbpm4/trunk/modules/api/src/main/resources/cfg.xsd (rev 0)
+++ jbpm4/trunk/modules/api/src/main/resources/cfg.xsd 2008-11-21 15:59:34 UTC (rev 3038)
@@ -0,0 +1,1350 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://jbpm.org/xsd/cfg"
+ xmlns:tns="http://jbpm.org/xsd/cfg"
+ elementFormDefault="qualified">
+
+ <annotation>
+ <documentation>Schema for the jBPM configuration file; configuration
+ is the top level element.
+ </documentation>
+ </annotation>
+
+ <!-- ### ELEMENTS ######################################################## -->
+
+ <element name="business-calendar">
+ <annotation><documentation>A BusinessCalendar that knows about working hours</documentation></annotation>
+ <complexType>
+ <sequence>
+ <element name="monday" type="tns:businessCalendarDayType" minOccurs="0"/>
+ <element name="tuesday" type="tns:businessCalendarDayType" minOccurs="0"/>
+ <element name="wednesday" type="tns:businessCalendarDayType" minOccurs="0"/>
+ <element name="thursday" type="tns:businessCalendarDayType" minOccurs="0"/>
+ <element name="friday" type="tns:businessCalendarDayType" minOccurs="0"/>
+ <element name="saturday" type="tns:businessCalendarDayType" minOccurs="0"/>
+ <element name="sunday" type="tns:businessCalendarDayType" minOccurs="0"/>
+ <element name="holiday" minOccurs="0" maxOccurs="unbounded">
+ <complexType>
+ <attribute name="period">
+ <annotation><documentation>Two dates in date-format, separated by
+ a dash that specify a holiday period. If it's just one day, a single day
+ is also valid.</documentation></annotation>
+ </attribute>
+ </complexType>
+ </element>
+ </sequence>
+ <attribute name="timezone" type="string">
+ <annotation><documentation>Optional specification of the timezone as specified by
+ java.util.TimeZone.getTimeZone(String)</documentation></annotation>
+ </attribute>
+ <attribute name="hour-format" type="string" default="HH:mm">
+ <annotation><documentation>Indicates how to interpret the hour specifications
+ in this business calendar in java.text.SimpleDateFormat(String)</documentation></annotation>
+ </attribute>
+ <attribute name="date-format" type="string" default="dd/MM/yyyy">
+ <annotation><documentation>Indicates how to interpret the date specifications
+ in this business calendar in java.text.SimpleDateFormat(String)</documentation></annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="byte">
+ <annotation><documentation>A java.lang.Byte</documentation></annotation>
+ <complexType>
+ <attribute name="name" type="string">
+ <annotation><documentation>The name of the object. It's optional and serves
+ as an id to refer to this object from other object declarations. This name can
+ also be used lookup the object programmatically.</documentation></annotation>
+ </attribute>
+ <attribute name="value" type="byte" use="required" />
+ </complexType>
+ </element>
+
+ <element name="char">
+ <annotation><documentation>A java.lang.Character</documentation></annotation>
+ <complexType>
+ <attribute name="name" type="string">
+ <annotation><documentation>The name of the object. It's optional and serves
+ as an id to refer to this object from other object declarations. This name can
+ also be used lookup the object programmatically.</documentation></annotation>
+ </attribute>
+ <attribute name="value" use="required">
+ <simpleType>
+ <restriction base="string">
+ <maxLength value="1" />
+ </restriction>
+ </simpleType>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="class">
+ <annotation><documentation>A java.lang.Class</documentation></annotation>
+ <complexType>
+ <attribute name="name" type="string">
+ <annotation><documentation>The name of the object. It's optional and serves
+ as an id to refer to this object from other object declarations. This name can
+ also be used lookup the object programmatically.</documentation></annotation>
+ </attribute>
+ <attribute name="init" type="tns:initType" default="lazy">
+ <annotation><documentation>Specifies when and how this object should be
+ created and initialized. Default is lazy.</documentation></annotation>
+ </attribute>
+ <attribute name="class-name" use="required" type="string">
+ <annotation><documentation>A fully qualified name of a
+ class that can be found on the wire context classpath or
+ (if that is not specified) on the current thread's context
+ classpath.
+ </documentation></annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="context-ref">
+ <annotation><documentation>The context. This refers to
+ the environment, process-engine or the wire context.
+ </documentation></annotation>
+ <complexType>
+ <attribute name="context-name" type="string">
+ <annotation><documentation>The name of the context in the current
+ environment. If this attribute is omitted, the enclosing
+ context will be given.
+ </documentation></annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="jbpm-configuration">
+ <annotation><documentation>Defines an environment factory and
+ an environment.
+ </documentation></annotation>
+ <complexType>
+ <sequence>
+ <element ref="tns:process-engine" />
+ <element ref="tns:environment" />
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="process-engine" type="tns:contextType">
+ <annotation><documentation>Defines the environment factory
+ context. (Aka application context)
+ </documentation></annotation>
+ </element>
+
+ <element name="environment" type="tns:contextType">
+ <annotation><documentation>Defines the environment
+ context. This context exists stretches for the duration of
+ an Environment try-finally block.
+ </documentation></annotation>
+ </element>
+
+ <element name="deployer-manager">
+ <annotation><documentation>Has a list of deployers (org.jbpm.deploy.Deployer)
+ for each process language for handling deployments.
+ </documentation></annotation>
+ <complexType>
+ <choice maxOccurs="unbounded">
+ <element name="language">
+ <annotation><documentation>A process language that contains
+ a list of deployers</documentation></annotation>
+ <complexType>
+ <choice maxOccurs="unbounded">
+ <group ref="tns:deployers" />
+ </choice>
+ <attribute name="name" type="string" use="required" />
+ <attribute name="extension" type="string" />
+ </complexType>
+ </element>
+ </choice>
+ <attribute name="name" type="string">
+ <annotation><documentation>The name of the object. It's optional and serves
+ as an id to refer to this object from other object declarations. This name can
+ also be used lookup the object programmatically.</documentation></annotation>
+ </attribute>
+ <attribute name="init" type="tns:initType" default="lazy">
+ <annotation><documentation>Specifies when and how this object should be
+ created and initialized. Default is lazy.</documentation></annotation>
+ </attribute>
+ <attribute name="resource" type="string">
+ <annotation><documentation>Imports contents of the document element
+ of all resource files (using deep scan ClassLoader.getResources(String))
+ as content into this element.
+ </documentation></annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="double">
+ <annotation><documentation>A java.lang.Double</documentation></annotation>
+ <complexType>
+ <attribute name="name" type="string">
+ <annotation><documentation>The name of the object. It's optional and serves
+ as an id to refer to this object from other object declarations. This name can
+ also be used lookup the object programmatically.</documentation></annotation>
+ </attribute>
+ <attribute name="value" type="double" use="required" />
+ </complexType>
+ </element>
+
+ <element name="environment-ref">
+ <annotation><documentation>Obtains the current environment. The environment
+ is only available in objects declared inside the environment context. So it
+ can't be used inside the session-factory context.
+ </documentation></annotation>
+ </element>
+
+ <element name="process-engine-ref">
+ <annotation><documentation>Obtains the current environment. The environment
+ is only available in objects declared inside the environment context. So it
+ can't be used inside the session-factory context.
+ </documentation></annotation>
+ </element>
+
+ <element name="false">
+ <annotation><documentation>java.lang.Boolean.FALSE
+ </documentation></annotation>
+ <complexType>
+ <attribute name="name" type="string">
+ <annotation><documentation>The name of the object. It's optional and serves
+ as an id to refer to this object from other object declarations. This name can
+ also be used lookup the object programmatically.</documentation></annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="float">
+ <annotation><documentation>A java.lang.Float
+ </documentation></annotation>
+ <complexType>
+ <attribute name="name" type="string">
+ <annotation><documentation>The name of the object. It's optional and serves
+ as an id to refer to this object from other object declarations. This name can
+ also be used lookup the object programmatically.</documentation></annotation>
+ </attribute>
+ <attribute name="value" type="float" use="required" />
+ </complexType>
+ </element>
+
+ <element name="hibernate-configuration" type="tns:hibernateConfigurationType">
+ <annotation><documentation>A hibernate Configuration to be used in the
+ process-engine context</documentation></annotation>
+ </element>
+
+ <element name="hibernate-session">
+ <annotation><documentation>A hibernate Session to be used in the
+ environment context</documentation></annotation>
+ <complexType>
+ <attribute name="name" type="string">
+ <annotation><documentation>Optional name of this hibernate session.
+ Typically a session is looked up by type. Only if multiple sessions
+ are declared, a name can be used to distinct them.
+ </documentation></annotation>
+ </attribute>
+ <attribute name="init" type="tns:initType" default="lazy">
+ <annotation><documentation>Specifies when and how this object should be
+ initialized. Default is lazy.</documentation></annotation>
+ </attribute>
+ <attribute name="factory" type="string">
+ <annotation><documentation>Optional name referring to the session-factory.
+ If no factory name is provided, the SessionFactory is looked up by type.
+ </documentation></annotation>
+ </attribute>
+ <attribute name="tx" type="tns:booleanValueType">
+ <annotation><documentation>Indicates if a hibernate transaction should
+ be started and ended in this environment. Default is true.
+ </documentation></annotation>
+ </attribute>
+ <attribute name="current" type="tns:booleanValueType">
+ <annotation><documentation>Indicates if the SessionFactory.getCurrentSession()
+ should be used instead of opening and closing a new session. Default is false.
+ If 'current' is set to true, then the default of 'close' will be set to false.
+ </documentation></annotation>
+ </attribute>
+ <attribute name="close" type="tns:booleanValueType">
+ <annotation><documentation>Indicates if the session should be closed when the
+ environment closes. The default is true (unless 'current' is set to true)
+ </documentation></annotation>
+ </attribute>
+ <attribute name="standard-transaction" type="string">
+ <annotation><documentation>Optional name of the standard transaction.
+ If 'tx' is set to true, a StandardTransaction needs to be found to enlist
+ this hibernate session. By default, the lookup of the StandardTransaction
+ is done by type. But this attribute allows to refer to the standard
+ transaction by name.
+ </documentation></annotation>
+ </attribute>
+ <attribute name="connection" type="string">
+ <annotation><documentation>Optional name of the JDBC connection to use
+ when creating this hibernate session. If no connection name is specified,
+ the creation of the connection is left to the hibernate session.
+ </documentation></annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="hibernate-session-factory">
+ <annotation><documentation>A hibernate SessionFactory to be used in the
+ process-engine context. The hibernate Configuration can be inlined in this
+ 'session-factory', it can be refered by type or referred by name.
+ </documentation></annotation>
+ <complexType>
+ <complexContent>
+ <extension base="tns:hibernateConfigurationType">
+ <attribute name="configuration" type="string">
+ <annotation><documentation>The name of the configuration to use to build
+ this hibernate SessionFactory. This is optional as the alternative methods
+ to specify a configuration are just inlining it here in this hibernate
+ session-factory element or looking up the hibernate Configuration by type.
+ </documentation></annotation>
+ </attribute>
+ </extension>
+ </complexContent>
+ </complexType>
+ </element>
+
+ <element name="int">
+ <annotation><documentation>A java.lang.Integer
+ </documentation></annotation>
+ <complexType>
+ <attribute name="name" type="string">
+ <annotation><documentation>The name of the object. It's optional and serves
+ as an id to refer to this object from other object declarations. This name can
+ also be used lookup the object programmatically.</documentation></annotation>
+ </attribute>
+ <attribute name="value" type="int" use="required"/>
+ </complexType>
+ </element>
+
+ <element name="jndi">
+ <annotation><documentation>A lookup from JNDI through the InitialContext
+ </documentation></annotation>
+ <complexType>
+ <attribute name="name" type="string">
+ <annotation><documentation>The name of the object. It's optional and serves
+ as an id to refer to this object from other object declarations. This name can
+ also be used lookup the object programmatically.</documentation></annotation>
+ </attribute>
+ <attribute name="jndi-name" type="string" use="required" />
+ </complexType>
+ </element>
+
+ <element name="job-db-session">
+ <annotation><documentation>A hibernate based JobDbSession</documentation></annotation>
+ <complexType>
+ <attribute name="name" type="string">
+ <annotation><documentation>The name of the object. It's optional and serves
+ as an id to refer to this object from other object declarations. This name can
+ also be used lookup the object programmatically.</documentation></annotation>
+ </attribute>
+ <attribute name="init" type="tns:initType" default="lazy">
+ <annotation><documentation>Specifies when and how this object should be
+ initialized. Default is lazy.</documentation></annotation>
+ </attribute>
+ <attribute name="session" type="string" />
+ </complexType>
+ </element>
+
+ <element name="job-executor">
+ <annotation><documentation>The default component for executing timers and messages.
+ A job-executor requires a CommandService.
+ </documentation></annotation>
+ <complexType>
+ <attribute name="name" type="string">
+ <annotation><documentation>Optional name of this object used to look up
+ this object from the environment. This name (along with ip-address) is
+ used as the basis for the names of the threads in the job executor's thread
+ pool. So when you're running more then one job-executor on the same
+ machine, you should be specifying custom job executor names.</documentation></annotation>
+ </attribute>
+ <attribute name="init" type="tns:initType" default="lazy">
+ <annotation><documentation>Specifies when and how this object should be
+ initialized. Default is lazy.</documentation></annotation>
+ </attribute>
+ <attribute name="command-service" type="string">
+ <annotation><documentation>Optional name of the command service to use. If
+ this attribute is not present, the command service will be looked up
+ by type.</documentation></annotation>
+ </attribute>
+ <attribute name="threads" type="int">
+ <annotation><documentation>Number of worker threads. One extra thread will
+ be created for scanning and acquisition of jobs (DispatcherThread).</documentation></annotation>
+ </attribute>
+ <attribute name="idle" type="int">
+ <annotation><documentation>Number of milliseconds the dispatcher thread
+ will normally wait inbetween checks for new jobs. Each time an exception
+ occurs, the idle period will be doubled until the 'idle-max' is reached.
+ This is a back-off mechanism in case the job executor can't access the
+ database.
+ </documentation></annotation>
+ </attribute>
+ <attribute name="idle-max" type="int">
+ <annotation><documentation>Maxumum number of milliseconds the dispatcher thread
+ will wait inbetween checks for new jobs.
+ </documentation></annotation>
+ </attribute>
+ <attribute name="history" type="int">
+ <annotation><documentation>Number of history records of job executions that will be
+ kept in memory.</documentation></annotation>
+ </attribute>
+ <attribute name="lock" type="int">
+ <annotation><documentation>Number of milliseconds that a job will be locked at
+ acquisition time. When a job is acquired, the job executor will write it's name
+ in the lock owner field of the job and the lockExpirationTime
+ will be set to the current time plus 'lock' milliseconds. The lock by that thread should
+ be considered as released if the lockExpirationTime has passed. This prevents starvation
+ in case one of more JobExecutors in a cluster would die.</documentation></annotation>
+ </attribute>
+ <attribute name="auto-start" type="tns:booleanValueType">
+ <annotation><documentation>Indicates if the job-executor should be started when it
+ is created. Default is true. If the job-executor is not auto-started, it can be
+ started programmatically with the start method on the JobExecutor.</documentation></annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="job-test-helper">
+ <annotation><documentation>A test helper for controlling job executions</documentation></annotation>
+ </element>
+
+ <element name="list">
+ <annotation><documentation>A java.util.List</documentation></annotation>
+ <complexType>
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <group ref="tns:persistableDescriptors" />
+ </choice>
+ <attribute name="name" type="string">
+ <annotation><documentation>The name of the object. It's optional and serves
+ as an id to refer to this object from other object declarations. This name can
+ also be used lookup the object programmatically.</documentation></annotation>
+ </attribute>
+ <attribute name="init" type="tns:initType" default="lazy">
+ <annotation><documentation>Specifies when and how this object should be
+ created and initialized. Default is lazy.</documentation></annotation>
+ </attribute>
+ <attribute name="class" type="string" default="java.util.ArrayList">
+ <annotation><documentation>Implementation class for this list.
+ </documentation></annotation>
+ </attribute>
+ <attribute name="synchronized" type="tns:booleanValueType" default="false">
+ <annotation><documentation>Indicates if this collection should be synchronized
+ with Collections.synchronizedList(List)</documentation></annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="long">
+ <annotation><documentation>A java.lang.Long</documentation></annotation>
+ <complexType>
+ <attribute name="name" type="string">
+ <annotation><documentation>The name of the object. It's optional and serves
+ as an id to refer to this object from other object declarations. This name can
+ also be used lookup the object programmatically.</documentation></annotation>
+ </attribute>
+ <attribute name="value" type="long" use="required"/>
+ </complexType>
+ </element>
+
+ <element name="map">
+ <annotation><documentation>A java.util.Map</documentation></annotation>
+ <complexType>
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <element name="entry">
+ <complexType>
+ <choice minOccurs="0">
+ <element name="key" minOccurs="0">
+ <complexType>
+ <group ref="tns:persistableDescriptors" />
+ </complexType>
+ </element>
+ <element name="value" minOccurs="0">
+ <complexType>
+ <group ref="tns:persistableDescriptors" />
+ </complexType>
+ </element>
+ </choice>
+ </complexType>
+ </element>
+ </choice>
+ <attribute name="name" type="string">
+ <annotation><documentation>The name of the object. It's optional and serves
+ as an id to refer to this object from other object declarations. This name can
+ also be used lookup the object programmatically.</documentation></annotation>
+ </attribute>
+ <attribute name="init" type="tns:initType" default="lazy">
+ <annotation><documentation>Specifies when and how this object should be
+ created and initialized. Default is lazy.</documentation></annotation>
+ </attribute>
+ <attribute name="class" type="string" default="java.util.HashMap">
+ <annotation><documentation>Implementation class for this map.
+ </documentation></annotation>
+ </attribute>
+ <attribute name="synchronized" type="tns:booleanValueType" default="false">
+ <annotation><documentation>Indicates if this collection should be synchronized
+ with Collections.synchronizedMap(Map)</documentation></annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="message-session">
+ <annotation><documentation>Specifies an implementation of the MessageSession
+ interface that sends messages to the JobExecutor. The main usage of MessageSession
+ is by the PVM implementation for asynchronous continuations. The PVM will look
+ up the message session by type. All message-session implementations depend on a
+ DbSession like e.g. the 'pvm-db-session'. A DbSession will be looked up by type.
+ </documentation></annotation>
+ <complexType>
+ <attribute name="name" type="string">
+ <annotation><documentation>The name of the object. It's optional and serves
+ as an id to refer to this object from other object declarations. This name can
+ also be used lookup the object programmatically.</documentation></annotation>
+ </attribute>
+ <attribute name="target" type="tns:messageSessionTargetType" default="job-executor">
+ <annotation><documentation>
+ <p>Specifies the implementation of the message session.
+ </p>
+ <p><code><b>job-executor</b></code>: Is the default and sends to messages to the
+ job-executor. In this case the message session has a dependency on
+ a DbSession (like the PvmDbSession) and a Transaction to which the
+ message session will register a listener to notify the job executor upon
+ successfull completion.
+ </p>
+ <p><code><b>jms</b></code>: Sends the messages over JMS and a JMS listener is assumed
+ (like the command executor MDB) that executes the message. If 'jms' is specified,
+ attributes 'session-jndi' and 'destination-jndi' become required.
+ </p>
+ </documentation></annotation>
+ </attribute>
+ <attribute name="session-jndi" type="string" use="optional">
+ <annotation><documentation>The JNDI name of the JMS Session. Only used in case of
+ target <b>jms</b>. </documentation></annotation>
+ </attribute>
+ <attribute name="destination-jndi" type="string" use="optional">
+ <annotation><documentation>The JNDI name of the Queue destination to use. Only used
+ in case of target <b>jms</b>.</documentation></annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="null">
+ <annotation><documentation>the null value
+ </documentation></annotation>
+ </element>
+
+ <element name="object">
+ <annotation><documentation>Any java object that will be created by reflection. .
+ <p>There are three main ways to create an object: by constructor or by a factory
+ object or a static factory method.</p>
+ <p><b>Using the constructor</b>: Then the <code>class</code> attribute must provide the
+ fully qualified class name. In case another constructor then the default is
+ targetted, a <code>constructor</code> child element can be provided.
+ The <code>factory</code> attribute should not be provided for using a constructor.
+ </p>
+ <p><b>Using a factory</b>: Then the <code>factory</code> attribute or one
+ <code>factory</code> element must be provided along with the attribute
+ <code>method</code>.
+ </p>
+ <p><b>Using a static factory method</b>: Then the <code>class</code> and
+ <code>method</code> attributes should be specified. There should be no
+ reference to a <code>factory</code> attribute of element.
+ </p>
+ <p><b>Construction and initialization</b>: all objects (constructor and factory)
+ are build in two phases: construction and initialisation phase. During construction
+ all is done until a pointer is obtained to the object. In initialisation, operations
+ are applied to the object until it is ready to be used. The separation between
+ construction and initialisation is made to allow for bidirectional references. In
+ that case, at least one of both ends can not be fully initialised before it is injected
+ into the other end.
+ </p>
+ <p><b>Operations</b>: after construction, various operations can be applied to objects
+ like e.g. direct field injection, injection through setters, method invocation,
+ enlist with the standard transaction, subscribe the object as a listener to an observable
+ </p>
+ <p><b>Arguments</b>: There are two different places for arguments. The <code>arg</code>
+ elements for the factory method invocation should be placed as child elements under the
+ <code>object</code> element. The <code>arg</code> elements for the constructor should be
+ placed as child elements under the <code>constructor</code> element.
+ </p>
+ </documentation></annotation>
+ <complexType>
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <element name="factory">
+ <annotation><documentation>Contains one element that describes the factory object.</documentation></annotation>
+ <complexType>
+ <group ref="tns:persistableDescriptors" />
+ </complexType>
+ </element>
+ <element name="constructor">
+ <annotation><documentation>Specifies the arguments to use for a non-default constructor.</documentation></annotation>
+ <complexType>
+ <choice maxOccurs="unbounded">
+ <element name="arg" type="tns:argType" />
+ </choice>
+ </complexType>
+ </element>
+ <element name="arg" type="tns:argType">
+ <annotation><documentation>The factory method arguments.</documentation></annotation>
+ </element>
+ <group ref="tns:operations" />
+ </choice>
+ <attribute name="name" type="string">
+ <annotation><documentation>The name of the object. It's optional and serves
+ as an id to refer to this object from other object declarations. This name can
+ also be used lookup the object programmatically.</documentation></annotation>
+ </attribute>
+ <attribute name="init" type="tns:initType" default="lazy">
+ <annotation><documentation>Specifies when and how this object should be
+ initialized. Default is lazy.</documentation></annotation>
+ </attribute>
+ <attribute name="class" type="string">
+ <annotation><documentation>The fully qualified class name</documentation></annotation>
+ </attribute>
+ <attribute name="factory" type="string">
+ <annotation><documentation>The name of the factory object</documentation></annotation>
+ </attribute>
+ <attribute name="method" type="string">
+ <annotation><documentation>The factory method name</documentation></annotation>
+ </attribute>
+ <attribute name="auto-wire" type="string">
+ <annotation><documentation>Indicates if the member fields and setter properties
+ should be automatically wired based on matching the property names and types with the
+ object names and types</documentation></annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="process-service">
+ <annotation><documentation>The default process service implementation
+ that delegates method implementations to a CommandService. process-service
+ depends on a command service.
+ </documentation></annotation>
+ </element>
+
+ <element name="properties">
+ <annotation><documentation>A java.util.Properties</documentation></annotation>
+ <complexType>
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <element name="property">
+ <complexType>
+ <attribute name="name" type="string" use="required" />
+ <attribute name="value" type="string" use="required" />
+ </complexType>
+ </element>
+ </choice>
+ <attribute name="name" type="string">
+ <annotation><documentation>The name of the object. It's optional and serves
+ as an id to refer to this object from other object declarations. This name can
+ also be used lookup the object programmatically.</documentation></annotation>
+ </attribute>
+ <attribute name="file" type="string">
+ <annotation><documentation>A file on the file system</documentation></annotation>
+ </attribute>
+ <attribute name="resource" type="string">
+ <annotation><documentation>A file as a resource in the classpath</documentation></annotation>
+ </attribute>
+ <attribute name="url" type="string">
+ <annotation><documentation>the contents is fetched by loading a url</documentation></annotation>
+ </attribute>
+ <attribute name="is-xml" type="tns:booleanValueType">
+ <annotation><documentation>optionally indicates if the content of referenced file in attributes
+ 'file', 'resource' or 'url' is XML. The default is the
+ plain properties format with a space or the equals character (=) separating key and value on
+ each line.</documentation></annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="pvm-db-session">
+ <annotation><documentation>A hibernate based PvmDbSession</documentation></annotation>
+ <complexType>
+ <attribute name="name" type="string">
+ <annotation><documentation>The name of the object. It's optional and serves
+ as an id to refer to this object from other object declarations. This name can
+ also be used lookup the object programmatically.</documentation></annotation>
+ </attribute>
+ <attribute name="init" type="tns:initType" default="lazy">
+ <annotation><documentation>Specifies when and how this object should be
+ initialized. Default is lazy.</documentation></annotation>
+ </attribute>
+ <attribute name="session" type="string" />
+ </complexType>
+ </element>
+
+ <element name="ref">
+ <annotation><documentation>A reference to another object by name</documentation></annotation>
+ <complexType>
+ <attribute name="name" type="string">
+ <annotation><documentation>The name of the object. It's optional and serves
+ as an id to refer to this object from other object declarations. This name can
+ also be used lookup the object programmatically.</documentation></annotation>
+ </attribute>
+ <attribute name="object" type="string" use="required">
+ <annotation><documentation>The name of the referred object</documentation></annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="set">
+ <annotation><documentation>A java.util.Set
+ </documentation></annotation>
+ <complexType>
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <group ref="tns:persistableDescriptors" />
+ </choice>
+ <attribute name="name" type="string">
+ <annotation><documentation>The name of the object. It's optional and serves
+ as an id to refer to this object from other object declarations. This name can
+ also be used lookup the object programmatically.</documentation></annotation>
+ </attribute>
+ <attribute name="init" type="tns:initType" default="lazy">
+ <annotation><documentation>Specifies when and how this object should be
+ initialized. Default is lazy.</documentation></annotation>
+ </attribute>
+ <attribute name="class" type="string" default="java.util.HashList">
+ <annotation><documentation>Implementation class for this set.
+ </documentation></annotation>
+ </attribute>
+ <attribute name="synchronized" type="tns:booleanValueType" default="false">
+ <annotation><documentation>Indicates if this collection should be synchronized
+ with Collections.synchronizedSet(Set)</documentation></annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="short">
+ <annotation><documentation>a java.lang.Short
+ </documentation></annotation>
+ <complexType>
+ <attribute name="name" type="string">
+ <annotation><documentation>The name of the object. It's optional and serves
+ as an id to refer to this object from other object declarations. This name can
+ also be used lookup the object programmatically.</documentation></annotation>
+ </attribute>
+ <attribute name="value" type="short" use="required"/>
+ </complexType>
+ </element>
+
+ <element name="command-service">
+ <annotation><documentation>The command service for usage in standard
+ Java environments.
+ </documentation></annotation>
+ <complexType>
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <group ref="tns:interceptors" />
+ </choice>
+ <attribute name="name" type="string">
+ <annotation><documentation>The name of the object. It's optional and serves
+ as an id to refer to this object from other object declarations. This name can
+ also be used lookup the object programmatically.</documentation></annotation>
+ </attribute>
+ <attribute name="init" type="tns:initType" default="lazy">
+ <annotation><documentation>Specifies when and how this object should be
+ initialized. Default is lazy.</documentation></annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="string">
+ <annotation><documentation>a java.lang.String
+ </documentation></annotation>
+ <complexType>
+ <attribute name="name" type="string">
+ <annotation><documentation>The name of the object. It's optional and serves
+ as an id to refer to this object from other object declarations. This name can
+ also be used lookup the object programmatically.</documentation></annotation>
+ </attribute>
+ <attribute name="value" type="string" use="required"/>
+ </complexType>
+ </element>
+
+ <element name="timer-session">
+ <annotation><documentation>A timer session is used during process execution to create
+ timers. Different implementations of the timer service make the process portable
+ over different environments.
+ </documentation></annotation>
+ <complexType>
+ <attribute name="name" type="string">
+ <annotation><documentation>The name of the object. It's optional and serves
+ as an id to refer to this object from other object declarations. This name can
+ also be used lookup the object programmatically.</documentation></annotation>
+ </attribute>
+ <attribute name="init" type="tns:initType" default="lazy">
+ <annotation><documentation>Specifies when and how this object should be
+ initialized. Default is lazy.</documentation></annotation>
+ </attribute>
+ <attribute name="target" default="job-executor">
+ <annotation><documentation>Specifies the target implementation. Use
+ <code>job-executor</code> when the job executor is responsible for executing the
+ timers (default). Use <code>ejb</code> in case the EJB Timer Service should be used.
+ If the target is job-executor, there is a dependency on the transaction, the job-executor
+ and a job-db-session.
+ </documentation></annotation>
+ <simpleType>
+ <restriction base="string">
+ <enumeration value="job-executor" />
+ <enumeration value="ejb" />
+ </restriction>
+ </simpleType>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="transaction">
+ <annotation><documentation>The transaction binding. Specifies how the transaction in the
+ pvm environment gets bound to the actual transaction in the real environment.
+ </documentation></annotation>
+ <complexType>
+ <attribute name="name" type="string">
+ <annotation><documentation>The name of the object. It's optional and serves
+ as an id to refer to this object from other object declarations. This name can
+ also be used lookup the object programmatically.</documentation></annotation>
+ </attribute>
+ <attribute name="target" default="standard">
+ <annotation><documentation>The real transaction to be wrapped. Use <code>standard</code>
+ in standard environments and enterprise in enterprise environments. In case of the
+ <code>enterprise</code> target, the <code>jndi</code> name of the user transaction and
+ the <code>manage</code> attribute can optionally be specified.
+ </documentation></annotation>
+ <simpleType>
+ <restriction base="string">
+ <enumeration value="standard" />
+ <enumeration value="enterprise" />
+ </restriction>
+ </simpleType>
+ </attribute>
+ <attribute name="jndi" type="string" default="java:comp/UserTransaction">
+ <annotation><documentation>The jndi name of the user transaction
+ </documentation></annotation>
+ </attribute>
+ <attribute name="manage" type="tns:booleanValueType" default="false">
+ <annotation><documentation>Indicates if the user transaction be controlled (=managed)
+ by the environment.
+ </documentation></annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="transaction-ref">
+ <annotation><documentation>Reference to the org.jbpm.pvm.api.env.Transaction in the
+ current environment.
+ </documentation></annotation>
+ </element>
+
+ <element name="true">
+ <annotation><documentation>java.lang.Boolean.TRUE
+ </documentation></annotation>
+ <complexType>
+ <attribute name="name" type="string">
+ <annotation><documentation>The name of the object. It's optional and serves
+ as an id to refer to this object from other object declarations. This name can
+ also be used lookup the object programmatically.</documentation></annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="variable-types">
+ <annotation><documentation>Specifies automatic variable type resolution, transforming
+ variable values of any java class into their persistable format. When the
+ type of a variable needs to be automatically detected. Each of the type elements will
+ be scanned in order. When the type matches, it is used to store the value.
+ </documentation></annotation>
+ <complexType>
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <element name="type">
+ <complexType>
+ <choice>
+ <element name="matcher">
+ <annotation><documentation>Alternative to the <code>class</code> attribute to
+ specify the matcher for this type.</documentation></annotation>
+ <complexType>
+ <group ref="tns:allDescriptors" />
+ </complexType>
+ </element>
+ </choice>
+ <attribute name="name" type="string">
+ <annotation><documentation>The name of the type is optional. It's used when
+ users declare variables in the process.</documentation></annotation>
+ </attribute>
+ <attribute name="class" type="string">
+ <annotation><documentation>Specifies a matcher based on the class of the
+ object. The java class name of the values that will be
+ stored in this type. Apart from Java class names following literals can be
+ used as well:
+ <p><b><code>persistable</code></b>: Matches when the class of the object is
+ known by the hibernate-session-factory so that a generic reference (any-mapping)
+ can be created to the persistable object. If <code>class="persistable"</code>
+ the attribute <code>id-type</code> becomes required.
+ </p>
+ <p><b><code>serializable</code></b>: Matches if the object implements the
+ java.io.Serializable interface.
+ </p>
+ <p>If no <code>class</code> is provided, a matcher can also be specified
+ as a separate child element.</p>
+ </documentation></annotation>
+ </attribute>
+ <attribute name="hibernate-session-factory" type="string">
+ <annotation><documentation>The name of the hibernate-session-factory. Only
+ required if <code>class="persistable"</code> is used and if there is more then
+ one hibernate session factory specified in the environment.
+ </documentation></annotation>
+ </attribute>
+ <attribute name="id-type">
+ <annotation><documentation>The type of the id property in the persistable object.
+ </documentation></annotation>
+ <simpleType>
+ <restriction base="string">
+ <enumeration value="long" />
+ <enumeration value="string" />
+ </restriction>
+ </simpleType>
+ </attribute>
+ <attribute name="converter" type="string">
+ <annotation><documentation>The class name of the converter. The converter must implement
+ the Converter interface and have a default constructor</documentation></annotation>
+ </attribute>
+ <attribute name="variable-class" type="string" use="required">
+ <annotation><documentation>The class name of the variable class. The variable class must be
+ a sub class of Variable and must have a default constructor.</documentation></annotation>
+ </attribute>
+ </complexType>
+ </element>
+ </choice>
+ <attribute name="name" type="string">
+ <annotation><documentation>The name of the object. It's optional and serves
+ as an id to refer to this object from other object declarations. This name can
+ also be used lookup the object programmatically.</documentation></annotation>
+ </attribute>
+ <attribute name="init" type="tns:initType" default="lazy">
+ <annotation><documentation>Specifies when and how this object should be
+ initialized. Default is lazy.</documentation></annotation>
+ </attribute>
+ <attribute name="file" type="string">
+ <annotation><documentation>Imports variable types from a file. All the
+ top level elements of the root document element are imported.</documentation></annotation>
+ </attribute>
+ <attribute name="url" type="string">
+ <annotation><documentation>Imports variable types from a URL. All the
+ top level elements of the root document element are imported.</documentation></annotation>
+ </attribute>
+ <attribute name="resource" type="string">
+ <annotation><documentation>Imports variable types from a resource. All the
+ top level elements of the root document element are imported.</documentation></annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <!-- ### COMPLEX TYPES ################################################### -->
+
+ <complexType name="argType">
+ <annotation><documentation>The method arguments.
+ Each 'arg' element should have exactly one child element
+ that represents the value of the argument.
+ </documentation></annotation>
+ <attribute name="type" type="string">
+ <annotation><documentation>The java class name representing
+ the type of the method. This is optional and can be used to
+ indicate the appropriate method in case of method overloading.
+ </documentation></annotation>
+ </attribute>
+ </complexType>
+
+ <complexType name="contextType">
+ <annotation><documentation>A context is a set of object
+ descriptions.
+ </documentation></annotation>
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <group ref="tns:allDescriptors" />
+ </choice>
+ </complexType>
+
+ <complexType name="hibernateConfigurationType">
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <element name="mappings">
+ <annotation><documentation>Imports mapping file references from the
+ referenced resource files</documentation></annotation>
+ <complexType>
+ <attribute name="resource" type="string">
+ <annotation><documentation>Import mapping references from a resource file.
+ The full classpath is scanned for all the resource
+ files of the given name. All mapping elements that are found as the content in
+ the top level document element will be imported for all of the resource files
+ found on the classpath with that name. </documentation></annotation>
+ </attribute>
+ </complexType>
+ </element>
+ <element name="mapping">
+ <annotation><documentation>Imports a hibernate mapping file</documentation></annotation>
+ <complexType>
+ <attribute name="resource" type="string">
+ <annotation><documentation>Adds the referenced resource file as a mapping
+ file to the hibernate configuration</documentation></annotation>
+ </attribute>
+ <attribute name="file" type="string">
+ <annotation><documentation>Adds the referenced file as a mapping
+ file to the hibernate configuration</documentation></annotation>
+ </attribute>
+ <attribute name="class" type="string">
+ <annotation><documentation>Adds the resource file that matches the given class
+ name as a mapping file to the hibernate configuration. Matching means
+ .hbm.xml instead of .java</documentation></annotation>
+ </attribute>
+ <attribute name="url" type="string">
+ <annotation><documentation>Adds file supplied by the URL as a mapping
+ file to the hibernate configuration</documentation></annotation>
+ </attribute>
+ </complexType>
+ </element>
+ <element ref="tns:properties" />
+ <element name="cache-configuration">
+ <complexType>
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <element name="class-cache">
+ <annotation><documentation>Persistent class for which hibernate should
+ activate its second level cache</documentation></annotation>
+ <complexType>
+ <attribute name="class">
+ <annotation><documentation>Fully qualified classname</documentation></annotation>
+ </attribute>
+ </complexType>
+ </element>
+ <element name="collection-cache">
+ <annotation><documentation>Persistent collection for which hibernate should
+ activate its second level cache</documentation></annotation>
+ <complexType>
+ <attribute name="collection">
+ <annotation><documentation>Fully qualified classname, a dot (.) and
+ then the property name of the collection</documentation></annotation>
+ </attribute>
+ </complexType>
+ </element>
+ </choice>
+ <attribute name="usage" type="tns:hibernateCacheUsageType">
+ <annotation><documentation>The caching strategy. see hibernate
+ docs for more info.</documentation></annotation>
+ </attribute>
+ <attribute name="file" type="string">
+ <annotation><documentation>Import source for class-cache elements</documentation></annotation>
+ </attribute>
+ <attribute name="resource" type="string">
+ <annotation><documentation>Import source for class-cache elements</documentation></annotation>
+ </attribute>
+ <attribute name="url" type="string">
+ <annotation><documentation>Import source for class-cache elements</documentation></annotation>
+ </attribute>
+ </complexType>
+ </element>
+ </choice>
+ <attribute name="name" type="string">
+ <annotation><documentation>Optional name of this hibernate session factory.
+ Typically a session factory is looked up by type. Only if multiple sessions
+ are declared, a name can be used to distinct them.
+ </documentation></annotation>
+ </attribute>
+ <attribute name="init" type="tns:initType" default="lazy">
+ <annotation><documentation>Specifies when and how this object should be
+ initialized. Default is lazy.</documentation></annotation>
+ </attribute>
+ <attribute name="class" type="string">
+ <annotation><documentation>Optional class of the hibernate configuration.
+ By default org.hibernate.cfg.Configuration will be used. This can be used
+ to specify e.g. an AnnotationConfiguration.</documentation></annotation>
+ </attribute>
+ <attribute name="schema-operation" type="tns:hibernateSchemaOperationType">
+ <annotation><documentation>Optional schema operation to be applied when
+ this configuration has been created. By default, no schema operation will
+ be applied.</documentation></annotation>
+ </attribute>
+ </complexType>
+
+ <complexType name="businessCalendarDayType">
+ <attribute name="hours" type="string">
+ <annotation><documentation>The working hours of this day. Day parts are separated
+ with 'and'. Begin and end hours are separated by '-'. E.g:
+ 9:00-12:00 and 12:30-17:00
+ </documentation></annotation>
+ </attribute>
+ </complexType>
+
+
+
+ <!-- ### SIMPLE VALUE TYPES ############################################## -->
+
+ <simpleType name="booleanValueType">
+ <restriction base="string">
+ <enumeration value="true" />
+ <enumeration value="on" />
+ <enumeration value="enabled" />
+ <enumeration value="false" />
+ <enumeration value="off" />
+ <enumeration value="disabled" />
+ </restriction>
+ </simpleType>
+
+ <simpleType name="hibernateSchemaOperationType">
+ <restriction base="string">
+ <enumeration value="update" />
+ <enumeration value="create" />
+ </restriction>
+ </simpleType>
+
+ <simpleType name="hibernateCacheUsageType">
+ <restriction base="string">
+ <enumeration value="read-only" />
+ <enumeration value="nonstrict-read-write" />
+ <enumeration value="read-write" />
+ <enumeration value="transactional" />
+ </restriction>
+ </simpleType>
+
+ <simpleType name="initType">
+ <annotation><documentation>Specifies when and how this object should be
+ initialized. Default is lazy.
+
+ <p><code><b>lazy</b></code>: The object is only created when it is asked for.
+ In case of transitive dependencies, the object might not yet be initialized.
+ </p>
+
+ <p><code><b>eager</b></code>: The object is created when the context is created.
+ In case of transitive dependencies, the object might not yet be initialized.
+ </p>
+
+ <p><code><b>eager</b></code>: The object is created when the context is created.
+ In case of transitive dependencies, the initialization is also mandatory.
+ </p>
+
+ <p><code><b>eager</b></code>: The object is only created when it is asked for.
+ In case of transitive dependencies, initialization is mandatory.
+ </p>
+ </documentation></annotation>
+ <restriction base="string">
+ <enumeration value="lazy" />
+ <enumeration value="eager" />
+ <enumeration value="immediate" />
+ <enumeration value="required" />
+ </restriction>
+ </simpleType>
+
+ <simpleType name="messageSessionTargetType">
+ <restriction base="string">
+ <enumeration value="job-executor" />
+ <enumeration value="jms" />
+ <enumeration value="test" />
+ </restriction>
+ </simpleType>
+
+
+ <!-- ### GROUPS ########################################################## -->
+
+ <group name="persistableDescriptors">
+ <choice>
+ <element ref="tns:byte" />
+ <element ref="tns:char" />
+ <element ref="tns:class" />
+ <element ref="tns:context-ref" />
+ <element ref="tns:double" />
+ <element ref="tns:environment-ref" />
+ <element ref="tns:process-engine-ref" />
+ <element ref="tns:false" />
+ <element ref="tns:float" />
+ <element ref="tns:int" />
+ <element ref="tns:jndi" />
+ <element ref="tns:list" />
+ <element ref="tns:long" />
+ <element ref="tns:map" />
+ <element ref="tns:message-session" />
+ <element ref="tns:null" />
+ <element ref="tns:object" />
+ <element ref="tns:pvm-db-session" />
+ <element ref="tns:properties" />
+ <element ref="tns:ref" />
+ <element ref="tns:set" />
+ <element ref="tns:short" />
+ <element ref="tns:string" />
+ <element ref="tns:timer-session" />
+ <element ref="tns:transaction-ref" />
+ <element ref="tns:true" />
+ </choice>
+ </group>
+
+ <group name="allDescriptors">
+ <choice>
+ <group ref="tns:persistableDescriptors" />
+ <element ref="tns:business-calendar" />
+ <element ref="tns:process-service" />
+ <element ref="tns:deployer-manager" />
+ <element ref="tns:hibernate-configuration" />
+ <element ref="tns:hibernate-session-factory" />
+ <element ref="tns:hibernate-session" />
+ <element ref="tns:job-executor" />
+ <element ref="tns:job-test-helper" />
+ <element ref="tns:command-service" />
+ <element ref="tns:transaction" />
+ <element ref="tns:variable-types" />
+ </choice>
+ </group>
+
+ <group name="interceptors">
+ <choice>
+ <element name="environment-interceptor">
+ <annotation><documentation>Interceptor that can be used as part of declaring
+ a command service.
+ </documentation></annotation>
+ </element>
+ <element name="retry-interceptor">
+ <annotation><documentation>Interceptor that retries the method invocation in
+ case of exceptions.
+ </documentation></annotation>
+ <complexType>
+ <attribute name="retries" default="3">
+ <annotation><documentation>Max number of attempts before giving up</documentation></annotation>
+ </attribute>
+ <attribute name="delay" default="50">
+ <annotation><documentation>Delay in milliseconds after the first exception</documentation></annotation>
+ </attribute>
+ <attribute name="delay-factor" default="4">
+ <annotation><documentation>Factor with which the delay is multiplied after subsequent
+ failed attempts. This enables back-off to reduce load in case of repetitive failures.
+ </documentation></annotation>
+ </attribute>
+ </complexType>
+ </element>
+ <element name="transaction-interceptor">
+ <annotation><documentation>Interceptor that will make sure the transaction is initialized before each
+ invocation and it will issue a setRollbackOnly on the transaction in case an exception occors.
+ </documentation></annotation>
+ </element>
+ </choice>
+ </group>
+
+ <group name="deployers">
+ <choice>
+ <element name="create-process">
+ <annotation><documentation>Deployer that can instantiate the
+ process definition of a given type.
+ </documentation></annotation>
+ <complexType>
+ <attribute name="name" type="string" />
+ <attribute name="class" type="string" use="required"/>
+ </complexType>
+ </element>
+ <element name="check-version">
+ <annotation><documentation>Deployer checks if the version of the
+ deployed process is exactly 1 more then the last version of the same
+ process. If a version already exists, it is left untouched.
+ If no version exists, by default, this deployer will assign
+ a version to the process definition that is 1 higher then the
+ highest deployed version in the DB for that process name. This
+ default can be overridden by the 'assign' attribute.
+ </documentation></annotation>
+ <complexType>
+ <attribute name="assign" default="true">
+ <annotation><documentation>In case there the process definition
+ has not be given a version explicitely, this attribute specifies
+ if this deployer should assign a version. The assigned version
+ will be 1 higher then the highest version in the db for processes
+ with the same name. Starting with 1 if no similarly named procses
+ definitions are found.
+ </documentation></annotation>
+ </attribute>
+ </complexType>
+ </element>
+ <element name="create-id">
+ <annotation><documentation>Deployer verifies if the version of the
+ deployed process is exactly 1 more then the last version of the same
+ process.
+ </documentation></annotation>
+ </element>
+ <element name="save-process">
+ <annotation><documentation>Deployer that saves the process with
+ the PvmDbSession.
+ </documentation></annotation>
+ </element>
+ </choice>
+ </group>
+
+ <group name="operations">
+ <choice>
+ <element name="enlist">
+ <annotation><documentation>Enlists this object (assumes a org.jbpm.tx.Resource) with the current org.jbpm.tx.StandardTransaction</documentation></annotation>
+ <complexType>
+ <attribute name="transaction" type="string">
+ <annotation><documentation>Optional reference to the name of the
+ standard transaction. If no transaction name is specified, the transaction
+ is looked up by type in the environment.
+ </documentation></annotation>
+ </attribute>
+ </complexType>
+ </element>
+ <element name="field">
+ <annotation><documentation>Injects a value into a member field of this object.
+ Exactly one child element must specify the value.
+ </documentation></annotation>
+ <complexType>
+ <group ref="tns:persistableDescriptors" />
+ <attribute name="name">
+ <annotation><documentation>The member field name</documentation></annotation>
+ </attribute>
+ </complexType>
+ </element>
+ <element name="invoke">
+ <annotation><documentation>Invokes a method</documentation></annotation>
+ <complexType>
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <element name="arg" type="tns:argType" />
+ </choice>
+ <attribute name="method" type="string" use="required">
+ <annotation><documentation>the method name</documentation></annotation>
+ </attribute>
+ </complexType>
+ </element>
+ <element name="subscribe">
+ <annotation><documentation>Subscribes this object to an observable</documentation></annotation>
+ <complexType>
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <element name="arg" type="tns:argType" />
+ </choice>
+ <attribute name="context" type="string">
+ <annotation><documentation>The context in which to find the observable. If not specified,
+ the context of this object will be taken. If no observable object names are specified, the
+ context object itself will be used as the observable.</documentation></annotation>
+ </attribute>
+ <attribute name="to" default="object-events">
+ <annotation><documentation>Indicates if this object is interested in the events fired by
+ the object itself (object-events) or in the wire events fired by the wire context
+ (wire-events).</documentation></annotation>
+ <simpleType>
+ <restriction base="string">
+ <enumeration value="wire-events" />
+ <enumeration value="object-events" />
+ </restriction>
+ </simpleType>
+ </attribute>
+ <attribute name="event" type="string">
+ <annotation><documentation>A single event. See 'events' for more information.</documentation></annotation>
+ </attribute>
+ <attribute name="events" type="string">
+ <annotation><documentation>Comma separated list of events to listen to, filtering out all other events.
+ If no events are specified or if the '*' wildcard is specified, the object will be notified of all events.
+ </documentation></annotation>
+ </attribute>
+ <attribute name="object" type="string">
+ <annotation><documentation>A single object name. See 'objects' for more information.</documentation></annotation>
+ </attribute>
+ <attribute name="objects" type="string">
+ <annotation><documentation>Comma separated list of object names to listen to.
+ If no objects are specified the specified context will be used as the observable.
+ </documentation></annotation>
+ </attribute>
+ <attribute name="method" type="string">
+ <annotation><documentation>Name of the method to invoke. If no method is specified, it is assumed that the
+ object implements the Listener interface. Nested 'arg' elements can be used to provide arguments
+ in the method invocation.
+ </documentation></annotation>
+ </attribute>
+ </complexType>
+ </element>
+ </choice>
+ </group>
+
+</schema>
\ No newline at end of file
Added: jbpm4/trunk/modules/api/src/main/resources/jpdl.xsd
===================================================================
--- jbpm4/trunk/modules/api/src/main/resources/jpdl.xsd (rev 0)
+++ jbpm4/trunk/modules/api/src/main/resources/jpdl.xsd 2008-11-21 15:59:34 UTC (rev 3038)
@@ -0,0 +1,615 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://jbpm.org/xsd/jpdl"
+ xmlns:tns="http://jbpm.org/xsd/jpdl"
+ elementFormDefault="qualified"
+ attributeFormDefault="qualified">
+
+ <annotation>
+ <documentation>Schema for jPDL 4 process descriptions;
+ element process is the top level element.
+
+ TODO: Add node pluggability. (add the proper any's and
+ anyAttributes)
+
+ TODO: Pull up expression. The expression element in the
+ delegation group can be pulled up as an expression
+ attribute in each use case of the delegationGroup
+
+ TODO: Should automatic activities have timers? That makes sense
+ in a transient scenario, but not in a transactional scenario.
+ Same comment holds for asynchronous continuations
+
+ TODO: Is it a good idea to move blocking and signalling to the API ?
+
+ TODO: Figure out task reuse (requires templating and parameters)
+ and dynamic task creation (requires tasks to be declared by name
+ in the process definition and that from the API tasks can be
+ easily instantiated.
+
+ TODO: Investigate if object-refs to centrally defined objects would
+ add value over inline defined objects.
+ </documentation>
+ </annotation>
+
+ <!-- ### PROCESS DEFINITION ############################################# -->
+
+ <element name="process">
+ <annotation><documentation>A jPDL process definition description; This
+ is the top level element in a jPDL process file.</documentation></annotation>
+ <complexType>
+ <sequence minOccurs="0" maxOccurs="unbounded">
+ <group ref="tns:activityGroup" minOccurs="0" maxOccurs="unbounded"/>
+ <!--
+ <element ref="tns:on" minOccurs="0" maxOccurs="unbounded">
+ <annotation><documentation>Events on which listeners can be registered.</documentation></annotation>
+ </element>
+ <element ref="tns:timer" minOccurs="0" maxOccurs="unbounded"/>
+ -->
+ </sequence>
+ <attribute name="name" use="required" type="string">
+ <annotation><documentation>The process name. Multiple processes can
+ be deployed with the same name, as long as they have a different
+ version.</documentation></annotation>
+ </attribute>
+ <attribute name="version" type="int">
+ <annotation><documentation>Indicates the sequence number of this
+ version for all processes with the same name. By specifying a version
+ automatic deployment can figure out if this process is already deployed
+ or not.
+ </documentation></annotation>
+ </attribute>
+ <attribute name="g" type="string">
+ <annotation><documentation>Graphical information used by designer tool.
+ </documentation></annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <!-- ### ACTIVITIES ##################################################### -->
+
+ <group name="activityGroup">
+ <choice>
+ <!-- ~~~ START ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <element name="start">
+ <annotation><documentation>Start event
+ </documentation></annotation>
+ <complexType>
+ <sequence>
+ <element ref="tns:flow" minOccurs="0" maxOccurs="unbounded" />
+ <element ref="tns:on" minOccurs="0" maxOccurs="unbounded">
+ <annotation><documentation>Events on which listeners can be registered.</documentation></annotation>
+ </element>
+ </sequence>
+ <attributeGroup ref="tns:nodeAttributes" />
+ </complexType>
+ </element>
+
+ <!-- ~~~ END ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <element name="end">
+ <annotation><documentation>End event.
+ </documentation></annotation>
+ <complexType>
+ <sequence>
+ <element ref="tns:on" minOccurs="0" maxOccurs="unbounded">
+ <annotation><documentation>Events on which listeners can be registered.</documentation></annotation>
+ </element>
+ </sequence>
+ <attributeGroup ref="tns:nodeAttributes" />
+ <attribute name="ends" default="process-instance">
+ <simpleType>
+ <restriction base="string">
+ <enumeration value="execution"/>
+ <enumeration value="process-instance"/>
+ </restriction>
+ </simpleType>
+ </attribute>
+ </complexType>
+ </element>
+
+ <!-- ~~~ STATE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <element name="state">
+ <annotation><documentation>A wait state. When an execution arrives in this
+ activity, the execution will wait until an external trigger is received
+ with execution.signal() or execution.getActivityInstance().signal()
+ </documentation></annotation>
+ <complexType>
+ <sequence>
+ <element ref="tns:flow" minOccurs="0" maxOccurs="unbounded" />
+ <element ref="tns:on" minOccurs="0" maxOccurs="unbounded">
+ <annotation><documentation>Events on which listeners can be registered.</documentation></annotation>
+ </element>
+ <!--
+ <element ref="tns:timer" minOccurs="0" maxOccurs="unbounded"/>
+ -->
+ </sequence>
+ <attributeGroup ref="tns:nodeAttributes" />
+ </complexType>
+ </element>
+
+ <!-- ~~~ EXCLUSIVE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <element name="exclusive">
+ <annotation><documentation>Exclusive gayteway: selects one path out of many alternatives.
+ When an execution comes in, exactly one outgoing flow is taken.
+ </documentation></annotation>
+ <complexType>
+ <sequence>
+ <element ref="tns:flow" minOccurs="0" maxOccurs="unbounded" />
+ <element ref="tns:on" minOccurs="0" maxOccurs="unbounded">
+ <annotation><documentation>Events on which listeners can be registered.</documentation></annotation>
+ </element>
+ </sequence>
+ <attributeGroup ref="tns:nodeAttributes" />
+ </complexType>
+ </element>
+
+ <!--
+ <element name="fork">
+ <annotation><documentation>Spawns multiple concurrent paths of
+ execution.
+ </documentation></annotation>
+ <complexType>
+ <sequence>
+ <element ref="tns:flow" minOccurs="0" maxOccurs="unbounded" />
+ <element ref="tns:on" minOccurs="0" maxOccurs="unbounded">
+ <annotation><documentation>Events on which listeners can be registered.</documentation></annotation>
+ </element>
+ </sequence>
+ <attributeGroup ref="tns:nodeAttributes" />
+ </complexType>
+ </element>
+
+ <element name="join">
+ <annotation><documentation>Spawns multiple concurrent paths of
+ execution.
+ </documentation></annotation>
+ <complexType>
+ <sequence>
+ <element ref="tns:flow" minOccurs="0" maxOccurs="unbounded" />
+ <element ref="tns:on" minOccurs="0" maxOccurs="unbounded">
+ <annotation><documentation>Events on which listeners can be registered.</documentation></annotation>
+ </element>
+ </sequence>
+ <attributeGroup ref="tns:nodeAttributes" />
+ </complexType>
+ </element>
+
+ <element name="process-state">
+ <annotation><documentation>Waits while a sub process instance is
+ being executed and continues when the sub process instance ends.
+ </documentation></annotation>
+ < ! - - take into account the following situation:
+ Unlike in jBPM 3, a process-state should not signal the newly created
+ process instance. The signal in jBPM 3 is probably historically there
+ because in the beginning there was no initial attribute on the process
+ definition.
+ - - >
+ <complexType>
+ <sequence>
+ <element ref="tns:flow" minOccurs="0" maxOccurs="unbounded" />
+ <element ref="tns:on" minOccurs="0" maxOccurs="unbounded">
+ <annotation><documentation>Events on which listeners can be registered.</documentation></annotation>
+ </element>
+ <element ref="tns:timer" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attributeGroup ref="tns:nodeAttributes" />
+ </complexType>
+ </element>
+
+ <element name="super-state">
+ <annotation><documentation>Scope enclosing a number of nodes.
+ </documentation></annotation>
+ <complexType>
+ <sequence>
+ <group ref="tns:activityGroup" minOccurs="0" maxOccurs="unbounded" />
+ <element ref="tns:flow" minOccurs="0" maxOccurs="unbounded" />
+ <element ref="tns:on" minOccurs="0" maxOccurs="unbounded">
+ <annotation><documentation>Events on which listeners can be registered.</documentation></annotation>
+ </element>
+ <element ref="tns:timer" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attributeGroup ref="tns:nodeAttributes" />
+ </complexType>
+ </element>
+
+ <element name="activity">
+ <annotation><documentation>Executes an activity implementation.
+ </documentation></annotation>
+ <complexType>
+ <sequence>
+ <group ref="tns:delegationGroup"/>
+ <element ref="tns:flow" minOccurs="0" maxOccurs="unbounded" />
+ <element ref="tns:on" minOccurs="0" maxOccurs="unbounded">
+ <annotation><documentation>Events on which listeners can be registered.</documentation></annotation>
+ </element>
+ </sequence>
+ <attributeGroup ref="tns:nodeAttributes" />
+ </complexType>
+ </element>
+
+ <element name="invoke">
+ <annotation><documentation>Invokes a method on a java object
+ </documentation></annotation>
+ <complexType>
+ <complexContent>
+ <extension base="tns:invokeType">
+ <sequence>
+ <element ref="tns:flow" minOccurs="0" maxOccurs="unbounded" />
+ <element ref="tns:on" minOccurs="0" maxOccurs="unbounded">
+ <annotation><documentation>Events on which listeners can be registered.</documentation></annotation>
+ </element>
+ </sequence>
+ <attributeGroup ref="tns:nodeAttributes" />
+ </extension>
+ </complexContent>
+ </complexType>
+ </element>
+
+ <element name="script">
+ <annotation><documentation>Evaluates a piece of text as a script
+ </documentation></annotation>
+ <complexType>
+ <complexContent>
+ <extension base="tns:scriptType">
+ <sequence>
+ <element ref="tns:flow" minOccurs="0" maxOccurs="unbounded" />
+ <element ref="tns:on" minOccurs="0" maxOccurs="unbounded">
+ <annotation><documentation>Events on which listeners can be registered.</documentation></annotation>
+ </element>
+ </sequence>
+ <attributeGroup ref="tns:nodeAttributes" />
+ </extension>
+ </complexContent>
+ </complexType>
+ </element>
+
+ <element name="email">
+ <annotation><documentation>Sends an email
+ </documentation></annotation>
+ <complexType>
+ <complexContent>
+ <extension base="tns:emailType">
+ <sequence>
+ <element ref="tns:flow" minOccurs="0" maxOccurs="unbounded" />
+ <element ref="tns:on" minOccurs="0" maxOccurs="unbounded">
+ <annotation><documentation>Events on which listeners can be registered.</documentation></annotation>
+ </element>
+ </sequence>
+ <attributeGroup ref="tns:nodeAttributes" />
+ </extension>
+ </complexContent>
+ </complexType>
+ </element>
+
+ <element name="task">
+ <annotation><documentation>Creates a human task
+ </documentation></annotation>
+ <complexType>
+ <complexContent>
+ <extension base="tns:taskType">
+ <sequence>
+ <element ref="tns:flow" minOccurs="0" maxOccurs="unbounded" />
+ <element ref="tns:on" minOccurs="0" maxOccurs="unbounded">
+ <annotation><documentation>Events on which listeners can be registered.</documentation></annotation>
+ </element>
+ <element ref="tns:timer" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attributeGroup ref="tns:nodeAttributes" />
+ </extension>
+ </complexContent>
+ </complexType>
+ </element>
+ -->
+ </choice>
+ </group>
+
+ <attributeGroup name="nodeAttributes">
+ <attribute name="name" type="string">
+ <annotation><documentation>The id of this activity. The name should be unique
+ in the complete scope of the process.</documentation></annotation>
+ </attribute>
+ <attribute name="g" type="string">
+ <annotation><documentation>Graphical information used by process designer tool.
+ </documentation></annotation>
+ </attribute>
+ </attributeGroup>
+
+ <complexType name="flowType">
+ <annotation><documentation>The outgoing flows. The first in the list
+ will be the default outgoing flow.
+ </documentation></annotation>
+ <!--
+ <sequence>
+ <group ref="tns:eventListenerGroup" />
+ </sequence>
+ -->
+ <attribute name="name" type="string">
+ <annotation><documentation>Name of this outgoing flow</documentation></annotation>
+ </attribute>
+ <attribute name="to" type="string">
+ <annotation><documentation>Name of the destination node of this flow.
+ </documentation></annotation>
+ </attribute>
+ <attribute name="g" type="string">
+ <annotation><documentation>Graphical information used by process designer tool.
+ </documentation></annotation>
+ </attribute>
+ </complexType>
+
+ <element name="flow" type="tns:flowType">
+ <annotation><documentation>A flow from one node to another.</documentation></annotation>
+ </element>
+
+ <element name="on">
+ <annotation><documentation>Events on which listeners can be registered.</documentation></annotation>
+ <complexType>
+ <!--
+ <sequence>
+ <group ref="tns:eventListenerGroup" minOccurs="0" maxOccurs="unbounded">
+ <annotation><documentation>A list of event listeners that will
+ be notified when the event is fired</documentation></annotation>
+ </group>
+ </sequence>
+ -->
+ <attribute name="event" type="string">
+ <annotation><documentation>The event identification
+ </documentation></annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <!--
+
+ <group name="eventListenerGroup">
+ <choice>
+ <element name="notify">
+ <annotation><documentation>Calls the notify method on an
+ EventListener.
+ </documentation></annotation>
+ <complexType>
+ <group ref="tns:delegationGroup" />
+ <attribute name="object" type="string">
+ <annotation><documentation>The reference to an object that is declared
+ in the objects section of this process definition.
+ </documentation></annotation>
+ </attribute>
+ <attribute name="expr" type="string">
+ <annotation><documentation>The expression that will resolve to
+ an Activity implementation.</documentation></annotation>
+ </attribute>
+ </complexType>
+ </element>
+ <element name="invoke" type="tns:invokeType">
+ <annotation><documentation>Invokes a method on a Java object
+ through reflection. The return value can be captured in a
+ process variable.
+ </documentation></annotation>
+ </element>
+ <element name="script" type="tns:scriptType">
+ <annotation><documentation>Evaluates a piece of text as a script
+ </documentation></annotation>
+ </element>
+ <element name="email" type="tns:emailType">
+ <annotation><documentation>Sends an email
+ </documentation></annotation>
+ </element>
+ <element ref="tns:timer">
+ <annotation><documentation>Creates a timer.
+ </documentation></annotation>
+ </element>
+ </choice>
+ </group>
+
+ <group name="delegationGroup">
+ <choice>
+ <element name="object">
+ <annotation><documentation>A java object that will be obtained by using
+ the constructor through reflection or through a factory method.</documentation></annotation>
+ <complexType>
+ <attribute name="class" type="string" />
+ </complexType>
+ </element>
+ <element name="jndi">
+ <complexType>
+ <attribute name="name" type="string" />
+ </complexType>
+ </element>
+ <element name="expr">
+ <complexType>
+ <attribute name="text" type="string" use="required"/>
+ <attribute name="language" type="string" />
+ </complexType>
+ </element>
+ </choice>
+ </group>
+
+ <complexType name="invokeType">
+ <sequence>
+ <group ref="tns:delegationGroup">
+ <annotation><documentation>The object on which the method
+ will be invoked</documentation></annotation>
+ </group>
+ <element name="arg" minOccurs="0" maxOccurs="unbounded">
+ <annotation><documentation>Arguments passed into the method
+ invocation.</documentation></annotation>
+ </element>
+ </sequence>
+ <attribute name="method" type="string" use="required">
+ <annotation><documentation>The name of the method to invoke.
+ </documentation></annotation>
+ </attribute>
+ </complexType>
+
+ <complexType name="scriptType">
+ <sequence>
+ <element name="expr" type="string">
+ <annotation><documentation>The content of this expression element
+ is the script text that will be evaluated. This is mutually
+ exclusive with the expression attribute.</documentation></annotation>
+ </element>
+ </sequence>
+ <attribute name="expr" type="string">
+ <annotation><documentation>The script text that will be evaluated. This
+ is mutually exclusive with the expression element.
+ </documentation></annotation>
+ </attribute>
+ <attribute name="lang" type="string">
+ <annotation><documentation>Identification of the scripting language
+ to use.</documentation></annotation>
+ </attribute>
+ </complexType>
+
+ <complexType name="emailType">
+ <sequence>
+ <element name="property">
+ <annotation><documentation>Template property value</documentation></annotation>
+ <complexType>
+ <attribute name="name" type="string" />
+ <attribute name="value" type="string" />
+ </complexType>
+ </element>
+ </sequence>
+ <attribute name="to" type="string" />
+ <attribute name="type" type="string">
+ <annotation><documentation>Reference to the email template</documentation></annotation>
+ </attribute>
+ </complexType>
+
+ <element name="timer">
+ <annotation><documentation>A timer that will be bound to the most inner enclosing scope.
+ Timers can give a signal to an activity instance. The signal will correspond to a flow
+ or to an event being fired.
+ </documentation></annotation>
+ <complexType>
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <group ref="tns:eventListenerGroup">
+ <annotation><documentation>An inline list of event listeners
+ on a timer is a short cut for defining the event separately.
+ </documentation></annotation>
+ </group>
+ </choice>
+ <attribute name="duedate" type="string" use="required" />
+ <attribute name="signal" type="string" use="required">
+ <annotation><documentation>Refers to the signal that will be used.
+ If inline event listeners are declared, the signal name can not be
+ the same as an event that is declared in this scope.
+ </documentation></annotation>
+ </attribute>
+ <attribute name="repeat" type="string" />
+ </complexType>
+ </element>
+
+ <complexType name="taskType">
+ <sequence>
+ <element ref="tns:assignment" />
+ <element name="reminder">
+ <complexType>
+ <attribute name="duedate" type="string" use="required" />
+ <attribute name="repeat" type="string" />
+ </complexType>
+ </element>
+ <element ref="tns:subtask" />
+ </sequence>
+ <attribute name="title" type="string">
+ </attribute>
+ <attribute name="form" type="string">
+ </attribute>
+ <attribute name="swimlane" type="string">
+ </attribute>
+ <attribute name="description" type="string" />
+ <attribute name="duedate" type="string" />
+ <attribute name="priority" type="tns:priorityType" default="normal" />
+ <attribute name="notify" type="boolean" default="false"/>
+ <attribute name="dynamic" type="boolean" default="true">
+ <annotation><documentation>Is dynamic creation of subtasks
+ allowed ?</documentation></annotation>
+ </attribute>
+ <attribute name="subtasksync">
+ <simpleType>
+ <union>
+ <simpleType>
+ <restriction base="string">
+ <enumeration value="last">
+ <annotation><documentation>When the last subtask completes,
+ this task is completed.</documentation></annotation>
+ </enumeration>
+ <enumeration value="first">
+ <annotation><documentation>When the first subtask completes,
+ this task is completed.</documentation></annotation>
+ </enumeration>
+ </restriction>
+ </simpleType>
+ <simpleType>
+ <restriction base="int">
+ <annotation><documentation>The number of subtasks that
+ have to complete before this task is considered
+ completed.</documentation></annotation>
+ </restriction>
+ </simpleType>
+ </union>
+ </simpleType>
+ </attribute>
+ </complexType>
+
+ <simpleType name="priorityType">
+ <restriction base="string">
+ <enumeration value="highest"/>
+ <enumeration value="high"/>
+ <enumeration value="normal"/>
+ <enumeration value="low"/>
+ <enumeration value="lowest"/>
+ </restriction>
+ </simpleType>
+
+ <element name="subtask" type="tns:taskType">
+ <annotation><documentation>Subtask in a task activity.</documentation></annotation>
+ </element>
+
+ <element name="swimlane">
+ <annotation><documentation>A process role.</documentation></annotation>
+ <complexType>
+ <sequence>
+ <element ref="tns:assignment"/>
+ </sequence>
+ <attribute name="name" type="string" use="required" />
+ </complexType>
+ </element>
+
+ <element name="assignment">
+ <annotation><documentation>Specifies how a task or a swimlane should be assigned
+ to a specific user or who will be identified as a candidate for it.</documentation></annotation>
+ <complexType>
+ <sequence minOccurs="0">
+ <group ref="tns:delegationGroup">
+ <annotation><documentation>An object that implements the
+ Assigner interface.
+ </documentation></annotation>
+ </group>
+ </sequence>
+ <attribute name="assignee" type="string">
+ <annotation><documentation>User ID of the person to which the task
+ or swimlane will be assigned.
+ </documentation></annotation>
+ </attribute>
+ <attribute name="assignee-expr" type="string">
+ <annotation><documentation>Expression that resolves to a
+ User ID to which the task or swimlane will be assigned.
+ </documentation></annotation>
+ </attribute>
+ <attribute name="candidates" type="string">
+ <annotation><documentation>Comma separated list of User ID's
+ or Group ID's. All the referred people will be candidates to
+ take the task or swimlane.</documentation></annotation>
+ </attribute>
+ <attribute name="candidate-expr" type="string">
+ <annotation><documentation>Expression that resolves to a
+ comma separated list of User ID's or Group ID's. All the
+ referred people will be candidates to
+ take the task or swimlane.</documentation></annotation>
+ </attribute>
+ </complexType>
+ </element>
+ -->
+
+</schema>
Added: jbpm4/trunk/modules/devguide/src/main/diagrams/diagrams.mdzip
===================================================================
(Binary files differ)
Property changes on: jbpm4/trunk/modules/devguide/src/main/diagrams/diagrams.mdzip
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: jbpm4/trunk/modules/devguide/src/main/diagrams/images.ppt
===================================================================
(Binary files differ)
Property changes on: jbpm4/trunk/modules/devguide/src/main/diagrams/images.ppt
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/apis.png
===================================================================
(Binary files differ)
Property changes on: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/apis.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/ch04.execution.states.png
===================================================================
(Binary files differ)
Property changes on: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/ch04.execution.states.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/ch09.persistent.process.png
===================================================================
(Binary files differ)
Property changes on: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/ch09.persistent.process.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/class.diagram.process.definition.png
===================================================================
(Binary files differ)
Property changes on: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/class.diagram.process.definition.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/class.diagram.process.execution.png
===================================================================
(Binary files differ)
Property changes on: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/class.diagram.process.execution.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/composite.node.png
===================================================================
(Binary files differ)
Property changes on: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/composite.node.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/execution.automatic.wait1.png
===================================================================
(Binary files differ)
Property changes on: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/execution.automatic.wait1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/execution.automatic.wait2.png
===================================================================
(Binary files differ)
Property changes on: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/execution.automatic.wait2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/execution.automatic.wait3.png
===================================================================
(Binary files differ)
Property changes on: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/execution.automatic.wait3.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/execution.concurrency.png
===================================================================
(Binary files differ)
Property changes on: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/execution.concurrency.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/execution.loan.archive.png
===================================================================
(Binary files differ)
Property changes on: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/execution.loan.archive.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/execution.loan.end.png
===================================================================
(Binary files differ)
Property changes on: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/execution.loan.end.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/execution.loan.evaluate.png
===================================================================
(Binary files differ)
Property changes on: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/execution.loan.evaluate.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/initial.in.composite.png
===================================================================
(Binary files differ)
Property changes on: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/initial.in.composite.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/interceptors.png
===================================================================
(Binary files differ)
Property changes on: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/interceptors.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/loan.db.png
===================================================================
(Binary files differ)
Property changes on: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/loan.db.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/loan.execution.png
===================================================================
(Binary files differ)
Property changes on: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/loan.execution.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/process.ab.png
===================================================================
(Binary files differ)
Property changes on: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/process.ab.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/process.anatomy.classes.png
===================================================================
(Binary files differ)
Property changes on: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/process.anatomy.classes.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/process.automatic.png
===================================================================
(Binary files differ)
Property changes on: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/process.automatic.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/process.loan.png
===================================================================
(Binary files differ)
Property changes on: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/process.loan.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/process.propagate.png
===================================================================
(Binary files differ)
Property changes on: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/process.propagate.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/process.structure.classes.png
===================================================================
(Binary files differ)
Property changes on: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/process.structure.classes.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/self.transition.png
===================================================================
(Binary files differ)
Property changes on: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/self.transition.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/transactions.png
===================================================================
(Binary files differ)
Property changes on: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/transactions.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/transition.inheritence.png
===================================================================
(Binary files differ)
Property changes on: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/transition.inheritence.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/transition.into.composite.png
===================================================================
(Binary files differ)
Property changes on: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/transition.into.composite.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/transition.out.of.composite.png
===================================================================
(Binary files differ)
Property changes on: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/transition.out.of.composite.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/transition.png
===================================================================
(Binary files differ)
Property changes on: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/transition.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/transition.to.inner.png
===================================================================
(Binary files differ)
Property changes on: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/transition.to.inner.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/transition.to.outer.png
===================================================================
(Binary files differ)
Property changes on: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/transition.to.outer.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: jbpm4/trunk/modules/devguide/src/main/docbook/en/master.xml
===================================================================
--- jbpm4/trunk/modules/devguide/src/main/docbook/en/master.xml (rev 0)
+++ jbpm4/trunk/modules/devguide/src/main/docbook/en/master.xml 2008-11-21 15:59:34 UTC (rev 3038)
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE book [
+ <!ENTITY ch01-Introduction SYSTEM "modules/ch01-Introduction.xml">
+ <!ENTITY ch02-ExecutionModes SYSTEM "modules/ch02-ExecutionModes.xml">
+ <!ENTITY ch03-Architecture SYSTEM "modules/ch03-Architecture.xml">
+ <!ENTITY ch04-ImplementingBasicActivities SYSTEM "modules/ch04-ImplementingBasicActivities.xml">
+ <!ENTITY ch05-ProcessAnatomy SYSTEM "modules/ch05-ProcessAnatomy.xml">
+ <!ENTITY ch06-ImplementingAdvancedActivities SYSTEM "modules/ch06-ImplementingAdvancedActivities.xml">
+ <!ENTITY ch07-Variables SYSTEM "modules/ch07-Variables.xml">
+ <!ENTITY ch08-Timers SYSTEM "modules/ch08-Timers.xml">
+ <!ENTITY ch09-AsynchronousContinuations SYSTEM "modules/ch09-AsynchronousContinuations.xml">
+ <!ENTITY ch10-SoftwareLogging SYSTEM "modules/ch10-SoftwareLogging.xml">
+]>
+
+<book lang="en">
+
+ <bookinfo>
+ <title>jBPM Developers Guide</title>
+ </bookinfo>
+
+ <toc />
+
+ &ch01-Introduction;
+ &ch02-ExecutionModes;
+ &ch03-Architecture;
+ &ch04-ImplementingBasicActivities;
+ &ch05-ProcessAnatomy;
+ &ch06-ImplementingAdvancedActivities;
+ &ch07-Variables;
+ &ch08-Timers;
+ &ch09-AsynchronousContinuations;
+ &ch10-SoftwareLogging;
+
+</book>
\ No newline at end of file
Added: jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch01-Introduction.xml
===================================================================
--- jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch01-Introduction.xml (rev 0)
+++ jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch01-Introduction.xml 2008-11-21 15:59:34 UTC (rev 3038)
@@ -0,0 +1,131 @@
+<chapter id="introduction">
+ <title>Introduction</title>
+
+ <section>
+ <title>License and EULA</title>
+ <para>The Process Virtual Machine component is distributed under the terms of the
+ GNU Lesser General Public License (LGPL) and the JBoss End User License Agreement (EULA).
+ See <ulink url="../../../lgpl.html">the full LGPL license text</ulink> and <ulink url="../../../JBossORG-EULA.txt">the
+ full End User License Agreement</ulink>.
+ </para>
+ </section>
+
+ <section>
+ <title>Sources</title>
+ <para>The source code for this component can be found in the jBPM SVN repository:
+ </para>
+ <ulink url="https://anonsvn.jboss.org/repos/jbpm/jbpm4/pvm/">https://anonsvn.jboss.org/repos/jbpm/jbpm4/pvm/</ulink>
+ </section>
+
+ <section>
+ <title>JVM version</title>
+ <para>jbpm-pvm.jar requires a JVM version 5 or higher.
+ </para>
+ </section>
+
+ <section>
+ <title>Library dependencies</title>
+ <para>For building and executing processes the jbpm-pvm.jar does not have any other
+ dependencies then on the JVM. If you're using DB persistence, then there is a dependency
+ on hibernate and it's dependencies. More information about the optional depedencies can
+ be found in the <ulink url="../../lib/optional-dependencies.html">lib directory</ulink>.
+ </para>
+ </section>
+
+ <section>
+ <title>What is it</title>
+ <para>In essence, the Process Virtual Machine is a framework specifying executable
+ graphs. A process definition represents an execution flow and has a structure that
+ be represented graphically as a diagram.
+ </para>
+ <figure id="example.process.graph">
+ <title>Example process definition</title>
+ <mediaobject><imageobject><imagedata align="center" fileref="images/process.loan.png"/></imageobject></mediaobject>
+ </figure>
+ <para>Typically, process definitions are static. A process definition is composed of
+ nodes and transitions. The runtime behaviour of a node is encapsulated in a so called
+ Activity and it's decoupled from the process graph structure.
+ </para>
+ <figure id="class.diagram.process.definition">
+ <title>Process structure class diagram</title>
+ <mediaobject><imageobject><imagedata align="center" fileref="images/class.diagram.process.definition.png"/></imageobject></mediaobject>
+ </figure>
+ <para>The Process Virtual
+ Machine doesn't contain any such activity implementations. It only provides the
+ execution environment and an activity API to write <literal>Activity</literal>
+ implementations as Java components. Activities can also be wait states. This means
+ that the node control flow goes outside the process system. For example a human task
+ or invoking an service asynchronously.
+ </para>
+ <para>Many executions can be started for one process definition. An execution is a pointer
+ that keeps track of the current node.
+ </para>
+ <figure id="example.execution">
+ <title>Example execution</title>
+ <mediaobject><imageobject><imagedata align="center" fileref="images/loan.execution.png"/></imageobject></mediaobject>
+ </figure>
+ <para>To represent concurrent paths of execution, there is
+ a hierarchical parent-child relation between so that one process instance can cope with concurrent
+ paths of execution.
+ </para>
+ <figure id="class.diagram.process.execution">
+ <title>Execution class diagram</title>
+ <mediaobject><imageobject><imagedata align="center" fileref="images/class.diagram.process.execution.png"/></imageobject></mediaobject>
+ </figure>
+ </section>
+
+ <section>
+ <title>Features</title>
+ <para>The key features of this library are
+ <itemizedlist>
+ <listitem>Create executable processes that are based on a diagram structure</listitem>
+ <listitem>Runtime behaviour of the nodes can be provided as Activity implementations</listitem>
+ <listitem>Activities can be wait states</listitem>
+ <listitem>There are no constraints on the process graph structure</listitem>
+ <listitem>Processes diagrams can be based on composition (aka block structured)</listitem>
+ <listitem>Processes diagrams can be a mix of graph based and composition</listitem>
+ <listitem>During wait states, the runtime state of a process execution can be persisted</listitem>
+ <listitem>Persistence is optional</listitem>
+ </itemizedlist>
+ </para>
+ </section>
+
+ <section>
+ <title>Purpose</title>
+ <para>The Process Virtual Machine is designed in such a way that it's easy to build
+ workflow, BPM, orchestration and other graph based execution langauges on top
+ of it. Examples of languages that have been built on top of this library:
+ </para>
+ <itemizedlist>
+ <listitem>jPDL: Workflow language that combines powerful human task capabilities with easy binding to Java.</listitem>
+ <listitem>BPEL: Web-Service orchestration (to be exact for the purists: BPEL is a WSDL service orchestration language)</listitem>
+ <listitem>Pageflow: To describe navigation handling in a web application, pages can be seen as nodes and the nagivation between the pages as transitions.</listitem>
+ <listitem>XPDL: A graph based process language standardized by the Workflow Management Coalition (WfMC)</listitem>
+ </itemizedlist>
+ <para>Even while the nature of these languages is already very diverse, these are
+ all examples of general purpose workflow languages. The real power of the
+ Process Virtual Machine is that it's very easy to build Domain Specific Languages (DSL)
+ with it. For instance, it's very easy to build a very simple (and dedicated) workflow
+ language to specify approvals related to documents in a document management system.
+ </para>
+ <para>BPM as a discipline refers to the management level effort to optimise efficiency
+ of an organisation by analysing and optimising the procedures of how people and systems
+ work together. In designing the Process Virtual Machine and the jPDL language
+ in particular, we have spend great care on facilitating the link between BPM analysis
+ notations and executable process languages. Here are the most known modeling notations:
+ </para>
+ <itemizedlist>
+ <listitem>BPMN: OMG latest notation for modeling business processes.
+ This is a modeling notation that is targetted explicitely to be bound
+ to executable processes.
+ </listitem>
+ <listitem>UML activity diagrams: OMG notation for modeling business
+ processes. Mostly used in business context.</listitem>
+ <listitem>UML state diagrams: OMG modeling notation for defining technical
+ state machines. More used in a technical context.</listitem>
+ <listitem>EPC: Event driven process chains. Rich notation for modeling
+ business processes driven by SAP and IDS Scheer.</listitem>
+ </itemizedlist>
+ </section>
+
+</chapter>
Added: jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch02-ExecutionModes.xml
===================================================================
--- jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch02-ExecutionModes.xml (rev 0)
+++ jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch02-ExecutionModes.xml 2008-11-21 15:59:34 UTC (rev 3038)
@@ -0,0 +1,396 @@
+<chapter id="executionmodes">
+ <title>Execution modes</title>
+
+ <para>There are basically three process execution modes: object, persistent
+ and embedded. For the persistent and embedded execution modes, the process
+ execution has to participate in a transaction. In that case, the process
+ execution has to take place inside of an Environment. The environment will be
+ used to bind process execution updates to a transaction in the application
+ transaction. The environment can be used to bind to e.g. a JDBC connection,
+ JTA, BMT, Spring transactions and so on.
+ </para>
+
+ <section id="objectexecutionmode">
+ <title>Object execution mode</title>
+ <para>Object execution mode is the simplest form of working with the Process
+ Virtual Machine. This means working with the process definition and execution
+ objects directly through the client API. Let's show this by an example. We
+ start by creating a <literal>ClientProcessDefinition</literal> that looks like this:
+ </para>
+
+ <para>Object execution mode is the simplest form of working with the Process
+ Virtual Machine. This means working with the process definition and execution
+ objects directly through the client API. Let's show this by an example. We
+ start by creating a <literal>ClientProcessDefinition</literal> that looks like this:
+ </para>
+ <figure id="loan.process">
+ <title>The loan process</title>
+ <mediaobject><imageobject><imagedata align="center" fileref="images/process.loan.png"/></imageobject></mediaobject>
+ </figure>
+ <programlisting>ClientProcessDefinition processDefinition = ProcessFactory.build("loan")
+ .node("submit loan request").initial().behaviour(AutomaticActivity.class)
+ .transition().to("evaluate")
+ .node("evaluate").behaviour(WaitState.class)
+ .transition("approve").to("wire money")
+ .transition("reject").to("end")
+ .node("wire money").behaviour(AutomaticActivity.class)
+ .transition().to("archive")
+ .node("archive").behaviour(WaitState.class)
+ .transition().to("end")
+ .node("end").behaviour(WaitState.class)
+.done();</programlisting>
+ <para>The <literal>ProcessFactory</literal> is a helper class that provides convenience
+ for building an object graph that represents a process definition.
+ <literal>AutomaticActivity</literal> is a pass-through activity without anything
+ happening and <literal>WaitState</literal> will wait until an external signal is given. Both
+ activity implementations will be covered in more depth later.
+ </para>
+ <para>The <literal>processDefinition</literal> object serves as a factory for process
+ instance objects. A process instance represents one execution of the process definition.
+ More precise, the process instance is the main path of execution.
+ </para>
+ <programlisting>ClientExecution execution = processDefinition.startProcessInstance();</programlisting>
+ <para>A process instance
+ itself is also an <literal>Execution</literal>. Potentially, an execution can have
+ child executions to represent concurrent paths of execution.
+ </para>
+ <para>The <literal>execution</literal> can be seen as a state machine that operates as
+ described in the process definition. Starting a process
+ instance means that the initial node of the process definition is executed.
+ Since this is an automatic activity, the execution will proceed to the
+ <literal>evaluate</literal> node. The <literal>evaluate</literal> node is a wait state.
+ When the execution arrived at the evaluate node, the method <literal>startProcessInstance</literal>
+ will return and waits until an external signal is provided with the <literal>signal</literal>
+ method. So after the <literal>startProcessInstance</literal> we can verify if the
+ execution is positioned in the evaluate node.
+ </para>
+ <programlisting>assertEquals("evaluate", execution.getNodeName());</programlisting>
+ <para>To make the process execute further, we provide an external trigger with the
+ <literal>signal</literal> method. The result of the evaluation will be given as the
+ signalName parameter like this:
+ </para>
+ <programlisting>execution.signal("approve");</programlisting>
+ <para>The <literal>WaitState</literal> activity implementation will take the transition
+ that corresponds to the given signalName. So the execution will first execute
+ the automatic activity <literal>wire money</literal> and then return after entering
+ the next wait state <literal>archive</literal>.
+ </para>
+ <programlisting>assertEquals("archive", execution.getNodeName());</programlisting>
+ <para>When the execution is waiting in the archive node, the default signal will
+ make it take the first unnamed transition.
+ </para>
+ <programlisting>execution.signal();
+assertEquals("end", execution.getNodeName());</programlisting>
+ <para>The process has executed in the thread of the client. The
+ <literal>startProcessInstance</literal> method only returned when the <literal>evaluate</literal>
+ node was reached. In other words, the <literal>ClientProcessDefinition.startProcessInstance</literal>
+ and <literal>ClientExecution.signal</literal> methods are blocking until the next
+ wait state is reached.
+ </para>
+ </section>
+
+ <section id="persistentexecutionmode">
+ <title>Persistent execution mode</title>
+ <para>The Process Virtual Machine also contains the hibernate mappings to store the
+ process definitions and executions in any database. A special session facade called
+ <literal>ExecutionService</literal> is provided for working with process executions
+ in such a persistent environment.
+ </para>
+ <para>Two configuration files should be available on the classpath: an environment
+ configuration file and a <literal>hibernate.properties</literal> file. A basic
+ configuration for persistent execution mode in a standard Java environment looks
+ like this:
+ </para>
+ <literal><emphasis role="bold">environment.cfg.xml</emphasis>:</literal>
+ <programlisting><jbpm-configuration xmlns="http://jbpm.org/xsd/cfg">
+
+ <process-engine>
+
+ <deployer-manager>
+ <language name="api">
+ <check-version />
+ <create-id />
+ <save-process />
+ </language>
+ </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" />
+ <mappings resource="org/jbpm/pvm/pvm.hibernate.mappings.xml" />
+ <cache-configuration resource="org/jbpm/pvm/pvm.cache.xml"
+ usage="nonstrict-read-write" />
+ </hibernate-configuration>
+
+ <hibernate-session-factory />
+
+ <id-generator />
+ <variable-types resource="org/jbpm/pvm/pvm.types.xml" />
+ <job-executor auto-start="false" />
+
+ </process-engine>
+
+ <environment>
+ <hibernate-session />
+ <transaction />
+ <pvm-db-session />
+ <job-db-session />
+ <message-session />
+ </environment>
+
+</jbpm-configuration></programlisting>
+ <para>And next to it a hibernate.properties like this</para>
+ <literal>hibernate.properties:</literal>
+ <programlisting>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</programlisting>
+ <para>Then you can obtain the services from the environment factory like this:
+ </para>
+ <programlisting>EnvironmentFactory environmentFactory = new PvmEnvironmentFactory("environment.cfg.xml");
+
+ProcessService processService = environmentFactory.get(ProcessService.class);
+ExecutionService executionService = environmentFactory.get(ExecutionService.class);
+ManagementService managementService = environmentFactory.get(ManagementService.class);</programlisting>
+ <para>The responsibility of the <literal>ProcessService</literal> is to manage
+ the repository of process definitions. Before we can start a process execution,
+ the process definition needs to be deployed into the process repository.
+ Process definitions can be supplied in various formats and process definition
+ languages. A deployment collects process definition information from various
+ sources like a ZIP file, an XML file or a process definition object.
+ The method <literal>ProcessService.deploy</literal> will take a deployment
+ through all the deployers that are configured in the configuration file.
+ </para>
+ <para>In this example, we'll supply a process definition programmatically
+ for deployment.</para>
+ <programlisting>ClientProcessDefinition processDefinition = ProcessFactory.build("loan")
+ .node("submit loan request").initial().behaviour(AutomaticActivity.class)
+ .transition().to("evaluate")
+ .node("evaluate").behaviour(WaitState.class)
+ .transition("approve").to("wire money")
+ .transition("reject").to("end")
+ .node("wire money").behaviour(AutomaticActivity.class)
+ .transition().to("archive")
+ .node("archive").behaviour(WaitState.class)
+ .transition().to("end")
+ .node("end").behaviour(WaitState.class)
+.done();
+
+Deployment deployment = new Deployment(processDefinition);
+processService.deploy(deployment);</programlisting>
+ <para>Now, a version of that process definition is stored in the database.
+ The <literal>check-version</literal> deployer will have assigned version 1
+ to the stored process definition. The <literal>create-id</literal> deployer
+ will have distilled id <literal>loan:1</literal> from the process name and the
+ assigned version.
+ </para>
+ <para>Deploying that process again will lead to a new process definition
+ version being created in the database. But an incremented version number will
+ be assigned. For the purpose of versioning, process definitions are considered
+ equal if they have the same name.</para>
+ <para>It is recommended that a user provided key reference is supplied for
+ all process executions. Starting a new process execution goes like this:
+ </para>
+ <programlisting>Execution execution = executionService.startExecution("loan:1", "request7836");</programlisting>
+ <para>The return value is an execution interface, which prevents navigation of relations.
+ That is because outside of the service methods, the transaction and hibernate session
+ is not guaranteed to still be open. In fact, the default configuration as given
+ above will only keep the transaction and session open for the duration of the
+ service method. So navigating the relations outside of the service methods might result
+ into a hibernate <literal>LazyInitializationException</literal>. But the
+ current node name can still be verified:
+ </para>
+ <programlisting>assertEquals("evaluate", execution.getNodeName());</programlisting>
+ <para>Also very important is the generated id that can be obtained. The default
+ <literal>id-generator</literal> will use the process definition id and the
+ given key to make a unique id for the process execution like this:</para>
+ <programlisting>assertEquals("loan:1/request7836", execution.getId());</programlisting>
+ <para>That id must be when providing the subsequent external triggers to the
+ process execution like this:
+ </para>
+ <programlisting>executionService.signalExecution("loan:1/request7836", "approve");</programlisting>
+ <para>More information about service interfaces to run in persistent
+ mode can be found in package
+ <ulink url="../../api/org/jbpm/pvm/package-summary.html"><literal>org.jbpm.pvm</literal> of the
+ api docs</ulink>.
+ </para>
+ </section>
+
+ <section id="embeddedexecutionmode">
+ <title>Embedded execution mode</title>
+ <para>Embedded execution mode means that the state of a process is stored
+ as a string column inside a user domain object like e.g. a loan.
+ </para>
+ <programlisting>public class Loan {
+
+ <emphasis role="bold">/** the loan process definition as a static resource */
+ private static final ClientProcessDefinition processDefinition = createLoanProcess();
+
+ private static ClientProcessDefinition createLoanProcess() {
+ ClientProcessDefinition processDefinition = ProcessFactory.build("loan")
+ .node("submit loan request").initial().behaviour(AutomaticActivity.class)
+ .transition().to("evaluate")
+ .node("evaluate").behaviour(WaitState.class)
+ .transition("approve").to("wire money")
+ .transition("reject").to("end")
+ .node("wire money").behaviour(AutomaticActivity.class)
+ .transition().to("archive")
+ .node("archive").behaviour(WaitState.class)
+ .transition().to("end")
+ .node("end").behaviour(WaitState.class)
+ .done();
+
+ return processDefinition;
+ }
+
+ /** exposes the process definition to the execution hibernate type */
+ private static ClientProcessDefinition getProcessDefinition() {
+ return processDefinition;
+ }
+ </emphasis>
+
+ long dbid;
+ String customer;
+ double amount;
+ <emphasis role="bold">ClientExecution execution;</emphasis>
+
+ /** constructor for persistence */
+ protected Loan() {
+ }
+
+ public Loan(String customer, double amount) {
+ this.customer = customer;
+ this.amount = amount;
+ <emphasis role="bold">this.execution = processDefinition.startProcessInstance();</emphasis>
+ }
+
+ public void approve() {
+ <emphasis role="bold">execution.signal("approve");</emphasis>
+ }
+
+ public void reject() {
+ <emphasis role="bold">execution.signal("reject");</emphasis>
+ }
+
+ public void archiveComplete() {
+ <emphasis role="bold">execution.signal();</emphasis>
+ }
+
+ public String getState() {
+ return <emphasis role="bold">execution.getNodeName()</emphasis>;
+ }
+
+ ...getters...
+}</programlisting>
+ <para>If you ignore the bold parts for a second, you can see that this is a
+ POJO without anything fancy. It's just a bean that can be stored with hibernate.
+ The bold part indicate that implementation part of the class that is related
+ to process and execution. Not that nothing of the process definition or
+ execution is exposed to the user of the Loan class.
+ </para>
+ <para>Each <literal>Loan</literal> object corresponds to a <literal>loan</literal>
+ process instance. Some methods of the <literal>Loan</literal> class correspond
+ to the external triggers that need to be given during the lifecycle of a
+ <literal>Loan</literal> object.
+ </para>
+ <para>Next we'll show how to use this class. To get started we need a</para>
+ <emphasis role="bold"><literal>hibernate.cfg.xml:</literal></emphasis>
+ <programlisting><?xml version="1.0" encoding="utf-8"?>
+
+<!DOCTYPE hibernate-configuration PUBLIC
+ "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
+
+<hibernate-configuration>
+ <session-factory>
+
+ <property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
+ <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
+ <property name="hibernate.connection.url">jdbc:hsqldb:mem:.</property>
+ <property name="hibernate.connection.username">sa</property>
+ <property name="hibernate.connection.password"></property>
+ <property name="hibernate.hbm2ddl.auto">create</property>
+ <property name="hibernate.show_sql">true"</property>
+ <property name="hibernate.format_sql">true"</property>
+ <property name="hibernate.use_sql_comments">true"</property>
+
+ <mapping resource="Loan.hbm.xml"/>
+
+ </session-factory>
+</hibernate-configuration></programlisting>
+ <para>And a</para>
+ <emphasis role="bold"><literal>Loan.hbm.xml:</literal></emphasis>
+ <programlisting><?xml version="1.0"?<
+
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"<
+
+<hibernate-mapping package="org.jbpm.pvm.api.db.embedded" default-access="field"<
+
+ <typedef name="execution" class="org.jbpm.pvm.internal.hibernate.ExecutionType" /<
+
+ <class name="Loan" table="LOAN"<
+
+ <id name="dbid"<
+ <generator class="sequence"/<
+ </id<
+
+ <property name="execution" type="execution" /<
+ <property name="customer" /<
+ <property name="amount" /<
+
+ </class<
+
+</hibernate-mapping<</programlisting>
+ <para>Then you can use the Loan class like this in a test</para>
+ <programlisting>Configuration configuration = new Configuration();
+configuration.configure();
+SessionFactory sessionFactory = configuration.buildSessionFactory();
+
+// start a session/transaction
+Session session = sessionFactory.openSession();
+Transaction transaction = session.beginTransaction();
+
+Loan loan = new Loan("john doe", 234.0);
+session.save(loan);
+assertEquals("evaluate", loan.getState());
+
+// start a new session/transaction
+transaction.commit();
+session.close();
+session = sessionFactory.openSession();
+transaction = session.beginTransaction();
+
+loan = (Loan) session.get(Loan.class, loan.getDbid());
+assertEquals("evaluate", loan.getState());
+loan.approve();
+assertEquals("archive", loan.getState());
+
+// start a new session/transaction
+transaction.commit();
+session.close();</programlisting>
+ <para>After executing this code snippet, this is the loan record in the DB:</para>
+ <figure id="loan.db">
+ <title>The loan record in the DB</title>
+ <mediaobject><imageobject><imagedata align="center" fileref="images/loan.db.png"/></imageobject></mediaobject>
+ </figure>
+ </section>
+
+</chapter>
\ No newline at end of file
Added: jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch03-Architecture.xml
===================================================================
--- jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch03-Architecture.xml (rev 0)
+++ jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch03-Architecture.xml 2008-11-21 15:59:34 UTC (rev 3038)
@@ -0,0 +1,250 @@
+<chapter id="architecture">
+ <title>Architecture</title>
+
+ <section id="apis">
+ <title>APIs</title>
+ <para>The Process Virtual Machine has 4 integrated API's that together
+ offer a complete coverage of working with processes in the different execution modes.
+ Each of the APIs has a specific purpose that fits within the following overall
+ architecture.
+ </para>
+ <figure id="apis">
+ <title>The 4 API's of the Process Virtual Machine</title>
+ <mediaobject><imageobject><imagedata align="center" fileref="images/apis.png"/></imageobject></mediaobject>
+ </figure>
+ <para>The services interfaces should be used from application code that wants to interact
+ with the Process Virtual Machine which runs in transactional persistent mode, backed by a
+ database. This is the most typical way how users interact with the PVM as a workflow engine.
+ </para>
+ <para>To execute processes without persistence, the client API can be used to work with process
+ and execution objects directly. The client API expose the methods of the core model objects.
+ </para>
+ <para>The activity API is used to implement the runtime behaviour of activities. So a activity
+ type is in fact a component with at the core an implementation of the <literal>Activity</literal>
+ interface. Activity implementations can control the flow of execution.
+ </para>
+ <para>The event listener API serves to write pieces of Java code that should be executed upon
+ process events. It's very similar to the activity API with that exception that event listeners
+ are not able to control the flow of execution.
+ </para>
+ </section>
+
+ <section>
+ <title>Activity API</title>
+ <para>The activity API allows to implement the runtime activity behaviour in Java.
+ </para>
+ <programlisting>public interface Activity extends Serializable {
+ void execute(ActivityExecution execution) throws Exception;
+}</programlisting>
+ <para>An activity is the behaviour of the node to which it is associated.
+ The provided execution is the execution that arrives in the node.
+ The interface <literal>ActivityExecution</literal> exposes special
+ methods to control the execution flow.
+ </para>
+ <programlisting>public interface ActivityExecution extends OpenExecution {
+
+ void waitForSignal();
+ void take(String transitionName);
+ void execute(String nodeName);
+
+ ...
+
+}</programlisting>
+ </section>
+
+ <section>
+ <title>Event listener API</title>
+ <para>The event listener API allows for listeners to be developed in Java code
+ and that are invoked on specific process events like entering a node or leaving
+ a node. It is very similar to the activity API, but the difference is
+ that the propagation of the execution flow cannot be controlled. E.g. when an execution
+ is taking a transition, a listener to that event can be notified, but since the
+ transition is already being taking, the execution flow cannot be changed
+ by the event listeners.
+ </para>
+ <programlisting>public interface EventListener extends Serializable {
+
+ void notify(EventListenerExecution execution) throws Exception;
+
+}</programlisting>
+ </section>
+
+ <section>
+ <title>Client API</title>
+ <para>The client API was already introduced above in the object execution mode
+ and embedded execution mode. It's an interface that exposes the methods for
+ managing executions on the plain process definition and execution objects directly.
+ </para>
+ <para>At a minimal, the client API and the activity API are needed to create
+ some a process definition with activities and execute it.
+ </para>
+ </section>
+
+ <section>
+ <title>Environment</title>
+ <para>In the persistent execution mode, the first purpose of the environment is
+ to enable processes to be executed in different transactional environments like
+ standard Java, enterprise Java, SEAM and Spring.
+ </para>
+ <para>The PVM code itself will only use transactional resources through self-defined
+ interfaces. For example, the PVM itself has interfaces for some methods on the hibernate
+ session, a async messaging session and a timer session.
+ </para>
+ <para>The environment allows to configure the actual implementations, lazy
+ initialization of the services on a request-basis and caching the service
+ objects for the duration of the transaction.
+ </para>
+ <para>An environment factory is static and one environment factory can serve
+ all the threads in an application.
+ </para>
+ <programlisting>EnvironmentFactory environmentFactory = new PvmEnvironmentFactory("environment.cfg.xml");</programlisting>
+ <para>Environment blocks can surround persistent process operations
+ like this:
+ </para>
+ <programlisting>Environment environment = environmentFactory.openEnvironment();
+try {
+
+ ... inside the environment block...
+
+} finally {
+ environment.close();
+}</programlisting>
+ <para>The PVM itself will fetch all it's transactional resources and configurations
+ from the environment. It's recommended that <literal>Activity</literal> implementations
+ do the same.
+ </para>
+ </section>
+
+ <section>
+ <title>Commands</title>
+ <para>Commands encapsulate operations that are to be executed within an environment
+ block. The main purpose for commands is to capture the logic of
+ </para>
+ <programlisting>public interface Command<T> extends Serializable {
+
+ T execute(Environment environment) throws Exception;
+
+}</programlisting>
+ <para></para>
+ </section>
+
+ <section>
+ <title>Services</title>
+ <para>There are three services: <literal>ProcessService</literal>,
+ <literal>ExecutionService</literal> and <literal>ManagementService</literal>.
+ In general, services are session facades that expose methods for persistent
+ usage of the PVM. The next fragments show the essential methods as example
+ to illustrate those services.
+ </para>
+ <para>The <literal>ProcessService</literal> manages the repository of
+ process definitions.
+ </para>
+ <programlisting>public interface ProcessService {
+
+ ProcessDefinition deploy(Deployment deployment);
+
+ ProcessDefinition findLatestProcessDefinition(String processDefinitionName);
+
+ ...
+
+}</programlisting>
+ <para>The <literal>ExecutionService</literal> manages the runtime
+ executions.</para>
+ <programlisting>public interface ExecutionService {
+
+ Execution startExecution(String processDefinitionId, String executionKey);
+
+ Execution signalExecution(String executionId, String signalName);
+
+ ...
+
+}</programlisting>
+ <para>The <literal>ManagementService</literal> groups all management operations
+ that are needed to keep the system up and running.
+ </para>
+ <programlisting>public interface ManagementService {
+
+ List<Job> getJobsWithException(int firstResult, int maxResults);
+
+ void executeJob(String jobId);
+
+ ...
+
+}</programlisting>
+ <para>The implementation of all these methods is encapsulated in
+ <literal>Command</literal>s. And the three services all delegate the
+ execution of the commands to a <literal>CommandService</literal>:
+ </para>
+ <programlisting>public interface CommandService {
+
+ <T> T execute(Command<T> command);
+
+}</programlisting>
+ <para>The <literal>CommandService</literal> is configured in the
+ environment. A chain of CommandServices can act as interceptors
+ around a command. This is the core mechanism on how persistence and
+ transactional support can be offered in a variety of environments.
+ </para>
+ <para>From the default configuration which is included in full above,
+ here is the section that configures the services
+ </para>
+ <programlisting><jbpm-configuration xmlns="http://jbpm.org/xsd/cfg">
+
+ <process-engine>
+
+ <process-service />
+ <execution-service />
+ <management-service />
+
+ <command-service>
+ <retry-interceptor />
+ <environment-interceptor />
+ <standard-transaction-interceptor />
+ </command-service>
+
+ ...
+ </programlisting>
+ <para>The three services <literal>process-service</literal>, <literal>execution-service</literal>
+ and <literal>management-service</literal> will look up the configured
+ <literal>command-service</literal> by type. The <literal>command-service</literal>
+ tag corresponds to the default command service that essentially does nothing else
+ then just execute the command providing it the current environment.
+ </para>
+ <para>The configured <literal>command-service</literal> results into the following
+ a chain of three interceptors followed by the default command executor.
+ </para>
+ <figure id="interceptors">
+ <title>The CommandService interceptors</title>
+ <mediaobject><imageobject><imagedata align="center" fileref="images/interceptors.png"/></imageobject></mediaobject>
+ </figure>
+ <para>The retry interceptor is the first in the chain and that one that will be exposed as the
+ <literal>CommandService.class</literal> from the environment. So the retry interceptor
+ will be given to the respective services <literal>process-service</literal>, <literal>execution-service</literal>
+ and <literal>management-service</literal>.
+ </para>
+ <para>The <literal>retry-interceptor</literal> will catch hibernate StaleObjectExceptions
+ (indicating optimistic locking failures) and retry to execute the command.
+ </para>
+ <para>The <literal>environment-interceptor</literal> will put an environment block
+ around the execution of the command.
+ </para>
+ <para>The <literal>standard-transaction-interceptor</literal> will initialize a
+ <literal>StandardTransaction</literal>. The hibernate session/transaction will be
+ enlisted as a resource with this standard transaction.
+ </para>
+ <para>Different configurations of this interceptor stack will also enable to
+ </para>
+ <itemizedlist>
+ <listitem>delegate execution to a local ejb command service so that an container
+ managed transaction is started.
+ </listitem>
+ <listitem>delegate to a remote ejb command service so that the command actually
+ gets executed on a different JVM.
+ </listitem>
+ <listitem>package the command as an asynchronous message so that the command gets
+ executed asynchronously in a different transaction.
+ </listitem>
+ </itemizedlist>
+ </section>
+
+</chapter>
\ No newline at end of file
Added: jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch04-ImplementingBasicActivities.xml
===================================================================
--- jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch04-ImplementingBasicActivities.xml (rev 0)
+++ jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch04-ImplementingBasicActivities.xml 2008-11-21 15:59:34 UTC (rev 3038)
@@ -0,0 +1,536 @@
+<chapter id="implementingbasicactivities">
+ <title>Implementing basic activities</title>
+
+ <para>This chapter explains the basics of process definitions, the features offered by
+ the Process Virtual Machine and how activity implementations can be build. At the same
+ time the client API is shown to execute processes with those activity implementations.
+ </para>
+
+ <!-- ### Activity ####################################################### -->
+ <section id="activity">
+ <title>Activity</title>
+ <para>The PVM library doesn't have a fixed set of process constructs.
+ Instead, runtime behaviour of a node is delegated to an <literal>Activity</literal>.
+ In other words, <literal>Activity</literal> is an interface to implement the runtime
+ behaviour of process constructs in plain Java.
+ </para>
+ <programlisting>public <emphasis role="bold">interface Activity</emphasis> extends Serializable {
+
+ void <emphasis role="bold">execute</emphasis>(ActivityExecution execution) throws Exception;
+
+}</programlisting>
+ <para>When an activity is used as the node behaviour, it is in full control of the further
+ propagation of the execution. In other words, a node behaviour can decide what the execution
+ should do next. For example, it can take a transition with
+ <literal>execution.take(Transition)</literal> or go into a wait state with
+ <literal>execution.waitForSignal()</literal>. In case the node behaviour does not invoke
+ any of the above execution propagation methods, the execution will
+ <link linkend="implicitproceedbehaviour">proceed in a default way</link>.
+ </para>
+ </section>
+
+ <!-- ### Activity example ############################################### -->
+ <section id="activityexample">
+ <title>Activity example</title>
+ <para>We'll start with a very original hello world example. A Display
+ activity will print a message to the console:
+ </para>
+ <programlisting>public <emphasis role="bold">class Display</emphasis> implements <emphasis role="bold">Activity</emphasis> {
+
+ String message;
+
+ public Display(String message) {
+ this.message = message;
+ }
+
+ public void execute(ActivityExecution execution) {
+ <emphasis role="bold">System.out.println(message);</emphasis>
+ }
+}</programlisting>
+ <para>Let' build our first process definition with this activity:</para>
+ <figure id="activity.example">
+ <title>Display example process</title>
+ <mediaobject><imageobject><imagedata align="center" fileref="images/process.ab.png"/></imageobject></mediaobject>
+ </figure>
+ <programlisting>ClientProcessDefinition processDefinition = ProcessFactory.build()
+ .<emphasis role="bold">node("a").initial()</emphasis>.behaviour(<emphasis role="bold">new Display("hello")</emphasis>)
+ .transition().to("b")
+ .<emphasis role="bold">node("b")</emphasis>.behaviour(<emphasis role="bold">new Display("world")</emphasis>)
+.done();</programlisting>
+ <para>Now we can execute this process as follows:</para>
+ <programlisting>Execution execution = processDefinition.startExecution();</programlisting>
+ <para>The invocation of <literal>startExecution</literal> will print hello world to the console:</para>
+ <programlisting>hello
+world</programlisting>
+ <para>One thing already worth noticing is that activities can be configured
+ with properties. In the Display example, you can see that the message property
+ is configured differently in the two usages. With configuration properties
+ it becomes possible to write reusable activities. They can then be configured
+ differently each time they are used in a process. That is an essential part of
+ how process languages can be build on top of the Process Virtual Machine.
+ </para>
+ <para>The other part that needs explanation is that this activity
+ implementation does not contain any instructions for the propagation of the
+ execution. When a new process instance is started, the execution is positioned
+ in the initial node and that activity is executed. The method
+ <literal>Display.execute</literal> makes use of what is called implicit propagation
+ of execution. Concretely this means that the activity itself does not
+ invoke any of the methods on the execution to propagate it. In that case
+ implicit propagation kicks in. Implicit propagation will take the first
+ transition if there is one. If not, it will end the execution. This explains
+ why both nodes <literal>a</literal> and <literal>b</literal> are executed and that
+ the execution stops after node <literal>b</literal> is executed.
+ </para>
+ <para>More details about the implicit proceed behaviour can be found
+ in <xref linkend="implicitproceedbehaviour" /></para>
+ </section>
+
+ <!-- ### ExternalActivity ############################################### -->
+ <section id="externalactivity">
+ <title>ExternalActivity</title>
+ <para>External activities are activities for which the responsibility for proceeding
+ the execution is transferred externally, meaning outside the process system. This
+ means that for the system that is executing the process, it's a wait state. The
+ execution will wait until an external trigger is given.
+ </para>
+ <para>For dealing with external triggers, <literal>ExternalActivity</literal>
+ adds two methods to the <literal>Activity</literal>:</para>
+ <programlisting>public <emphasis role="bold">interface ExternalActivity</emphasis> extends <emphasis role="bold">Activity</emphasis> {
+
+ void <emphasis role="bold">signal</emphasis>(Execution execution,
+ String signal,
+ Map<String, Object> parameters) throws Exception;
+
+}</programlisting>
+ <para>Just like with plain activities, when an execution arrives in a node, the
+ <literal>execute</literal>-method of the node behaviour is invoked.
+ In external activities, the execute method typically does something to
+ transfer the responsibility to another system and then enters a wait
+ state by invoking <literal>execution.waitForSignal()</literal>. For
+ example in the execute method, responsibility could be transferred to a
+ person by creating a task entry in a task management system and then
+ wait until the person completes the task.
+ </para>
+ <para>In case a node behaves as a wait state, then the execution will
+ wait in that node until the execution's <literal>signal</literal> method
+ is invoked. The execution will delegate that signal to the behaviour Activity
+ of the current node.
+ </para>
+ <para>So the Activity's <literal>signal</literal>-method is invoked
+ when the execution receives an external trigger during the wait state. With the
+ signal method, responsibility is transferred back to the process execution. For
+ example, when a person completes a task, the task management system calls the
+ signal method on the execution.
+ </para>
+ <para>A signal can optionally have a signal name and a map of parameters. Most
+ common way on how node behaviours interprete the signal and parameters is that
+ the signal relates to the outgoing transition that needs to be taken and that the
+ parameters are set as variables on the execution. But those are just examples, it
+ is up to the activity to use the signal and the parameters as it pleases.
+ </para>
+ </section>
+
+ <!-- ### ExternalActivity example ####################################### -->
+ <section id="externalactivityexample">
+ <title>ExternalActivity example</title>
+ <para>Here's a first example of a simple wait state implementation:
+ </para>
+ <programlisting>public <emphasis role="bold">class WaitState</emphasis> implements <emphasis role="bold">ExternalActivity</emphasis> {
+
+ public void execute(ActivityExecution execution) {
+ <emphasis role="bold">execution.waitForSignal();</emphasis>
+ }
+
+ public void signal(ActivityExecution execution,
+ String signalName,
+ Map<String, Object> parameters) {
+ <emphasis role="bold">execution.take(signalName);</emphasis>
+ }
+}</programlisting>
+ <para>The <literal>execute</literal>-method calls
+ <literal>execution.waitForSignal()</literal>. The invocation of
+ <literal>execution.waitForSignal()</literal> will bring the process execution
+ into a wait state until an external trigger is given.
+ </para>
+ <para><literal>signal</literal>-method takes the transition with
+ the signal parameter as the transition name. So when an execution receives an
+ external trigger, the signal name is interpreted as the name of an outgoing
+ transition and the execution will be propagated over that transition.
+ </para>
+ <para>Here's the same simple process that has a transition from a to b. This
+ time, the behaviour of the two nodes will be WaitState's.
+ </para>
+ <figure id="process.diagram">
+ <title>The external activity example process</title>
+ <mediaobject><imageobject><imagedata align="center" fileref="images/process.ab.png"/></imageobject></mediaobject>
+ </figure>
+ <programlisting>ClientProcessDefinition processDefinition = ProcessFactory.build()
+ <emphasis role="bold">.node("a").initial().behaviour(new WaitState())</emphasis>
+ .transition().to("b")
+ <emphasis role="bold">.node("b").behaviour(new WaitState())</emphasis>
+.done();</programlisting>
+ <para>Let's start a new process instance for this process definition:</para>
+ <programlisting>ClientExecution execution = processDefinition.startProcessInstance();</programlisting>
+ <para>Starting this process will execute the <literal>WaitState</literal> activity
+ in node <literal>a</literal>. <literal>WaitState.execute</literal> will invoke
+ <literal>ActivityExecution.waitForSignal</literal>. So when the
+ <literal>processDefinition.startProcessInstance()</literal> returns, the execution
+ will still be positioned in node a.
+ </para>
+ <programlisting>assertEquals("a", execution.getNodeName());</programlisting>
+ <para>Then we provide the external trigger by calling the <literal>signal</literal>
+ method.
+ </para>
+ <programlisting>execution.signal();</programlisting>
+ <para>The <literal>execution.signal()</literal> will delegate to the activity
+ of the current node. So in this case that is the <literal>WaitState</literal>
+ activity in node <literal>a</literal>. The <literal>WaitState.signal</literal>
+ will invoke the <literal>ActivityExecution.take(String transitionName)</literal>.
+ Since we didn't supply a signalName, the first transition with name <literal>null</literal>
+ will be taken. The only transition we specified out of node <literal>a</literal>
+ didn't get a name so that one will be taken. And that transition points to node
+ <literal>b</literal>. When the execution arrives in node <literal>b</literal>,
+ the <literal>WaitState</literal> in node <literal>b</literal> is executed.
+ Similar as we saw above, the execution will wait in node <literal>b</literal>
+ and this time the <literal>signal</literal> method will return, leaving the
+ execution positioned in node <literal>b</literal>.
+ </para>
+ <programlisting>assertEquals("b", execution.getNodeName());</programlisting>
+ </section>
+
+ <!-- ### BASIC PROCESS EXECUTION ######################################## -->
+ <section id="basicprocessexecution">
+ <title>Basic process execution</title>
+ <para>In this next example, we'll combine automatic activities and wait states.
+ This example builds upon the loan approval process with the <literal>WaitState</literal>
+ and <literal>Display</literal> activities that we've just created. Graphically,
+ the loan process looks like this:
+ </para>
+ <figure id="basicprocessexecution.loan.process">
+ <title>The loan process</title>
+ <mediaobject><imageobject><imagedata align="center" fileref="images/process.loan.png"/></imageobject></mediaobject>
+ </figure>
+ <para>Building process graphs in Java code can be tedious because you have to keep track of all the
+ references in local variables. To resolve that, the Process Virtual Machine comes with a
+ ProcessFactory. The ProcessFactory is a kind of domain specific language (DSL) that is embedded
+ in Java and eases the construction of process graphs. This pattern is also known as
+ a <ulink url="http://martinfowler.com/bliki/FluentInterface.html">fluent
+ interface</ulink>.
+ </para>
+ <programlisting>ClientProcessDefinition processDefinition = ProcessFactory.build("loan")
+ .node(<emphasis role="bold">"submit loan request"</emphasis>).initial().behaviour(new Display("loan request submitted"))
+ .transition().to("evaluate")
+ <emphasis role="bold">.node("evaluate").behaviour(new WaitState())</emphasis>
+ .transition("approve").to("wire money")
+ .transition("reject").to("end")
+ <emphasis role="bold">.node("wire money").behaviour(new Display("wire the money"))</emphasis>
+ .transition().to("archive")
+ <emphasis role="bold">.node("archive").behaviour(new WaitState())</emphasis>
+ .transition().to("end")
+ <emphasis role="bold">.node("end").behaviour(new WaitState())</emphasis>
+.done();</programlisting>
+ <para>For more details about the ProcessFactory, see <ulink url="../../api/org/jbpm/pvm/package-summary.html">the
+ api docs</ulink>. An alternative for
+ the ProcessFactory would be to create an XML language and an XML parser for expressing
+ processes. The XML parser can then instantiate the classes of package
+ <literal>org.jbpm.pvm.internal.model</literal> directly. That approach is typically taken by
+ process languages.
+ </para>
+ <para>The initial node <literal>submit loan request</literal> and the node
+ <literal>wire the money</literal> are automatic nodes. In this example,
+ the <literal>Display</literal> implementation of node
+ <literal>wire the money</literal> uses the Java API's to just print a
+ message to the console. But the witty reader can imagine an alternative
+ <literal>Activity</literal> implementation that uses the Java API of a payment
+ processing library to make a real automatic payment.
+ </para>
+ <para>A new execution for the process above can be started like this
+ </para>
+ <programlisting>ClientExecution execution = processDefinition.startProcessInstance();</programlisting>
+ <para>When the <literal>startExecution</literal>-method returns, the node
+ <literal>submit loan request</literal> will be executed and the execution will be
+ positioned in the node <literal>evaluate</literal>.
+ </para>
+ <figure id="execution.loan.evaluate">
+ <title>Execution positioned in the 'evaluate' node</title>
+ <mediaobject><imageobject><imagedata align="center" fileref="images/execution.loan.evaluate.png"/></imageobject></mediaobject>
+ </figure>
+ <para>Now, the execution is at an interesting point. There are two transitions out of
+ the state <literal>evaluate</literal>. One transition is called <literal>approve</literal>
+ and one transition is called <literal>reject</literal>. As we explained above, the WaitState
+ implementation will take the transition that corresponds to the signal that is given.
+ Let's feed in the 'approve' signal like this:
+ </para>
+ <programlisting>execution.signal("approve");</programlisting>
+ <para>The <literal>approve</literal> signal will cause the execution to take the <literal>approve</literal>
+ transition and it will arrive in the node <literal>wire money</literal>.
+ </para>
+ <para>In node <literal>wire money</literal>, the message will be printed to the console.
+ Since, the <literal>Display</literal> activity didn't invoke the
+ <literal>execution.waitForSignal()</literal>, nor any of the other execution propagation
+ methods, the implicit proceed behaviour will just make the execution continue
+ over the outgoing transition to node <literal>archive</literal>, which is again
+ a <literal>WaitState</literal>.
+ </para>
+ <figure id="execution.loan.archive">
+ <title>Execution positioned in 'archive' node</title>
+ <mediaobject><imageobject><imagedata align="center" fileref="images/execution.loan.archive.png"/></imageobject></mediaobject>
+ </figure>
+ <para>So only when the <literal>archive</literal> wait state is reached,
+ the <literal>signal("approve")</literal> returns.
+ </para>
+ <para>Another signal like this:</para>
+ <programlisting>execution.signal("approve");</programlisting>
+ <para>will bring the execution eventually in the end state.</para>
+ <figure id="execution.loan.end">
+ <title>Execution positioned in the 'end' node</title>
+ <mediaobject><imageobject><imagedata align="center" fileref="images/execution.loan.end.png"/></imageobject></mediaobject>
+ </figure>
+ </section>
+
+ <!-- ### EVENTS ######################################################### -->
+ <section id="events">
+ <title>Events</title>
+ <para>Events are points in the process definition to which a list of
+ <literal>EventListener</literal>s can be subscribed.
+ </para>
+ <programlisting>public interface EventListener extends Serializable {
+
+ void notify(EventListenerExecution execution) throws Exception;
+
+}</programlisting>
+ <para>The motivation for events is to allow for
+ developers to add programming logic to a process without changing the process diagram.
+ This is a very valuable instrument in facilitating the collaboration between business analysts
+ and developers. Business analysts
+ are responsible for expressing the requirements. When they use a process graph to document
+ those requirements, developers can take this diagram and make it executable. Events can
+ be a very handy to insert technical details into a process (like e.g. some database insert)
+ in which the business analyst is not interested.
+ </para>
+ <para>Most common events are fired by the execution automatically:
+ </para>
+ <para><emphasis role="bold">WARNING: the following event names will be
+ subject to change in the next release: see
+ <ulink url="https://jira.jboss.org/jira/browse/JBPM-1753">JBPM-1753</ulink></emphasis>
+ </para>
+ <itemizedlist>
+ <listitem><literal><emphasis role="bold">Event.TRANSITION_TAKE</emphasis> = "transition-take"</literal> :
+ fired on transitions when transitions are taken.
+ </listitem>
+ <listitem><literal><emphasis role="bold">Event.NODE_BEGIN</emphasis> = "node-begin"</literal> : fired on the node
+ when execution enters that node. This happens when execution takes a transition
+ to that node, when a child node is being executed with <literal>execution.execute(Node)</literal>
+ or when a transition is taken from a node outside that node to a contained node.
+ The latter refers to super states in state machines.
+ </listitem>
+ <listitem><literal><emphasis role="bold">Event.NODE_END</emphasis> = "node-end"</literal> : fired on the node
+ when a transition is taken out of that node or when a child node execution is
+ finished and the execution is propagated to the parent node.
+ </listitem>
+ <listitem><literal><emphasis role="bold">Event.PROCESS_BEGIN</emphasis> = "process-begin"</literal> : fired on a process
+ when a new process is started.
+ </listitem>
+ <listitem><literal><emphasis role="bold">Event.PROCESS_END</emphasis> = "process-end"</literal> : fired on a process
+ when a new process is ended. This might include a executions that are ended
+ with a cancelled or error state.
+ </listitem>
+ </itemizedlist>
+ <para>Events are identified by the combination of a process element
+ and an event name. Users and process languages can also fire events
+ programmatically with the fire method on the Execution:
+ </para>
+ <programlisting>public interface Execution extends Serializable {
+ ...
+ void fire(String eventName, ProcessElement eventSource);
+ ...
+}</programlisting>
+
+ <para>A list of <literal>EventListeners</literal> can be associated to an
+ event. But event listeners can not influence the control flow of the execution since
+ they are merely listeners to an execution which is already in progress. This is different from
+ activities that serve as the behaviour for nodes. Node behaviour activities are responsible
+ for propagating the execution.
+ </para>
+ <para>We'll create a <literal>PrintLn</literal> event listener which is
+ very similar to the <literal>Display</literal> activity from above.
+ </para>
+ <programlisting>public class PrintLn implements EventListener {
+
+ String message;
+
+ public PrintLn(String message) {
+ this.message = message;
+ }
+
+ public void notify(EventListenerExecution execution) throws Exception {
+ System.out.println("message");
+ }
+}</programlisting>
+ <para>Several <literal>PrintLn</literal> listeners will be subscribed to events in
+ the process.</para>
+ <figure id="action.process">
+ <title>The PrintLn listener process</title>
+ <mediaobject><imageobject><imagedata align="center" fileref="images/process.ab.png"/></imageobject></mediaobject>
+ </figure>
+ <programlisting>ClientProcessDefinition processDefinition = ProcessFactory.build()
+ .node("a").initial().behaviour(new AutomaticActivity())
+ <emphasis role="bold">.event("node-end")
+ .listener(new PrintLn("leaving a"))
+ .listener(new PrintLn("second message while leaving a"))</emphasis>
+ .transition().to("b")
+ <emphasis role="bold">.listener(new PrintLn("taking transition"))</emphasis>
+ .node("b").behaviour(new WaitState())
+ .event("node-begin")
+ <emphasis role="bold">.listener(new PrintLn("entering b"))</emphasis>
+.done();</programlisting>
+ <para>The first event shows how to register multiple listeners to the same
+ event. They will be notified in the order as they are specified.
+ </para>
+ <para>Then, on the transition, there is only one type of event. So in that case,
+ the event type must not be specified and the listeners can be added directly on
+ the transition.
+ </para>
+ <para>A listeners will be called each time an execution fires the event to
+ which the listener is subscribed. The execution will be provided in the activity
+ interface as a parameter and can be used by listeners except for the methods that
+ control the propagation of execution.
+ </para>
+ </section>
+
+ <!-- ### EVENT PROPAGATION ############################################## -->
+ <section>
+ <title>Event propagation</title>
+ <para>Events are by default propagated to enclosing process elements. The motivation
+ is to allow for listeners on process definitions or composite nodes that get executed
+ for all events that occur within that process element. For example this feature
+ allows to register an event listener on a process definition or a composite node on
+ <literal>node-end</literal> events. Such action will be executed if that node is
+ left. And if that event listener is registered on a composite node, it will also be executed
+ for all nodes that are left within that composite node.
+ </para>
+ <para>To show this clearly, we'll create a <literal>DisplaySource</literal> event listener
+ that will print the message <literal>leaving</literal> and the source of the event
+ to the console.
+ </para>
+ <programlisting>public class <emphasis role="bold">DisplaySource</emphasis> implements EventListener {
+
+ public void execute(EventListenerExecution execution) {
+ <emphasis role="bold">System.out.println("leaving "+execution.getEventSource());</emphasis>
+ }
+}</programlisting>
+ <para>Note that the purpose of event listeners is not to be visible, that's why the event listener
+ itself should not be displayed in the diagram. A <literal>DisplaySource</literal> event listener
+ will be added as a listener to the event <literal>node-end</literal> on the composite node.
+ </para>
+ <para>The next process shows how the <literal>DisplaySource</literal> event listener is registered
+ as a listener to to the 'node-end' event on the <literal>composite</literal> node:</para>
+ <figure id="process.propagate">
+ <title>A process with an invisible event listener on a node-end event on a composite node.</title>
+ <mediaobject><imageobject><imagedata align="center" fileref="images/process.propagate.png"/></imageobject></mediaobject>
+ </figure>
+ <programlisting>ClientProcessDefinition processDefinition = ProcessFactory.build("propagate")
+ <emphasis role="bold">.compositeNode("composite")
+ .event(Event.NODE_END)
+ .listener(new DisplaySource())</emphasis>
+ .node("a").initial().behaviour(new WaitState())
+ .transition().to("b")
+ .node("b").behaviour(new WaitState())
+ .transition().to("c")
+ .compositeEnd()
+ .node("c").behaviour(new WaitState())
+.done();</programlisting>
+ <para>Next we'll start an execution.</para>
+ <programlisting>ClientExecution execution = processDefinition.startProcessInstance();</programlisting>
+ <para>After starting a new execution, the execution will be in node <literal>a</literal> as
+ that is the initial node. No nodes have been left so no message is logged. Next a signal
+ will be given to the execution, causing it to take the transition from <literal>a</literal>
+ to <literal>b</literal>.
+ </para>
+ <programlisting>execution.signal();</programlisting>
+ <para>When the signal method returns, the execution will have taken the transition and
+ the <literal>node-end</literal> event will be fired on node <literal>a</literal>. That
+ event will be propagated to the
+ composite node and to the process definition. Since our <literal>DisplaySource</literal>
+ event listener is placed
+ on the <literal>composite</literal> node, it will receive the event and print the following
+ message on the console:
+ </para>
+ <programlisting>leaving node(a)</programlisting>
+ <para>Another</para>
+ <programlisting>execution.signal();</programlisting>
+ <para>will take the transition from b to c. That will fire two node-leave events. One on
+ node b and one on node composite. So the following lines will be appended to the console
+ output:</para>
+ <programlisting>leaving node(b)
+leaving node(composite)</programlisting>
+ <para>Event propagation is build on the hierarchical composition structure of the process
+ definition. The top level element is always the process definition. The process
+ definition contains a list of nodes. Each node can be a leaf node or it can be a
+ composite node, which means that it contains a list of nested nodes. Nested nodes
+ can be used for e.g. super states or composite activities in nested process languages like BPEL.
+ </para>
+ <para>So the even model also works similarly for composite nodes as it did for the process
+ definition above. Suppose that 'Phase one' models
+ a super state as in state machines. Then event propagation allows to subscribe to all events
+ within that super state. The idea is that the hierarchical composition corresponds to
+ diagram representation. If an element 'e' is drawn inside another element 'p', then p
+ is the parent of e. A process definition has a set of top level nodes. Every node can have
+ a set of nested nodes. The parent of a transition is considered as the first common
+ parent for it's source and destination.
+ </para>
+ <para>If an event listener is not interested in propagated events, propagation can be disabled
+ with <literal>propagationDisabled()</literal> while building the process with the
+ <literal>ProcessFactory</literal>. The next process is the same process
+ as above except that propagated events will be disabled on the event listener. The graph diagram
+ remains the same.
+ </para>
+ <figure id="process.propagate.propagation.disabled">
+ <title>A process with an event listener to 'node-end' events with propagation disabled.</title>
+ <mediaobject><imageobject><imagedata align="center" fileref="images/process.propagate.png"/></imageobject></mediaobject>
+ </figure>
+ <para>Building the process with the process factory:
+ </para>
+ <programlisting>ClientProcessDefinition processDefinition = ProcessFactory.build("propagate")
+ .compositeNode("composite")
+ .event(Event.NODE_END)
+ .listener(new DisplaySource())
+ <emphasis role="bold">.propagationDisabled()</emphasis>
+ .node("a").initial().behaviour(new WaitState())
+ .transition().to("b")
+ .node("b").behaviour(new WaitState())
+ .transition().to("c")
+ .compositeEnd()
+ .node("c").behaviour(new WaitState())
+.done();</programlisting>
+ <para>So when the first signal is given for this process, again the <literal>node-end</literal>
+ event will be fired on node <literal>a</literal>, but now the event listener on the composite
+ node will not be executed cause
+ propagated events have been disabled. Disabling propagation is a property on the individual
+ event listener and doesn't influence the other listeners. The event will always be fired and
+ propagated over the whole parent hierarchy.
+ </para>
+ <programlisting>ClientExecution execution = processDefinition.startProcessInstance();</programlisting>
+ <para>The first signal will take the process from <literal>a</literal> to
+ <literal>b</literal>. No messages will be printed to the console.
+ </para>
+ <programlisting>execution.signal();</programlisting>
+ <para>Next, the second signal will take the transition from b to c.
+ </para>
+ <programlisting>execution.signal()</programlisting>
+ <para>Again two <literal>node-end</literal>
+ events are fired just like above on nodes <literal>b</literal> and <literal>composite</literal>
+ respectively. The first event
+ is the <literal>node-end</literal> event on node <literal>b</literal>. That will be propagated
+ to the <literal>composite</literal> node. So the event
+ listener will not be executed for this event cause it has propagation disabled. But the
+ event listener will be executed for the <literal>node-end</literal> event on the
+ <literal>composite</literal> node. That is not
+ propagated, but fired directly on the <literal>composite</literal> node. So the event
+ listener will now be executed
+ only once for the composite node as shown in the following console output:
+ </para>
+ <programlisting>leaving node(composite)</programlisting>
+ </section>
+
+</chapter>
Added: jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch05-ProcessAnatomy.xml
===================================================================
--- jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch05-ProcessAnatomy.xml (rev 0)
+++ jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch05-ProcessAnatomy.xml 2008-11-21 15:59:34 UTC (rev 3038)
@@ -0,0 +1,62 @@
+<chapter id="processanatomy">
+ <title>Process anatomy</title>
+
+ <para>Above we already touched briefly on the two main process constructs:
+ Nodes, transitions and node composition. This chapter explores in full
+ all the possibilities of the process definition structures.
+ </para>
+
+ <para>There are basically two forms of process languages: graph based and composite
+ process languages. First of all, the process supports both. Even graph based execution
+ and node composition can be used in combination to implement something like UML super states.
+ Furthermore, automatic functional activities can be implemented so that they can be
+ used with transitions as well as with node composition.
+ </para>
+
+ <figure id="process.anatomy">
+ <title>UML class diagram of the logical process structure</title>
+ <mediaobject><imageobject><imagedata align="center" fileref="images/process.anatomy.classes.png"/></imageobject></mediaobject>
+ </figure>
+
+ <para>Next we'll show a series of example diagram structures that can be formed
+ with the PVM process model.
+ </para>
+
+ <figure id="transition">
+ <title>Any two nodes can be connected with a transition.</title>
+ <mediaobject><imageobject><imagedata align="center" fileref="images/transition.png"/></imageobject></mediaobject>
+ </figure>
+
+ <figure id="self.transition">
+ <title>A self transition.</title>
+ <mediaobject><imageobject><imagedata align="center" fileref="images/self.transition.png"/></imageobject></mediaobject>
+ </figure>
+ <figure id="composite.node">
+ <title>Composite node is a list of nested nodes.</title>
+ <mediaobject><imageobject><imagedata align="center" fileref="images/composite.node.png"/></imageobject></mediaobject>
+ </figure>
+ <figure id="transition.into.composite">
+ <title>Transition to a node inside a composite.</title>
+ <mediaobject><imageobject><imagedata align="center" fileref="images/transition.into.composite.png"/></imageobject></mediaobject>
+ </figure>
+ <figure id="transition.out.of.composite">
+ <title>Transition from a node inside a composite to a node outside the composite.</title>
+ <mediaobject><imageobject><imagedata align="center" fileref="images/transition.out.of.composite.png"/></imageobject></mediaobject>
+ </figure>
+ <figure id="transition.inheritence">
+ <title>Transition of composite nodes are inherited. The node inside can take the transition of the composite node.</title>
+ <mediaobject><imageobject><imagedata align="center" fileref="images/transition.inheritence.png"/></imageobject></mediaobject>
+ </figure>
+ <figure id="transition.to.outer">
+ <title>Transition from a node to an outer composite.</title>
+ <mediaobject><imageobject><imagedata align="center" fileref="images/transition.to.outer.png"/></imageobject></mediaobject>
+ </figure>
+ <figure id="transition.to.inner">
+ <title>Transition from a composite node to an inner composed node.</title>
+ <mediaobject><imageobject><imagedata align="center" fileref="images/transition.to.inner.png"/></imageobject></mediaobject>
+ </figure>
+ <figure id="initial.in.composite">
+ <title>An initial node inside a composite node.</title>
+ <mediaobject><imageobject><imagedata align="center" fileref="images/initial.in.composite.png"/></imageobject></mediaobject>
+ </figure>
+</chapter>
\ No newline at end of file
Added: jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch06-ImplementingAdvancedActivities.xml
===================================================================
--- jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch06-ImplementingAdvancedActivities.xml (rev 0)
+++ jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch06-ImplementingAdvancedActivities.xml 2008-11-21 15:59:34 UTC (rev 3038)
@@ -0,0 +1,393 @@
+<chapter id="advancedgraphexecution">
+ <title>Advanced graph execution</title>
+
+ <!-- ### LOOPS ########################################################## -->
+ <section>
+ <title>Loops</title>
+ <para>Activities can implement loops based on transitions or on node composition.
+ Loops can contain wait states.
+ </para>
+ <para>To support high numbers of automatic loop executions, the Process Virtual Machine
+ tranformed the propagation of execution from tail recursion to a while loop.
+ </para>
+ </section>
+
+ <!-- ### SUB PROCESSES ################################################## -->
+ <section>
+ <title>Sub processes</title>
+ <para>TODO: sub processes</para>
+ </section>
+
+ <!-- ### DEFAULT PROCEED BEHAVIOUR ###################################### -->
+ <section id="implicitproceedbehaviour">
+ <title>Implicit proceed behaviour</title>
+ <para>When an <literal>Activity</literal> is used as node behaviour, it can
+ explicitely propagate the execution with following methods:
+ </para>
+ <itemizedlist>
+ <listitem><literal>waitForSignal()</literal></listitem>
+ <listitem><literal>take(Transition)</literal></listitem>
+ <listitem><literal>end(*)</literal></listitem>
+ <listitem><literal>execute(Node)</literal></listitem>
+ <listitem><literal>createExecution(*)</literal></listitem>
+ </itemizedlist>
+ <para>When <literal>Activity</literal> implementations used for node behviour
+ don't call any of the following execution propagation methods, then, after
+ the activity is executed, the execution will apply the implicit proceed behaviour.
+ </para>
+ <para>The implicit proceed behaviour is defined as follows:</para>
+ <itemizedlist>
+ <listitem>If the current node has a default outgoing transition, take it.</listitem>
+ <listitem>If the current node has a parent node, move back to the parent node.</listitem>
+ <listitem>Otherwise, end this execution.</listitem>
+ </itemizedlist>
+ <para>Process languages can overwrite the implicit proceed behaviour
+ by overriding the <literal>proceed</literal> method in
+ <literal>ExecutionImpl</literal>.
+ </para>
+ </section>
+
+ <!-- ### FUNCTIONAL ACTIVITIES ################################ -->
+ <section id="functionalactivities">
+ <title>Functional activities</title>
+ <para>Activities that also can be used as event listeners are called functional
+ activities. Examples of automatic activities are sending an email, doing a database
+ update, generating a pdf, calculating an average, etc. All of these are automatic
+ activities that do not change the execution flow. Here's how such activities can
+ be implemented:
+ </para>
+ <programlisting>public class FunctionalActivity implements Activity, EventListener {
+ public void execute(ActivityExecution execution) {
+ perform(execution);
+ }
+ public void notify(EventListenerExecution execution) {
+ perform(execution);
+ }
+ void perform(OpenExecution execution) {
+ ...do functional work...
+ }
+ }</programlisting>
+ <para>The <literal>perform</literal> method takes an <literal>OpenExecution</literal>,
+ which is the supertype of both <literal>ActivityExecution</literal> and
+ <literal>EventListenerExecution</literal>. <literal>OpenExecution</literal>
+ does not allow any of the specific purpose methods, but still
+ the current state and the process definition can be inspected as well
+ as the variables, which contain the context information for the process
+ execution.
+ </para>
+ <para>None of these methods actually invoke execution propagation methods.
+ So after the perform method is completed, the execution will
+ <link linkend="implicitproceedbehaviour">proceed in the default way</link>.
+ </para>
+ </section>
+
+
+ <!-- ### EXECUTION AND THREADS ########################################## -->
+ <section id="executionandthreads">
+ <title>Execution and threads</title>
+ <para>This section explains how the Process Virtual Machine boroughs the thread
+ from the client to bring an execution from one wait state to another.
+ </para>
+ <para>When a client invokes a method (like e.g. the signal method) on an execution,
+ by default, the Process Virtual Machine will use that thread to progress the execution
+ until it reached a wait state. Once the next wait state has been reached, the
+ method returns and the client gets the thread back. This is the default way
+ for the Process Virtual Machine to operate. Two more levels of asynchonous
+ execution complement this default behaviour:
+ <link linkend="asynchronouscontinuations">Asynchronous continuations</link>
+ and the <link linkend="architecture">asynchronous command service</link>.
+ </para>
+ <para>The next process will show the basics concretely. It has three wait states
+ and four automatic nodes.
+ </para>
+ <figure id="process.automatic">
+ <title>Process with many sequential automatic activities.</title>
+ <mediaobject><imageobject><imagedata align="center" fileref="images/process.automatic.png"/></imageobject></mediaobject>
+ </figure>
+ <para>Here's how to build the process:</para>
+ <programlisting>ClientProcessDefinition processDefinition = ProcessFactory.build("automatic")
+ .<emphasis role="bold">node("wait 1").initial()</emphasis>.behaviour(new <emphasis role="bold">WaitState</emphasis>())
+ .transition().to("automatic 1")
+ .<emphasis role="bold">node("automatic 1")</emphasis>.behaviour(new <emphasis role="bold">Display("one")</emphasis>)
+ .transition().to("wait 2")
+ .<emphasis role="bold">node("wait 2")</emphasis>.behaviour(new <emphasis role="bold">WaitState</emphasis>())
+ .transition().to("automatic 2")
+ .<emphasis role="bold">node("automatic 2")</emphasis>.behaviour(new <emphasis role="bold">Display("two")</emphasis>)
+ .transition().to("automatic 3")
+ .<emphasis role="bold">node("automatic 3")</emphasis>.behaviour(new <emphasis role="bold">Display("three")</emphasis>)
+ .transition().to("automatic 4")
+ .<emphasis role="bold">node("automatic 4")</emphasis>.behaviour(new <emphasis role="bold">Display("four")</emphasis>)
+ .transition().to("wait 3")
+ .<emphasis role="bold">node("wait 3")</emphasis>.behaviour(new <emphasis role="bold">WaitState</emphasis>())
+.done();</programlisting>
+ <para>Let's walk you through one execution of this process.
+ </para>
+ <programlisting>ClientExecution execution = processDefinition.startProcessInstance();</programlisting>
+ <para>Starting a new execution means that the initial node is executed. So if an automatic
+ activity is the initial node, this means that immediately the first unnamed outgoing transition
+ is taken. This happens all inside of the invocation of <literal>startProcessInstance</literal>.
+ </para>
+ <para>In this case however, the initial node is a wait state. So
+ the method <literal>startProcessInstance</literal> returns immediately and the execution will be
+ positioned in the initial node 'wait 1'.
+ </para>
+ <figure id="execution.automatic.wait1">
+ <title>A new execution will be positioned in 'wait 1'.</title>
+ <mediaobject><imageobject><imagedata align="center" fileref="images/execution.automatic.wait1.png"/></imageobject></mediaobject>
+ </figure>
+ <para>Then an external trigger is given with the signal method.</para>
+ <programlisting>execution.signal();</programlisting>
+ <para>As explained above when <link linkend="externalactivityexample">introducing the WaitState</link>,
+ that signal will cause the default transition to be taken. The
+ transition will move the execution to node <literal>automatic 1</literal> and execute it.
+ The execute method of the <literal>Display</literal> activity in <literal>automatic 1</literal>
+ print a line to the console and it will <emphasis role="bold">not</emphasis> call
+ <literal>execution.waitForSignal()</literal>. Therefore, the execution will proceed by
+ taking the default transition out of <literal>automatic 1</literal>. At this stage, the
+ signal method is still blocking. Another way to think about it is that the execution
+ methods like <literal>signal</literal> will use the thread of the client to interpret
+ the process definition until a wait state is reached.
+ </para>
+ <para>Then the execution arrives in <literal>wait 2</literal> and executes
+ the <literal>WaitState</literal> activity. That method will invoke
+ the <literal>execution.waitForSignal()</literal>, which will cause the signal method
+ to return. That is when the thread is given back to the client that invoked the
+ <literal>signal</literal> method.
+ </para>
+ <para>So when the signal method returns, the execution is positioned in <literal>wait 2</literal>.</para>
+ <figure id="execution.automatic.wait2">
+ <title>One signal brought the execution from 'initial' to 'wait 2'.</title>
+ <mediaobject><imageobject><imagedata align="center" fileref="images/execution.automatic.wait2.png"/></imageobject></mediaobject>
+ </figure>
+ <para>Then the execution is now waiting for an external trigger just as an object
+ (more precisely an object graph) in memory until the next external trigger is given
+ with the signal method.
+ </para>
+ <programlisting>execution.signal();</programlisting>
+ <para>This second invocation of signal will take the execution similarly all the
+ way to <literal>wait 3</literal> before it returns.
+ </para>
+ <figure id="automatic.wait3">
+ <title>The second signal brought the execution all the way to 'wait 3'.</title>
+ <mediaobject><imageobject><imagedata align="center" fileref="images/ch04.automatic.wait3.png"/></imageobject></mediaobject>
+ </figure>
+ <para>The benefits of using this paradigm is that the same process definition
+ can be executed in <link linkend="clientexecutionmode">client execution mode</link>
+ (in-memory without persistence) as well as in <link linkend="persistentexecutionmode">
+ persistent execution mode</link>, depending on the application and on the environment.
+ </para>
+ <para>When executing a process in persistent mode, this is how you typically want
+ to bind that process execution to transactions of the database:
+ </para>
+ <figure id="transactions.png">
+ <title>Transactions over time in persistent execution mode.</title>
+ <mediaobject><imageobject><imagedata align="center" fileref="images/transactions.png"/></imageobject></mediaobject>
+ </figure>
+ <para>In most situations, the computational work that needs to be done as part of
+ the process after an external trigger (the red pieces) is pretty minimal. Typically
+ transactions combining the process execution and processing the request from the
+ UI takes typically less then a second. Whereas the wait state in business processes
+ typically can span for hours, days or even years. The clue is to clearly distinct
+ when a wait state starts so that only the computational work done before the start
+ of that wait state should be included in the transaction.
+ </para>
+ <para>Think of
+ it this way: "When an approval arrives, what are all the automated processing that
+ needs to be done before the process system needs to wait for another external
+ trigger?" Unless pdf's need to be generated or mass emails need to be send,
+ the amount of time that this takes is usually neglectable. That is why in the
+ default persistent execution mode, the process work is executed in the thread
+ of the client.
+ </para>
+ <para>This reasoning even holds in case of concurrent paths of execution.
+ When a single path of execution splits into concurrent paths of execution,
+ the process overhead of calculating that is neglectable. So that is why it
+ makes sense for a fork or split activity implementation that targets persistent
+ execution mode to spawn the concurrent paths sequentially in the same thread.
+ Basically it's all just computational work as part of the same transaction.
+ This can only be done because the fork/split knows that each concurrent path
+ of execution will return whenever a wait state is encountered.
+ </para>
+ <para>Since this is a difficult concept to grasp, I'll explain it again with other
+ words. Look at it from the overhead that is produced by the process execution
+ itself in persistent execution mode. If in a transaction, an execution is given
+ an external trigger and that causes the execution to split into multiple concurrent
+ paths of execution. Then the process overhead of calculating this is neglectable.
+ Also the overhead of the generated SQL is neglectable. And since all the work done
+ in the concurrent branches must be done inside that single transaction, there is
+ typically no point in having fork/split implementations spawn the concurrent
+ paths of execution in multiple threads.
+ </para>
+ <para>To make executable processes, developers need to know exactly what the automatic activities
+ are, what the wait states are and which threads will be allocated to the process execution.
+ For business analysts that draw the analysis process, things are a bit simpler. For the
+ activities they draw, they usually know whether it's a human or a system that is responsible.
+ But they typically don't not how this translates to threads and transactions.
+ </para>
+ <para>So for the developer, the first job is to analyse what needs to be executed
+ within the thread of control of the process and what is outside. Looking for the external
+ triggers can be a good start to find the wait states in a process, just like verbs and nouns
+ can be the rule of thumb in building UML class diagrams.
+ </para>
+ </section>
+
+ <!-- ### PROCESS CONCURRENCY ############################################ -->
+ <section>
+ <title>Process concurrency</title>
+ <para>To model process concurrency, there is a parent-child tree structure on the
+ execution. The idea is that the main path of execution is the root of that tree.
+ The main path of execution is also called the process instance. It is the execution
+ that is created when starting or creating a new process instance for a given
+ process definition.
+ </para>
+ <para>Now, because the main path of execution is the same object as the
+ process instance, this keeps the usage simple in case of simple processes
+ without concurrency.
+ </para>
+ <figure id="execution.structure">
+ <title>UML class diagram of the basic execution structure</title>
+ <mediaobject><imageobject><imagedata align="center" fileref="images/class.diagram.process.execution.png"/></imageobject></mediaobject>
+ </figure>
+ <para>To establish multiple concurrent paths of execution, activity implementations
+ like a fork or split can create child executions with method
+ <literal>ActivityExecution.createExecution</literal>. Activity implementations
+ like join or merge can stop these concurrent paths of execution by calling
+ method <literal>stop</literal> on the concurrent execution.
+ </para>
+ <para>Only leaf executions can be active. Non-leave executions should be
+ inactive. This tree structure of executions doesn't enforce a particular type of
+ concurrency or join behaviour. It's up to the forks or and-splits and to the joins
+ or and-merges to use the execution tree structure in any way they want to define
+ the wanted concurrency behaviour. Here you see an example
+ of concurrent executions.
+ </para>
+ <figure id="concurrency">
+ <title>Concurrent paths of execution</title>
+ <mediaobject><imageobject><imagedata align="center" fileref="images/execution.concurrency.png"/></imageobject></mediaobject>
+ </figure>
+ <para>There is a billing and a shipping path of execution. In this case, the
+ flat bar nodes represent nodes that fork and join. The execution shows a three
+ executions. The main path of execution is inactive (represented as gray) and the
+ billing and shipping paths of execution are active and point to the node
+ <literal>bill</literal> and <literal>ship</literal> respectively.
+ </para>
+ <para>It's up to the node behaviour implementations how they want to use this
+ execution structure. Suppose that multiple tasks have to be completed before the
+ execution is to proceed. The node behaviour can spawn a series of child executions
+ for this. Or alternatively, the task component could support task groups that
+ are associated to one single execution. In that case, the task component becomes
+ responsible for synchronizing the tasks, thereby moving this responsibility
+ outside the scope of the execution tree structure.
+ </para>
+ </section>
+
+ <!-- ### EXCEPTION HANDLERS ############################################# -->
+ <section>
+ <title>Exception handlers</title>
+ <para>In all the code that is associated to a process
+ like <literal>Activity</literal>s, <literal>EventListeners</literal> and
+ <literal>Condition</literal>s, it's possible to associate exception handlers. This
+ can be thought of as including try-catch blocks in
+ the method implementations of those implementations. But in order to build more reusable building
+ blocks for both the delegation classes and the exception handling logic, exception handlers are
+ added to the core process model.
+ </para>
+ <para>An exception handler can be associated to any process element. When an exception
+ occurs in a delegation class, a matching exception handler will be searched for. If
+ such an exception handler is found, it will get a chance to handle the exception.
+ </para>
+ <para>If an exception handler completes without problems, then the exception is considered
+ handled and the execution resumes right after the delegation code that was called. For example,
+ a transition has three actions and the second action throws an exception that is handled
+ by an exception handler, then
+ </para>
+ <para>Writing automatic activities that are exception handler aware is easy. The
+ default is to proceed anyway. No method needs to be called on the execution. So
+ if an automatic activity throws an exception that is handled by an exception handler,
+ the execution will just proceed after that activity. It becomes a big more difficult
+ for control flow activities. They might have to include try-finally blocks to
+ invoke the proper methods on the execution before an exception handler gets a
+ chance to handle the exception. For example, if an activity is a wait state and
+ an exception occurs, then there is a risk that the thread jumps over the
+ invocation of <literal>execution.waitForSignal()</literal>, causing the execution
+ to proceed after the activity.
+ </para>
+ <para>TODO: exceptionhandler.isRethrowMasked</para>
+ <para>TODO: transactional exception handlers</para>
+ <para>TODO: we never catch errors</para>
+ </section>
+
+ <!-- ### PROCESS MODIFICATIONS ########################################## -->
+ <section>
+ <title>Process modifications</title>
+ <para>TODO: process modifications</para>
+ </section>
+
+ <!-- ### LOCKING AND EXECUTION STATE #################################### -->
+ <section>
+ <title>Locking and execution state</title>
+ <para>The state of an execution is either active or locked. An active
+ execution is either executing or waiting for an external trigger. If an
+ execution is not in <literal>STATE_ACTIVE</literal>, then it is locked.
+ A locked execution is read only and cannot receive any external triggers.
+ </para>
+ <para>When a new execution is created, it is in STATE_ACTIVE. To change
+ the state to a locked state, use lock(String). Some STATE_* constants
+ are provided that represent the most commonly used locked states. But
+ the state '...' in the picture indicates that any string can be provided
+ as the state in the lock method.
+ </para>
+ <figure id="execution.states">
+ <title>States of an execution</title>
+ <mediaobject><imageobject><imagedata align="center" fileref="images/ch04.execution.states.png"/></imageobject></mediaobject>
+ </figure>
+ <para>If an execution is locked, methods that change the execution will
+ throw a PvmException and the message will reference the actual locking state.
+ Firing events, updating variables, updating priority and adding comments
+ are not considered to change an execution. Also creation and removal of child
+ executions are unchecked, which means that those methods can be invoked by
+ external API clients and node behaviour methods, even while the execution
+ is in a locked state.
+ </para>
+ <para>Make sure that comparisons between getState() and the STATE_* constants
+ are done with .equals and not with '==' because if executions are loaded
+ from persistent storage, a new string is created instead of the constants.
+ </para>
+ <para>An execution implementation will be locked:
+ </para>
+ <itemizedlist>
+ <listitem>When it is ended</listitem>
+ <listitem>When it is suspended</listitem>
+ <listitem>During asynchronous continuations</listitem>
+ </itemizedlist>
+ <para>Furthermore, locking can be used by Activity implementations to make
+ executions read only during wait states hen responsibility for the execution is
+ transferred to an external entity such as:
+ </para>
+ <itemizedlist>
+ <listitem>A human task</listitem>
+ <listitem>A service invocation</listitem>
+ <listitem>A wait state that ends when a scanner detects that a file appears</listitem>
+ </itemizedlist>
+ <para>In these situations the strategy is that the external entity should get
+ full control over the execution because it wants to control what is allowed
+ and what not. To get that control, they lock the execution so that all interactions
+ have to go through the external entity.
+ </para>
+ <para>One of the main reasons to create external entities is that they can live
+ on after the execution has already proceeded. For example, in case
+ of a service invocation, a timer could cause the execution to take the timeout transition.
+ When the response arrives after the timeout, the service invocation entity should
+ make sure it doesn't signal the execution. So the service invocation can be
+ seen as a node instance (aka activity instance) and is unique for every execution
+ of the node.
+ </para>
+ <para>External entities themselves are responsible for managing the execution
+ lock. If the timers and client applications are consequent in addressing the
+ external entities instead of the execution directly, then locking is in theory
+ unnecessary. It's up to the node behaviour implementations whether they want
+ to take the overhead of locking and unlocking.
+ </para>
+ </section>
+
+</chapter>
Added: jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch07-Variables.xml
===================================================================
--- jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch07-Variables.xml (rev 0)
+++ jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch07-Variables.xml 2008-11-21 15:59:34 UTC (rev 3038)
@@ -0,0 +1,4 @@
+<chapter id="variables">
+ <title>Variables</title>
+ <para>TODO</para>
+</chapter>
\ No newline at end of file
Added: jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch08-Timers.xml
===================================================================
--- jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch08-Timers.xml (rev 0)
+++ jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch08-Timers.xml 2008-11-21 15:59:34 UTC (rev 3038)
@@ -0,0 +1,4 @@
+<chapter id="timers">
+ <title>Timers</title>
+ <para>TODO</para>
+</chapter>
\ No newline at end of file
Added: jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch09-AsynchronousContinuations.xml
===================================================================
--- jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch09-AsynchronousContinuations.xml (rev 0)
+++ jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch09-AsynchronousContinuations.xml 2008-11-21 15:59:34 UTC (rev 3038)
@@ -0,0 +1,4 @@
+<chapter id="asynchronouscontinuations">
+ <title>Asynchronous continuations</title>
+ <para>TODO</para>
+</chapter>
Added: jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch10-SoftwareLogging.xml
===================================================================
--- jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch10-SoftwareLogging.xml (rev 0)
+++ jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch10-SoftwareLogging.xml 2008-11-21 15:59:34 UTC (rev 3038)
@@ -0,0 +1,99 @@
+<chapter id="softwarelogging">
+ <title>Software logging</title>
+
+ <section>
+ <title>Configuration</title>
+ <para>PVM can use JDK logging (java.util.logging) or log4j. When the first message is
+ logged, PVM logging will make the selection with following procedure:
+ <orderedlist>
+ <listitem>If a <literal>logging.properties</literal> resource is found
+ on the classpath (using the context classloader), then JDK logging will
+ be used and that file will be used to initialize the JDK logging.
+ </listitem>
+ <listitem>If log4j is found on the classpath, then log4j will be used.
+ The check for log4j will be done by checking availability of class
+ <literal>org.apache.log4j.LogManager</literal> with the context classloader.
+ </listitem>
+ <listitem>If none of the above, JDK logging will be used.</listitem>
+ </orderedlist>
+ </para>
+ </section>
+
+ <section>
+ <title>Categories</title>
+ <para>The PVM classes use their class name as the category for the logger.
+ </para>
+ <para>To have a basic understanding of what the PVM classes are doing,
+ turning on the <literal>debug</literal> level is great. Level
+ <literal>trace</literal> might be spitting out too much for that
+ purpose.
+ </para>
+ </section>
+
+ <section>
+ <title>JDK logging</title>
+ <para>In JDK logging, <literal>debug</literal>maps to <literal>fine</literal>
+ and <literal>trace</literal> maps to <literal>finest</literal>.
+ Level <literal>finer</literal> is not used.
+ </para>
+ <para><literal>org.jbpm.pvm.internal.log.LogFormatter</literal> is part of
+ the pvm library and it can create a nice one-line output for log messages.
+ It also has a neat feature that creates a unique indentation per thread.
+ To configure it, this is a typical <literal>logging.properties</literal>
+ </para>
+ <programlisting>handlers = java.util.logging.ConsoleHandler
+java.util.logging.ConsoleHandler.level = FINEST
+java.util.logging.ConsoleHandler.formatter = org.jbpm.pvm.internal.log.LogFormatter
+
+# For example, set the com.xyz.foo logger to only log SEVERE messages:
+# com.xyz.foo.level = SEVERE
+
+.level = SEVERE
+org.jbpm.level=FINE
+org.jbpm.tx.level=FINE
+org.jbpm.pvm.internal.wire.level=FINE</programlisting>
+
+<!--
+ <para>For production usage, jBPM also includes an error triggered log handler. This is
+ a log handler that will only keep the most recent log messages in
+ memory and these will only be flushed to a file in case an error occurs.
+ </para>
+ <para>to configure it, add <literal>org.jbpm.util.ErrorTriggeredFileHandler</literal>
+ to the handlers in the logging properties like this:
+ </para>
+ <programlisting>handlers = java.util.logging.ConsoleHandler org.jbpm.util.ErrorTriggeredFileHandler</programlisting>
+ <para>Next snippet shows how in the same logging.properties, the error
+ triggered file handler can be configured. The given values are the default
+ values.
+ </para>
+ <programlisting>org.jbpm.util.ErrorTriggeredFileHandler.size = 500
+org.jbpm.util.ErrorTriggeredFileHandler.push = SEVERE
+org.jbpm.util.ErrorTriggeredFileHandler.pattern = %h/jbpm%u.log</programlisting>
+ <para>Alternatively to using the org.jbpm.util.ErrorTriggeredFileHandler, the
+ JDK handlers FileHandler and MemoryHandler can used in combination to get
+ similar results with a bit more configuration.
+ </para>
+
+-->
+ </section>
+
+ <section>
+ <title>Debugging persistence</title>
+ <para>When testing the persistence, following logging configurations can be
+ valuable. Category <literal>org.hibernate.SQL</literal> shows the SQL statement that is executed
+ and category <literal>org.hibernate.type</literal> shows the values of the parameters that are
+ set in the queries.
+ </para>
+ <programlisting>org.hibernate.SQL.level=FINEST
+org.hibernate.type.level=FINEST</programlisting>
+ <para>And in case you get a failed batch as a cause in a hibernate exception,
+ you might want to set the batch size to 0 like this in the hibernate properties:
+ </para>
+ <programlisting>hibernate.jdbc.batch_size = 0</programlisting>
+ <para>Also in the hibernate properties, the following properties allow for
+ detailed logs of the SQL that hibernate spits out:</para>
+ <programlisting>hibernate.show_sql = true
+hibernate.format_sql = true
+hibernate.use_sql_comments = true</programlisting>
+ </section>
+</chapter>
\ No newline at end of file
Added: jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/chxx-DelegationClasses.xml
===================================================================
--- jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/chxx-DelegationClasses.xml (rev 0)
+++ jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/chxx-DelegationClasses.xml 2008-11-21 15:59:34 UTC (rev 3038)
@@ -0,0 +1,53 @@
+<chapter id="delegationclasses">
+ <title>Delegation classes</title>
+
+ <section>
+ <title>What are delegation classes</title>
+ <para>Delegation classes are the classes that implement
+ <literal>Activity</literal> or <literal>Condition</literal>. From the Process
+ Virtual Machine's perspective, these are external classes that provide
+ programming logic that is inserted into the PVM's graph execution.
+ Delegation classes can be provided by the process languages as well
+ as by the end users.
+ </para>
+ </section>
+
+ <section>
+ <title>Configuration of delegation classes</title>
+ <para>Delegation classes can be made configurable. Member fields can
+ contain configuration parameters so that a delegation class can be
+ configured differently each time it is used. For example, in the
+ <literal><link linkend="activity">Display</link></literal> activity,
+ the message that is to be printed to the console is a configuration
+ parameter.
+ </para>
+ <para>Delegation classes should be stateless. This means that executing the interface
+ methods should not change values of the member fields. Changing member field values
+ of delegation classes during execution methods is actually changing the process
+ while it's executing. That is not threadsafe and usually leads to unexpected
+ results. As an exception, getters and setters might be made available to inject
+ the configuration cause they are used before the delegation object is actually
+ used in the process execution.
+ </para>
+ </section>
+
+ <section>
+ <title>Object references</title>
+ <para>TODO</para>
+ </section>
+
+ <section>
+ <title>Design time versus runtime</title>
+ <para>TODO: the node behaviour allows for design time as well as runtime behaviour.</para>
+ </section>
+
+ <section>
+ <title>UserCodeInterceptor</title>
+ <para>TODO: UserCodeInterceptor</para>
+ </section>
+
+ <section>
+ <title>Member field configurations versus properties</title>
+ <para>TODO: document field configurations versus properties</para>
+ </section>
+</chapter>
\ No newline at end of file
Added: jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/chxx-Environment.xml
===================================================================
--- jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/chxx-Environment.xml (rev 0)
+++ jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/chxx-Environment.xml 2008-11-21 15:59:34 UTC (rev 3038)
@@ -0,0 +1,139 @@
+<chapter id="environment">
+ <title>Environment</title>
+
+ <section>
+ <title>Introduction</title>
+ <para>The environment component together with the wire context is a kind of
+ Inversion of Control (IoC) container. It reads configuration information that
+ describes how objects should be instantiated, configured and wired together.
+ </para>
+ <para>The environment is used to retrieve resources and services needed by
+ <literal>Activity</literal> implementations and the Process Virtual Machine
+ itself. The main purpose is to make various aspects of the Process Virtual Machine
+ configurable so that the PVM and the languages that run on top can work
+ in a standard Java environment as well as an enterprise Java environment.
+ </para>
+ <para>The environment is partitioned into a set of contexts. Each context
+ can have its own lifecycle. For instance, the process-engine context will
+ strech over the full lifetime of the application. The block context only
+ for the duration of a try-finally block. Typically a block context represents
+ a database transaction. Each context exposes a list of key-value
+ pairs.
+ </para>
+ </section>
+
+ <section id="environmentfactory">
+ <title>EnvironmentFactory</title>
+ <para>To start working with an environment, you need an EnvironmentFactory.
+ One single environment factory object can be used throughout the complete
+ lifetime of the application. So typically this is kept in a static
+ member field. The EnvironmentFactory itself is the process-engine context.
+ </para>
+ <para>An <literal>EnvironmentFactory</literal> is typically obtained by
+ parsing a configuration file like this:
+ </para>
+ <programlisting>static EnvironmentFactory environmentFactory =
+ EnvironmentFactory.parse(new ResourceStreamSource("pvm.cfg.xml");</programlisting>
+ <para>See javadocs package org.jbpm.stream for more types of stream sources.
+ </para>
+ <para>There is a default parser in the environment factory that will
+ create <literal>DefaultEnvironmentFactory</literal>s. The idea is that we'll
+ also support spring as an IoC container. But that is still TODO. Feel free
+ to help us out :-). The parser can be configured with the static setter
+ method <literal>EnvironmentFactory.setParser(Parser)</literal>
+ </para>
+ </section>
+
+ <section id="environmentblock">
+ <title>Environment block</title>
+ <para>An environment exists for the duration of a try-finally block. This is how
+ an environment block looks like:
+ </para>
+ <programlisting><emphasis role="bold">Environment environment = environmentFactory.openEnvironment();
+try {
+
+ ...
+
+} finally {
+ environment.close();
+}</emphasis></programlisting>
+ <para>The environment block defines another lifespan: the <literal>block</literal> context.
+ A transaction would be a typical example of an object that is defined in the block
+ context.
+ </para>
+ <para>Inside such a block, objects can be looked up from the environment by name
+ or by type. If objects can looked up from the environment with method
+ <literal>environment.get(String name)</literal> or
+ <literal><T> T environment.get(Class<T>)</literal>.
+ </para>
+ <para>when an environment is created, it has a <literal>process-engine</literal> context
+ and a <literal>block</literal>
+ context.
+ </para>
+ <para>In the default implementation, the <literal>process-engine</literal> context and
+ the <literal>block</literal> context are <literal>WireContext</literal>s. A
+ <literal>WireContext</literal> contains a description of how its objects are
+ created and wired together to form object graphs.
+ </para>
+ </section>
+
+ <section>
+ <title>Example</title>
+ <para>To start with a simple example, we'll need a <literal>Book</literal>:</para>
+ <programlisting>public class <emphasis role="bold">Book</emphasis> {
+ ...
+ public Book() {}
+ ...
+}</programlisting>
+ <para>Then let's create an environment factory that knows how to create book</para>
+ <programlisting>static EnvironmentFactory environmentFactory = EnvironmentFactory.parseXmlString(
+ "<jbpm-configuration>" +
+ " <process-engine>" +
+ " <object name='book' class='org.jbpm.examples.ch09.Book' />" +
+ " </process-engine>" +
+ "</jbpm-configuration>"
+));</programlisting>
+ <para>Now we'll create an environment block with this environment factory and
+ we'll look up the book in the environment. First the lookup is done by
+ type and secondly by name.
+ </para>
+ <programlisting>Environment environment = environmentFactory.openEnvironment();
+try {
+
+ Book book = <emphasis role="bold">environment.get(Book.class);</emphasis>
+ assertNotNull(book);
+
+ assertSame(book, <emphasis role="bold">environment.get("book")</emphasis>);
+
+} finally {
+ environment.close();
+}</programlisting>
+ <para>To prevent that you have to pass the environment as a parameter in
+ all methods, the current environment is maintained in a threadlocal stack:
+ </para>
+ <programlisting>Environment environment = Environment.getCurrent();</programlisting>
+ </section>
+
+ <section id="context">
+ <title>Context</title>
+ <para>Contexts can be added and removed dynamically. Anything can be exposed
+ as a <literal>Context</literal>.
+ </para>
+ <programlisting>public interface <emphasis role="bold">Context</emphasis> {
+
+ <emphasis role="bold">Object get(String key);
+ <T> T get(Class<T> type);
+ Set<String> keys();</emphasis>
+
+ ...
+}</programlisting>
+ <para>When doing a lookup on the environment, there is a default search order
+ in which the contexts will be scanned for the requested object. The default
+ order is the inverse of the sequence in which the contexts were added. E.g.
+ if an object is defined in both the process-engine context and in the block context,
+ the block context is considered more applicable and that will be scanned first.
+ Alternatively, an explicit search order can be passed in with the
+ <literal>get</literal> lookups as an optional parameter.
+ </para>
+ </section>
+</chapter>
\ No newline at end of file
Added: jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/chxx-History.xml
===================================================================
--- jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/chxx-History.xml (rev 0)
+++ jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/chxx-History.xml 2008-11-21 15:59:34 UTC (rev 3038)
@@ -0,0 +1,15 @@
+<chapter id="history">
+ <title>History</title>
+
+ <section id="processlogs">
+ <title>Process logs</title>
+ </section>
+
+ <section id="businessintelligence">
+ <title>Business Intelligence (BI)</title>
+ </section>
+
+ <section id="businessactivitymonitoring">
+ <title>Business Activity Monitoring (BAM)</title>
+ </section>
+</chapter>
\ No newline at end of file
Added: jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/chxx-Persistence.xml
===================================================================
--- jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/chxx-Persistence.xml (rev 0)
+++ jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/chxx-Persistence.xml 2008-11-21 15:59:34 UTC (rev 3038)
@@ -0,0 +1,266 @@
+<chapter id="persistence">
+ <title>Persistence</title>
+
+ <section>
+ <title>Standard environment configuration</title>
+ <para>This section describes how the environment can be configured to use
+ hibernate in a standard Java environment.
+ </para>
+ <programlisting>01 | <jbpm-configuration>
+02 |
+03 | <process-engine>
+04 |<emphasis role="bold"> <hibernate-session-factory /></emphasis>
+05 |<emphasis role="bold"> <hibernate-configuration></emphasis>
+06 |<emphasis role="bold"> <properties resource="hibernate.properties" /></emphasis>
+07 |<emphasis role="bold"> <mappings resource="org/jbpm/pvm/pvm.hibernate.mappings.xml" /></emphasis>
+08 |<emphasis role="bold"> <cache-configuration </emphasis>
+09 |<emphasis role="bold"> resource="org/jbpm/pvm/pvm.cache.xml" </emphasis>
+10 |<emphasis role="bold"> usage="nonstrict-read-write" /></emphasis>
+11 |<emphasis role="bold"> </hibernate-configuration></emphasis>
+12 | </process-engine>
+13 |
+14 | <block>
+15 |<emphasis role="bold"> <standard-transaction /></emphasis>
+16 |<emphasis role="bold"> <hibernate-session /></emphasis>
+17 |<emphasis role="bold"> <pvm-db-session /></emphasis>
+18 | </block>
+19 |
+20 | </jbpm-configuration></programlisting>
+ <para><literal>line 04</literal> specifies a hibernate session factory in the
+ process-engine context. This means that a hibernate session factory is lazy
+ created when it is first needed and cached in the
+ <literal>EnvironmentFactory</literal>.
+ </para>
+ <para>A hibernate session factory is build calling the
+ method <literal>buildSessionFactory()</literal> on a hibernate configuration.
+ By default, the hibernate configuration will be looked up by type.
+ </para>
+ <para><literal>line 05</literal> specifies a hibernate configuration.
+ </para>
+ <para><literal>line 06</literal> specifies the that the resource file
+ <literal>hibernate.properties</literal> should be loaded into the configuration.
+ </para>
+ <para><literal>line 07</literal> (note the plural form of mapping<emphasis role="bold">s</emphasis>)
+ specifies that resources <literal>org/jbpm/pvm/pvm.hibernate.mappings.xml</literal> contain references
+ to hibernate mapping files or resources that should be included into the
+ configuration. Also note the plural form of <literal>resources</literal>.
+ This means that not one, but all the resource files on the whole classpath will be found.
+ This way new library components containing a <literal>org/jbpm/pvm/pvm.hibernate.mappings.xml</literal>
+ resource can plug automatically into the same hibernate session by just being added to
+ the classpath.
+ </para>
+ <para>Alternatively, individual hibernate mapping files can be referenced with the
+ singular <literal>mapping</literal> element.
+ </para>
+ <para><literal>line 08 - 10</literal> provide a single place to specify the
+ hibernate caching strategy for all the PVM classes and collections.
+ </para>
+ <para><literal>line 15</literal> specifies a standard transaction. This is
+ a very simple global transaction strategy without recovery that can be used
+ in standard environments to get all-or-nothing semantics over multiple
+ transactional resources.
+ </para>
+ <para><literal>line 16</literal> specifies the hibernate session that will
+ automatically register itself with the standard transaction.
+ </para>
+ <para><literal>line 17</literal> specifies a <literal>PvmDbSession</literal>.
+ That is a class that adds methods that bind to specific queries to be executed
+ on the hibernate session.
+ </para>
+ </section>
+
+ <section>
+ <title>Standard hibernate configuration</title>
+ <para>Here is a set of default properties to configure hibernate with
+ hsqldb in a standard Java environment.
+ </para>
+ <programlisting>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.cache.use_second_level_cache true
+hibernate.cache.provider_class org.hibernate.cache.HashtableCacheProvider</programlisting>
+ <para>Optionally in development the schema export can be used to
+ create the schema when the session factory is created and drop the
+ schema when the session factory is closed.
+ </para>
+ <programlisting>hibernate.hbm2ddl.auto create-drop</programlisting>
+ <para>For more information about hibernate configurations, see the hibernate
+ reference manual.
+ </para>
+ </section>
+
+ <section>
+ <title>Standard transaction</title>
+ <para>By default, the <literal><hibernate-session /></literal> will
+ start a hibernate transaction with <literal>session.beginTransaction()</literal>.
+ Then the hibernate transaction is wrapped in a <literal>org.jbpm.pvm.internal.hibernate.HibernateTransactionResource</literal>
+ and that resource is enlisted with the <literal><standard-transaction /></literal>
+ (<literal>org.jbpm.tx.StandardTransaction</literal>)
+ </para>
+ <para>Inside of the environment block, the transaction is available
+ through <literal>environment.getTransaction()</literal>. So inside an
+ environment block, the transaction can be rolled back with
+ <literal>environment.getTransaction().setRollbackOnly()</literal>
+ </para>
+ <para>When created, the standard transaction will register itself to be notified on the
+ close of the environment. So in side the close, the standard transaction will
+ commit or rollback depending on whether <literal>setRollbackOnly()</literal>
+ was called.
+ </para>
+ <para>So in the configuration shown above, each environment block will be
+ a separate transaction. At least, if the hibernate session is used.</para>
+ </section>
+
+ <section>
+ <title>Basics of process persistence</title>
+ <para>In the next example, we'll show how this hibernate persistence is
+ used with a concrete example. The 'persistent process' is a simple
+ three-step process:
+ </para>
+ <figure id="the.persistent.process">
+ <title>The persistent process</title>
+ <mediaobject><imageobject><imagedata align="center" fileref="images/ch09.persistent.process.png"/></imageobject></mediaobject>
+ </figure>
+ <para>The activities in the three nodes will be wait states just like
+ in <xref linkend="externalactivityexample" />
+ </para>
+ <para>To make sure we can persist this class, we create the hibernate mapping for
+ it and add it to the configuration like this:
+ </para>
+ <programlisting><hibernate-configuration>
+ <properties resource="hibernate.properties" />
+ <mappings resource="org/jbpm/pvm/pvm.hibernate.mappings.xml" />
+ <emphasis role="bold"><mapping resource="org/jbpm/examples/ch09/state.hbm.xml" /></emphasis>
+ <cache-configuration
+ resource="org/jbpm/pvm/pvm.cache.xml"
+ usage="nonstrict-read-write" /></programlisting>
+ <para>The next code pieces show the contents of one unit test method. The method
+ will first create the environment factory. Then, in a first transaction, a process
+ definition will be created and saved into the database. Then the next transaction will
+ create a new execution of that process. And the following two transactions will
+ provide external triggers to the execution.
+ </para>
+ <programlisting>EnvironmentFactory environmentFactory = EnvironmentFactory.parse(new ResourceStreamSource(
+ "org/jbpm/examples/ch09/environment.cfg.xml"
+));</programlisting>
+ <para>Then in a first transaction, a process is created and saved in the database.
+ This is typically referred to as deploying a process and it only needs to be done
+ once.
+ </para>
+ <programlisting>Environment environment = environmentFactory.openEnvironment();
+try {
+ PvmDbSession pvmDbSession = environment.get(PvmDbSession.class);
+
+ ProcessDefinition processDefinition = ProcessFactory.build("persisted process")
+ .node("one").initial().behaviour(new State())
+ .transition().to("two")
+ .node("two").behaviour(new State())
+ .transition().to("three")
+ .node("three").behaviour(new State())
+ .done();
+
+ pvmDbSession.save(processDefinition);
+} finally {
+ environment.close();
+}</programlisting>
+ <para>In the previous transaction, the process definition, the nodes and transitions
+ will be inserted into the database tables.
+ </para>
+ <para>Next we'll show how a new process execution can be started for this
+ process definition. Note that in this case, we provide <link linkend="businesskey">a
+ business key</link> called 'first'. This will make it easy for us to retrieve
+ the same execution from the database in subsequent transactions. After starting
+ the new process execution, it will wait in node 'one' cause the behaviour is a
+ wait state.
+ </para>
+ <programlisting>environment = environmentFactory.openEnvironment();
+try {
+ PvmDbSession pvmDbSession = environment.get(PvmDbSession.class);
+
+ ProcessDefinition processDefinition = pvmDbSession.findProcessDefinition("persisted process");
+ assertNotNull(processDefinition);
+
+ Execution execution = processDefinition.startExecution("first");
+ assertEquals("one", execution.getNode().getName());
+ pvmDbSession.save(execution);
+
+} finally {
+ environment.close();
+}</programlisting>
+ <para>In the previous transaction, a new execution record will be inserted into
+ the database.
+ </para>
+ <para>Next we feed in an external trigger into this existing process execution.
+ We load the execution, provide a signal and just save it back into the database.
+ </para>
+ <programlisting>environment = environmentFactory.openEnvironment();
+try {
+ PvmDbSession pvmDbSession = environment.get(PvmDbSession.class);
+
+ Execution execution = pvmDbSession.findExecution("persisted process", "first");
+ assertNotNull(execution);
+ assertEquals("one", execution.getNode().getName());
+
+ // external trigger that will cause the execution to execute until
+ // it reaches the next wait state
+ execution.signal();
+
+ assertEquals("two", execution.getNode().getName());
+
+ pvmDbSession.save(execution);
+
+} finally {
+ environment.close();
+}</programlisting>
+ <para>The previous transaction will result in an update of the existing
+ execution, reassigning the foreign key to reference another record in
+ the node table.
+ </para>
+ <programlisting>UPDATE JBPM_EXECUTION
+SET
+ NODE_=?,
+ DBVERSION_=?,
+ ...
+WHERE DBID_=?
+ AND DBVERSION_=?</programlisting>
+ <para>The version in this SQL shows the automatic optimistic locking that
+ is baked into the PVM persistence so that process persistence can easily
+ scale to multiple JVM's or multiple machines.
+ </para>
+ <para>In the example code, there is one more transaction that is
+ completely similar to the previous which takes the execution from
+ node 'two' to node 'three'.
+ </para>
+ <para>All of this shows that the PVM can move from one wait state to
+ another wait state transactionally. Each transaction correcponds to
+ a state transition.
+ </para>
+ <para>Note that in case of automatic activities, multiple activities
+ will be executed before the execution reaches a wait state. Typically
+ that is desired behaviour. In case the automatic activities take too
+ long or you don't want to block the original transaction to wait for
+ the completion of those automatic activities, check out <xref linkend="asynchronouscontinuations"/>
+ to learn about how it's possible to demarcate transactions in the process
+ definition, which can also be seen as safe-points during process execution.
+ </para>
+ </section>
+
+ <section id="businesskey">
+ <title>Business key</title>
+ <para>TODO</para>
+ </section>
+
+
+ <para>TODO: General persistence architecture
+ </para>
+ <para>TODO: Object references
+ </para>
+ <para>TODO: Threads, concurrency with respect to forks and joins
+ </para>
+ <para>TODO: Caching
+ </para>
+ <para>TODO: Process instance migration
+ </para>
+</chapter>
\ No newline at end of file
Added: jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/chxx-ProcessLanguages.xml
===================================================================
--- jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/chxx-ProcessLanguages.xml (rev 0)
+++ jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/chxx-ProcessLanguages.xml 2008-11-21 15:59:34 UTC (rev 3038)
@@ -0,0 +1,19 @@
+<chapter id="processlanguages">
+ <title>Process languages</title>
+
+ <para>TODO: xml parser infrastructure
+ </para>
+ <para>TODO: inherit from ProcessDefinitionImpl, ExecutionImpl
+ </para>
+ <para>TODO: overriding the default proceed()
+ </para>
+ <para>TODO: node type implementations
+ </para>
+ <para>TODO: persistence
+ </para>
+ <para>TODO: compensation: languages like bpel and bpnm define that
+ as a normal contination that fits within the process
+ structures available in the pvm (taking a transition and
+ executing a nested node).
+ </para>
+</chapter>
\ No newline at end of file
Deleted: jbpm4/trunk/modules/jpdl/src/main/resources/org/jbpm/jpdl/jpdl.xsd
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/resources/org/jbpm/jpdl/jpdl.xsd 2008-11-21 15:52:02 UTC (rev 3037)
+++ jbpm4/trunk/modules/jpdl/src/main/resources/org/jbpm/jpdl/jpdl.xsd 2008-11-21 15:59:34 UTC (rev 3038)
@@ -1,615 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<schema xmlns="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://jbpm.org/jpdl4"
- xmlns:tns="http://jbpm.org/jpdl4"
- elementFormDefault="qualified"
- attributeFormDefault="qualified">
-
- <annotation>
- <documentation>Prelimiary draft of the jPDL 4 process definition
- grammar; element process is the top level element.
-
- TODO: Add node pluggability. (add the proper any's and
- anyAttributes)
-
- TODO: Pull up expression. The expression element in the
- delegation group can be pulled up as an expression
- attribute in each use case of the delegationGroup
-
- TODO: Should automatic activities have timers? That makes sense
- in a transient scenario, but not in a transactional scenario.
- Same comment holds for asynchronous continuations
-
- TODO: Is it a good idea to move blocking and signalling to the API ?
-
- TODO: Figure out task reuse (requires templating and parameters)
- and dynamic task creation (requires tasks to be declared by name
- in the process definition and that from the API tasks can be
- easily instantiated.
-
- TODO: Investigate if object-refs to centrally defined objects would
- add value over inline defined objects.
- </documentation>
- </annotation>
-
- <!-- ### PROCESS DEFINITION ############################################# -->
-
- <element name="process">
- <annotation><documentation>A jPDL process definition description; This
- is the top level element in a jPDL process file.</documentation></annotation>
- <complexType>
- <sequence minOccurs="0" maxOccurs="unbounded">
- <group ref="tns:activityGroup" minOccurs="0" maxOccurs="unbounded"/>
- <!--
- <element ref="tns:on" minOccurs="0" maxOccurs="unbounded">
- <annotation><documentation>Events on which listeners can be registered.</documentation></annotation>
- </element>
- <element ref="tns:timer" minOccurs="0" maxOccurs="unbounded"/>
- -->
- </sequence>
- <attribute name="name" use="required" type="string">
- <annotation><documentation>The process name. Multiple processes can
- be deployed with the same name, as long as they have a different
- version.</documentation></annotation>
- </attribute>
- <attribute name="version" type="int">
- <annotation><documentation>Indicates the sequence number of this
- version for all processes with the same name. By specifying a version
- automatic deployment can figure out if this process is already deployed
- or not.
- </documentation></annotation>
- </attribute>
- <attribute name="g" type="string">
- <annotation><documentation>Graphical information used by designer tool.
- </documentation></annotation>
- </attribute>
- </complexType>
- </element>
-
- <!-- ### ACTIVITIES ##################################################### -->
-
- <group name="activityGroup">
- <choice>
- <!-- ~~~ START ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
- <element name="start">
- <annotation><documentation>Start event
- </documentation></annotation>
- <complexType>
- <sequence>
- <element ref="tns:flow" minOccurs="0" maxOccurs="unbounded" />
- <element ref="tns:on" minOccurs="0" maxOccurs="unbounded">
- <annotation><documentation>Events on which listeners can be registered.</documentation></annotation>
- </element>
- </sequence>
- <attributeGroup ref="tns:nodeAttributes" />
- </complexType>
- </element>
-
- <!-- ~~~ END ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
- <element name="end">
- <annotation><documentation>End event.
- </documentation></annotation>
- <complexType>
- <sequence>
- <element ref="tns:on" minOccurs="0" maxOccurs="unbounded">
- <annotation><documentation>Events on which listeners can be registered.</documentation></annotation>
- </element>
- </sequence>
- <attributeGroup ref="tns:nodeAttributes" />
- <attribute name="ends" default="process-instance">
- <simpleType>
- <restriction base="string">
- <enumeration value="execution"/>
- <enumeration value="process-instance"/>
- </restriction>
- </simpleType>
- </attribute>
- </complexType>
- </element>
-
- <!-- ~~~ STATE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
- <element name="state">
- <annotation><documentation>A wait state. When an execution arrives in this
- activity, the execution will wait until an external trigger is received
- with execution.signal() or execution.getActivityInstance().signal()
- </documentation></annotation>
- <complexType>
- <sequence>
- <element ref="tns:flow" minOccurs="0" maxOccurs="unbounded" />
- <element ref="tns:on" minOccurs="0" maxOccurs="unbounded">
- <annotation><documentation>Events on which listeners can be registered.</documentation></annotation>
- </element>
- <!--
- <element ref="tns:timer" minOccurs="0" maxOccurs="unbounded"/>
- -->
- </sequence>
- <attributeGroup ref="tns:nodeAttributes" />
- </complexType>
- </element>
-
- <!-- ~~~ EXCLUSIVE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
- <element name="exclusive">
- <annotation><documentation>Exclusive gayteway: selects one path out of many alternatives.
- When an execution comes in, exactly one outgoing flow is taken.
- </documentation></annotation>
- <complexType>
- <sequence>
- <element ref="tns:flow" minOccurs="0" maxOccurs="unbounded" />
- <element ref="tns:on" minOccurs="0" maxOccurs="unbounded">
- <annotation><documentation>Events on which listeners can be registered.</documentation></annotation>
- </element>
- </sequence>
- <attributeGroup ref="tns:nodeAttributes" />
- </complexType>
- </element>
-
- <!--
- <element name="fork">
- <annotation><documentation>Spawns multiple concurrent paths of
- execution.
- </documentation></annotation>
- <complexType>
- <sequence>
- <element ref="tns:flow" minOccurs="0" maxOccurs="unbounded" />
- <element ref="tns:on" minOccurs="0" maxOccurs="unbounded">
- <annotation><documentation>Events on which listeners can be registered.</documentation></annotation>
- </element>
- </sequence>
- <attributeGroup ref="tns:nodeAttributes" />
- </complexType>
- </element>
-
- <element name="join">
- <annotation><documentation>Spawns multiple concurrent paths of
- execution.
- </documentation></annotation>
- <complexType>
- <sequence>
- <element ref="tns:flow" minOccurs="0" maxOccurs="unbounded" />
- <element ref="tns:on" minOccurs="0" maxOccurs="unbounded">
- <annotation><documentation>Events on which listeners can be registered.</documentation></annotation>
- </element>
- </sequence>
- <attributeGroup ref="tns:nodeAttributes" />
- </complexType>
- </element>
-
- <element name="process-state">
- <annotation><documentation>Waits while a sub process instance is
- being executed and continues when the sub process instance ends.
- </documentation></annotation>
- < ! - - take into account the following situation:
- Unlike in jBPM 3, a process-state should not signal the newly created
- process instance. The signal in jBPM 3 is probably historically there
- because in the beginning there was no initial attribute on the process
- definition.
- - - >
- <complexType>
- <sequence>
- <element ref="tns:flow" minOccurs="0" maxOccurs="unbounded" />
- <element ref="tns:on" minOccurs="0" maxOccurs="unbounded">
- <annotation><documentation>Events on which listeners can be registered.</documentation></annotation>
- </element>
- <element ref="tns:timer" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attributeGroup ref="tns:nodeAttributes" />
- </complexType>
- </element>
-
- <element name="super-state">
- <annotation><documentation>Scope enclosing a number of nodes.
- </documentation></annotation>
- <complexType>
- <sequence>
- <group ref="tns:activityGroup" minOccurs="0" maxOccurs="unbounded" />
- <element ref="tns:flow" minOccurs="0" maxOccurs="unbounded" />
- <element ref="tns:on" minOccurs="0" maxOccurs="unbounded">
- <annotation><documentation>Events on which listeners can be registered.</documentation></annotation>
- </element>
- <element ref="tns:timer" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attributeGroup ref="tns:nodeAttributes" />
- </complexType>
- </element>
-
- <element name="activity">
- <annotation><documentation>Executes an activity implementation.
- </documentation></annotation>
- <complexType>
- <sequence>
- <group ref="tns:delegationGroup"/>
- <element ref="tns:flow" minOccurs="0" maxOccurs="unbounded" />
- <element ref="tns:on" minOccurs="0" maxOccurs="unbounded">
- <annotation><documentation>Events on which listeners can be registered.</documentation></annotation>
- </element>
- </sequence>
- <attributeGroup ref="tns:nodeAttributes" />
- </complexType>
- </element>
-
- <element name="invoke">
- <annotation><documentation>Invokes a method on a java object
- </documentation></annotation>
- <complexType>
- <complexContent>
- <extension base="tns:invokeType">
- <sequence>
- <element ref="tns:flow" minOccurs="0" maxOccurs="unbounded" />
- <element ref="tns:on" minOccurs="0" maxOccurs="unbounded">
- <annotation><documentation>Events on which listeners can be registered.</documentation></annotation>
- </element>
- </sequence>
- <attributeGroup ref="tns:nodeAttributes" />
- </extension>
- </complexContent>
- </complexType>
- </element>
-
- <element name="script">
- <annotation><documentation>Evaluates a piece of text as a script
- </documentation></annotation>
- <complexType>
- <complexContent>
- <extension base="tns:scriptType">
- <sequence>
- <element ref="tns:flow" minOccurs="0" maxOccurs="unbounded" />
- <element ref="tns:on" minOccurs="0" maxOccurs="unbounded">
- <annotation><documentation>Events on which listeners can be registered.</documentation></annotation>
- </element>
- </sequence>
- <attributeGroup ref="tns:nodeAttributes" />
- </extension>
- </complexContent>
- </complexType>
- </element>
-
- <element name="email">
- <annotation><documentation>Sends an email
- </documentation></annotation>
- <complexType>
- <complexContent>
- <extension base="tns:emailType">
- <sequence>
- <element ref="tns:flow" minOccurs="0" maxOccurs="unbounded" />
- <element ref="tns:on" minOccurs="0" maxOccurs="unbounded">
- <annotation><documentation>Events on which listeners can be registered.</documentation></annotation>
- </element>
- </sequence>
- <attributeGroup ref="tns:nodeAttributes" />
- </extension>
- </complexContent>
- </complexType>
- </element>
-
- <element name="task">
- <annotation><documentation>Creates a human task
- </documentation></annotation>
- <complexType>
- <complexContent>
- <extension base="tns:taskType">
- <sequence>
- <element ref="tns:flow" minOccurs="0" maxOccurs="unbounded" />
- <element ref="tns:on" minOccurs="0" maxOccurs="unbounded">
- <annotation><documentation>Events on which listeners can be registered.</documentation></annotation>
- </element>
- <element ref="tns:timer" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attributeGroup ref="tns:nodeAttributes" />
- </extension>
- </complexContent>
- </complexType>
- </element>
- -->
- </choice>
- </group>
-
- <attributeGroup name="nodeAttributes">
- <attribute name="name" type="string">
- <annotation><documentation>The id of this activity. The name should be unique
- in the complete scope of the process.</documentation></annotation>
- </attribute>
- <attribute name="g" type="string">
- <annotation><documentation>Graphical information used by process designer tool.
- </documentation></annotation>
- </attribute>
- </attributeGroup>
-
- <complexType name="flowType">
- <annotation><documentation>The outgoing flows. The first in the list
- will be the default outgoing flow.
- </documentation></annotation>
- <!--
- <sequence>
- <group ref="tns:eventListenerGroup" />
- </sequence>
- -->
- <attribute name="name" type="string">
- <annotation><documentation>Name of this outgoing flow</documentation></annotation>
- </attribute>
- <attribute name="to" type="string">
- <annotation><documentation>Name of the destination node of this flow.
- </documentation></annotation>
- </attribute>
- <attribute name="g" type="string">
- <annotation><documentation>Graphical information used by process designer tool.
- </documentation></annotation>
- </attribute>
- </complexType>
-
- <element name="flow" type="tns:flowType">
- <annotation><documentation>A flow from one node to another.</documentation></annotation>
- </element>
-
- <element name="on">
- <annotation><documentation>Events on which listeners can be registered.</documentation></annotation>
- <complexType>
- <!--
- <sequence>
- <group ref="tns:eventListenerGroup" minOccurs="0" maxOccurs="unbounded">
- <annotation><documentation>A list of event listeners that will
- be notified when the event is fired</documentation></annotation>
- </group>
- </sequence>
- -->
- <attribute name="event" type="string">
- <annotation><documentation>The event identification
- </documentation></annotation>
- </attribute>
- </complexType>
- </element>
-
- <!--
-
- <group name="eventListenerGroup">
- <choice>
- <element name="notify">
- <annotation><documentation>Calls the notify method on an
- EventListener.
- </documentation></annotation>
- <complexType>
- <group ref="tns:delegationGroup" />
- <attribute name="object" type="string">
- <annotation><documentation>The reference to an object that is declared
- in the objects section of this process definition.
- </documentation></annotation>
- </attribute>
- <attribute name="expr" type="string">
- <annotation><documentation>The expression that will resolve to
- an Activity implementation.</documentation></annotation>
- </attribute>
- </complexType>
- </element>
- <element name="invoke" type="tns:invokeType">
- <annotation><documentation>Invokes a method on a Java object
- through reflection. The return value can be captured in a
- process variable.
- </documentation></annotation>
- </element>
- <element name="script" type="tns:scriptType">
- <annotation><documentation>Evaluates a piece of text as a script
- </documentation></annotation>
- </element>
- <element name="email" type="tns:emailType">
- <annotation><documentation>Sends an email
- </documentation></annotation>
- </element>
- <element ref="tns:timer">
- <annotation><documentation>Creates a timer.
- </documentation></annotation>
- </element>
- </choice>
- </group>
-
- <group name="delegationGroup">
- <choice>
- <element name="object">
- <annotation><documentation>A java object that will be obtained by using
- the constructor through reflection or through a factory method.</documentation></annotation>
- <complexType>
- <attribute name="class" type="string" />
- </complexType>
- </element>
- <element name="jndi">
- <complexType>
- <attribute name="name" type="string" />
- </complexType>
- </element>
- <element name="expr">
- <complexType>
- <attribute name="text" type="string" use="required"/>
- <attribute name="language" type="string" />
- </complexType>
- </element>
- </choice>
- </group>
-
- <complexType name="invokeType">
- <sequence>
- <group ref="tns:delegationGroup">
- <annotation><documentation>The object on which the method
- will be invoked</documentation></annotation>
- </group>
- <element name="arg" minOccurs="0" maxOccurs="unbounded">
- <annotation><documentation>Arguments passed into the method
- invocation.</documentation></annotation>
- </element>
- </sequence>
- <attribute name="method" type="string" use="required">
- <annotation><documentation>The name of the method to invoke.
- </documentation></annotation>
- </attribute>
- </complexType>
-
- <complexType name="scriptType">
- <sequence>
- <element name="expr" type="string">
- <annotation><documentation>The content of this expression element
- is the script text that will be evaluated. This is mutually
- exclusive with the expression attribute.</documentation></annotation>
- </element>
- </sequence>
- <attribute name="expr" type="string">
- <annotation><documentation>The script text that will be evaluated. This
- is mutually exclusive with the expression element.
- </documentation></annotation>
- </attribute>
- <attribute name="lang" type="string">
- <annotation><documentation>Identification of the scripting language
- to use.</documentation></annotation>
- </attribute>
- </complexType>
-
- <complexType name="emailType">
- <sequence>
- <element name="property">
- <annotation><documentation>Template property value</documentation></annotation>
- <complexType>
- <attribute name="name" type="string" />
- <attribute name="value" type="string" />
- </complexType>
- </element>
- </sequence>
- <attribute name="to" type="string" />
- <attribute name="type" type="string">
- <annotation><documentation>Reference to the email template</documentation></annotation>
- </attribute>
- </complexType>
-
- <element name="timer">
- <annotation><documentation>A timer that will be bound to the most inner enclosing scope.
- Timers can give a signal to an activity instance. The signal will correspond to a flow
- or to an event being fired.
- </documentation></annotation>
- <complexType>
- <choice minOccurs="0" maxOccurs="unbounded">
- <group ref="tns:eventListenerGroup">
- <annotation><documentation>An inline list of event listeners
- on a timer is a short cut for defining the event separately.
- </documentation></annotation>
- </group>
- </choice>
- <attribute name="duedate" type="string" use="required" />
- <attribute name="signal" type="string" use="required">
- <annotation><documentation>Refers to the signal that will be used.
- If inline event listeners are declared, the signal name can not be
- the same as an event that is declared in this scope.
- </documentation></annotation>
- </attribute>
- <attribute name="repeat" type="string" />
- </complexType>
- </element>
-
- <complexType name="taskType">
- <sequence>
- <element ref="tns:assignment" />
- <element name="reminder">
- <complexType>
- <attribute name="duedate" type="string" use="required" />
- <attribute name="repeat" type="string" />
- </complexType>
- </element>
- <element ref="tns:subtask" />
- </sequence>
- <attribute name="title" type="string">
- </attribute>
- <attribute name="form" type="string">
- </attribute>
- <attribute name="swimlane" type="string">
- </attribute>
- <attribute name="description" type="string" />
- <attribute name="duedate" type="string" />
- <attribute name="priority" type="tns:priorityType" default="normal" />
- <attribute name="notify" type="boolean" default="false"/>
- <attribute name="dynamic" type="boolean" default="true">
- <annotation><documentation>Is dynamic creation of subtasks
- allowed ?</documentation></annotation>
- </attribute>
- <attribute name="subtasksync">
- <simpleType>
- <union>
- <simpleType>
- <restriction base="string">
- <enumeration value="last">
- <annotation><documentation>When the last subtask completes,
- this task is completed.</documentation></annotation>
- </enumeration>
- <enumeration value="first">
- <annotation><documentation>When the first subtask completes,
- this task is completed.</documentation></annotation>
- </enumeration>
- </restriction>
- </simpleType>
- <simpleType>
- <restriction base="int">
- <annotation><documentation>The number of subtasks that
- have to complete before this task is considered
- completed.</documentation></annotation>
- </restriction>
- </simpleType>
- </union>
- </simpleType>
- </attribute>
- </complexType>
-
- <simpleType name="priorityType">
- <restriction base="string">
- <enumeration value="highest"/>
- <enumeration value="high"/>
- <enumeration value="normal"/>
- <enumeration value="low"/>
- <enumeration value="lowest"/>
- </restriction>
- </simpleType>
-
- <element name="subtask" type="tns:taskType">
- <annotation><documentation>Subtask in a task activity.</documentation></annotation>
- </element>
-
- <element name="swimlane">
- <annotation><documentation>A process role.</documentation></annotation>
- <complexType>
- <sequence>
- <element ref="tns:assignment"/>
- </sequence>
- <attribute name="name" type="string" use="required" />
- </complexType>
- </element>
-
- <element name="assignment">
- <annotation><documentation>Specifies how a task or a swimlane should be assigned
- to a specific user or who will be identified as a candidate for it.</documentation></annotation>
- <complexType>
- <sequence minOccurs="0">
- <group ref="tns:delegationGroup">
- <annotation><documentation>An object that implements the
- Assigner interface.
- </documentation></annotation>
- </group>
- </sequence>
- <attribute name="assignee" type="string">
- <annotation><documentation>User ID of the person to which the task
- or swimlane will be assigned.
- </documentation></annotation>
- </attribute>
- <attribute name="assignee-expr" type="string">
- <annotation><documentation>Expression that resolves to a
- User ID to which the task or swimlane will be assigned.
- </documentation></annotation>
- </attribute>
- <attribute name="candidates" type="string">
- <annotation><documentation>Comma separated list of User ID's
- or Group ID's. All the referred people will be candidates to
- take the task or swimlane.</documentation></annotation>
- </attribute>
- <attribute name="candidate-expr" type="string">
- <annotation><documentation>Expression that resolves to a
- comma separated list of User ID's or Group ID's. All the
- referred people will be candidates to
- take the task or swimlane.</documentation></annotation>
- </attribute>
- </complexType>
- </element>
- -->
-
-</schema>
Deleted: jbpm4/trunk/modules/pvm/src/main/resources/org/jbpm/pvm/wire.xsd
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/resources/org/jbpm/pvm/wire.xsd 2008-11-21 15:52:02 UTC (rev 3037)
+++ jbpm4/trunk/modules/pvm/src/main/resources/org/jbpm/pvm/wire.xsd 2008-11-21 15:59:34 UTC (rev 3038)
@@ -1,1350 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<schema xmlns="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://jbpm.org/pvm/1.0/wire"
- xmlns:tns="http://jbpm.org/pvm/1.0/wire"
- elementFormDefault="qualified">
-
- <annotation>
- <documentation>XML schema to express how java objects can be
- created and wired together. aka IoC.
- </documentation>
- </annotation>
-
- <!-- ### ELEMENTS ######################################################## -->
-
- <element name="business-calendar">
- <annotation><documentation>A BusinessCalendar that knows about working hours</documentation></annotation>
- <complexType>
- <sequence>
- <element name="monday" type="tns:businessCalendarDayType" minOccurs="0"/>
- <element name="tuesday" type="tns:businessCalendarDayType" minOccurs="0"/>
- <element name="wednesday" type="tns:businessCalendarDayType" minOccurs="0"/>
- <element name="thursday" type="tns:businessCalendarDayType" minOccurs="0"/>
- <element name="friday" type="tns:businessCalendarDayType" minOccurs="0"/>
- <element name="saturday" type="tns:businessCalendarDayType" minOccurs="0"/>
- <element name="sunday" type="tns:businessCalendarDayType" minOccurs="0"/>
- <element name="holiday" minOccurs="0" maxOccurs="unbounded">
- <complexType>
- <attribute name="period">
- <annotation><documentation>Two dates in date-format, separated by
- a dash that specify a holiday period. If it's just one day, a single day
- is also valid.</documentation></annotation>
- </attribute>
- </complexType>
- </element>
- </sequence>
- <attribute name="timezone" type="string">
- <annotation><documentation>Optional specification of the timezone as specified by
- java.util.TimeZone.getTimeZone(String)</documentation></annotation>
- </attribute>
- <attribute name="hour-format" type="string" default="HH:mm">
- <annotation><documentation>Indicates how to interpret the hour specifications
- in this business calendar in java.text.SimpleDateFormat(String)</documentation></annotation>
- </attribute>
- <attribute name="date-format" type="string" default="dd/MM/yyyy">
- <annotation><documentation>Indicates how to interpret the date specifications
- in this business calendar in java.text.SimpleDateFormat(String)</documentation></annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="byte">
- <annotation><documentation>A java.lang.Byte</documentation></annotation>
- <complexType>
- <attribute name="name" type="string">
- <annotation><documentation>The name of the object. It's optional and serves
- as an id to refer to this object from other object declarations. This name can
- also be used lookup the object programmatically.</documentation></annotation>
- </attribute>
- <attribute name="value" type="byte" use="required" />
- </complexType>
- </element>
-
- <element name="char">
- <annotation><documentation>A java.lang.Character</documentation></annotation>
- <complexType>
- <attribute name="name" type="string">
- <annotation><documentation>The name of the object. It's optional and serves
- as an id to refer to this object from other object declarations. This name can
- also be used lookup the object programmatically.</documentation></annotation>
- </attribute>
- <attribute name="value" use="required">
- <simpleType>
- <restriction base="string">
- <maxLength value="1" />
- </restriction>
- </simpleType>
- </attribute>
- </complexType>
- </element>
-
- <element name="class">
- <annotation><documentation>A java.lang.Class</documentation></annotation>
- <complexType>
- <attribute name="name" type="string">
- <annotation><documentation>The name of the object. It's optional and serves
- as an id to refer to this object from other object declarations. This name can
- also be used lookup the object programmatically.</documentation></annotation>
- </attribute>
- <attribute name="init" type="tns:initType" default="lazy">
- <annotation><documentation>Specifies when and how this object should be
- created and initialized. Default is lazy.</documentation></annotation>
- </attribute>
- <attribute name="class-name" use="required" type="string">
- <annotation><documentation>A fully qualified name of a
- class that can be found on the wire context classpath or
- (if that is not specified) on the current thread's context
- classpath.
- </documentation></annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="context-ref">
- <annotation><documentation>The context. This refers to
- the environment, environment-factory or the wire context.
- </documentation></annotation>
- <complexType>
- <attribute name="context-name" type="string">
- <annotation><documentation>The name of the context in the current
- environment. If this attribute is omitted, the enclosing
- context will be given.
- </documentation></annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="contexts">
- <annotation><documentation>Defines an environment factory and
- an environment.
- </documentation></annotation>
- <complexType>
- <sequence>
- <element ref="tns:environment-factory" />
- <element ref="tns:environment" />
- </sequence>
- </complexType>
- </element>
-
- <element name="environment-factory" type="tns:contextType">
- <annotation><documentation>Defines the environment factory
- context. (Aka application context)
- </documentation></annotation>
- </element>
-
- <element name="environment" type="tns:contextType">
- <annotation><documentation>Defines the environment
- context. This context exists stretches for the duration of
- an Environment try-finally block.
- </documentation></annotation>
- </element>
-
- <element name="deployer-manager">
- <annotation><documentation>Has a list of deployers (org.jbpm.deploy.Deployer)
- for each process language for handling deployments.
- </documentation></annotation>
- <complexType>
- <choice maxOccurs="unbounded">
- <element name="language">
- <annotation><documentation>A process language that contains
- a list of deployers</documentation></annotation>
- <complexType>
- <choice maxOccurs="unbounded">
- <group ref="tns:deployers" />
- </choice>
- <attribute name="name" type="string" use="required" />
- <attribute name="extension" type="string" />
- </complexType>
- </element>
- </choice>
- <attribute name="name" type="string">
- <annotation><documentation>The name of the object. It's optional and serves
- as an id to refer to this object from other object declarations. This name can
- also be used lookup the object programmatically.</documentation></annotation>
- </attribute>
- <attribute name="init" type="tns:initType" default="lazy">
- <annotation><documentation>Specifies when and how this object should be
- created and initialized. Default is lazy.</documentation></annotation>
- </attribute>
- <attribute name="resource" type="string">
- <annotation><documentation>Imports contents of the document element
- of all resource files (using deep scan ClassLoader.getResources(String))
- as content into this element.
- </documentation></annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="double">
- <annotation><documentation>A java.lang.Double</documentation></annotation>
- <complexType>
- <attribute name="name" type="string">
- <annotation><documentation>The name of the object. It's optional and serves
- as an id to refer to this object from other object declarations. This name can
- also be used lookup the object programmatically.</documentation></annotation>
- </attribute>
- <attribute name="value" type="double" use="required" />
- </complexType>
- </element>
-
- <element name="environment-ref">
- <annotation><documentation>Obtains the current environment. The environment
- is only available in objects declared inside the environment context. So it
- can't be used inside the session-factory context.
- </documentation></annotation>
- </element>
-
- <element name="environment-factory-ref">
- <annotation><documentation>Obtains the current environment. The environment
- is only available in objects declared inside the environment context. So it
- can't be used inside the session-factory context.
- </documentation></annotation>
- </element>
-
- <element name="false">
- <annotation><documentation>java.lang.Boolean.FALSE
- </documentation></annotation>
- <complexType>
- <attribute name="name" type="string">
- <annotation><documentation>The name of the object. It's optional and serves
- as an id to refer to this object from other object declarations. This name can
- also be used lookup the object programmatically.</documentation></annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="float">
- <annotation><documentation>A java.lang.Float
- </documentation></annotation>
- <complexType>
- <attribute name="name" type="string">
- <annotation><documentation>The name of the object. It's optional and serves
- as an id to refer to this object from other object declarations. This name can
- also be used lookup the object programmatically.</documentation></annotation>
- </attribute>
- <attribute name="value" type="float" use="required" />
- </complexType>
- </element>
-
- <element name="hibernate-configuration" type="tns:hibernateConfigurationType">
- <annotation><documentation>A hibernate Configuration to be used in the
- environment-factory context</documentation></annotation>
- </element>
-
- <element name="hibernate-session">
- <annotation><documentation>A hibernate Session to be used in the
- environment context</documentation></annotation>
- <complexType>
- <attribute name="name" type="string">
- <annotation><documentation>Optional name of this hibernate session.
- Typically a session is looked up by type. Only if multiple sessions
- are declared, a name can be used to distinct them.
- </documentation></annotation>
- </attribute>
- <attribute name="init" type="tns:initType" default="lazy">
- <annotation><documentation>Specifies when and how this object should be
- initialized. Default is lazy.</documentation></annotation>
- </attribute>
- <attribute name="factory" type="string">
- <annotation><documentation>Optional name referring to the session-factory.
- If no factory name is provided, the SessionFactory is looked up by type.
- </documentation></annotation>
- </attribute>
- <attribute name="tx" type="tns:booleanValueType">
- <annotation><documentation>Indicates if a hibernate transaction should
- be started and ended in this environment. Default is true.
- </documentation></annotation>
- </attribute>
- <attribute name="current" type="tns:booleanValueType">
- <annotation><documentation>Indicates if the SessionFactory.getCurrentSession()
- should be used instead of opening and closing a new session. Default is false.
- If 'current' is set to true, then the default of 'close' will be set to false.
- </documentation></annotation>
- </attribute>
- <attribute name="close" type="tns:booleanValueType">
- <annotation><documentation>Indicates if the session should be closed when the
- environment closes. The default is true (unless 'current' is set to true)
- </documentation></annotation>
- </attribute>
- <attribute name="standard-transaction" type="string">
- <annotation><documentation>Optional name of the standard transaction.
- If 'tx' is set to true, a StandardTransaction needs to be found to enlist
- this hibernate session. By default, the lookup of the StandardTransaction
- is done by type. But this attribute allows to refer to the standard
- transaction by name.
- </documentation></annotation>
- </attribute>
- <attribute name="connection" type="string">
- <annotation><documentation>Optional name of the JDBC connection to use
- when creating this hibernate session. If no connection name is specified,
- the creation of the connection is left to the hibernate session.
- </documentation></annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="hibernate-session-factory">
- <annotation><documentation>A hibernate SessionFactory to be used in the
- environment-factory context. The hibernate Configuration can be inlined in this
- 'session-factory', it can be refered by type or referred by name.
- </documentation></annotation>
- <complexType>
- <complexContent>
- <extension base="tns:hibernateConfigurationType">
- <attribute name="configuration" type="string">
- <annotation><documentation>The name of the configuration to use to build
- this hibernate SessionFactory. This is optional as the alternative methods
- to specify a configuration are just inlining it here in this hibernate
- session-factory element or looking up the hibernate Configuration by type.
- </documentation></annotation>
- </attribute>
- </extension>
- </complexContent>
- </complexType>
- </element>
-
- <element name="int">
- <annotation><documentation>A java.lang.Integer
- </documentation></annotation>
- <complexType>
- <attribute name="name" type="string">
- <annotation><documentation>The name of the object. It's optional and serves
- as an id to refer to this object from other object declarations. This name can
- also be used lookup the object programmatically.</documentation></annotation>
- </attribute>
- <attribute name="value" type="int" use="required"/>
- </complexType>
- </element>
-
- <element name="jndi">
- <annotation><documentation>A lookup from JNDI through the InitialContext
- </documentation></annotation>
- <complexType>
- <attribute name="name" type="string">
- <annotation><documentation>The name of the object. It's optional and serves
- as an id to refer to this object from other object declarations. This name can
- also be used lookup the object programmatically.</documentation></annotation>
- </attribute>
- <attribute name="jndi-name" type="string" use="required" />
- </complexType>
- </element>
-
- <element name="job-db-session">
- <annotation><documentation>A hibernate based JobDbSession</documentation></annotation>
- <complexType>
- <attribute name="name" type="string">
- <annotation><documentation>The name of the object. It's optional and serves
- as an id to refer to this object from other object declarations. This name can
- also be used lookup the object programmatically.</documentation></annotation>
- </attribute>
- <attribute name="init" type="tns:initType" default="lazy">
- <annotation><documentation>Specifies when and how this object should be
- initialized. Default is lazy.</documentation></annotation>
- </attribute>
- <attribute name="session" type="string" />
- </complexType>
- </element>
-
- <element name="job-executor">
- <annotation><documentation>The default component for executing timers and messages.
- A job-executor requires a CommandService.
- </documentation></annotation>
- <complexType>
- <attribute name="name" type="string">
- <annotation><documentation>Optional name of this object used to look up
- this object from the environment. This name (along with ip-address) is
- used as the basis for the names of the threads in the job executor's thread
- pool. So when you're running more then one job-executor on the same
- machine, you should be specifying custom job executor names.</documentation></annotation>
- </attribute>
- <attribute name="init" type="tns:initType" default="lazy">
- <annotation><documentation>Specifies when and how this object should be
- initialized. Default is lazy.</documentation></annotation>
- </attribute>
- <attribute name="command-service" type="string">
- <annotation><documentation>Optional name of the command service to use. If
- this attribute is not present, the command service will be looked up
- by type.</documentation></annotation>
- </attribute>
- <attribute name="threads" type="int">
- <annotation><documentation>Number of worker threads. One extra thread will
- be created for scanning and acquisition of jobs (DispatcherThread).</documentation></annotation>
- </attribute>
- <attribute name="idle" type="int">
- <annotation><documentation>Number of milliseconds the dispatcher thread
- will normally wait inbetween checks for new jobs. Each time an exception
- occurs, the idle period will be doubled until the 'idle-max' is reached.
- This is a back-off mechanism in case the job executor can't access the
- database.
- </documentation></annotation>
- </attribute>
- <attribute name="idle-max" type="int">
- <annotation><documentation>Maxumum number of milliseconds the dispatcher thread
- will wait inbetween checks for new jobs.
- </documentation></annotation>
- </attribute>
- <attribute name="history" type="int">
- <annotation><documentation>Number of history records of job executions that will be
- kept in memory.</documentation></annotation>
- </attribute>
- <attribute name="lock" type="int">
- <annotation><documentation>Number of milliseconds that a job will be locked at
- acquisition time. When a job is acquired, the job executor will write it's name
- in the lock owner field of the job and the lockExpirationTime
- will be set to the current time plus 'lock' milliseconds. The lock by that thread should
- be considered as released if the lockExpirationTime has passed. This prevents starvation
- in case one of more JobExecutors in a cluster would die.</documentation></annotation>
- </attribute>
- <attribute name="auto-start" type="tns:booleanValueType">
- <annotation><documentation>Indicates if the job-executor should be started when it
- is created. Default is true. If the job-executor is not auto-started, it can be
- started programmatically with the start method on the JobExecutor.</documentation></annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="job-test-helper">
- <annotation><documentation>A test helper for controlling job executions</documentation></annotation>
- </element>
-
- <element name="list">
- <annotation><documentation>A java.util.List</documentation></annotation>
- <complexType>
- <choice minOccurs="0" maxOccurs="unbounded">
- <group ref="tns:persistableDescriptors" />
- </choice>
- <attribute name="name" type="string">
- <annotation><documentation>The name of the object. It's optional and serves
- as an id to refer to this object from other object declarations. This name can
- also be used lookup the object programmatically.</documentation></annotation>
- </attribute>
- <attribute name="init" type="tns:initType" default="lazy">
- <annotation><documentation>Specifies when and how this object should be
- created and initialized. Default is lazy.</documentation></annotation>
- </attribute>
- <attribute name="class" type="string" default="java.util.ArrayList">
- <annotation><documentation>Implementation class for this list.
- </documentation></annotation>
- </attribute>
- <attribute name="synchronized" type="tns:booleanValueType" default="false">
- <annotation><documentation>Indicates if this collection should be synchronized
- with Collections.synchronizedList(List)</documentation></annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="long">
- <annotation><documentation>A java.lang.Long</documentation></annotation>
- <complexType>
- <attribute name="name" type="string">
- <annotation><documentation>The name of the object. It's optional and serves
- as an id to refer to this object from other object declarations. This name can
- also be used lookup the object programmatically.</documentation></annotation>
- </attribute>
- <attribute name="value" type="long" use="required"/>
- </complexType>
- </element>
-
- <element name="map">
- <annotation><documentation>A java.util.Map</documentation></annotation>
- <complexType>
- <choice minOccurs="0" maxOccurs="unbounded">
- <element name="entry">
- <complexType>
- <choice minOccurs="0">
- <element name="key" minOccurs="0">
- <complexType>
- <group ref="tns:persistableDescriptors" />
- </complexType>
- </element>
- <element name="value" minOccurs="0">
- <complexType>
- <group ref="tns:persistableDescriptors" />
- </complexType>
- </element>
- </choice>
- </complexType>
- </element>
- </choice>
- <attribute name="name" type="string">
- <annotation><documentation>The name of the object. It's optional and serves
- as an id to refer to this object from other object declarations. This name can
- also be used lookup the object programmatically.</documentation></annotation>
- </attribute>
- <attribute name="init" type="tns:initType" default="lazy">
- <annotation><documentation>Specifies when and how this object should be
- created and initialized. Default is lazy.</documentation></annotation>
- </attribute>
- <attribute name="class" type="string" default="java.util.HashMap">
- <annotation><documentation>Implementation class for this map.
- </documentation></annotation>
- </attribute>
- <attribute name="synchronized" type="tns:booleanValueType" default="false">
- <annotation><documentation>Indicates if this collection should be synchronized
- with Collections.synchronizedMap(Map)</documentation></annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="message-session">
- <annotation><documentation>Specifies an implementation of the MessageSession
- interface that sends messages to the JobExecutor. The main usage of MessageSession
- is by the PVM implementation for asynchronous continuations. The PVM will look
- up the message session by type. All message-session implementations depend on a
- DbSession like e.g. the 'pvm-db-session'. A DbSession will be looked up by type.
- </documentation></annotation>
- <complexType>
- <attribute name="name" type="string">
- <annotation><documentation>The name of the object. It's optional and serves
- as an id to refer to this object from other object declarations. This name can
- also be used lookup the object programmatically.</documentation></annotation>
- </attribute>
- <attribute name="target" type="tns:messageSessionTargetType" default="job-executor">
- <annotation><documentation>
- <p>Specifies the implementation of the message session.
- </p>
- <p><code><b>job-executor</b></code>: Is the default and sends to messages to the
- job-executor. In this case the message session has a dependency on
- a DbSession (like the PvmDbSession) and a Transaction to which the
- message session will register a listener to notify the job executor upon
- successfull completion.
- </p>
- <p><code><b>jms</b></code>: Sends the messages over JMS and a JMS listener is assumed
- (like the command executor MDB) that executes the message. If 'jms' is specified,
- attributes 'session-jndi' and 'destination-jndi' become required.
- </p>
- </documentation></annotation>
- </attribute>
- <attribute name="session-jndi" type="string" use="optional">
- <annotation><documentation>The JNDI name of the JMS Session. Only used in case of
- target <b>jms</b>. </documentation></annotation>
- </attribute>
- <attribute name="destination-jndi" type="string" use="optional">
- <annotation><documentation>The JNDI name of the Queue destination to use. Only used
- in case of target <b>jms</b>.</documentation></annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="null">
- <annotation><documentation>the null value
- </documentation></annotation>
- </element>
-
- <element name="object">
- <annotation><documentation>Any java object that will be created by reflection. .
- <p>There are three main ways to create an object: by constructor or by a factory
- object or a static factory method.</p>
- <p><b>Using the constructor</b>: Then the <code>class</code> attribute must provide the
- fully qualified class name. In case another constructor then the default is
- targetted, a <code>constructor</code> child element can be provided.
- The <code>factory</code> attribute should not be provided for using a constructor.
- </p>
- <p><b>Using a factory</b>: Then the <code>factory</code> attribute or one
- <code>factory</code> element must be provided along with the attribute
- <code>method</code>.
- </p>
- <p><b>Using a static factory method</b>: Then the <code>class</code> and
- <code>method</code> attributes should be specified. There should be no
- reference to a <code>factory</code> attribute of element.
- </p>
- <p><b>Construction and initialization</b>: all objects (constructor and factory)
- are build in two phases: construction and initialisation phase. During construction
- all is done until a pointer is obtained to the object. In initialisation, operations
- are applied to the object until it is ready to be used. The separation between
- construction and initialisation is made to allow for bidirectional references. In
- that case, at least one of both ends can not be fully initialised before it is injected
- into the other end.
- </p>
- <p><b>Operations</b>: after construction, various operations can be applied to objects
- like e.g. direct field injection, injection through setters, method invocation,
- enlist with the standard transaction, subscribe the object as a listener to an observable
- </p>
- <p><b>Arguments</b>: There are two different places for arguments. The <code>arg</code>
- elements for the factory method invocation should be placed as child elements under the
- <code>object</code> element. The <code>arg</code> elements for the constructor should be
- placed as child elements under the <code>constructor</code> element.
- </p>
- </documentation></annotation>
- <complexType>
- <choice minOccurs="0" maxOccurs="unbounded">
- <element name="factory">
- <annotation><documentation>Contains one element that describes the factory object.</documentation></annotation>
- <complexType>
- <group ref="tns:persistableDescriptors" />
- </complexType>
- </element>
- <element name="constructor">
- <annotation><documentation>Specifies the arguments to use for a non-default constructor.</documentation></annotation>
- <complexType>
- <choice maxOccurs="unbounded">
- <element name="arg" type="tns:argType" />
- </choice>
- </complexType>
- </element>
- <element name="arg" type="tns:argType">
- <annotation><documentation>The factory method arguments.</documentation></annotation>
- </element>
- <group ref="tns:operations" />
- </choice>
- <attribute name="name" type="string">
- <annotation><documentation>The name of the object. It's optional and serves
- as an id to refer to this object from other object declarations. This name can
- also be used lookup the object programmatically.</documentation></annotation>
- </attribute>
- <attribute name="init" type="tns:initType" default="lazy">
- <annotation><documentation>Specifies when and how this object should be
- initialized. Default is lazy.</documentation></annotation>
- </attribute>
- <attribute name="class" type="string">
- <annotation><documentation>The fully qualified class name</documentation></annotation>
- </attribute>
- <attribute name="factory" type="string">
- <annotation><documentation>The name of the factory object</documentation></annotation>
- </attribute>
- <attribute name="method" type="string">
- <annotation><documentation>The factory method name</documentation></annotation>
- </attribute>
- <attribute name="auto-wire" type="string">
- <annotation><documentation>Indicates if the member fields and setter properties
- should be automatically wired based on matching the property names and types with the
- object names and types</documentation></annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="process-service">
- <annotation><documentation>The default process service implementation
- that delegates method implementations to a CommandService. process-service
- depends on a command service.
- </documentation></annotation>
- </element>
-
- <element name="properties">
- <annotation><documentation>A java.util.Properties</documentation></annotation>
- <complexType>
- <choice minOccurs="0" maxOccurs="unbounded">
- <element name="property">
- <complexType>
- <attribute name="name" type="string" use="required" />
- <attribute name="value" type="string" use="required" />
- </complexType>
- </element>
- </choice>
- <attribute name="name" type="string">
- <annotation><documentation>The name of the object. It's optional and serves
- as an id to refer to this object from other object declarations. This name can
- also be used lookup the object programmatically.</documentation></annotation>
- </attribute>
- <attribute name="file" type="string">
- <annotation><documentation>A file on the file system</documentation></annotation>
- </attribute>
- <attribute name="resource" type="string">
- <annotation><documentation>A file as a resource in the classpath</documentation></annotation>
- </attribute>
- <attribute name="url" type="string">
- <annotation><documentation>the contents is fetched by loading a url</documentation></annotation>
- </attribute>
- <attribute name="is-xml" type="tns:booleanValueType">
- <annotation><documentation>optionally indicates if the content of referenced file in attributes
- 'file', 'resource' or 'url' is XML. The default is the
- plain properties format with a space or the equals character (=) separating key and value on
- each line.</documentation></annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="pvm-db-session">
- <annotation><documentation>A hibernate based PvmDbSession</documentation></annotation>
- <complexType>
- <attribute name="name" type="string">
- <annotation><documentation>The name of the object. It's optional and serves
- as an id to refer to this object from other object declarations. This name can
- also be used lookup the object programmatically.</documentation></annotation>
- </attribute>
- <attribute name="init" type="tns:initType" default="lazy">
- <annotation><documentation>Specifies when and how this object should be
- initialized. Default is lazy.</documentation></annotation>
- </attribute>
- <attribute name="session" type="string" />
- </complexType>
- </element>
-
- <element name="ref">
- <annotation><documentation>A reference to another object by name</documentation></annotation>
- <complexType>
- <attribute name="name" type="string">
- <annotation><documentation>The name of the object. It's optional and serves
- as an id to refer to this object from other object declarations. This name can
- also be used lookup the object programmatically.</documentation></annotation>
- </attribute>
- <attribute name="object" type="string" use="required">
- <annotation><documentation>The name of the referred object</documentation></annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="set">
- <annotation><documentation>A java.util.Set
- </documentation></annotation>
- <complexType>
- <choice minOccurs="0" maxOccurs="unbounded">
- <group ref="tns:persistableDescriptors" />
- </choice>
- <attribute name="name" type="string">
- <annotation><documentation>The name of the object. It's optional and serves
- as an id to refer to this object from other object declarations. This name can
- also be used lookup the object programmatically.</documentation></annotation>
- </attribute>
- <attribute name="init" type="tns:initType" default="lazy">
- <annotation><documentation>Specifies when and how this object should be
- initialized. Default is lazy.</documentation></annotation>
- </attribute>
- <attribute name="class" type="string" default="java.util.HashList">
- <annotation><documentation>Implementation class for this set.
- </documentation></annotation>
- </attribute>
- <attribute name="synchronized" type="tns:booleanValueType" default="false">
- <annotation><documentation>Indicates if this collection should be synchronized
- with Collections.synchronizedSet(Set)</documentation></annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="short">
- <annotation><documentation>a java.lang.Short
- </documentation></annotation>
- <complexType>
- <attribute name="name" type="string">
- <annotation><documentation>The name of the object. It's optional and serves
- as an id to refer to this object from other object declarations. This name can
- also be used lookup the object programmatically.</documentation></annotation>
- </attribute>
- <attribute name="value" type="short" use="required"/>
- </complexType>
- </element>
-
- <element name="command-service">
- <annotation><documentation>The command service for usage in standard
- Java environments.
- </documentation></annotation>
- <complexType>
- <choice minOccurs="0" maxOccurs="unbounded">
- <group ref="tns:interceptors" />
- </choice>
- <attribute name="name" type="string">
- <annotation><documentation>The name of the object. It's optional and serves
- as an id to refer to this object from other object declarations. This name can
- also be used lookup the object programmatically.</documentation></annotation>
- </attribute>
- <attribute name="init" type="tns:initType" default="lazy">
- <annotation><documentation>Specifies when and how this object should be
- initialized. Default is lazy.</documentation></annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="string">
- <annotation><documentation>a java.lang.String
- </documentation></annotation>
- <complexType>
- <attribute name="name" type="string">
- <annotation><documentation>The name of the object. It's optional and serves
- as an id to refer to this object from other object declarations. This name can
- also be used lookup the object programmatically.</documentation></annotation>
- </attribute>
- <attribute name="value" type="string" use="required"/>
- </complexType>
- </element>
-
- <element name="timer-session">
- <annotation><documentation>A timer session is used during process execution to create
- timers. Different implementations of the timer service make the process portable
- over different environments.
- </documentation></annotation>
- <complexType>
- <attribute name="name" type="string">
- <annotation><documentation>The name of the object. It's optional and serves
- as an id to refer to this object from other object declarations. This name can
- also be used lookup the object programmatically.</documentation></annotation>
- </attribute>
- <attribute name="init" type="tns:initType" default="lazy">
- <annotation><documentation>Specifies when and how this object should be
- initialized. Default is lazy.</documentation></annotation>
- </attribute>
- <attribute name="target" default="job-executor">
- <annotation><documentation>Specifies the target implementation. Use
- <code>job-executor</code> when the job executor is responsible for executing the
- timers (default). Use <code>ejb</code> in case the EJB Timer Service should be used.
- If the target is job-executor, there is a dependency on the transaction, the job-executor
- and a job-db-session.
- </documentation></annotation>
- <simpleType>
- <restriction base="string">
- <enumeration value="job-executor" />
- <enumeration value="ejb" />
- </restriction>
- </simpleType>
- </attribute>
- </complexType>
- </element>
-
- <element name="transaction">
- <annotation><documentation>The transaction binding. Specifies how the transaction in the
- pvm environment gets bound to the actual transaction in the real environment.
- </documentation></annotation>
- <complexType>
- <attribute name="name" type="string">
- <annotation><documentation>The name of the object. It's optional and serves
- as an id to refer to this object from other object declarations. This name can
- also be used lookup the object programmatically.</documentation></annotation>
- </attribute>
- <attribute name="target" default="standard">
- <annotation><documentation>The real transaction to be wrapped. Use <code>standard</code>
- in standard environments and enterprise in enterprise environments. In case of the
- <code>enterprise</code> target, the <code>jndi</code> name of the user transaction and
- the <code>manage</code> attribute can optionally be specified.
- </documentation></annotation>
- <simpleType>
- <restriction base="string">
- <enumeration value="standard" />
- <enumeration value="enterprise" />
- </restriction>
- </simpleType>
- </attribute>
- <attribute name="jndi" type="string" default="java:comp/UserTransaction">
- <annotation><documentation>The jndi name of the user transaction
- </documentation></annotation>
- </attribute>
- <attribute name="manage" type="tns:booleanValueType" default="false">
- <annotation><documentation>Indicates if the user transaction be controlled (=managed)
- by the environment.
- </documentation></annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="transaction-ref">
- <annotation><documentation>Reference to the org.jbpm.pvm.api.env.Transaction in the
- current environment.
- </documentation></annotation>
- </element>
-
- <element name="true">
- <annotation><documentation>java.lang.Boolean.TRUE
- </documentation></annotation>
- <complexType>
- <attribute name="name" type="string">
- <annotation><documentation>The name of the object. It's optional and serves
- as an id to refer to this object from other object declarations. This name can
- also be used lookup the object programmatically.</documentation></annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="variable-types">
- <annotation><documentation>Specifies automatic variable type resolution, transforming
- variable values of any java class into their persistable format. When the
- type of a variable needs to be automatically detected. Each of the type elements will
- be scanned in order. When the type matches, it is used to store the value.
- </documentation></annotation>
- <complexType>
- <choice minOccurs="0" maxOccurs="unbounded">
- <element name="type">
- <complexType>
- <choice>
- <element name="matcher">
- <annotation><documentation>Alternative to the <code>class</code> attribute to
- specify the matcher for this type.</documentation></annotation>
- <complexType>
- <group ref="tns:allDescriptors" />
- </complexType>
- </element>
- </choice>
- <attribute name="name" type="string">
- <annotation><documentation>The name of the type is optional. It's used when
- users declare variables in the process.</documentation></annotation>
- </attribute>
- <attribute name="class" type="string">
- <annotation><documentation>Specifies a matcher based on the class of the
- object. The java class name of the values that will be
- stored in this type. Apart from Java class names following literals can be
- used as well:
- <p><b><code>persistable</code></b>: Matches when the class of the object is
- known by the hibernate-session-factory so that a generic reference (any-mapping)
- can be created to the persistable object. If <code>class="persistable"</code>
- the attribute <code>id-type</code> becomes required.
- </p>
- <p><b><code>serializable</code></b>: Matches if the object implements the
- java.io.Serializable interface.
- </p>
- <p>If no <code>class</code> is provided, a matcher can also be specified
- as a separate child element.</p>
- </documentation></annotation>
- </attribute>
- <attribute name="hibernate-session-factory" type="string">
- <annotation><documentation>The name of the hibernate-session-factory. Only
- required if <code>class="persistable"</code> is used and if there is more then
- one hibernate session factory specified in the environment.
- </documentation></annotation>
- </attribute>
- <attribute name="id-type">
- <annotation><documentation>The type of the id property in the persistable object.
- </documentation></annotation>
- <simpleType>
- <restriction base="string">
- <enumeration value="long" />
- <enumeration value="string" />
- </restriction>
- </simpleType>
- </attribute>
- <attribute name="converter" type="string">
- <annotation><documentation>The class name of the converter. The converter must implement
- the Converter interface and have a default constructor</documentation></annotation>
- </attribute>
- <attribute name="variable-class" type="string" use="required">
- <annotation><documentation>The class name of the variable class. The variable class must be
- a sub class of Variable and must have a default constructor.</documentation></annotation>
- </attribute>
- </complexType>
- </element>
- </choice>
- <attribute name="name" type="string">
- <annotation><documentation>The name of the object. It's optional and serves
- as an id to refer to this object from other object declarations. This name can
- also be used lookup the object programmatically.</documentation></annotation>
- </attribute>
- <attribute name="init" type="tns:initType" default="lazy">
- <annotation><documentation>Specifies when and how this object should be
- initialized. Default is lazy.</documentation></annotation>
- </attribute>
- <attribute name="file" type="string">
- <annotation><documentation>Imports variable types from a file. All the
- top level elements of the root document element are imported.</documentation></annotation>
- </attribute>
- <attribute name="url" type="string">
- <annotation><documentation>Imports variable types from a URL. All the
- top level elements of the root document element are imported.</documentation></annotation>
- </attribute>
- <attribute name="resource" type="string">
- <annotation><documentation>Imports variable types from a resource. All the
- top level elements of the root document element are imported.</documentation></annotation>
- </attribute>
- </complexType>
- </element>
-
- <!-- ### COMPLEX TYPES ################################################### -->
-
- <complexType name="argType">
- <annotation><documentation>The method arguments.
- Each 'arg' element should have exactly one child element
- that represents the value of the argument.
- </documentation></annotation>
- <attribute name="type" type="string">
- <annotation><documentation>The java class name representing
- the type of the method. This is optional and can be used to
- indicate the appropriate method in case of method overloading.
- </documentation></annotation>
- </attribute>
- </complexType>
-
- <complexType name="contextType">
- <annotation><documentation>A context is a set of object
- descriptions.
- </documentation></annotation>
- <choice minOccurs="0" maxOccurs="unbounded">
- <group ref="tns:allDescriptors" />
- </choice>
- </complexType>
-
- <complexType name="hibernateConfigurationType">
- <choice minOccurs="0" maxOccurs="unbounded">
- <element name="mappings">
- <annotation><documentation>Imports mapping file references from the
- referenced resource files</documentation></annotation>
- <complexType>
- <attribute name="resource" type="string">
- <annotation><documentation>Import mapping references from a resource file.
- The full classpath is scanned for all the resource
- files of the given name. All mapping elements that are found as the content in
- the top level document element will be imported for all of the resource files
- found on the classpath with that name. </documentation></annotation>
- </attribute>
- </complexType>
- </element>
- <element name="mapping">
- <annotation><documentation>Imports a hibernate mapping file</documentation></annotation>
- <complexType>
- <attribute name="resource" type="string">
- <annotation><documentation>Adds the referenced resource file as a mapping
- file to the hibernate configuration</documentation></annotation>
- </attribute>
- <attribute name="file" type="string">
- <annotation><documentation>Adds the referenced file as a mapping
- file to the hibernate configuration</documentation></annotation>
- </attribute>
- <attribute name="class" type="string">
- <annotation><documentation>Adds the resource file that matches the given class
- name as a mapping file to the hibernate configuration. Matching means
- .hbm.xml instead of .java</documentation></annotation>
- </attribute>
- <attribute name="url" type="string">
- <annotation><documentation>Adds file supplied by the URL as a mapping
- file to the hibernate configuration</documentation></annotation>
- </attribute>
- </complexType>
- </element>
- <element ref="tns:properties" />
- <element name="cache-configuration">
- <complexType>
- <choice minOccurs="0" maxOccurs="unbounded">
- <element name="class-cache">
- <annotation><documentation>Persistent class for which hibernate should
- activate its second level cache</documentation></annotation>
- <complexType>
- <attribute name="class">
- <annotation><documentation>Fully qualified classname</documentation></annotation>
- </attribute>
- </complexType>
- </element>
- <element name="collection-cache">
- <annotation><documentation>Persistent collection for which hibernate should
- activate its second level cache</documentation></annotation>
- <complexType>
- <attribute name="collection">
- <annotation><documentation>Fully qualified classname, a dot (.) and
- then the property name of the collection</documentation></annotation>
- </attribute>
- </complexType>
- </element>
- </choice>
- <attribute name="usage" type="tns:hibernateCacheUsageType">
- <annotation><documentation>The caching strategy. see hibernate
- docs for more info.</documentation></annotation>
- </attribute>
- <attribute name="file" type="string">
- <annotation><documentation>Import source for class-cache elements</documentation></annotation>
- </attribute>
- <attribute name="resource" type="string">
- <annotation><documentation>Import source for class-cache elements</documentation></annotation>
- </attribute>
- <attribute name="url" type="string">
- <annotation><documentation>Import source for class-cache elements</documentation></annotation>
- </attribute>
- </complexType>
- </element>
- </choice>
- <attribute name="name" type="string">
- <annotation><documentation>Optional name of this hibernate session factory.
- Typically a session factory is looked up by type. Only if multiple sessions
- are declared, a name can be used to distinct them.
- </documentation></annotation>
- </attribute>
- <attribute name="init" type="tns:initType" default="lazy">
- <annotation><documentation>Specifies when and how this object should be
- initialized. Default is lazy.</documentation></annotation>
- </attribute>
- <attribute name="class" type="string">
- <annotation><documentation>Optional class of the hibernate configuration.
- By default org.hibernate.cfg.Configuration will be used. This can be used
- to specify e.g. an AnnotationConfiguration.</documentation></annotation>
- </attribute>
- <attribute name="schema-operation" type="tns:hibernateSchemaOperationType">
- <annotation><documentation>Optional schema operation to be applied when
- this configuration has been created. By default, no schema operation will
- be applied.</documentation></annotation>
- </attribute>
- </complexType>
-
- <complexType name="businessCalendarDayType">
- <attribute name="hours" type="string">
- <annotation><documentation>The working hours of this day. Day parts are separated
- with 'and'. Begin and end hours are separated by '-'. E.g:
- 9:00-12:00 and 12:30-17:00
- </documentation></annotation>
- </attribute>
- </complexType>
-
-
-
- <!-- ### SIMPLE VALUE TYPES ############################################## -->
-
- <simpleType name="booleanValueType">
- <restriction base="string">
- <enumeration value="true" />
- <enumeration value="on" />
- <enumeration value="enabled" />
- <enumeration value="false" />
- <enumeration value="off" />
- <enumeration value="disabled" />
- </restriction>
- </simpleType>
-
- <simpleType name="hibernateSchemaOperationType">
- <restriction base="string">
- <enumeration value="update" />
- <enumeration value="create" />
- </restriction>
- </simpleType>
-
- <simpleType name="hibernateCacheUsageType">
- <restriction base="string">
- <enumeration value="read-only" />
- <enumeration value="nonstrict-read-write" />
- <enumeration value="read-write" />
- <enumeration value="transactional" />
- </restriction>
- </simpleType>
-
- <simpleType name="initType">
- <annotation><documentation>Specifies when and how this object should be
- initialized. Default is lazy.
-
- <p><code><b>lazy</b></code>: The object is only created when it is asked for.
- In case of transitive dependencies, the object might not yet be initialized.
- </p>
-
- <p><code><b>eager</b></code>: The object is created when the context is created.
- In case of transitive dependencies, the object might not yet be initialized.
- </p>
-
- <p><code><b>eager</b></code>: The object is created when the context is created.
- In case of transitive dependencies, the initialization is also mandatory.
- </p>
-
- <p><code><b>eager</b></code>: The object is only created when it is asked for.
- In case of transitive dependencies, initialization is mandatory.
- </p>
- </documentation></annotation>
- <restriction base="string">
- <enumeration value="lazy" />
- <enumeration value="eager" />
- <enumeration value="immediate" />
- <enumeration value="required" />
- </restriction>
- </simpleType>
-
- <simpleType name="messageSessionTargetType">
- <restriction base="string">
- <enumeration value="job-executor" />
- <enumeration value="jms" />
- <enumeration value="test" />
- </restriction>
- </simpleType>
-
-
- <!-- ### GROUPS ########################################################## -->
-
- <group name="persistableDescriptors">
- <choice>
- <element ref="tns:byte" />
- <element ref="tns:char" />
- <element ref="tns:class" />
- <element ref="tns:context-ref" />
- <element ref="tns:double" />
- <element ref="tns:environment-ref" />
- <element ref="tns:environment-factory-ref" />
- <element ref="tns:false" />
- <element ref="tns:float" />
- <element ref="tns:int" />
- <element ref="tns:jndi" />
- <element ref="tns:list" />
- <element ref="tns:long" />
- <element ref="tns:map" />
- <element ref="tns:message-session" />
- <element ref="tns:null" />
- <element ref="tns:object" />
- <element ref="tns:pvm-db-session" />
- <element ref="tns:properties" />
- <element ref="tns:ref" />
- <element ref="tns:set" />
- <element ref="tns:short" />
- <element ref="tns:string" />
- <element ref="tns:timer-session" />
- <element ref="tns:transaction-ref" />
- <element ref="tns:true" />
- </choice>
- </group>
-
- <group name="allDescriptors">
- <choice>
- <group ref="tns:persistableDescriptors" />
- <element ref="tns:business-calendar" />
- <element ref="tns:process-service" />
- <element ref="tns:deployer-manager" />
- <element ref="tns:hibernate-configuration" />
- <element ref="tns:hibernate-session-factory" />
- <element ref="tns:hibernate-session" />
- <element ref="tns:job-executor" />
- <element ref="tns:job-test-helper" />
- <element ref="tns:command-service" />
- <element ref="tns:transaction" />
- <element ref="tns:variable-types" />
- </choice>
- </group>
-
- <group name="interceptors">
- <choice>
- <element name="environment-interceptor">
- <annotation><documentation>Interceptor that can be used as part of declaring
- a command service.
- </documentation></annotation>
- </element>
- <element name="retry-interceptor">
- <annotation><documentation>Interceptor that retries the method invocation in
- case of exceptions.
- </documentation></annotation>
- <complexType>
- <attribute name="retries" default="3">
- <annotation><documentation>Max number of attempts before giving up</documentation></annotation>
- </attribute>
- <attribute name="delay" default="50">
- <annotation><documentation>Delay in milliseconds after the first exception</documentation></annotation>
- </attribute>
- <attribute name="delay-factor" default="4">
- <annotation><documentation>Factor with which the delay is multiplied after subsequent
- failed attempts. This enables back-off to reduce load in case of repetitive failures.
- </documentation></annotation>
- </attribute>
- </complexType>
- </element>
- <element name="transaction-interceptor">
- <annotation><documentation>Interceptor that will make sure the transaction is initialized before each
- invocation and it will issue a setRollbackOnly on the transaction in case an exception occors.
- </documentation></annotation>
- </element>
- </choice>
- </group>
-
- <group name="deployers">
- <choice>
- <element name="create-process">
- <annotation><documentation>Deployer that can instantiate the
- process definition of a given type.
- </documentation></annotation>
- <complexType>
- <attribute name="name" type="string" />
- <attribute name="class" type="string" use="required"/>
- </complexType>
- </element>
- <element name="check-version">
- <annotation><documentation>Deployer checks if the version of the
- deployed process is exactly 1 more then the last version of the same
- process. If a version already exists, it is left untouched.
- If no version exists, by default, this deployer will assign
- a version to the process definition that is 1 higher then the
- highest deployed version in the DB for that process name. This
- default can be overridden by the 'assign' attribute.
- </documentation></annotation>
- <complexType>
- <attribute name="assign" default="true">
- <annotation><documentation>In case there the process definition
- has not be given a version explicitely, this attribute specifies
- if this deployer should assign a version. The assigned version
- will be 1 higher then the highest version in the db for processes
- with the same name. Starting with 1 if no similarly named procses
- definitions are found.
- </documentation></annotation>
- </attribute>
- </complexType>
- </element>
- <element name="create-id">
- <annotation><documentation>Deployer verifies if the version of the
- deployed process is exactly 1 more then the last version of the same
- process.
- </documentation></annotation>
- </element>
- <element name="save-process">
- <annotation><documentation>Deployer that saves the process with
- the PvmDbSession.
- </documentation></annotation>
- </element>
- </choice>
- </group>
-
- <group name="operations">
- <choice>
- <element name="enlist">
- <annotation><documentation>Enlists this object (assumes a org.jbpm.tx.Resource) with the current org.jbpm.tx.StandardTransaction</documentation></annotation>
- <complexType>
- <attribute name="transaction" type="string">
- <annotation><documentation>Optional reference to the name of the
- standard transaction. If no transaction name is specified, the transaction
- is looked up by type in the environment.
- </documentation></annotation>
- </attribute>
- </complexType>
- </element>
- <element name="field">
- <annotation><documentation>Injects a value into a member field of this object.
- Exactly one child element must specify the value.
- </documentation></annotation>
- <complexType>
- <group ref="tns:persistableDescriptors" />
- <attribute name="name">
- <annotation><documentation>The member field name</documentation></annotation>
- </attribute>
- </complexType>
- </element>
- <element name="invoke">
- <annotation><documentation>Invokes a method</documentation></annotation>
- <complexType>
- <choice minOccurs="0" maxOccurs="unbounded">
- <element name="arg" type="tns:argType" />
- </choice>
- <attribute name="method" type="string" use="required">
- <annotation><documentation>the method name</documentation></annotation>
- </attribute>
- </complexType>
- </element>
- <element name="subscribe">
- <annotation><documentation>Subscribes this object to an observable</documentation></annotation>
- <complexType>
- <choice minOccurs="0" maxOccurs="unbounded">
- <element name="arg" type="tns:argType" />
- </choice>
- <attribute name="context" type="string">
- <annotation><documentation>The context in which to find the observable. If not specified,
- the context of this object will be taken. If no observable object names are specified, the
- context object itself will be used as the observable.</documentation></annotation>
- </attribute>
- <attribute name="to" default="object-events">
- <annotation><documentation>Indicates if this object is interested in the events fired by
- the object itself (object-events) or in the wire events fired by the wire context
- (wire-events).</documentation></annotation>
- <simpleType>
- <restriction base="string">
- <enumeration value="wire-events" />
- <enumeration value="object-events" />
- </restriction>
- </simpleType>
- </attribute>
- <attribute name="event" type="string">
- <annotation><documentation>A single event. See 'events' for more information.</documentation></annotation>
- </attribute>
- <attribute name="events" type="string">
- <annotation><documentation>Comma separated list of events to listen to, filtering out all other events.
- If no events are specified or if the '*' wildcard is specified, the object will be notified of all events.
- </documentation></annotation>
- </attribute>
- <attribute name="object" type="string">
- <annotation><documentation>A single object name. See 'objects' for more information.</documentation></annotation>
- </attribute>
- <attribute name="objects" type="string">
- <annotation><documentation>Comma separated list of object names to listen to.
- If no objects are specified the specified context will be used as the observable.
- </documentation></annotation>
- </attribute>
- <attribute name="method" type="string">
- <annotation><documentation>Name of the method to invoke. If no method is specified, it is assumed that the
- object implements the Listener interface. Nested 'arg' elements can be used to provide arguments
- in the method invocation.
- </documentation></annotation>
- </attribute>
- </complexType>
- </element>
- </choice>
- </group>
-
-</schema>
\ No newline at end of file
Added: jbpm4/trunk/modules/userguide/src/main/diagrams/diagrams.mdzip
===================================================================
(Binary files differ)
Property changes on: jbpm4/trunk/modules/userguide/src/main/diagrams/diagrams.mdzip
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: jbpm4/trunk/modules/userguide/src/main/diagrams/images.ppt
===================================================================
(Binary files differ)
Property changes on: jbpm4/trunk/modules/userguide/src/main/diagrams/images.ppt
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: jbpm4/trunk/modules/userguide/src/main/docbook/en/master.xml
===================================================================
--- jbpm4/trunk/modules/userguide/src/main/docbook/en/master.xml (rev 0)
+++ jbpm4/trunk/modules/userguide/src/main/docbook/en/master.xml 2008-11-21 15:59:34 UTC (rev 3038)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE book [
+ <!ENTITY ch01-Introduction SYSTEM "modules/ch01-Introduction.xml">
+ <!ENTITY ch02-Environments SYSTEM "modules/ch02-Environments.xml">
+ <!ENTITY ch03-Configuration SYSTEM "modules/ch03-Configuration.xml">
+ <!ENTITY ch04-Services SYSTEM "modules/ch04-Services.xml">
+]>
+
+<book lang="en">
+
+ <bookinfo>
+ <title>jBPM User Guide</title>
+ </bookinfo>
+
+ <toc />
+
+ &ch01-Introduction;
+ &ch02-Configuration;
+ &ch03-Services;
+
+</book>
\ No newline at end of file
Added: jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch01-Introduction.xml
===================================================================
--- jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch01-Introduction.xml (rev 0)
+++ jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch01-Introduction.xml 2008-11-21 15:59:34 UTC (rev 3038)
@@ -0,0 +1,49 @@
+<chapter id="introduction">
+ <title>Introduction</title>
+
+ <section>
+ <title>License and EULA</title>
+ <para>jBPM is distributed under the terms of the
+ GNU Lesser General Public License (LGPL) and the JBoss End User License Agreement (EULA).
+ See <ulink url="../../../lgpl.html">the full LGPL license text</ulink> and <ulink url="../../../JBossORG-EULA.txt">the
+ full End User License Agreement</ulink>.
+ </para>
+ </section>
+
+ <section>
+ <title>Sources</title>
+ <para>The source code for this component can be found in the jBPM SVN repository:
+ </para>
+ <ulink url="https://anonsvn.jboss.org/repos/jbpm/jbpm4/">https://anonsvn.jboss.org/repos/jbpm/jbpm4/</ulink>
+ </section>
+
+ <section>
+ <title>JVM version</title>
+ <para>jBPM requires a JVM version 5 or higher.
+ </para>
+ </section>
+
+ <section>
+ <title>What is it</title>
+ <para>jBPM is an extensible and flexible process engine that can run
+ as a standalone server or embedded in any Java application.
+ jBPM can run multiple process languages and it supports multiple
+ execution modes.
+ </para>
+ </section>
+
+ <section>
+ <title>Contents of this userguide</title>
+ <para>In this user guide, we'll describe the jPDL
+ process language in persistent execution mode. Persistent
+ execution mode means that process definitions, process executions
+ and process history is stored in a relational DB. This is the common way
+ of how jBPM is used.
+ </para>
+ <para>This user guide explains the supported way on how to use jBPM.
+ The developers guide explains more advanced customization options that
+ are not supported.
+ </para>
+ </section>
+
+</chapter>
Added: jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch02-Environments.xml
===================================================================
--- jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch02-Environments.xml (rev 0)
+++ jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch02-Environments.xml 2008-11-21 15:59:34 UTC (rev 3038)
@@ -0,0 +1,49 @@
+<chapter id="environments">
+ <title>Environments</title>
+
+ <para>This chapter describes the supported environments
+ and the supported configurations for these environments.
+ </para>
+
+ <section id="plainjava">
+ <title>Plain Java</title>
+ <para>TODO : specify library dependencies</para>
+ </section>
+
+ <section id="tomcat-xxx">
+ <title>Tomcat xxx</title>
+ <para>TODO</para>
+ </section>
+
+ <section id="jboss-4.2.2">
+ <title>JBoss 4.2.2</title>
+ <para>TODO</para>
+ </section>
+
+ <section id="jboss-4.2.3">
+ <title>JBoss 4.2.3</title>
+ <para>TODO</para>
+ </section>
+
+ <section id="jboss-5.0.0">
+ <title>JBoss 5.0.0</title>
+ <para>TODO</para>
+ </section>
+
+ <section id="spring">
+ <title>Spring</title>
+ <para>Usage of jBPM with Spring is only supported when jBPM is configured with
+ the jBPM configuration file and when hibernate or JTA is used for transaction
+ demarcation. For configuring jBPM in a Spring configuration file and for
+ binding jBPM to Spring demarcated transactions, see the non-supported
+ developers guide.
+ </para>
+ </section>
+
+ <section id="osgi">
+ <title>OSGi</title>
+ <para>TODO
+ </para>
+ </section>
+
+</chapter>
\ No newline at end of file
Added: jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch03-Configuration.xml
===================================================================
--- jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch03-Configuration.xml (rev 0)
+++ jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch03-Configuration.xml 2008-11-21 15:59:34 UTC (rev 3038)
@@ -0,0 +1,10 @@
+<chapter id="configuration">
+ <title>Configuration</title>
+
+ <para>Interacting with jBPM occurs through <link linkend="services">services</link>.
+ The service interfaces can be obtained from the <literal>ProcessEngine</literal>
+ which is build from a <literal>Configuration</literal>.
+ </para>
+
+
+</chapter>
\ No newline at end of file
Added: jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch04-Services.xml
===================================================================
--- jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch04-Services.xml (rev 0)
+++ jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch04-Services.xml 2008-11-21 15:59:34 UTC (rev 3038)
@@ -0,0 +1,7 @@
+<chapter id="services">
+ <title>Services</title>
+
+ <para>
+ </para>
+
+</chapter>
\ No newline at end of file
17 years, 5 months
JBoss JBPM SVN: r3037 - in jbpm4/trunk: modules/api and 34 other directories.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2008-11-21 10:52:02 -0500 (Fri, 21 Nov 2008)
New Revision: 3037
Modified:
jbpm4/trunk/build.xml
jbpm4/trunk/modules/api/.classpath
jbpm4/trunk/modules/api/pom.xml
jbpm4/trunk/modules/api/src/main/java/org/jbpm/env/Context.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/env/Environment.java
jbpm4/trunk/modules/devguide/
jbpm4/trunk/modules/jpdl/pom.xml
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/xml/JpdlParser.java
jbpm4/trunk/modules/jpdl/src/test/resources/jbpm.cfg.xml
jbpm4/trunk/modules/manual/src/main/docbook/en/modules/ch02-ExecutionModes.xml
jbpm4/trunk/modules/manual/src/main/docbook/en/modules/ch03-Architecture.xml
jbpm4/trunk/modules/manual/src/main/docbook/en/modules/chxx-Environment.xml
jbpm4/trunk/modules/manual/src/main/docbook/en/modules/chxx-Persistence.xml
jbpm4/trunk/modules/pvm/pom.xml
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/cfg/JbpmConfiguration.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/env/PvmEnvironmentFactoryParser.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/script/ScriptManager.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/WireContext.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/EnvironmentFactoryRefBinding.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/env/BasicEnvironmentTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/env/EnvironmentSearchOrderTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/env/EnvironmentTypeLookupTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/env/NestedEnvironmentTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/expr/GroovyExpressionTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/expr/JuelExpressionTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/tx/EnlistTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/tx/TransactionFailingCommitTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/tx/TransactionResourcesCommitTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/tx/TransactionResourcesSetRollbackOnlyTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/ContextBlockSubscriptionTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/EnvWireTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/MethodSubscriptionTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/ObjectSubscriptionTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/WireEventsSubscriptionTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/WireObservableTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/samples/ex13/EnvironmentTest.java
jbpm4/trunk/modules/pvm/src/test/resources/environment.cfg.xml
jbpm4/trunk/modules/pvm/src/test/resources/org/jbpm/pvm/api/db/continuation/ContinuationTest.cfg.xml
jbpm4/trunk/modules/pvm/src/test/resources/org/jbpm/pvm/api/db/svc/environment.cfg.xml
jbpm4/trunk/modules/pvm/src/test/resources/org/jbpm/pvm/api/timer/environment.cfg.xml
jbpm4/trunk/modules/pvm/src/test/resources/org/jbpm/pvm/environment.cfg.xml
jbpm4/trunk/modules/pvm/src/test/resources/org/jbpm/pvm/internal/db/langext/environment.cfg.xml
jbpm4/trunk/modules/pvm/src/test/resources/org/jbpm/pvm/internal/db/model/environment.cfg.xml
jbpm4/trunk/modules/pvm/src/test/resources/org/jbpm/pvm/internal/db/type/environmentCustomTypes.cfg.xml
jbpm4/trunk/modules/pvm/src/test/resources/org/jbpm/pvm/internal/jobexecutor/environment.cfg.xml
jbpm4/trunk/modules/pvm/src/test/resources/org/jbpm/pvm/internal/type/environment.cfg.xml
jbpm4/trunk/modules/pvm/src/test/resources/org/jbpm/pvm/internal/xml/schematest.xml
jbpm4/trunk/modules/pvm/src/test/resources/org/jbpm/xml/schematest.xml
jbpm4/trunk/modules/task/src/test/resources/environment.cfg.xml
jbpm4/trunk/modules/task/src/test/resources/jbpm.cfg.xml
jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/Db.java
jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/basicfeatures/ConfigurationTest.java
jbpm4/trunk/modules/test-db/src/test/resources/jbpm.cfg.xml
jbpm4/trunk/modules/userguide/
jbpm4/trunk/pom.xml
Log:
jbpm-configuration and userguide-devguide split
Modified: jbpm4/trunk/build.xml
===================================================================
--- jbpm4/trunk/build.xml 2008-11-21 15:47:43 UTC (rev 3036)
+++ jbpm4/trunk/build.xml 2008-11-21 15:52:02 UTC (rev 3037)
@@ -66,16 +66,25 @@
</antcall>
</target>
- <target name="manual">
- <exec executable="cmd" dir="modules/manual">
+ <target name="devguide">
+ <exec executable="cmd" dir="modules/devguide">
<arg line="/C mvn jdocbook:resources jdocbook:generate" />
</exec>
<antcall target="show.html">
- <param name="page" value="modules/manual/target/docbook/publish/en/html_single/index.html"/>
+ <param name="page" value="modules/devguide/target/docbook/publish/en/html_single/index.html"/>
</antcall>
</target>
+ <target name="userguide">
+ <exec executable="cmd" dir="modules/userguide">
+ <arg line="/C mvn jdocbook:resources jdocbook:generate" />
+ </exec>
+ <antcall target="show.html">
+ <param name="page" value="modules/userguide/target/docbook/publish/en/html_single/index.html"/>
+ </antcall>
+ </target>
+
<!-- HTML -->
<target name="show.html">
<fail message="property page has to be specified to use this target" unless="page" />
Modified: jbpm4/trunk/modules/api/.classpath
===================================================================
--- jbpm4/trunk/modules/api/.classpath 2008-11-21 15:47:43 UTC (rev 3036)
+++ jbpm4/trunk/modules/api/.classpath 2008-11-21 15:52:02 UTC (rev 3037)
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java"/>
+ <classpathentry kind="src" output="target/classes" path="src/main/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/classes"/>
Modified: jbpm4/trunk/modules/api/pom.xml
===================================================================
--- jbpm4/trunk/modules/api/pom.xml 2008-11-21 15:47:43 UTC (rev 3036)
+++ jbpm4/trunk/modules/api/pom.xml 2008-11-21 15:52:02 UTC (rev 3037)
@@ -46,6 +46,55 @@
<!-- Plugins -->
<build>
<plugins>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>generate-jpdlxsd-doc</id>
+ <phase>package</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <taskdef name="xsddoc" classname="net.sf.xframe.xsddoc.Task" classpathref="maven.plugin.classpath" />
+ <mkdir dir="${basedir}/target/doc/schemadoc" />
+ <xsddoc out="${basedir}/target/doc/schemadoc" title="jBPM 4 Schema's" verbose="false">
+ <fileset dir="${basedir}/src/main/resources" />
+ </xsddoc>
+ </tasks>
+ </configuration>
+ </execution>
+ <!--
+ <execution>
+ <id>generate-wirexsd-doc</id>
+ <phase>package</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <taskdef name="xsddoc" classname="net.sf.xframe.xsddoc.Task" classpathref="maven.plugin.classpath" />
+ <mkdir dir="${basedir}/target/doc/configuration-xsd-schema" />
+ <xsddoc file="${basedir}/src/main/resources/configuration.xsd" out="${basedir}/target/doc/configuration-xsd-schema" title="jBPM Configuration Schema" verbose="false" />
+ </tasks>
+ </configuration>
+ </execution>
+ -->
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>xsddoc</groupId>
+ <artifactId>xsddoc</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>xalan</groupId>
+ <artifactId>xalan</artifactId>
+ <version>2.7.0</version>
+ </dependency>
+ </dependencies>
+ </plugin>
</plugins>
</build>
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/env/Context.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/env/Context.java 2008-11-21 15:47:43 UTC (rev 3036)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/env/Context.java 2008-11-21 15:52:02 UTC (rev 3037)
@@ -30,8 +30,8 @@
*/
public interface Context {
- /** key of the environment-factory context in the environment */
- String CONTEXTNAME_ENVIRONMENT_FACTORY = "environment-factory";
+ /** key of the process-engine context in the environment */
+ String CONTEXTNAME_ENVIRONMENT_FACTORY = "process-engine";
/** key of the block context in the environment */
String CONTEXTNAME_ENVIRONMENT = "environment";
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/env/Environment.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/env/Environment.java 2008-11-21 15:47:43 UTC (rev 3036)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/env/Environment.java 2008-11-21 15:52:02 UTC (rev 3037)
@@ -40,12 +40,12 @@
*
* <p>Examples of contexts are:
* <ul>
- * <li><b>environment-factory</b>: The environment-factory context is used to store e.g. data sources,
+ * <li><b>process-engine</b>: The process-engine context is used to store e.g. data sources,
* session factories and other static resources needed by an application.
- * The environment-factory context lives for the complete duration of the {@link EnvironmentFactory}.
+ * The process-engine context lives for the complete duration of the {@link EnvironmentFactory}.
* So if the {@link EnvironmentFactory} is maintained in a static member field, the
- * environment-factory context lives for the duration of the application.
- * The same environment-factory context is shared for all the Environments produced by one
+ * process-engine context lives for the duration of the application.
+ * The same process-engine context is shared for all the Environments produced by one
* EnvironmentFactory.</li>
* <li><b>environment</b>: The environment context is used for e.g. a transaction
* and transactional resources, user authentication. This results in an efficient and
@@ -85,8 +85,8 @@
*
* <p>A second purpose of the environment is to enable specific to global searching
* of resources. E.g. you could search for an 'adminEmailAddress' in the contexts
- * 'processDefinition-execution', 'processDefinition-definition' and 'environment-factory' in the given order.
- * That way, a global adminEmailAddress can be specified in the environment-factory context
+ * 'processDefinition-execution', 'processDefinition-definition' and 'process-engine' in the given order.
+ * That way, a global adminEmailAddress can be specified in the process-engine context
* and it can be refined in more specific contexts processDefinition-definition or processDefinition-execution.
* </p>
*
Property changes on: jbpm4/trunk/modules/devguide
___________________________________________________________________
Name: svn:ignore
+ target
Modified: jbpm4/trunk/modules/jpdl/pom.xml
===================================================================
--- jbpm4/trunk/modules/jpdl/pom.xml 2008-11-21 15:47:43 UTC (rev 3036)
+++ jbpm4/trunk/modules/jpdl/pom.xml 2008-11-21 15:52:02 UTC (rev 3037)
@@ -50,38 +50,6 @@
<build>
<plugins>
<plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>generate-jpdlxsd-doc</id>
- <phase>package</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <tasks>
- <taskdef name="xsddoc" classname="net.sf.xframe.xsddoc.Task" classpathref="maven.plugin.classpath" />
- <mkdir dir="${basedir}/target/doc/jpdlxsd" />
- <xsddoc file="${basedir}/src/main/resources/org/jbpm/jpdl/jpdl.xsd" out="${basedir}/target/doc/jpdlxsd" title="jPDL: jBPM's Process Definition Language"
- verbose="false" />
- </tasks>
- </configuration>
- </execution>
- </executions>
- <dependencies>
- <dependency>
- <groupId>xsddoc</groupId>
- <artifactId>xsddoc</artifactId>
- <version>1.0</version>
- </dependency>
- <dependency>
- <groupId>xalan</groupId>
- <artifactId>xalan</artifactId>
- <version>2.7.0</version>
- </dependency>
- </dependencies>
- </plugin>
- <plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
Modified: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/xml/JpdlParser.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/xml/JpdlParser.java 2008-11-21 15:47:43 UTC (rev 3036)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/xml/JpdlParser.java 2008-11-21 15:52:02 UTC (rev 3037)
@@ -29,7 +29,6 @@
import org.jbpm.activity.Activity;
import org.jbpm.jpdl.JpdlProcessDefinition;
import org.jbpm.log.Log;
-import org.jbpm.model.Node;
import org.jbpm.pvm.internal.model.NodeImpl;
import org.jbpm.pvm.internal.model.ProcessDefinitionImpl;
import org.jbpm.pvm.internal.model.TransitionImpl;
@@ -54,7 +53,7 @@
public JpdlParser() {
super(defaultBindings);
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
- this.addEntity("http://jbpm.org/jpdl4", new UrlEntity("org/jbpm/jpdl/jpdl.xsd", classLoader));
+ this.addEntity("http://jbpm.org/jpdl4", new UrlEntity("jpdl.xsd", classLoader));
}
Modified: jbpm4/trunk/modules/jpdl/src/test/resources/jbpm.cfg.xml
===================================================================
--- jbpm4/trunk/modules/jpdl/src/test/resources/jbpm.cfg.xml 2008-11-21 15:47:43 UTC (rev 3036)
+++ jbpm4/trunk/modules/jpdl/src/test/resources/jbpm.cfg.xml 2008-11-21 15:52:02 UTC (rev 3037)
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<contexts xmlns="http://jbpm.org/pvm/1.0/wire">
+<jbpm-configuration xmlns="http://jbpm.org/xsd/cfg">
- <environment-factory>
+ <process-engine>
<deployer-manager>
<language name="jpdl">
@@ -47,7 +47,7 @@
<holiday period="01/07/2008 - 31/08/2008"/>
</business-calendar>
- </environment-factory>
+ </process-engine>
<environment>
<hibernate-session />
@@ -58,4 +58,4 @@
<timer-session />
</environment>
-</contexts>
+</jbpm-configuration>
Modified: jbpm4/trunk/modules/manual/src/main/docbook/en/modules/ch02-ExecutionModes.xml
===================================================================
--- jbpm4/trunk/modules/manual/src/main/docbook/en/modules/ch02-ExecutionModes.xml 2008-11-21 15:47:43 UTC (rev 3036)
+++ jbpm4/trunk/modules/manual/src/main/docbook/en/modules/ch02-ExecutionModes.xml 2008-11-21 15:52:02 UTC (rev 3037)
@@ -102,9 +102,9 @@
like this:
</para>
<literal><emphasis role="bold">environment.cfg.xml</emphasis>:</literal>
- <programlisting><contexts xmlns="http://jbpm.org/pvm/1.0/wire">
+ <programlisting><jbpm-configuration xmlns="http://jbpm.org/xsd/cfg">
- <environment-factory>
+ <process-engine>
<deployer-manager>
<language name="api">
@@ -137,7 +137,7 @@
<variable-types resource="org/jbpm/pvm/pvm.types.xml" />
<job-executor auto-start="false" />
- </environment-factory>
+ </process-engine>
<environment>
<hibernate-session />
@@ -147,7 +147,7 @@
<message-session />
</environment>
-</contexts></programlisting>
+</jbpm-configuration></programlisting>
<para>And next to it a hibernate.properties like this</para>
<literal>hibernate.properties:</literal>
<programlisting>hibernate.dialect org.hibernate.dialect.HSQLDialect
Modified: jbpm4/trunk/modules/manual/src/main/docbook/en/modules/ch03-Architecture.xml
===================================================================
--- jbpm4/trunk/modules/manual/src/main/docbook/en/modules/ch03-Architecture.xml 2008-11-21 15:47:43 UTC (rev 3036)
+++ jbpm4/trunk/modules/manual/src/main/docbook/en/modules/ch03-Architecture.xml 2008-11-21 15:52:02 UTC (rev 3037)
@@ -188,9 +188,9 @@
<para>From the default configuration which is included in full above,
here is the section that configures the services
</para>
- <programlisting><contexts xmlns="http://jbpm.org/pvm/1.0/wire">
+ <programlisting><jbpm-configuration xmlns="http://jbpm.org/xsd/cfg">
- <environment-factory>
+ <process-engine>
<process-service />
<execution-service />
Modified: jbpm4/trunk/modules/manual/src/main/docbook/en/modules/chxx-Environment.xml
===================================================================
--- jbpm4/trunk/modules/manual/src/main/docbook/en/modules/chxx-Environment.xml 2008-11-21 15:47:43 UTC (rev 3036)
+++ jbpm4/trunk/modules/manual/src/main/docbook/en/modules/chxx-Environment.xml 2008-11-21 15:52:02 UTC (rev 3037)
@@ -14,7 +14,7 @@
in a standard Java environment as well as an enterprise Java environment.
</para>
<para>The environment is partitioned into a set of contexts. Each context
- can have its own lifecycle. For instance, the environment-factory context will
+ can have its own lifecycle. For instance, the process-engine context will
strech over the full lifetime of the application. The block context only
for the duration of a try-finally block. Typically a block context represents
a database transaction. Each context exposes a list of key-value
@@ -27,7 +27,7 @@
<para>To start working with an environment, you need an EnvironmentFactory.
One single environment factory object can be used throughout the complete
lifetime of the application. So typically this is kept in a static
- member field. The EnvironmentFactory itself is the environment-factory context.
+ member field. The EnvironmentFactory itself is the process-engine context.
</para>
<para>An <literal>EnvironmentFactory</literal> is typically obtained by
parsing a configuration file like this:
@@ -66,11 +66,11 @@
<literal>environment.get(String name)</literal> or
<literal><T> T environment.get(Class<T>)</literal>.
</para>
- <para>when an environment is created, it has a <literal>environment-factory</literal> context
+ <para>when an environment is created, it has a <literal>process-engine</literal> context
and a <literal>block</literal>
context.
</para>
- <para>In the default implementation, the <literal>environment-factory</literal> context and
+ <para>In the default implementation, the <literal>process-engine</literal> context and
the <literal>block</literal> context are <literal>WireContext</literal>s. A
<literal>WireContext</literal> contains a description of how its objects are
created and wired together to form object graphs.
@@ -87,11 +87,11 @@
}</programlisting>
<para>Then let's create an environment factory that knows how to create book</para>
<programlisting>static EnvironmentFactory environmentFactory = EnvironmentFactory.parseXmlString(
- "<contexts>" +
- " <environment-factory>" +
+ "<jbpm-configuration>" +
+ " <process-engine>" +
" <object name='book' class='org.jbpm.examples.ch09.Book' />" +
- " </environment-factory>" +
- "</contexts>"
+ " </process-engine>" +
+ "</jbpm-configuration>"
));</programlisting>
<para>Now we'll create an environment block with this environment factory and
we'll look up the book in the environment. First the lookup is done by
@@ -130,7 +130,7 @@
<para>When doing a lookup on the environment, there is a default search order
in which the contexts will be scanned for the requested object. The default
order is the inverse of the sequence in which the contexts were added. E.g.
- if an object is defined in both the environment-factory context and in the block context,
+ if an object is defined in both the process-engine context and in the block context,
the block context is considered more applicable and that will be scanned first.
Alternatively, an explicit search order can be passed in with the
<literal>get</literal> lookups as an optional parameter.
Modified: jbpm4/trunk/modules/manual/src/main/docbook/en/modules/chxx-Persistence.xml
===================================================================
--- jbpm4/trunk/modules/manual/src/main/docbook/en/modules/chxx-Persistence.xml 2008-11-21 15:47:43 UTC (rev 3036)
+++ jbpm4/trunk/modules/manual/src/main/docbook/en/modules/chxx-Persistence.xml 2008-11-21 15:52:02 UTC (rev 3037)
@@ -6,9 +6,9 @@
<para>This section describes how the environment can be configured to use
hibernate in a standard Java environment.
</para>
- <programlisting>01 | <contexts>
+ <programlisting>01 | <jbpm-configuration>
02 |
-03 | <environment-factory>
+03 | <process-engine>
04 |<emphasis role="bold"> <hibernate-session-factory /></emphasis>
05 |<emphasis role="bold"> <hibernate-configuration></emphasis>
06 |<emphasis role="bold"> <properties resource="hibernate.properties" /></emphasis>
@@ -17,7 +17,7 @@
09 |<emphasis role="bold"> resource="org/jbpm/pvm/pvm.cache.xml" </emphasis>
10 |<emphasis role="bold"> usage="nonstrict-read-write" /></emphasis>
11 |<emphasis role="bold"> </hibernate-configuration></emphasis>
-12 | </environment-factory>
+12 | </process-engine>
13 |
14 | <block>
15 |<emphasis role="bold"> <standard-transaction /></emphasis>
@@ -25,9 +25,9 @@
17 |<emphasis role="bold"> <pvm-db-session /></emphasis>
18 | </block>
19 |
-20 | </contexts></programlisting>
+20 | </jbpm-configuration></programlisting>
<para><literal>line 04</literal> specifies a hibernate session factory in the
- environment-factory context. This means that a hibernate session factory is lazy
+ process-engine context. This means that a hibernate session factory is lazy
created when it is first needed and cached in the
<literal>EnvironmentFactory</literal>.
</para>
Modified: jbpm4/trunk/modules/pvm/pom.xml
===================================================================
--- jbpm4/trunk/modules/pvm/pom.xml 2008-11-21 15:47:43 UTC (rev 3036)
+++ jbpm4/trunk/modules/pvm/pom.xml 2008-11-21 15:52:02 UTC (rev 3037)
@@ -155,34 +155,7 @@
</tasks>
</configuration>
</execution>
- <execution>
- <id>generate-wirexsd-doc</id>
- <phase>package</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <tasks>
- <taskdef name="xsddoc" classname="net.sf.xframe.xsddoc.Task" classpathref="maven.plugin.classpath" />
- <mkdir dir="${basedir}/target/doc-wirexsd" />
- <xsddoc file="${basedir}/src/main/resources/org/jbpm/pvm/wire.xsd" out="${basedir}/target/doc-wirexsd" title="Process Virtual Machine: Wiring Schema"
- verbose="false" />
- </tasks>
- </configuration>
- </execution>
</executions>
- <dependencies>
- <dependency>
- <groupId>xsddoc</groupId>
- <artifactId>xsddoc</artifactId>
- <version>1.0</version>
- </dependency>
- <dependency>
- <groupId>xalan</groupId>
- <artifactId>xalan</artifactId>
- <version>2.7.0</version>
- </dependency>
- </dependencies>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/cfg/JbpmConfiguration.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/cfg/JbpmConfiguration.java 2008-11-21 15:47:43 UTC (rev 3036)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/cfg/JbpmConfiguration.java 2008-11-21 15:52:02 UTC (rev 3037)
@@ -49,27 +49,27 @@
import org.jbpm.pvm.internal.wire.WireDefinition;
/**
- * an environment factory that also is the environment-factory context.
+ * an environment factory that also is the process-engine context.
*
* <p>
* This environment factory will produce environments with 2 contexts: the
- * environment-factory context and the block context.
+ * process-engine context and the block context.
* </p>
*
* <p>
- * An environment-factory context is build from two wire definitions: the
- * environment-factory wire definition and the environment wire definition.
+ * An process-engine context is build from two wire definitions: the
+ * process-engine wire definition and the environment wire definition.
* </p>
*
* <p>
- * The environment-factory context itself is build from the environment-factory
+ * The process-engine context itself is build from the process-engine
* wire definition. So all objects that are created in this context remain
- * cached for the lifetime of this environment-factory context object.
+ * cached for the lifetime of this process-engine context object.
* </p>
*
* <p>
- * This environment-factory context is also a environment factory. The produced
- * environments contain 2 contexts: the environment-factory context itself and a
+ * This process-engine context is also a environment factory. The produced
+ * environments contain 2 contexts: the process-engine context itself and a
* new environment context, build from the environment wire definition. For each
* created environment, a new environment context will be created from the same
* environment wire definition. Objects in the environment context will live for
@@ -172,7 +172,7 @@
environment.setClassLoader(classLoader);
}
- // add the environment-factory context
+ // add the process-engine context
environment.addContext(environmentFactoryCtxWireContext);
// add the environment block context
@@ -198,7 +198,7 @@
environmentFactoryCtxWireContext.fire(WireContext.EVENT_CLOSE, null);
}
- // environment-factory context delegation methods
+ // process-engine context delegation methods
// ///////////////////////////////////
public Object get(String key) {
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/env/PvmEnvironmentFactoryParser.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/env/PvmEnvironmentFactoryParser.java 2008-11-21 15:47:43 UTC (rev 3036)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/env/PvmEnvironmentFactoryParser.java 2008-11-21 15:52:02 UTC (rev 3037)
@@ -34,8 +34,8 @@
import org.w3c.dom.Document;
import org.w3c.dom.Element;
-/** main parser. It parses the <code>contexts</code>, which is assumed the document element
- * and can contain the {@link EnvironmentFactoryXmlParser environment-factory}
+/** main parser. It parses the <code>jbpm-configuration</code>, which is assumed the document element
+ * and can contain the {@link EnvironmentFactoryXmlParser process-engine}
* context and the {@link EnvironmentXmlParser environment} context.
*
* See {@link Parser} for usage instructions.
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-11-21 15:47:43 UTC (rev 3036)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/script/ScriptManager.java 2008-11-21 15:52:02 UTC (rev 3037)
@@ -66,7 +66,7 @@
"<objects>" +
" <script-manager default-expression-language='juel'" +
" default-script-language='beanshell' " +
- " read-contexts='execution, environment, environment-factory' " +
+ " read-contexts='execution, environment, process-engine' " +
" write-context='execution'>" +
" <script-language name='juel' factory='com.sun.script.juel.JuelScriptEngineFactory' />" +
" </script-manager>" +
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/WireContext.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/WireContext.java 2008-11-21 15:47:43 UTC (rev 3036)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/WireContext.java 2008-11-21 15:52:02 UTC (rev 3037)
@@ -66,7 +66,7 @@
*
* <p>A WireContext is used often in combination with {@link Environment} to
* decouple the processDefinition virtual machine from its environment. In the
- * {@link JbpmConfiguration}, both the environment-factory context and
+ * {@link JbpmConfiguration}, both the process-engine context and
* the environment contexts are WireContexts. The PVM will use the persistence service,
* asynchronous message service, timer service and other services through specified
* abstractions in the environment.
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/EnvironmentFactoryRefBinding.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/EnvironmentFactoryRefBinding.java 2008-11-21 15:47:43 UTC (rev 3036)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/EnvironmentFactoryRefBinding.java 2008-11-21 15:52:02 UTC (rev 3037)
@@ -37,7 +37,7 @@
public class EnvironmentFactoryRefBinding extends WireDescriptorBinding {
public EnvironmentFactoryRefBinding() {
- super("environment-factory-ref");
+ super("process-engine-ref");
}
public Object parse(Element element, Parse parse, Parser parser) {
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/env/BasicEnvironmentTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/env/BasicEnvironmentTest.java 2008-11-21 15:47:43 UTC (rev 3036)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/env/BasicEnvironmentTest.java 2008-11-21 15:52:02 UTC (rev 3037)
@@ -35,14 +35,14 @@
public void testBasicEnvironmentOperation() {
EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString(
- "<contexts>" +
- " <environment-factory>" +
+ "<jbpm-configuration>" +
+ " <process-engine>" +
" <object name='a' class='"+Object.class.getName()+"' />" +
- " </environment-factory>" +
+ " </process-engine>" +
" <environment>" +
" <object name='b' class='"+Object.class.getName()+"' />" +
" </environment>" +
- "</contexts>"
+ "</jbpm-configuration>"
);
Object firstA;
@@ -65,7 +65,7 @@
environment = environmentFactory.openEnvironment();
try {
- // the same a should have been stored in the environment-factory cache
+ // the same a should have been stored in the process-engine cache
assertSame(firstA, environment.get("a"));
// a new b should be created because we're in a new environment
Object secondB = environment.get("b");
@@ -78,10 +78,10 @@
public void testCurrentEnvironment(){
EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString(
- "<contexts>" +
- " <environment-factory/>" +
+ "<jbpm-configuration>" +
+ " <process-engine/>" +
" <environment/>" +
- "</contexts>"
+ "</jbpm-configuration>"
);
assertNotNull(environmentFactory);
@@ -108,14 +108,14 @@
public void testUnexistingElement() {
EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString(
- "<contexts>" +
- " <environment-factory>" +
+ "<jbpm-configuration>" +
+ " <process-engine>" +
" <object name='a' class='"+Object.class.getName()+"' />" +
- " </environment-factory>" +
+ " </process-engine>" +
" <environment>" +
" <object name='b' class='"+Object.class.getName()+"' />" +
" </environment>" +
- "</contexts>"
+ "</jbpm-configuration>"
);
Environment environment = environmentFactory.openEnvironment();
@@ -129,9 +129,9 @@
public void testNoBlockEnvironment(){
EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString(
- "<contexts>" +
- " <environment-factory/>" +
- "</contexts>"
+ "<jbpm-configuration>" +
+ " <process-engine/>" +
+ "</jbpm-configuration>"
);
assertNotNull(environmentFactory);
@@ -150,9 +150,9 @@
public void testNoApplicationEnvironment(){
EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString(
- "<contexts>" +
+ "<jbpm-configuration>" +
" <environment/>" +
- "</contexts>"
+ "</jbpm-configuration>"
);
assertNotNull(environmentFactory);
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/env/EnvironmentSearchOrderTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/env/EnvironmentSearchOrderTest.java 2008-11-21 15:47:43 UTC (rev 3036)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/env/EnvironmentSearchOrderTest.java 2008-11-21 15:52:02 UTC (rev 3037)
@@ -37,14 +37,14 @@
public void testEnvironmentDefaultSearchOrder() {
EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString(
- "<contexts>" +
- " <environment-factory>" +
- " <string name='a' value='environment-factory-a' />" +
- " </environment-factory>" +
+ "<jbpm-configuration>" +
+ " <process-engine>" +
+ " <string name='a' value='process-engine-a' />" +
+ " </process-engine>" +
" <environment>" +
" <string name='a' value='environment-a' />" +
" </environment>" +
- "</contexts>"
+ "</jbpm-configuration>"
);
Environment environment = environmentFactory.openEnvironment();
@@ -59,22 +59,22 @@
public void testEnvironmentGivenSearchOrder() {
EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString(
- "<contexts>" +
- " <environment-factory>" +
- " <string name='a' value='environment-factory-a' />" +
- " </environment-factory>" +
+ "<jbpm-configuration>" +
+ " <process-engine>" +
+ " <string name='a' value='process-engine-a' />" +
+ " </process-engine>" +
" <environment>" +
" <string name='a' value='environment-a' />" +
" </environment>" +
- "</contexts>"
+ "</jbpm-configuration>"
);
Environment environment = environmentFactory.openEnvironment();
try {
- // only search in context 'environment-factory' and then in 'environment'
- String[] searchOrder = new String[]{"environment-factory", "environment"};
- assertEquals("environment-factory-a", environment.get("a", searchOrder));
+ // only search in context 'process-engine' and then in 'environment'
+ String[] searchOrder = new String[]{"process-engine", "environment"};
+ assertEquals("process-engine-a", environment.get("a", searchOrder));
} finally {
environment.close();
@@ -83,22 +83,22 @@
public void testEnvironmentGivenSearchOrderUnexistingObject() {
EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString(
- "<contexts>" +
- " <environment-factory>" +
- " <string name='a' value='environment-factory-a' />" +
- " </environment-factory>" +
+ "<jbpm-configuration>" +
+ " <process-engine>" +
+ " <string name='a' value='process-engine-a' />" +
+ " </process-engine>" +
" <environment>" +
" <string name='a' value='environment-a' />" +
" <string name='b' value='environment-b' />" +
" </environment>" +
- "</contexts>"
+ "</jbpm-configuration>"
);
Environment environment = environmentFactory.openEnvironment();
try {
- // only search in context 'environment-factory'
- String[] searchOrder = new String[]{"environment-factory"};
+ // only search in context 'process-engine'
+ String[] searchOrder = new String[]{"process-engine"};
assertNull(environment.get("b", searchOrder));
} finally {
@@ -109,14 +109,14 @@
public void testEnvironmentDefaultSearchOrderWithAddedContext() {
EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString(
- "<contexts>" +
- " <environment-factory>" +
- " <string name='a' value='environment-factory-a' />" +
- " </environment-factory>" +
+ "<jbpm-configuration>" +
+ " <process-engine>" +
+ " <string name='a' value='process-engine-a' />" +
+ " </process-engine>" +
" <environment>" +
" <string name='a' value='environment-a' />" +
" </environment>" +
- "</contexts>"
+ "</jbpm-configuration>"
);
Environment environment = environmentFactory.openEnvironment();
@@ -143,14 +143,14 @@
public void testEnvironmentGivenSearchOrderWithAddedContext() {
EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString(
- "<contexts>" +
- " <environment-factory>" +
- " <string name='a' value='environment-factory-a' />" +
- " </environment-factory>" +
+ "<jbpm-configuration>" +
+ " <process-engine>" +
+ " <string name='a' value='process-engine-a' />" +
+ " </process-engine>" +
" <environment>" +
" <string name='a' value='environment-a' />" +
" </environment>" +
- "</contexts>"
+ "</jbpm-configuration>"
);
Environment environment = environmentFactory.openEnvironment();
@@ -167,8 +167,8 @@
// add the new context to the enviromnent
environment.addContext(addedContext);
- // only search in context 'environment-factory' and 'environment'
- String[] searchOrder = new String[]{"environment", "environment-factory"};
+ // only search in context 'process-engine' and 'environment'
+ String[] searchOrder = new String[]{"environment", "process-engine"};
assertEquals("environment-a", environment.get("a", searchOrder));
} finally {
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/env/EnvironmentTypeLookupTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/env/EnvironmentTypeLookupTest.java 2008-11-21 15:47:43 UTC (rev 3036)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/env/EnvironmentTypeLookupTest.java 2008-11-21 15:52:02 UTC (rev 3037)
@@ -36,14 +36,14 @@
public void testApplicationTypeLookup() {
EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString(
- "<contexts>" +
- " <environment-factory>" +
+ "<jbpm-configuration>" +
+ " <process-engine>" +
" <object class='"+A.class.getName()+"' />" +
- " </environment-factory>" +
+ " </process-engine>" +
" <environment>" +
" <string name='a' value='distraction' />" +
" </environment>" +
- "</contexts>"
+ "</jbpm-configuration>"
);
Environment environment = environmentFactory.openEnvironment();
@@ -60,14 +60,14 @@
public void testBlockTypeLookup() {
EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString(
- "<contexts>" +
- " <environment-factory>" +
+ "<jbpm-configuration>" +
+ " <process-engine>" +
" <string name='a' value='distraction' />" +
- " </environment-factory>" +
+ " </process-engine>" +
" <environment>" +
" <object class='"+A.class.getName()+"' />" +
" </environment>" +
- "</contexts>"
+ "</jbpm-configuration>"
);
Environment environment = environmentFactory.openEnvironment();
@@ -84,14 +84,14 @@
public void testNonExistingTypeLookup() {
EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString(
- "<contexts>" +
- " <environment-factory>" +
+ "<jbpm-configuration>" +
+ " <process-engine>" +
" <string name='a' value='A' />" +
- " </environment-factory>" +
+ " </process-engine>" +
" <environment>" +
" <string name='b' value='B' />" +
" </environment>" +
- "</contexts>"
+ "</jbpm-configuration>"
);
Environment environment = environmentFactory.openEnvironment();
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/env/NestedEnvironmentTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/env/NestedEnvironmentTest.java 2008-11-21 15:47:43 UTC (rev 3036)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/env/NestedEnvironmentTest.java 2008-11-21 15:52:02 UTC (rev 3037)
@@ -34,14 +34,14 @@
public void testNestedEnvironments() {
EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString(
- "<contexts>" +
- " <environment-factory>" +
+ "<jbpm-configuration>" +
+ " <process-engine>" +
" <object name='a' class='"+Object.class.getName()+"' />" +
- " </environment-factory>" +
+ " </process-engine>" +
" <environment>" +
" <object name='b' class='"+Object.class.getName()+"' />" +
" </environment>" +
- "</contexts>"
+ "</jbpm-configuration>"
);
Environment environment = environmentFactory.openEnvironment();
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/expr/GroovyExpressionTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/expr/GroovyExpressionTest.java 2008-11-21 15:47:43 UTC (rev 3036)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/expr/GroovyExpressionTest.java 2008-11-21 15:52:02 UTC (rev 3037)
@@ -42,16 +42,16 @@
public void dontTestGroovyExpression() {
EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString(
- "<contexts>" +
- " <environment-factory>" +
+ "<jbpm-configuration>" +
+ " <process-engine>" +
" <script-manager default-expression-language='juel'" +
" default-script-language='juel'" +
- " read-contexts='execution, environment, environment-factory' " +
+ " read-contexts='execution, environment, process-engine' " +
" write-context='execution'>" +
" <script-language name='groovy' factory='com.sun.script.groovy.GroovyScriptEngineFactory' />" +
" </script-manager>" +
- " </environment-factory>" +
- "</contexts>"
+ " </process-engine>" +
+ "</jbpm-configuration>"
);
ScriptManager scriptManager = environmentFactory.get(ScriptManager.class);
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/expr/JuelExpressionTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/expr/JuelExpressionTest.java 2008-11-21 15:47:43 UTC (rev 3036)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/expr/JuelExpressionTest.java 2008-11-21 15:52:02 UTC (rev 3037)
@@ -38,16 +38,16 @@
public void testJuelExpression() {
EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString(
- "<contexts>" +
- " <environment-factory>" +
+ "<jbpm-configuration>" +
+ " <process-engine>" +
" <script-manager default-expression-language='juel'" +
" default-script-language='juel'" +
- " read-contexts='execution, environment, environment-factory' " +
+ " read-contexts='execution, environment, process-engine' " +
" write-context='execution'>" +
" <script-language name='juel' factory='com.sun.script.juel.JuelScriptEngineFactory' />" +
" </script-manager>" +
- " </environment-factory>" +
- "</contexts>"
+ " </process-engine>" +
+ "</jbpm-configuration>"
);
ScriptManager scriptManager = environmentFactory.get(ScriptManager.class);
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/tx/EnlistTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/tx/EnlistTest.java 2008-11-21 15:47:43 UTC (rev 3036)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/tx/EnlistTest.java 2008-11-21 15:52:02 UTC (rev 3037)
@@ -34,15 +34,15 @@
public void testEnlist() {
Environment environment = openEnvironment(
- "<contexts>" +
- " <environment-factory/>"+
+ "<jbpm-configuration>" +
+ " <process-engine/>"+
" <environment>" +
" <transaction name='tx' />" +
" <object name='o' class='"+ MyResource.class.getName()+"'>" +
" <enlist transaction='tx'/>" +
" </object>" +
" </environment>" +
- "</contexts>"
+ "</jbpm-configuration>"
);
try {
@@ -64,15 +64,15 @@
public void testEnlistRollback() {
Environment environment = openEnvironment(
- "<contexts>" +
- " <environment-factory/>"+
+ "<jbpm-configuration>" +
+ " <process-engine/>"+
" <environment>" +
" <transaction name='tx' />" +
" <object name='o' class='"+ MyResource.class.getName()+"'>" +
" <enlist transaction='tx'/>" +
" </object>" +
" </environment>" +
- "</contexts>"
+ "</jbpm-configuration>"
);
try {
@@ -94,15 +94,15 @@
public void testEnlistInOtherContext() {
Environment environment = openEnvironment(
- "<contexts>" +
- " <environment-factory/>"+
+ "<jbpm-configuration>" +
+ " <process-engine/>"+
" <environment>" +
" <transaction name='tx' />" +
" <object name='o' class='"+ MyResource.class.getName()+"'>" +
" <enlist transaction='tx'/>" +
" </object>" +
" </environment>" +
- "</contexts>"
+ "</jbpm-configuration>"
);
try {
@@ -127,15 +127,15 @@
public void testEnlistInOtherContextWithRollback() {
Environment environment = openEnvironment(
- "<contexts>" +
- " <environment-factory/>"+
+ "<jbpm-configuration>" +
+ " <process-engine/>"+
" <environment>" +
" <transaction name='tx' />" +
" <object name='o' class='"+ MyResource.class.getName()+"'>" +
" <enlist transaction='tx'/>" +
" </object>" +
" </environment>" +
- "</contexts>"
+ "</jbpm-configuration>"
);
try {
@@ -160,15 +160,15 @@
public void testEnlistNotAResource() {
Environment environment = openEnvironment(
- "<contexts>" +
- " <environment-factory/>"+
+ "<jbpm-configuration>" +
+ " <process-engine/>"+
" <environment>" +
" <transaction name='transaction' />" +
" <object name='o' class='java.lang.Object'>" +
" <enlist transaction='transaction'/>" +
" </object>" +
" </environment>" +
- "</contexts>"
+ "</jbpm-configuration>"
);
try{
@@ -184,15 +184,15 @@
public void testEnlistNotATransaction() {
Environment environment = openEnvironment(
- "<contexts>" +
- " <environment-factory/>"+
+ "<jbpm-configuration>" +
+ " <process-engine/>"+
" <environment>" +
" <object name='o' class='"+MyResource.class.getName()+"'>" +
" <enlist transaction='tx'/>" +
" </object>" +
" <object name='tx' class='java.lang.Object'/>" +
" </environment>" +
- "</contexts>"
+ "</jbpm-configuration>"
);
try{
@@ -208,12 +208,12 @@
public void testMissingTransactionName() {
Environment environment = openEnvironment(
- "<contexts>" +
- " <environment-factory/>"+
+ "<jbpm-configuration>" +
+ " <process-engine/>"+
" <environment>" +
" <transaction />" +
" </environment>" +
- "</contexts>"
+ "</jbpm-configuration>"
);
try{
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/tx/TransactionFailingCommitTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/tx/TransactionFailingCommitTest.java 2008-11-21 15:47:43 UTC (rev 3036)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/tx/TransactionFailingCommitTest.java 2008-11-21 15:52:02 UTC (rev 3037)
@@ -50,8 +50,8 @@
try {
Environment environment = openEnvironment(
- "<contexts>" +
- " <environment-factory/>"+
+ "<jbpm-configuration>" +
+ " <process-engine/>"+
" <environment>" +
" <transaction />" +
" <object name='resourceOne' class='"+TestResource.class.getName()+"'>" +
@@ -64,7 +64,7 @@
" <enlist />" +
" </object>" +
" </environment>" +
- "</contexts>"
+ "</jbpm-configuration>"
);
try {
StandardTransaction standardTransaction = environment.get(StandardTransaction.class);
@@ -122,8 +122,8 @@
try {
Environment environment = openEnvironment(
- "<contexts>" +
- " <environment-factory/>"+
+ "<jbpm-configuration>" +
+ " <process-engine/>"+
" <environment>" +
" <transaction />" +
" <object name='resourceOne' class='"+TestResource.class.getName()+"'>" +
@@ -136,7 +136,7 @@
" <enlist />" +
" </object>" +
" </environment>" +
- "</contexts>"
+ "</jbpm-configuration>"
);
try {
StandardTransaction standardTransaction = environment.get(StandardTransaction.class);
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/tx/TransactionResourcesCommitTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/tx/TransactionResourcesCommitTest.java 2008-11-21 15:47:43 UTC (rev 3036)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/tx/TransactionResourcesCommitTest.java 2008-11-21 15:52:02 UTC (rev 3037)
@@ -36,15 +36,15 @@
TestResource resourceOne = null;
Environment environment = openEnvironment(
- "<contexts>" +
- " <environment-factory/>"+
+ "<jbpm-configuration>" +
+ " <process-engine/>"+
" <environment>" +
" <transaction />" +
" <object name='resourceOne' class='"+TestResource.class.getName()+"'>" +
" <enlist />" +
" </object>" +
" </environment>" +
- "</contexts>"
+ "</jbpm-configuration>"
);
try {
StandardTransaction standardTransaction = environment.get(StandardTransaction.class);
@@ -73,8 +73,8 @@
TestResource resourceThree = null;
Environment environment = openEnvironment(
- "<contexts>" +
- " <environment-factory/>"+
+ "<jbpm-configuration>" +
+ " <process-engine/>"+
" <environment>" +
" <transaction />" +
" <object name='resourceOne' class='"+TestResource.class.getName()+"'>" +
@@ -87,7 +87,7 @@
" <enlist />" +
" </object>" +
" </environment>" +
- "</contexts>"
+ "</jbpm-configuration>"
);
try {
StandardTransaction standardTransaction = environment.get(StandardTransaction.class);
@@ -131,8 +131,8 @@
TestResource resourceTwo = null;
Environment environment = openEnvironment(
- "<contexts>" +
- " <environment-factory/>"+
+ "<jbpm-configuration>" +
+ " <process-engine/>"+
" <environment>" +
" <transaction />" +
" <object name='resourceOne' class='"+TestResource.class.getName()+"'>" +
@@ -145,7 +145,7 @@
" <enlist />" +
" </object>" +
" </environment>" +
- "</contexts>"
+ "</jbpm-configuration>"
);
try {
StandardTransaction standardTransaction = environment.get(StandardTransaction.class);
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/tx/TransactionResourcesSetRollbackOnlyTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/tx/TransactionResourcesSetRollbackOnlyTest.java 2008-11-21 15:47:43 UTC (rev 3036)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/tx/TransactionResourcesSetRollbackOnlyTest.java 2008-11-21 15:52:02 UTC (rev 3037)
@@ -37,15 +37,15 @@
TestResource resourceOne = null;
Environment environment = openEnvironment(
- "<contexts>" +
- " <environment-factory/>"+
+ "<jbpm-configuration>" +
+ " <process-engine/>"+
" <environment>" +
" <transaction />" +
" <object name='resourceOne' class='"+TestResource.class.getName()+"'>" +
" <enlist />" +
" </object>" +
" </environment>" +
- "</contexts>"
+ "</jbpm-configuration>"
);
try {
StandardTransaction standardTransaction = environment.get(StandardTransaction.class);
@@ -76,8 +76,8 @@
TestResource resourceThree = null;
Environment environment = openEnvironment(
- "<contexts>" +
- " <environment-factory/>"+
+ "<jbpm-configuration>" +
+ " <process-engine/>"+
" <environment>" +
" <transaction />" +
" <object name='resourceOne' class='"+TestResource.class.getName()+"'>" +
@@ -90,7 +90,7 @@
" <enlist />" +
" </object>" +
" </environment>" +
- "</contexts>"
+ "</jbpm-configuration>"
);
try {
StandardTransaction standardTransaction = environment.get(StandardTransaction.class);
@@ -136,8 +136,8 @@
TestResource resourceTwo = null;
Environment environment = openEnvironment(
- "<contexts>" +
- " <environment-factory/>"+
+ "<jbpm-configuration>" +
+ " <process-engine/>"+
" <environment>" +
" <transaction />" +
" <object name='resourceOne' class='"+TestResource.class.getName()+"'>" +
@@ -150,7 +150,7 @@
" <enlist />" +
" </object>" +
" </environment>" +
- "</contexts>"
+ "</jbpm-configuration>"
);
try {
StandardTransaction standardTransaction = environment.get(StandardTransaction.class);
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/ContextBlockSubscriptionTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/ContextBlockSubscriptionTest.java 2008-11-21 15:47:43 UTC (rev 3036)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/ContextBlockSubscriptionTest.java 2008-11-21 15:52:02 UTC (rev 3037)
@@ -77,14 +77,14 @@
// In this test, there is no eager initialization
EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString(
- "<contexts>" +
- " <environment-factory />" +
+ "<jbpm-configuration>" +
+ " <process-engine />" +
" <environment>" +
" <object name='recorder' class='"+Recorder.class.getName()+"'>" +
" <subscribe />" +
" </object>" +
" </environment>" +
- "</contexts>"
+ "</jbpm-configuration>"
);
Environment environment = environmentFactory.openEnvironment();
@@ -127,14 +127,14 @@
// In this test, there is eager initialisation
EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString(
- "<contexts>" +
- " <environment-factory />" +
+ "<jbpm-configuration>" +
+ " <process-engine />" +
" <environment>" +
" <object name='recorder' class='"+Recorder.class.getName()+"' init='eager'>" +
" <subscribe />" +
" </object>" +
" </environment>" +
- "</contexts>"
+ "</jbpm-configuration>"
);
Environment environment = environmentFactory.openEnvironment();
@@ -161,15 +161,15 @@
// In this test, there is eager initialisation
EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString(
- "<contexts>" +
- " <environment-factory />" +
+ "<jbpm-configuration>" +
+ " <process-engine />" +
" <environment>" +
" <object name='recorder' class='"+Recorder.class.getName()+"' init='eager'>" +
" <subscribe />" +
" </object>" +
" <object name='o' class='"+Object.class.getName()+"' />" +
" </environment>" +
- "</contexts>"
+ "</jbpm-configuration>"
);
Environment environment = environmentFactory.openEnvironment();
@@ -202,14 +202,14 @@
// In this test, there is eager initialisation
EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString(
- "<contexts>" +
- " <environment-factory />" +
+ "<jbpm-configuration>" +
+ " <process-engine />" +
" <environment>" +
" <object name='recorder' class='"+Recorder.class.getName()+"' init='eager'>" +
" <subscribe event='interestingevent'/>" +
" </object>" +
" </environment>" +
- "</contexts>"
+ "</jbpm-configuration>"
);
Environment environment = environmentFactory.openEnvironment();
@@ -238,14 +238,14 @@
// In this test, there is eager initialisation
EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString(
- "<contexts>" +
- " <environment-factory />" +
+ "<jbpm-configuration>" +
+ " <process-engine />" +
" <environment>" +
" <object name='recorder' class='"+Recorder.class.getName()+"' init='eager'>" +
" <subscribe events='constructing, open, constructed, interestingevent, close'/>" +
" </object>" +
" </environment>" +
- "</contexts>"
+ "</jbpm-configuration>"
);
Environment environment = environmentFactory.openEnvironment();
@@ -285,15 +285,15 @@
// In this test, there is eager initialisation
EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString(
- "<contexts>" +
- " <environment-factory />" +
+ "<jbpm-configuration>" +
+ " <process-engine />" +
" <environment>" +
" <object name='recorder' class='"+Recorder.class.getName()+"' init='eager'>" +
" <subscribe events='constructing, open, constructed, interestingevent, close'/>" +
" </object>" +
" <object name='o' class='"+Object.class.getName()+"' />" +
" </environment>" +
- "</contexts>"
+ "</jbpm-configuration>"
);
Environment environment = environmentFactory.openEnvironment();
@@ -321,17 +321,17 @@
public void testOtherWireScope() {
EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString(
- "<contexts>" +
- " <environment-factory>" +
+ "<jbpm-configuration>" +
+ " <process-engine>" +
" <object name='factory' class='"+Object.class.getName()+"' />" +
- " </environment-factory>" +
+ " </process-engine>" +
" <environment>" +
" <object name='recorder' class='"+Recorder.class.getName()+"' init='eager'>" +
- " <subscribe context='environment-factory'/>" +
+ " <subscribe context='process-engine'/>" +
" </object>" +
" <object name='product' factory='factory' method='getClass' />" +
" </environment>" +
- "</contexts>"
+ "</jbpm-configuration>"
);
int index=0;
@@ -371,17 +371,17 @@
public void testOtherWireScopeWithEventFiltering() {
EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString(
- "<contexts>" +
- " <environment-factory>" +
+ "<jbpm-configuration>" +
+ " <process-engine>" +
" <object name='factory' class='"+Object.class.getName()+"' />" +
- " </environment-factory>" +
+ " </process-engine>" +
" <environment>" +
" <object name='recorder' class='"+Recorder.class.getName()+"' init='eager'>" +
- " <subscribe context='environment-factory' events='initializing' />" +
+ " <subscribe context='process-engine' events='initializing' />" +
" </object>" +
" <object name='product' factory='factory' method='getClass' />" +
" </environment>" +
- "</contexts>"
+ "</jbpm-configuration>"
);
int index=0;
@@ -409,14 +409,14 @@
public void testUnexistingScope() {
EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString(
- "<contexts>" +
- " <environment-factory />" +
+ "<jbpm-configuration>" +
+ " <process-engine />" +
" <environment>" +
" <object name='recorder' class='"+Recorder.class.getName()+"' init='eager'>" +
" <subscribe context='unexistingcontext' />" +
" </object>" +
" </environment>" +
- "</contexts>"
+ "</jbpm-configuration>"
);
assertNull(Environment.getCurrent());
@@ -438,8 +438,8 @@
// In this test, there is no eager initialization
EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString(
- "<contexts>" +
- " <environment-factory />" +
+ "<jbpm-configuration>" +
+ " <process-engine />" +
" <environment>" +
" <object name='a' class='"+A.class.getName()+"'>" +
" <field name='o'>" +
@@ -449,7 +449,7 @@
" </field>" +
" </object>"+
" </environment>" +
- "</contexts>"
+ "</jbpm-configuration>"
);
Environment environment = environmentFactory.openEnvironment();
@@ -497,8 +497,8 @@
// In this test, there is no eager initialization
EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString(
- "<contexts>" +
- " <environment-factory />" +
+ "<jbpm-configuration>" +
+ " <process-engine />" +
" <environment>" +
" <object name='a' class='"+A.class.getName()+"'>" +
" <field name='o'>" +
@@ -512,7 +512,7 @@
" </field>" +
" </object>"+
" </environment>" +
- "</contexts>"
+ "</jbpm-configuration>"
);
Environment environment = environmentFactory.openEnvironment();
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/EnvWireTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/EnvWireTest.java 2008-11-21 15:47:43 UTC (rev 3036)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/EnvWireTest.java 2008-11-21 15:52:02 UTC (rev 3037)
@@ -14,7 +14,7 @@
public void testEnvironmentWire(){
EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString(
"<environment-scopes>" +
- " <environment-factory />" +
+ " <process-engine />" +
" <environment>" +
" <environment-ref name='e' />" +
" </environment>" +
@@ -38,9 +38,9 @@
public void testEnvironmentFactoryWire(){
EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString(
"<environment-scopes>" +
- " <environment-factory />" +
+ " <process-engine />" +
" <environment>" +
- " <environment-factory-ref name='f' />" +
+ " <process-engine-ref name='f' />" +
" </environment>" +
"</environment-scopes>"
);
@@ -61,7 +61,7 @@
public void testContextRefEnvironmentWire(){
EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString(
"<environment-scopes>" +
- " <environment-factory />" +
+ " <process-engine />" +
" <environment>" +
" <context-ref name='c' />" +
" </environment>" +
@@ -85,9 +85,9 @@
public void testContextRefEnvironmentFactoryWire(){
EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString(
"<environment-scopes>" +
- " <environment-factory>" +
+ " <process-engine>" +
" <context-ref name='c' />" +
- " </environment-factory>" +
+ " </process-engine>" +
" <environment/>" +
"</environment-scopes>"
);
@@ -99,7 +99,7 @@
assertNotNull(c);
assertEquals(WireContext.class, c.getClass());
- assertEquals(environment.getContext("environment-factory"), c);
+ assertEquals(environment.getContext("process-engine"), c);
} finally {
environment.close();
}
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/MethodSubscriptionTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/MethodSubscriptionTest.java 2008-11-21 15:47:43 UTC (rev 3036)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/MethodSubscriptionTest.java 2008-11-21 15:52:02 UTC (rev 3037)
@@ -46,7 +46,7 @@
public void testMethodWithNoArg() {
EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString(
"<environment-scopes>" +
- " <environment-factory />" +
+ " <process-engine />" +
" <environment>" +
" <object name='l' class='"+NonListenerRecorder.class.getName()+"' init='eager'>" +
" <subscribe object='a' method='logEvent' />" +
@@ -88,7 +88,7 @@
public void testMethodWithBadName() {
EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString(
"<environment-scopes>" +
- " <environment-factory />" +
+ " <process-engine />" +
" <environment>" +
" <object name='l' class='"+NonListenerRecorder.class.getName()+"' init='eager'>" +
" <subscribe object='a' method='i-am-not-a-method' />" +
@@ -125,7 +125,7 @@
public void testMethodWithOneArg() {
EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString(
"<environment-scopes>" +
- " <environment-factory />" +
+ " <process-engine />" +
" <environment>" +
" <object name='l' class='"+NonListenerRecorder.class.getName()+"' init='eager'>" +
" <subscribe object='a' method='logEvent' >" +
@@ -172,7 +172,7 @@
public void testMethodWithTwoArgs() {
EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString(
"<environment-scopes>" +
- " <environment-factory />" +
+ " <process-engine />" +
" <environment>" +
" <object name='l' class='"+NonListenerRecorder.class.getName()+"' init='eager'>" +
" <subscribe object='a' method='logEvent' event='ping'>" +
@@ -232,7 +232,7 @@
public void testMethodWithThreeArgs() {
EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString(
"<environment-scopes>" +
- " <environment-factory />" +
+ " <process-engine />" +
" <environment>" +
" <object name='l' class='"+NonListenerRecorder.class.getName()+"' init='eager'>" +
" <subscribe object='a' method='logEvent'>" +
@@ -284,7 +284,7 @@
public void testMethodWithArgsAndMultipleObjectsSubcription() {
EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString(
"<environment-scopes>" +
- " <environment-factory />" +
+ " <process-engine />" +
" <environment>" +
" <object name='l' class='"+NonListenerRecorder.class.getName()+"' init='eager'>" +
" <subscribe object='a' method='logEvent' >" +
@@ -375,7 +375,7 @@
public void testMethodAndOverLoading() {
EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString(
"<environment-scopes>" +
- " <environment-factory />" +
+ " <process-engine />" +
" <environment>" +
" <object name='l' class='"+OverloadingRecorder.class.getName()+"' init='eager'>" +
" <subscribe object='a' method='logEvent' >" +
@@ -430,7 +430,7 @@
public void testMethodAndBadArg() {
EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString(
"<environment-scopes>" +
- " <environment-factory />" +
+ " <process-engine />" +
" <environment>" +
" <object name='l' class='"+OverloadingRecorder.class.getName()+"' init='eager'>" +
" <subscribe object='a' method='logEvent' >" +
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/ObjectSubscriptionTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/ObjectSubscriptionTest.java 2008-11-21 15:47:43 UTC (rev 3036)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/ObjectSubscriptionTest.java 2008-11-21 15:52:02 UTC (rev 3037)
@@ -40,7 +40,7 @@
EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString(
"<environment-scopes>" +
- " <environment-factory />" +
+ " <process-engine />" +
" <environment>" +
" <object name='recorder' class='"+Recorder.class.getName()+"'>" +
" <subscribe object='o' />" +
@@ -82,7 +82,7 @@
EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString(
"<environment-scopes>" +
- " <environment-factory />" +
+ " <process-engine />" +
" <environment>" +
" <object name='recorder' class='"+Recorder.class.getName()+"' init='eager'>" +
" <subscribe object='o' />" +
@@ -128,7 +128,7 @@
EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString(
"<environment-scopes>" +
- " <environment-factory />" +
+ " <process-engine />" +
" <environment>" +
" <object name='recorder' class='"+Recorder.class.getName()+"' init='eager'>" +
" <subscribe objects='newsletter, blog, newspaper' />" +
@@ -195,7 +195,7 @@
public void testUnexistingObject() {
EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString(
"<environment-scopes>" +
- " <environment-factory />" +
+ " <process-engine />" +
" <environment>" +
" <object name='recorder' class='"+Recorder.class.getName()+"' init='eager'>" +
" <subscribe object='unexistingobject' />" +
@@ -218,7 +218,7 @@
EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString(
"<environment-scopes>" +
- " <environment-factory />" +
+ " <process-engine />" +
" <environment>" +
" <object name='recorder' class='"+Recorder.class.getName()+"' init='eager'>" +
" <subscribe object='o' events='ping, pong' />" +
@@ -268,7 +268,7 @@
public void testNotObservableObject() {
EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString(
"<environment-scopes>" +
- " <environment-factory />" +
+ " <process-engine />" +
" <environment>" +
" <object name='recorder' class='"+Recorder.class.getName()+"' init='eager'>" +
" <subscribe object='o' />" +
@@ -290,7 +290,7 @@
public void testNotListener() {
EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString(
"<environment-scopes>" +
- " <environment-factory />" +
+ " <process-engine />" +
" <environment>" +
" <object name='recorder' class='java.lang.Object' init='eager'>" +
" <subscribe object='o' />" +
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/WireEventsSubscriptionTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/WireEventsSubscriptionTest.java 2008-11-21 15:47:43 UTC (rev 3036)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/WireEventsSubscriptionTest.java 2008-11-21 15:52:02 UTC (rev 3037)
@@ -42,7 +42,7 @@
public void testRegisterToAllDescriptors() {
EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString(
"<environment-scopes>" +
- " <environment-factory />" +
+ " <process-engine />" +
" <environment>" +
" <object name='recorder' class='"+Recorder.class.getName()+"'>" +
// If no object(s) are specified, the subscriber will be informed of
@@ -84,7 +84,7 @@
public void testOneObjectDescriptor() {
EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString(
"<environment-scopes>" +
- " <environment-factory />" +
+ " <process-engine />" +
" <environment>" +
" <object name='recorder' class='"+Recorder.class.getName()+"' init='eager'>" +
// only subscribe to wire-events of object o, which means that recorder will
@@ -141,7 +141,7 @@
public void testMultipleObjectDescriptors() {
EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString(
"<environment-scopes>" +
- " <environment-factory />" +
+ " <process-engine />" +
" <environment>" +
" <object name='recorder' class='"+Recorder.class.getName()+"' init='eager'>" +
// record all wire events coming from the descriptors of objects o and p
@@ -217,7 +217,7 @@
public void testOneObjectDescriptorWithEventFilter() {
EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString(
"<environment-scopes>" +
- " <environment-factory />" +
+ " <process-engine />" +
" <environment>" +
" <object name='recorder' class='"+Recorder.class.getName()+"' init='eager'>" +
// record only 'initializing' wire events produced by the descriptor of object o.
@@ -258,7 +258,7 @@
public void testMultipleObjectDescriptorsWithEventFilter() {
EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString(
"<environment-scopes>" +
- " <environment-factory />" +
+ " <process-engine />" +
" <environment>" +
" <object name='recorder' class='"+Recorder.class.getName()+"' init='eager'>" +
// record 'constructing' and 'constructed' events fired by descriptors for objects o and p
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/WireObservableTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/WireObservableTest.java 2008-11-21 15:47:43 UTC (rev 3036)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/WireObservableTest.java 2008-11-21 15:52:02 UTC (rev 3037)
@@ -48,7 +48,7 @@
EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString(
"<environment-scopes>" +
- " <environment-factory />" +
+ " <process-engine />" +
" <environment>" +
" <object name='recorder' class='"+Recorder.class.getName()+"'>" +
" <subscribe />" +
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/samples/ex13/EnvironmentTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/samples/ex13/EnvironmentTest.java 2008-11-21 15:47:43 UTC (rev 3036)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/samples/ex13/EnvironmentTest.java 2008-11-21 15:52:02 UTC (rev 3037)
@@ -33,11 +33,11 @@
public class EnvironmentTest extends TestCase {
static EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString(
- "<contexts>" +
- " <environment-factory>" +
+ "<jbpm-configuration>" +
+ " <process-engine>" +
" <object name='book' class='org.jbpm.pvm.samples.ex13.Book' />" +
- " </environment-factory>" +
- "</contexts>"
+ " </process-engine>" +
+ "</jbpm-configuration>"
);
public void testEnvironment() {
Modified: jbpm4/trunk/modules/pvm/src/test/resources/environment.cfg.xml
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/resources/environment.cfg.xml 2008-11-21 15:47:43 UTC (rev 3036)
+++ jbpm4/trunk/modules/pvm/src/test/resources/environment.cfg.xml 2008-11-21 15:52:02 UTC (rev 3037)
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<contexts xmlns="http://jbpm.org/pvm/1.0/wire">
+<jbpm-configuration xmlns="http://jbpm.org/xsd/cfg">
- <environment-factory>
+ <process-engine>
<deployer-manager>
<language name="api">
@@ -46,7 +46,7 @@
<holiday period="01/07/2008 - 31/08/2008"/>
</business-calendar>
- </environment-factory>
+ </process-engine>
<environment>
<hibernate-session />
@@ -57,4 +57,4 @@
<timer-session />
</environment>
-</contexts>
+</jbpm-configuration>
Modified: jbpm4/trunk/modules/pvm/src/test/resources/org/jbpm/pvm/api/db/continuation/ContinuationTest.cfg.xml
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/resources/org/jbpm/pvm/api/db/continuation/ContinuationTest.cfg.xml 2008-11-21 15:47:43 UTC (rev 3036)
+++ jbpm4/trunk/modules/pvm/src/test/resources/org/jbpm/pvm/api/db/continuation/ContinuationTest.cfg.xml 2008-11-21 15:52:02 UTC (rev 3037)
@@ -1,6 +1,6 @@
-<contexts>
+<jbpm-configuration>
- <environment-factory>
+ <process-engine>
<object class="org.jbpm.pvm.internal.hibernate.PvmNamingStrategy" auto-wire="true" />
@@ -21,7 +21,7 @@
<transaction-interceptor />
</command-service>
- </environment-factory>
+ </process-engine>
<environment>
@@ -34,4 +34,4 @@
</environment>
-</contexts>
+</jbpm-configuration>
Modified: jbpm4/trunk/modules/pvm/src/test/resources/org/jbpm/pvm/api/db/svc/environment.cfg.xml
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/resources/org/jbpm/pvm/api/db/svc/environment.cfg.xml 2008-11-21 15:47:43 UTC (rev 3036)
+++ jbpm4/trunk/modules/pvm/src/test/resources/org/jbpm/pvm/api/db/svc/environment.cfg.xml 2008-11-21 15:52:02 UTC (rev 3037)
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<contexts xmlns="http://jbpm.org/pvm/1.0/wire">
+<jbpm-configuration xmlns="http://jbpm.org/xsd/cfg">
- <environment-factory>
+ <process-engine>
<deployer-manager resource="pvm.language.deployers.xml">
<language name="api">
@@ -29,7 +29,7 @@
</hibernate-configuration>
<hibernate-session-factory />
<variable-types resource="org/jbpm/pvm/pvm.types.xml" />
- </environment-factory>
+ </process-engine>
<environment>
<transaction />
@@ -37,4 +37,4 @@
<pvm-db-session />
</environment>
-</contexts>
+</jbpm-configuration>
Modified: jbpm4/trunk/modules/pvm/src/test/resources/org/jbpm/pvm/api/timer/environment.cfg.xml
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/resources/org/jbpm/pvm/api/timer/environment.cfg.xml 2008-11-21 15:47:43 UTC (rev 3036)
+++ jbpm4/trunk/modules/pvm/src/test/resources/org/jbpm/pvm/api/timer/environment.cfg.xml 2008-11-21 15:52:02 UTC (rev 3037)
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<contexts xmlns="http://jbpm.org/pvm/1.0/wire">
+<jbpm-configuration xmlns="http://jbpm.org/xsd/cfg">
- <environment-factory>
+ <process-engine>
<job-test-helper />
@@ -42,7 +42,7 @@
<holiday period="01/07/2008 - 31/08/2008"/>
</business-calendar>
- </environment-factory>
+ </process-engine>
<environment>
<transaction />
@@ -52,4 +52,4 @@
<timer-session target="test" />
</environment>
-</contexts>
+</jbpm-configuration>
Modified: jbpm4/trunk/modules/pvm/src/test/resources/org/jbpm/pvm/environment.cfg.xml
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/resources/org/jbpm/pvm/environment.cfg.xml 2008-11-21 15:47:43 UTC (rev 3036)
+++ jbpm4/trunk/modules/pvm/src/test/resources/org/jbpm/pvm/environment.cfg.xml 2008-11-21 15:52:02 UTC (rev 3037)
@@ -1,10 +1,10 @@
-<contexts>
+<jbpm-configuration>
- <environment-factory>
+ <process-engine>
<variable-types resource="org/jbpm/pvm/pvm.types.xml" />
- </environment-factory>
+ </process-engine>
<environment>
</environment>
-</contexts>
+</jbpm-configuration>
Modified: jbpm4/trunk/modules/pvm/src/test/resources/org/jbpm/pvm/internal/db/langext/environment.cfg.xml
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/resources/org/jbpm/pvm/internal/db/langext/environment.cfg.xml 2008-11-21 15:47:43 UTC (rev 3036)
+++ jbpm4/trunk/modules/pvm/src/test/resources/org/jbpm/pvm/internal/db/langext/environment.cfg.xml 2008-11-21 15:52:02 UTC (rev 3037)
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<contexts xmlns="http://jbpm.org/pvm/1.0/wire">
+<jbpm-configuration xmlns="http://jbpm.org/xsd/cfg">
- <environment-factory>
+ <process-engine>
<deployer-manager resource="pvm.language.deployers.xml">
<language name="api">
@@ -33,7 +33,7 @@
<variable-types resource="org/jbpm/pvm/pvm.types.xml" />
- </environment-factory>
+ </process-engine>
<environment>
<hibernate-session />
@@ -42,4 +42,4 @@
<object class="org.jbpm.pvm.internal.db.langext.AddressSession" />
</environment>
-</contexts>
+</jbpm-configuration>
Modified: jbpm4/trunk/modules/pvm/src/test/resources/org/jbpm/pvm/internal/db/model/environment.cfg.xml
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/resources/org/jbpm/pvm/internal/db/model/environment.cfg.xml 2008-11-21 15:47:43 UTC (rev 3036)
+++ jbpm4/trunk/modules/pvm/src/test/resources/org/jbpm/pvm/internal/db/model/environment.cfg.xml 2008-11-21 15:52:02 UTC (rev 3037)
@@ -1,6 +1,6 @@
-<contexts>
+<jbpm-configuration>
- <environment-factory>
+ <process-engine>
<hibernate-configuration>
<properties resource="hibernate.properties" />
@@ -11,7 +11,7 @@
<hibernate-session-factory />
<variable-types resource="org/jbpm/pvm/pvm.types.xml" />
- </environment-factory>
+ </process-engine>
<environment>
@@ -21,4 +21,4 @@
</environment>
-</contexts>
+</jbpm-configuration>
Modified: jbpm4/trunk/modules/pvm/src/test/resources/org/jbpm/pvm/internal/db/type/environmentCustomTypes.cfg.xml
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/resources/org/jbpm/pvm/internal/db/type/environmentCustomTypes.cfg.xml 2008-11-21 15:47:43 UTC (rev 3036)
+++ jbpm4/trunk/modules/pvm/src/test/resources/org/jbpm/pvm/internal/db/type/environmentCustomTypes.cfg.xml 2008-11-21 15:52:02 UTC (rev 3037)
@@ -1,6 +1,6 @@
-<contexts>
+<jbpm-configuration>
- <environment-factory>
+ <process-engine>
<hibernate-configuration>
<properties resource="hibernate.properties" />
@@ -12,7 +12,7 @@
<variable-types>
<type name="date" class="java.util.Date" variable-class="org.jbpm.pvm.internal.type.variable.DateVariable" />
</variable-types>
- </environment-factory>
+ </process-engine>
<environment>
@@ -22,4 +22,4 @@
</environment>
-</contexts>
+</jbpm-configuration>
Modified: jbpm4/trunk/modules/pvm/src/test/resources/org/jbpm/pvm/internal/jobexecutor/environment.cfg.xml
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/resources/org/jbpm/pvm/internal/jobexecutor/environment.cfg.xml 2008-11-21 15:47:43 UTC (rev 3036)
+++ jbpm4/trunk/modules/pvm/src/test/resources/org/jbpm/pvm/internal/jobexecutor/environment.cfg.xml 2008-11-21 15:52:02 UTC (rev 3037)
@@ -1,6 +1,6 @@
-<contexts>
+<jbpm-configuration>
- <environment-factory>
+ <process-engine>
<job-executor threads="1" auto-start="false" />
@@ -27,7 +27,7 @@
<!-- used in JobExecutorTimerSessionTest -->
<map name="timerVariables" synchronized="true" />
- </environment-factory>
+ </process-engine>
<environment>
@@ -40,4 +40,4 @@
<timer-session />
</environment>
-</contexts>
+</jbpm-configuration>
Modified: jbpm4/trunk/modules/pvm/src/test/resources/org/jbpm/pvm/internal/type/environment.cfg.xml
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/resources/org/jbpm/pvm/internal/type/environment.cfg.xml 2008-11-21 15:47:43 UTC (rev 3036)
+++ jbpm4/trunk/modules/pvm/src/test/resources/org/jbpm/pvm/internal/type/environment.cfg.xml 2008-11-21 15:52:02 UTC (rev 3037)
@@ -1,10 +1,10 @@
-<contexts>
+<jbpm-configuration>
- <environment-factory>
+ <process-engine>
<variable-types resource="org/jbpm/pvm/pvm.types.xml" />
- </environment-factory>
+ </process-engine>
<environment>
</environment>
-</contexts>
+</jbpm-configuration>
Modified: jbpm4/trunk/modules/pvm/src/test/resources/org/jbpm/pvm/internal/xml/schematest.xml
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/resources/org/jbpm/pvm/internal/xml/schematest.xml 2008-11-21 15:47:43 UTC (rev 3036)
+++ jbpm4/trunk/modules/pvm/src/test/resources/org/jbpm/pvm/internal/xml/schematest.xml 2008-11-21 15:52:02 UTC (rev 3037)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<object xmlns="http://jbpm.org/pvm/1.0/wire">
+<object xmlns="http://jbpm.org/xsd/cfg">
<constructor>
<arg/>
Modified: jbpm4/trunk/modules/pvm/src/test/resources/org/jbpm/xml/schematest.xml
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/resources/org/jbpm/xml/schematest.xml 2008-11-21 15:47:43 UTC (rev 3036)
+++ jbpm4/trunk/modules/pvm/src/test/resources/org/jbpm/xml/schematest.xml 2008-11-21 15:52:02 UTC (rev 3037)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<object xmlns="http://jbpm.org/pvm/1.0/wire">
+<object xmlns="http://jbpm.org/xsd/cfg">
<constructor>
<arg/>
Modified: jbpm4/trunk/modules/task/src/test/resources/environment.cfg.xml
===================================================================
--- jbpm4/trunk/modules/task/src/test/resources/environment.cfg.xml 2008-11-21 15:47:43 UTC (rev 3036)
+++ jbpm4/trunk/modules/task/src/test/resources/environment.cfg.xml 2008-11-21 15:52:02 UTC (rev 3037)
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<contexts xmlns="http://jbpm.org/pvm/1.0/wire">
+<jbpm-configuration xmlns="http://jbpm.org/xsd/cfg">
- <environment-factory>
+ <process-engine>
<deployer-manager>
<language name="api">
@@ -46,7 +46,7 @@
<holiday period="01/07/2008 - 31/08/2008"/>
</business-calendar>
- </environment-factory>
+ </process-engine>
<environment>
<hibernate-session />
@@ -57,4 +57,4 @@
<timer-session />
</environment>
-</contexts>
+</jbpm-configuration>
Modified: jbpm4/trunk/modules/task/src/test/resources/jbpm.cfg.xml
===================================================================
--- jbpm4/trunk/modules/task/src/test/resources/jbpm.cfg.xml 2008-11-21 15:47:43 UTC (rev 3036)
+++ jbpm4/trunk/modules/task/src/test/resources/jbpm.cfg.xml 2008-11-21 15:52:02 UTC (rev 3037)
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<contexts xmlns="http://jbpm.org/pvm/1.0/wire">
+<jbpm-configuration xmlns="http://jbpm.org/xsd/cfg">
- <environment-factory>
+ <process-engine>
<deployer-manager>
<language name="api">
@@ -46,7 +46,7 @@
<holiday period="01/07/2008 - 31/08/2008"/>
</business-calendar>
- </environment-factory>
+ </process-engine>
<environment>
<hibernate-session />
@@ -57,4 +57,4 @@
<timer-session />
</environment>
-</contexts>
+</jbpm-configuration>
Modified: jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/Db.java
===================================================================
--- jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/Db.java 2008-11-21 15:47:43 UTC (rev 3036)
+++ jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/Db.java 2008-11-21 15:52:02 UTC (rev 3037)
@@ -123,7 +123,7 @@
Session session = sessionFactory.openSession();
try {
for (String query : cleanSql) {
- log.trace(query);
+ // log.trace(query);
session.createSQLQuery(query).executeUpdate();
}
} finally {
Modified: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/basicfeatures/ConfigurationTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/basicfeatures/ConfigurationTest.java 2008-11-21 15:47:43 UTC (rev 3036)
+++ jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/basicfeatures/ConfigurationTest.java 2008-11-21 15:52:02 UTC (rev 3037)
@@ -30,9 +30,22 @@
*/
public class ConfigurationTest extends JbpmTestCase {
+ public void testDefaultConfiguration() {
+ ProcessEngine processEngine = new Configuration()
+ .buildProcessEngine();
+ assertNotNull(processEngine);
+ }
+
+ public void testResourceConfiguration() {
+ ProcessEngine processEngine = new Configuration()
+ .setResource("my-jbpm-configuration.cfg.xml")
+ .buildProcessEngine();
+ assertNotNull(processEngine);
+ }
+
public void testMinimalConfiguration() {
ProcessEngine processEngine = new Configuration()
- .setXmlString("<configuration />")
+ .setXmlString("<jbpm-configuration />")
.buildProcessEngine();
assertNotNull(processEngine);
}
@@ -40,13 +53,13 @@
public void testConfigurationServices() {
ProcessEngine processEngine = new Configuration()
.setXmlString(
- "<configuration>" +
- " <environment-factory>" +
+ "<jbpm-configuration>" +
+ " <process-engine>" +
" <process-service />" +
" <execution-service />" +
" <management-service />" +
- " </environment-factory>" +
- "</configuration>"
+ " </process-engine>" +
+ "</jbpm-configuration>"
)
.buildProcessEngine();
assertNotNull(processEngine);
Modified: jbpm4/trunk/modules/test-db/src/test/resources/jbpm.cfg.xml
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/resources/jbpm.cfg.xml 2008-11-21 15:47:43 UTC (rev 3036)
+++ jbpm4/trunk/modules/test-db/src/test/resources/jbpm.cfg.xml 2008-11-21 15:52:02 UTC (rev 3037)
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<contexts xmlns="http://jbpm.org/pvm/1.0/wire">
+<jbpm-configuration xmlns="http://jbpm.org/xsd/cfg">
- <environment-factory>
+ <process-engine>
<deployer-manager>
<language name="jpdl">
@@ -53,7 +53,7 @@
<holiday period="01/07/2008 - 31/08/2008"/>
</business-calendar>
- </environment-factory>
+ </process-engine>
<environment>
<hibernate-session />
@@ -64,4 +64,4 @@
<timer-session />
</environment>
-</contexts>
+</jbpm-configuration>
Property changes on: jbpm4/trunk/modules/userguide
___________________________________________________________________
Name: svn:ignore
+ target
Modified: jbpm4/trunk/pom.xml
===================================================================
--- jbpm4/trunk/pom.xml 2008-11-21 15:47:43 UTC (rev 3036)
+++ jbpm4/trunk/pom.xml 2008-11-21 15:52:02 UTC (rev 3037)
@@ -34,15 +34,16 @@
<!-- Modules -->
<modules>
<module>modules/api</module>
+ <module>modules/devguide</module>
<module>modules/jpdl</module>
<module>modules/log</module>
- <module>modules/manual</module>
<module>modules/pvm</module>
<module>modules/task</module>
<module>modules/test-base</module>
<module>modules/test-db</module>
<module>modules/test-load</module>
<module>modules/test-pojo</module>
+ <module>modules/userguide</module>
</modules>
<!-- Properties -->
17 years, 5 months
JBoss JBPM SVN: r3036 - in jbpm4/trunk/modules: userguide and 1 other directory.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2008-11-21 10:47:43 -0500 (Fri, 21 Nov 2008)
New Revision: 3036
Added:
jbpm4/trunk/modules/userguide/
jbpm4/trunk/modules/userguide/pom.xml
Log:
adding userguide
Added: jbpm4/trunk/modules/userguide/pom.xml
===================================================================
--- jbpm4/trunk/modules/userguide/pom.xml (rev 0)
+++ jbpm4/trunk/modules/userguide/pom.xml 2008-11-21 15:47:43 UTC (rev 3036)
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+ <!-- ====================================================================== -->
+ <!-- -->
+ <!-- JBoss, the OpenSource J2EE webOS -->
+ <!-- -->
+ <!-- Distributable under LGPL license. -->
+ <!-- See terms of license at http://www.gnu.org. -->
+ <!-- -->
+ <!-- ====================================================================== -->
+
+ <!-- $Id: pom.xml 2693 2008-10-31 09:12:32Z tom.baeyens(a)jboss.com $ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <name>jBPM 4 - User Guide</name>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-userguide</artifactId>
+ <packaging>pom</packaging>
+
+ <!-- Parent -->
+ <parent>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+
+ <dependencies>
+ <!--
+ <dependency>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-pvm</artifactId>
+ <version>${version}</version>
+ </dependency>
+ -->
+ </dependencies>
+
+ <build>
+ <!-- ### PLUGINS ###################################################### -->
+ <plugins>
+
+ <plugin>
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifactId>maven-jdocbook-plugin</artifactId>
+ <version>2.1.2</version>
+ <extensions>true</extensions>
+
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>resources</goal>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ </executions>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jbossorg-docbook-xslt</artifactId>
+ <version>1.1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>docbook-style</artifactId>
+ <version>1.0.0</version>
+ <type>jdocbook-style</type>
+ </dependency>
+ </dependencies>
+
+ <configuration>
+ <sourceDocumentName>master.xml</sourceDocumentName>
+ <masterTranslation>en</masterTranslation>
+ <imageResource>
+ <directory>${basedir}/src/main/docbook/en</directory>
+ <includes>
+ <include>images/*.png</include>
+ </includes>
+ </imageResource>
+ <formats>
+ <format>
+ <formatName>html_single</formatName>
+ <stylesheetResource>classpath:/xslt/org/jboss/xhtml-single.xsl</stylesheetResource>
+ <finalName>index.html</finalName>
+ </format>
+ </formats>
+ </configuration>
+
+ </plugin>
+
+ </plugins>
+ </build>
+
+</project>
\ No newline at end of file
17 years, 5 months