JBoss JBPM SVN: r5344 - jbpm3/trunk/modules/core/src/main/java/org/jbpm/graph/def.
by do-not-reply@jboss.org
Author: camunda
Date: 2009-07-24 02:17:41 -0400 (Fri, 24 Jul 2009)
New Revision: 5344
Modified:
jbpm3/trunk/modules/core/src/main/java/org/jbpm/graph/def/GraphElement.java
Log:
JBPM-1775: fixed check if exception can be rolled back to work in JTA environment
Modified: jbpm3/trunk/modules/core/src/main/java/org/jbpm/graph/def/GraphElement.java
===================================================================
--- jbpm3/trunk/modules/core/src/main/java/org/jbpm/graph/def/GraphElement.java 2009-07-23 19:40:58 UTC (rev 5343)
+++ jbpm3/trunk/modules/core/src/main/java/org/jbpm/graph/def/GraphElement.java 2009-07-24 06:17:41 UTC (rev 5344)
@@ -414,7 +414,7 @@
Service service = services.getPersistenceService();
if (service instanceof DbPersistenceService) {
DbPersistenceService persistenceService = (DbPersistenceService) service;
- return persistenceService.isTransactionActive() || persistenceService.getTransaction() == null;
+ return persistenceService.getTransaction() != null && persistenceService.isTransactionActive();
}
}
}
15 years, 3 months
JBoss JBPM SVN: r5343 - in projects/demos/richfaces-spring-jbpm4/trunk: src/main and 3 other directories.
by do-not-reply@jboss.org
Author: ainze
Date: 2009-07-23 15:40:58 -0400 (Thu, 23 Jul 2009)
New Revision: 5343
Added:
projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/demo/v12/
projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/demo/v12/applicationContext-v12.xml
projects/demos/richfaces-spring-jbpm4/trunk/src/main/spring/
projects/demos/richfaces-spring-jbpm4/trunk/src/main/springv12/
projects/demos/richfaces-spring-jbpm4/trunk/src/test/java/be/inze/spring/demo/process/RegistrationProcessTestsv12.java
Modified:
projects/demos/richfaces-spring-jbpm4/trunk/pom.xml
Log:
added minor support for spring 1.2 testing
Modified: projects/demos/richfaces-spring-jbpm4/trunk/pom.xml
===================================================================
--- projects/demos/richfaces-spring-jbpm4/trunk/pom.xml 2009-07-23 19:35:15 UTC (rev 5342)
+++ projects/demos/richfaces-spring-jbpm4/trunk/pom.xml 2009-07-23 19:40:58 UTC (rev 5343)
@@ -225,7 +225,27 @@
<artifactId>commons-collections</artifactId>
<version>${commons-collections.version}</version>
</dependency>
- </dependencies>
+ </dependencies>
+
+ <profiles>
+ <profile>
+ <id>default</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ </profile>
+ <profile>
+ <id>springv12</id>
+ <properties>
+ <spring.version>1.2.8</spring.version>
+ </properties>
+ </profile>
+ <profile>
+ <id>snapshot</id>
+ <properties>
+ <jbpm.version>4.1-SNAPSHOT</jbpm.version>
+ </properties>
+ </profile>
+ </profiles>
-
</project>
Added: projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/demo/v12/applicationContext-v12.xml
===================================================================
--- projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/demo/v12/applicationContext-v12.xml (rev 0)
+++ projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/demo/v12/applicationContext-v12.xml 2009-07-23 19:40:58 UTC (rev 5343)
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
+
+<beans>
+ <bean id="sessionFactory"
+ class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
+ <property name="dataSource" ref="dataSource" />
+ <property name="hibernateProperties">
+ <props>
+ <prop key="hibernate.dialect">org.hibernate.dialect.HSQLDialect</prop>
+ <prop key="hibernate.show_sql">true</prop>
+ <prop key="hibernate.hbm2ddl.auto">create-drop</prop>
+ </props>
+ </property>
+ <property name="configLocations">
+ <list>
+ <value>classpath:be/inze/spring/demo/hibernate.cfg.xml</value>
+ </list>
+ </property>
+ <property name="mappingLocations">
+ <list>
+ <value>classpath:jbpm.execution.hbm.xml</value>
+ <value>classpath:jbpm.repository.hbm.xml</value>
+ <value>classpath:jbpm.task.hbm.xml</value>
+ <value>classpath:jbpm.history.hbm.xml</value>
+ </list>
+ </property>
+ </bean>
+
+ <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
+ destroy-method="close">
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
+ <property name="url" value="jdbc:hsqldb:jbpm4;shutdown=true" />
+ <property name="username" value="sa" />
+ <property name="password" value="" />
+ </bean>
+
+
+ <bean
+ class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+ <property name="locations">
+ <list>
+ <value>classpath:/log4j.properties</value>
+ </list>
+ </property>
+ </bean>
+
+ <bean id="jbpmConfiguration" class="org.jbpm.pvm.internal.cfg.SpringConfiguration">
+ <constructor-arg value="be/inze/spring/demo/jbpm.cfg.xml" />
+ </bean>
+
+ <bean id="processEngine" factory-bean="jbpmConfiguration"
+ factory-method="buildProcessEngine" />
+ <bean id="repositoryService" factory-bean="processEngine"
+ factory-method="getRepositoryService" />
+ <bean id="executionService" factory-bean="processEngine"
+ factory-method="getExecutionService" />
+
+ <bean id="transactionManager"
+ class="org.springframework.orm.hibernate3.HibernateTransactionManager">
+ <property name="sessionFactory" ref="sessionFactory" />
+ </bean>
+
+
+ <bean id="deployService" class="be.inze.spring.demo.service.impl.DeployServiceImpl">
+ <property name="repositoryService" ref="repositoryService" />
+ </bean>
+
+ <bean id="processInformationService"
+ class="be.inze.spring.demo.service.impl.ProcessInformationServiceImpl">
+ <property name="repositoryService" ref="repositoryService" />
+ <property name="executionService" ref="executionService" />
+ </bean>
+
+ <bean id="simpleProcessService"
+ class="be.inze.spring.demo.service.impl.SimpleProcessServiceImpl">
+ <property name="repositoryService" ref="repositoryService" />
+ <property name="executionService" ref="executionService" />
+ </bean>
+
+ <bean id="echoService" class="be.inze.spring.demo.service.impl.EchoServiceImpl" />
+
+ <bean id="initialFillService" class="be.inze.spring.demo.service.impl.InitialFillServiceImpl"
+ init-method="init">
+ <property name="deployService" ref="deployService" />
+ <property name="simpleProcessService" ref="simpleProcessService" />
+ </bean>
+</beans>
Property changes on: projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/demo/v12/applicationContext-v12.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: projects/demos/richfaces-spring-jbpm4/trunk/src/test/java/be/inze/spring/demo/process/RegistrationProcessTestsv12.java
===================================================================
--- projects/demos/richfaces-spring-jbpm4/trunk/src/test/java/be/inze/spring/demo/process/RegistrationProcessTestsv12.java (rev 0)
+++ projects/demos/richfaces-spring-jbpm4/trunk/src/test/java/be/inze/spring/demo/process/RegistrationProcessTestsv12.java 2009-07-23 19:40:58 UTC (rev 5343)
@@ -0,0 +1,63 @@
+package be.inze.spring.demo.process;
+
+import java.util.Collection;
+
+import org.jbpm.api.Execution;
+import org.jbpm.api.ProcessInstance;
+import org.jbpm.api.activity.ActivityExecution;
+import org.jbpm.api.job.Job;
+import org.jbpm.test.AbstractTransactionalSpringJbpmTestCase;
+
+public class RegistrationProcessTestsv12 extends
+ AbstractTransactionalSpringJbpmTestCase {
+
+ private String processInstanceId;
+
+ @Override
+ protected String[] getConfigLocations() {
+ return new String[] {
+ "be/inze/spring/demo/v12/applicationContext-v12.xml",
+ };
+ }
+
+ @Override
+ protected void onSetUpInTransaction() throws Exception {
+ super.onSetUpInTransaction();
+ deployJpdlFromClasspath("be/inze/spring/process/Registration.jpdl.xml");
+ }
+
+ public void testStart() {
+ ProcessInstance processInstance = executionService
+ .startProcessInstanceByKey("DemoProcess");
+ processInstanceId = processInstance.getId();
+ assertTrue(processInstance.isActive("accept"));
+ }
+
+ public void testSignalAccept() {
+ testStart();
+
+ Execution execution = executionService.findExecutionById(processInstanceId);
+
+ ProcessInstance processInstance = executionService.signalExecutionById(execution.getExecutions().iterator().next().getId(), "transition");
+ ActivityExecution activityExecution = (ActivityExecution) processInstance;
+ assertEquals("grant access", activityExecution.getActivityName());
+ }
+
+ public void testTimeOut() {
+ testStart();
+
+ Collection<Job> result = managementService.createJobQuery().processInstanceId(processInstanceId).list();
+ assertEquals(1, result.size());
+
+ managementService.executeJob(result.iterator().next().getId());
+
+ result = managementService.createJobQuery().processInstanceId(processInstanceId).list();
+ assertEquals(1, result.size());
+
+ ProcessInstance instance = executionService.findProcessInstanceById(processInstanceId);
+ ActivityExecution activityExecution = (ActivityExecution) instance;
+ assertEquals("timed out", activityExecution.getActivityName());
+
+ }
+
+}
Property changes on: projects/demos/richfaces-spring-jbpm4/trunk/src/test/java/be/inze/spring/demo/process/RegistrationProcessTestsv12.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 3 months
JBoss JBPM SVN: r5342 - projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/process.
by do-not-reply@jboss.org
Author: ainze
Date: 2009-07-23 15:35:15 -0400 (Thu, 23 Jul 2009)
New Revision: 5342
Added:
projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/process/Registration.png
Modified:
projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/process/Registration.jpdl.xml
Log:
generated working png
Modified: projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/process/Registration.jpdl.xml
===================================================================
--- projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/process/Registration.jpdl.xml 2009-07-23 19:34:49 UTC (rev 5341)
+++ projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/process/Registration.jpdl.xml 2009-07-23 19:35:15 UTC (rev 5342)
@@ -10,7 +10,7 @@
<transition g="-65,-22" name="to accept" to="join1"/>
</java>
- <java expr="#{echoService}" g="140,176,92,52" method="sayHelloWithExecution" name="echo2">
+ <java expr="#{echoService}" g="246,169,92,52" method="sayHelloWithExecution" name="echo2">
<arg>
<env type="org.jbpm.pvm.internal.history.HistorySession"/>
</arg>
@@ -21,6 +21,8 @@
<transition g="-63,-22" name="to timeout" to="timed out">
<timer duedate="10 seconds"/>
<timer duedate="10 seconds"/>
+ <timer duedate="10 seconds"/>
+ <timer duedate="10 seconds"/>
<timer duedate="10 seconds"/>
</transition>
</state>
@@ -31,6 +33,8 @@
<transition g="-54,-22" name="transition" to="timed out2">
<timer duedate="20 seconds"/>
<timer duedate="20 seconds"/>
+ <timer duedate="20 seconds"/>
+ <timer duedate="20 seconds"/>
<timer duedate="20 seconds"/>
<timer duedate="20 seconds"/>
</transition>
@@ -39,6 +43,8 @@
<transition g="-54,-22" name="transition" to="timed out3">
<timer duedate="30 seconds"/>
<timer duedate="30 seconds"/>
+ <timer duedate="30 seconds"/>
+ <timer duedate="30 seconds"/>
<timer duedate="30 seconds"/>
<timer duedate="30 seconds"/>
</transition>
@@ -53,7 +59,7 @@
<transition g="-61,-22" name="to echo2" to="echo2"/>
</fork>
<join g="221,283,48,48" multiplicity="2" name="join1">
- <transition name="to accept" to="accept" g="-65,-22"/>
+ <transition g="-65,-22" name="to accept" to="accept"/>
</join>
</process>
\ No newline at end of file
Added: projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/process/Registration.png
===================================================================
(Binary files differ)
Property changes on: projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/process/Registration.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
15 years, 3 months
JBoss JBPM SVN: r5341 - projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/demo.
by do-not-reply@jboss.org
Author: ainze
Date: 2009-07-23 15:34:49 -0400 (Thu, 23 Jul 2009)
New Revision: 5341
Modified:
projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/demo/jbpm.cfg.xml
Log:
compatible with 4.1-SNAPSHOT
Modified: projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/demo/jbpm.cfg.xml
===================================================================
--- projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/demo/jbpm.cfg.xml 2009-07-23 09:21:53 UTC (rev 5340)
+++ projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/demo/jbpm.cfg.xml 2009-07-23 19:34:49 UTC (rev 5341)
@@ -31,8 +31,6 @@
factory="org.jbpm.pvm.internal.script.JuelScriptEngineFactory" />
</script-manager>
- <authentication />
-
<id-generator />
<types resource="jbpm.variable.types.xml" />
15 years, 3 months
JBoss JBPM SVN: r5340 - in jbpm4/trunk/modules: bpmn/src/test/java/org/jbpm/bpmn/test and 5 other directories.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2009-07-23 05:21:53 -0400 (Thu, 23 Jul 2009)
New Revision: 5340
Modified:
jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/parser/BpmnParser.java
jbpm4/trunk/modules/bpmn/src/test/java/org/jbpm/bpmn/test/ShipmentTest.java
jbpm4/trunk/modules/bpmn/src/test/resources/jbpm.cfg.xml
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/JpdlParser.java
jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/parsing/JpdlParseTestCase.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/repository/ProcessDeployer.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/xml/Parser.java
Log:
bpmn parsing fixes
Modified: jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/parser/BpmnParser.java
===================================================================
--- jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/parser/BpmnParser.java 2009-07-22 20:44:20 UTC (rev 5339)
+++ jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/parser/BpmnParser.java 2009-07-23 09:21:53 UTC (rev 5340)
@@ -24,6 +24,9 @@
import java.util.ArrayList;
import java.util.List;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.SAXParserFactory;
+
import org.jbpm.pvm.internal.model.ProcessDefinitionImpl;
import org.jbpm.pvm.internal.util.XmlUtil;
import org.jbpm.pvm.internal.xml.Parse;
Modified: jbpm4/trunk/modules/bpmn/src/test/java/org/jbpm/bpmn/test/ShipmentTest.java
===================================================================
--- jbpm4/trunk/modules/bpmn/src/test/java/org/jbpm/bpmn/test/ShipmentTest.java 2009-07-22 20:44:20 UTC (rev 5339)
+++ jbpm4/trunk/modules/bpmn/src/test/java/org/jbpm/bpmn/test/ShipmentTest.java 2009-07-23 09:21:53 UTC (rev 5340)
@@ -30,10 +30,10 @@
public class ShipmentTest extends JbpmTestCase {
public void testShipment() {
- repositoryService.createDeployment()
+ String deploymentId = repositoryService.createDeployment()
.addResourceFromClasspath("org/jbpm/bpmn/test/shipment.bpmn.xml")
.deploy();
- // todo
+ repositoryService.deleteDeploymentCascade(deploymentId);
}
}
Modified: jbpm4/trunk/modules/bpmn/src/test/resources/jbpm.cfg.xml
===================================================================
--- jbpm4/trunk/modules/bpmn/src/test/resources/jbpm.cfg.xml 2009-07-22 20:44:20 UTC (rev 5339)
+++ jbpm4/trunk/modules/bpmn/src/test/resources/jbpm.cfg.xml 2009-07-23 09:21:53 UTC (rev 5340)
@@ -5,7 +5,6 @@
<import resource="jbpm.default.cfg.xml" />
<import resource="jbpm.businesscalendar.cfg.xml" />
<import resource="jbpm.tx.hibernate.cfg.xml" />
- <import resource="jbpm.bpmn.cfg.xml" />
<import resource="jbpm.identity.cfg.xml" />
<process-engine-context>
Modified: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/JpdlParser.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/JpdlParser.java 2009-07-22 20:44:20 UTC (rev 5339)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/JpdlParser.java 2009-07-23 09:21:53 UTC (rev 5340)
@@ -163,12 +163,16 @@
}
public Object parseDocumentElement(Element documentElement, Parse parse) {
+ List<ProcessDefinitionImpl> processDefinitions = new ArrayList<ProcessDefinitionImpl>();
+
JpdlProcessDefinition processDefinition = (JpdlProcessDefinition) parse.getDocumentObject();
if (processDefinition==null) {
processDefinition = new JpdlProcessDefinition();
parse.setDocumentObject(processDefinition);
}
+ processDefinitions.add(processDefinition);
+
parse.pushObject(processDefinition);
try {
// process attribues
@@ -225,7 +229,7 @@
parse.addProblem("no start activity in process", documentElement);
}
- return processDefinition;
+ return processDefinitions;
}
protected void resolveTransitionDestinations(Parse parse, JpdlProcessDefinition processDefinition, UnresolvedTransitions unresolvedTransitions) {
Modified: jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/parsing/JpdlParseTestCase.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/parsing/JpdlParseTestCase.java 2009-07-22 20:44:20 UTC (rev 5339)
+++ jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/parsing/JpdlParseTestCase.java 2009-07-23 09:21:53 UTC (rev 5340)
@@ -25,6 +25,7 @@
import org.jbpm.jpdl.internal.xml.JpdlParser;
import org.jbpm.pvm.internal.client.ClientProcessDefinition;
+import org.jbpm.pvm.internal.model.ProcessDefinitionImpl;
import org.jbpm.pvm.internal.xml.Problem;
import org.jbpm.test.BaseJbpmTestCase;
@@ -51,11 +52,17 @@
public ClientProcessDefinition parse(String xmlString) {
JpdlParser jpdlParser = new JpdlParser();
- return (ClientProcessDefinition) jpdlParser.createParse()
+ List<ProcessDefinitionImpl> processDefinitions = (List<ProcessDefinitionImpl>) jpdlParser.createParse()
.setString(xmlString)
.execute()
.checkErrors("process definition xml string")
.getDocumentObject();
+ if ( (processDefinitions==null)
+ || (processDefinitions.isEmpty())
+ ) {
+ return null;
+ }
+ return processDefinitions.get(0);
}
}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/repository/ProcessDeployer.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/repository/ProcessDeployer.java 2009-07-22 20:44:20 UTC (rev 5339)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/repository/ProcessDeployer.java 2009-07-23 09:21:53 UTC (rev 5340)
@@ -61,38 +61,40 @@
parse.setProblems(deployment.getProblems());
parse.setInputStream(inputStream);
parse.execute();
- ProcessDefinitionImpl processDefinition = (ProcessDefinitionImpl) parse.getDocumentObject();
- if ((processDefinition != null) && (processDefinition.getName() != null)) {
- String processDefinitionName = processDefinition.getName();
-
- processDefinition.setSuspended(deployment.isSuspended());
-
- String imageResourceName = resourceName.substring(0, resourceName.lastIndexOf(extension))+".png";
- if (deployment.getResourceNames().contains(imageResourceName)) {
- processDefinition.setImageResourceName(imageResourceName);
- }
+ List<ProcessDefinitionImpl> processDefinitions = (List<ProcessDefinitionImpl>) parse.getDocumentObject();
+ for (ProcessDefinitionImpl processDefinition: processDefinitions) {
+ if ((processDefinition != null) && (processDefinition.getName() != null)) {
+ String processDefinitionName = processDefinition.getName();
+
+ processDefinition.setSuspended(deployment.isSuspended());
+
+ String imageResourceName = resourceName.substring(0, resourceName.lastIndexOf(extension))+".png";
+ if (deployment.getResourceNames().contains(imageResourceName)) {
+ processDefinition.setImageResourceName(imageResourceName);
+ }
- processDefinition.setDeploymentDbid(deployment.getDbid());
+ processDefinition.setDeploymentDbid(deployment.getDbid());
- if (deployment.hasObjectProperties(processDefinitionName)) {
- String key = deployment.getProcessDefinitionKey(processDefinitionName);
- String id = deployment.getProcessDefinitionId(processDefinitionName);
- Long version = deployment.getProcessDefinitionVersion(processDefinitionName);
- processDefinition.setId(id);
- processDefinition.setKey(key);
- processDefinition.setVersion(version.intValue());
+ if (deployment.hasObjectProperties(processDefinitionName)) {
+ String key = deployment.getProcessDefinitionKey(processDefinitionName);
+ String id = deployment.getProcessDefinitionId(processDefinitionName);
+ Long version = deployment.getProcessDefinitionVersion(processDefinitionName);
+ processDefinition.setId(id);
+ processDefinition.setKey(key);
+ processDefinition.setVersion(version.intValue());
- } else {
- checkKey(processDefinition, deployment);
- checkVersion(processDefinition, deployment);
- checkId(processDefinition, deployment);
+ } else {
+ checkKey(processDefinition, deployment);
+ checkVersion(processDefinition, deployment);
+ checkId(processDefinition, deployment);
- deployment.setProcessDefinitionId(processDefinitionName, processDefinition.getId());
- deployment.setProcessDefinitionKey(processDefinitionName, processDefinition.getKey());
- deployment.setProcessDefinitionVersion(processDefinitionName, new Long(processDefinition.getVersion()));
+ deployment.setProcessDefinitionId(processDefinitionName, processDefinition.getId());
+ deployment.setProcessDefinitionKey(processDefinitionName, processDefinition.getKey());
+ deployment.setProcessDefinitionVersion(processDefinitionName, new Long(processDefinition.getVersion()));
+ }
+
+ deployment.addObject(processDefinitionName, processDefinition);
}
-
- deployment.addObject(processDefinitionName, processDefinition);
}
}
}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/xml/Parser.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/xml/Parser.java 2009-07-22 20:44:20 UTC (rev 5339)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/xml/Parser.java 2009-07-23 09:21:53 UTC (rev 5340)
@@ -286,10 +286,12 @@
public void initializeDocumentBuilderFactory() {
documentBuilderFactory = DocumentBuilderFactory.newInstance();
+ documentBuilderFactory.setNamespaceAware(true);
}
public void initializeSaxParserFactory() {
saxParserFactory = SAXParserFactory.newInstance();
+ saxParserFactory.setNamespaceAware(true);
}
// document builder methods /////////////////////////////////////////////////
15 years, 3 months
JBoss JBPM SVN: r5339 - in projects/demos/richfaces-spring-jbpm4/trunk: src and 38 other directories.
by do-not-reply@jboss.org
Author: ainze
Date: 2009-07-22 16:44:20 -0400 (Wed, 22 Jul 2009)
New Revision: 5339
Added:
projects/demos/richfaces-spring-jbpm4/trunk/pom.xml
projects/demos/richfaces-spring-jbpm4/trunk/run_jetty.bat
projects/demos/richfaces-spring-jbpm4/trunk/run_jetty.sh
projects/demos/richfaces-spring-jbpm4/trunk/src/
projects/demos/richfaces-spring-jbpm4/trunk/src/main/
projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/
projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/
projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/
projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/
projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/
projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/dao/
projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/dao/BaseDAOInterface.java
projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/dao/impl/
projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/dao/impl/BaseHibernateDAOImpl.java
projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/domain/
projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/jsf/
projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/jsf/DeployBackingBean.java
projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/jsf/ProcessInformationBackingBean.java
projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/jsf/SimpleProcessBackingBean.java
projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/service/
projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/service/DeployService.java
projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/service/EchoService.java
projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/service/ProcessInformationService.java
projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/service/SimpleProcessService.java
projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/service/impl/
projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/service/impl/DeployServiceImpl.java
projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/service/impl/EchoServiceImpl.java
projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/service/impl/InitialFillServiceImpl.java
projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/service/impl/ProcessInformationServiceImpl.java
projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/service/impl/SimpleProcessServiceImpl.java
projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/
projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/
projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/
projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/
projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/demo/
projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/demo/applicationContext-common.xml
projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/demo/applicationContext-dao.xml
projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/demo/applicationContext-process.xml
projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/demo/applicationContext-service.xml
projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/demo/hibernate.cfg.xml
projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/demo/jbpm.cfg.xml
projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/process/
projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/process/Registration.jpdl.xml
projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/properties/
projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/properties/ApplicationResources_en.properties
projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/properties/ErrorCodes_en.properties
projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/log4j.properties
projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/
projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/META-INF/
projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/META-INF/MANIFEST.MF
projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/WEB-INF/
projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/WEB-INF/config/
projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/WEB-INF/config/.bean-config.xml.jsfdia
projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/WEB-INF/config/.navigation-config.xml.jsfdia
projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/WEB-INF/config/applicationContext.xml
projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/WEB-INF/config/bean-config.xml
projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/WEB-INF/config/faces-config.xml
projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/WEB-INF/config/navigation-config.xml
projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/WEB-INF/facelets/
projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/WEB-INF/facelets/custom_input_components.taglib.xml
projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/WEB-INF/lib/
projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/WEB-INF/web.xml
projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/common/
projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/common/images/
projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/common/images/picto_derpage.gif
projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/common/images/picto_loupe.gif
projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/common/images/picto_precedent.gif
projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/common/images/picto_prempage.gif
projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/common/images/picto_suivant.gif
projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/common/menu.xhtml
projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/index.xhtml
projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/pages/
projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/pages/RegistrationProcess.xhtml
projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/pages/administrator/
projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/pages/client/
projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/style/
projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/style/style.css
projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/template/
projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/template/template.xhtml
projects/demos/richfaces-spring-jbpm4/trunk/src/test/
projects/demos/richfaces-spring-jbpm4/trunk/src/test/java/
projects/demos/richfaces-spring-jbpm4/trunk/src/test/java/be/
projects/demos/richfaces-spring-jbpm4/trunk/src/test/java/be/inze/
projects/demos/richfaces-spring-jbpm4/trunk/src/test/java/be/inze/spring/
projects/demos/richfaces-spring-jbpm4/trunk/src/test/java/be/inze/spring/demo/
projects/demos/richfaces-spring-jbpm4/trunk/src/test/java/be/inze/spring/demo/process/
projects/demos/richfaces-spring-jbpm4/trunk/src/test/java/be/inze/spring/demo/process/RegistrationProcessTests.java
projects/demos/richfaces-spring-jbpm4/trunk/src/test/java/org/
projects/demos/richfaces-spring-jbpm4/trunk/src/test/java/org/jbpm/
projects/demos/richfaces-spring-jbpm4/trunk/src/test/java/org/jbpm/spring/
projects/demos/richfaces-spring-jbpm4/trunk/src/test/java/org/jbpm/spring/test/
projects/demos/richfaces-spring-jbpm4/trunk/src/test/resources/
Modified:
projects/demos/richfaces-spring-jbpm4/trunk/
Log:
Initial port from old repository
Property changes on: projects/demos/richfaces-spring-jbpm4/trunk
___________________________________________________________________
Name: svn:ignore
+ target
jbpm4.properties
.project
jbpm4.lck
jbpm4.script
.classpath
.settings
Added: projects/demos/richfaces-spring-jbpm4/trunk/pom.xml
===================================================================
--- projects/demos/richfaces-spring-jbpm4/trunk/pom.xml (rev 0)
+++ projects/demos/richfaces-spring-jbpm4/trunk/pom.xml 2009-07-22 20:44:20 UTC (rev 5339)
@@ -0,0 +1,231 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>be.inze.spring.demo</groupId>
+ <artifactId>jbpm4-spring</artifactId>
+ <packaging>war</packaging>
+ <version>0.3-SNAPSHOT</version>
+ <name>jBPM4 Spring integration </name>
+ <url>http://maven.apache.org</url>
+ <build>
+ <finalName>
+ jbpm4-spring-demo
+ </finalName>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-eclipse-plugin</artifactId>
+ <configuration>
+ <wtpversion>1.5</wtpversion>
+ <downloadSources>true</downloadSources>
+ <downloadJavadocs>true</downloadJavadocs>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>maven-jetty-plugin</artifactId>
+ <configuration>
+ <scanIntervalSeconds>10</scanIntervalSeconds>
+ <stopKey>foo</stopKey>
+ <stopPort>9999</stopPort>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.4.2</version>
+ <configuration>
+ <includes>
+ <include>**/*Tests.java</include>
+ </includes>
+ </configuration>
+ </plugin>
+
+ </plugins>
+ </build>
+
+ <repositories>
+ <repository>
+ <id>jboss</id>
+ <url>http://repository.jboss.com/maven2/</url>
+ </repository>
+ </repositories>
+
+ <properties>
+ <spring.version>2.0.8</spring.version>
+ <hibernate.version>3.3.1.GA</hibernate.version>
+ <acegi-security.version>1.0.3</acegi-security.version>
+ <richfaces.version>3.3.0.GA</richfaces.version>
+ <jboss-el.version>2.0.1.GA</jboss-el.version>
+ <facelets.version>1.1.14</facelets.version>
+ <aspectjweaver.version>1.6.4</aspectjweaver.version>
+ <xerces.version>2.9.1</xerces.version>
+ <jsf.version>1.2_04-p02</jsf.version>
+ <jbpm.version>4.0</jbpm.version>
+ <commons-collections.version>3.2.1</commons-collections.version>
+ <log4j.version>1.2.14</log4j.version>
+ <el.version>1.2</el.version>
+ <junit.version>3.8.1</junit.version>
+ <taglibs.version>1.1.2</taglibs.version>
+ <commons-dbcp.version>1.2.1</commons-dbcp.version>
+ <hsqldb.version>1.8.0.7</hsqldb.version>
+ <javax.servlet>2.4</javax.servlet>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-jpdl</artifactId>
+ <version>${jbpm.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>richfaces-ui</artifactId>
+ <version>${richfaces.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.el</groupId>
+ <artifactId>jboss-el</artifactId>
+ <version>${jboss-el.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <version>${jsf.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-impl</artifactId>
+ <version>${jsf.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>com.sun.facelets</groupId>
+ <artifactId>jsf-facelets</artifactId>
+ <version>1.1.10</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ <version>${el.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.el</groupId>
+ <artifactId>el-ri</artifactId>
+ <version>${el.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>taglibs</groupId>
+ <artifactId>standard</artifactId>
+ <version>${taglibs.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>${junit.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-mock</artifactId>
+ <version>${spring.version}</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.acegisecurity</groupId>
+ <artifactId>acegi-security</artifactId>
+ <version>${acegi-security.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-remoting</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-jdbc</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-support</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-core</artifactId>
+ <version>${hibernate.version}</version>
+ </dependency>
+
+ <!-- 1.2.14 is minimum (jbpm is tracing) -->
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>${log4j.version}</version>
+ </dependency>
+
+ <!--
+
+ <dependency> <groupId>org.springframework</groupId>
+ <artifactId>spring-aspects</artifactId> <version>2.0.8</version>
+ </dependency>
+ -->
+ <dependency>
+ <groupId>commons-dbcp</groupId>
+ <artifactId>commons-dbcp</artifactId>
+ <version>${commons-dbcp.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <version>${xerces.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.aspectj</groupId>
+ <artifactId>aspectjweaver</artifactId>
+ <version>${aspectjweaver.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>hsqldb</groupId>
+ <artifactId>hsqldb</artifactId>
+ <version>${hsqldb.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>${javax.servlet}</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ <version>${commons-collections.version}</version>
+ </dependency>
+ </dependencies>
+
+
+</project>
Property changes on: projects/demos/richfaces-spring-jbpm4/trunk/pom.xml
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
Added: projects/demos/richfaces-spring-jbpm4/trunk/run_jetty.bat
===================================================================
--- projects/demos/richfaces-spring-jbpm4/trunk/run_jetty.bat (rev 0)
+++ projects/demos/richfaces-spring-jbpm4/trunk/run_jetty.bat 2009-07-22 20:44:20 UTC (rev 5339)
@@ -0,0 +1 @@
+mvn jetty:run
\ No newline at end of file
Added: projects/demos/richfaces-spring-jbpm4/trunk/run_jetty.sh
===================================================================
--- projects/demos/richfaces-spring-jbpm4/trunk/run_jetty.sh (rev 0)
+++ projects/demos/richfaces-spring-jbpm4/trunk/run_jetty.sh 2009-07-22 20:44:20 UTC (rev 5339)
@@ -0,0 +1 @@
+mvn jetty:run
\ No newline at end of file
Property changes on: projects/demos/richfaces-spring-jbpm4/trunk/run_jetty.sh
___________________________________________________________________
Name: svn:executable
+ *
Added: projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/dao/BaseDAOInterface.java
===================================================================
--- projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/dao/BaseDAOInterface.java (rev 0)
+++ projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/dao/BaseDAOInterface.java 2009-07-22 20:44:20 UTC (rev 5339)
@@ -0,0 +1,15 @@
+package be.inze.spring.demo.dao;
+
+import java.io.Serializable;
+
+public interface BaseDAOInterface < T, PK extends Serializable > {
+
+ PK create(T someObject);
+
+ void update(T someObject);
+
+ void delete(T someObject);
+
+ T getByPrimaryKey(PK primaryKey);
+
+}
Property changes on: projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/dao/BaseDAOInterface.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
Added: projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/dao/impl/BaseHibernateDAOImpl.java
===================================================================
--- projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/dao/impl/BaseHibernateDAOImpl.java (rev 0)
+++ projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/dao/impl/BaseHibernateDAOImpl.java 2009-07-22 20:44:20 UTC (rev 5339)
@@ -0,0 +1,46 @@
+package be.inze.spring.demo.dao.impl;
+
+import java.io.Serializable;
+
+import org.hibernate.Session;
+import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
+
+import be.inze.spring.demo.dao.BaseDAOInterface;
+
+public abstract class BaseHibernateDAOImpl < T, PK extends Serializable > extends HibernateDaoSupport implements
+ BaseDAOInterface < T, PK > {
+
+ private Class < T > type;
+
+ public BaseHibernateDAOImpl(final Class < T > someClass) {
+ this.type = someClass;
+ }
+
+ @SuppressWarnings("unchecked")
+ public PK create(final T someObject) {
+ Session session = getSession(false);
+
+ return (PK) session.save(someObject);
+ }
+
+ public void delete(final T someObject) {
+ Session session = getSession(false);
+
+ session.delete(someObject);
+ }
+
+ @SuppressWarnings("unchecked")
+ public T getByPrimaryKey(final PK primaryKey) {
+ Session session = getSession(false);
+
+ T t = (T) session.get(type, primaryKey);
+ return t;
+ }
+
+ public void update(final T someObject) {
+ Session session = getSession(false);
+
+ session.update(someObject);
+ }
+
+}
Property changes on: projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/dao/impl/BaseHibernateDAOImpl.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
Added: projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/jsf/DeployBackingBean.java
===================================================================
--- projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/jsf/DeployBackingBean.java (rev 0)
+++ projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/jsf/DeployBackingBean.java 2009-07-22 20:44:20 UTC (rev 5339)
@@ -0,0 +1,31 @@
+/**
+ *
+ */
+package be.inze.spring.demo.jsf;
+
+import be.inze.spring.demo.service.DeployService;
+
+/**
+ * @author Andries Inze
+ *
+ */
+public class DeployBackingBean {
+
+ private DeployService deployService;
+
+ private boolean success = false;
+
+ public void deploy() {
+ deployService.deploy("be/inze/spring/process/Registration.jpdl.xml");
+ success = true;
+ }
+
+ public boolean success() {
+ return success;
+ }
+
+ public void setDeployService(
+ DeployService deployService) {
+ this.deployService = deployService;
+ }
+}
Property changes on: projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/jsf/DeployBackingBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/jsf/ProcessInformationBackingBean.java
===================================================================
--- projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/jsf/ProcessInformationBackingBean.java (rev 0)
+++ projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/jsf/ProcessInformationBackingBean.java 2009-07-22 20:44:20 UTC (rev 5339)
@@ -0,0 +1,44 @@
+/**
+ *
+ */
+package be.inze.spring.demo.jsf;
+
+import java.util.List;
+
+import org.jbpm.api.Execution;
+import org.jbpm.api.ProcessDefinition;
+import org.jbpm.api.ProcessInstance;
+
+import be.inze.spring.demo.service.ProcessInformationService;
+import be.inze.spring.demo.service.SimpleProcessService;
+
+/**
+ * @author Andries Inze
+ *
+ */
+public class ProcessInformationBackingBean {
+
+ private ProcessInformationService processInformationService;
+ private SimpleProcessService simpleProcessService;
+
+ public List<ProcessDefinition> getAllProcessDefinitionKeys() {
+ return processInformationService.getAllProcessDefinitionKeys();
+ }
+
+ public List<ProcessInstance> getAllOpenExecutions() {
+ return processInformationService.getAllOpenExecutions();
+ }
+
+ public void signal(Execution execution) {
+ simpleProcessService.signal(execution);
+ }
+
+ public void setProcessInformationService(
+ ProcessInformationService processInformationService) {
+ this.processInformationService = processInformationService;
+ }
+
+ public void setSimpleProcessService(SimpleProcessService simpleProcessService) {
+ this.simpleProcessService = simpleProcessService;
+ }
+}
Property changes on: projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/jsf/ProcessInformationBackingBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/jsf/SimpleProcessBackingBean.java
===================================================================
--- projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/jsf/SimpleProcessBackingBean.java (rev 0)
+++ projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/jsf/SimpleProcessBackingBean.java 2009-07-22 20:44:20 UTC (rev 5339)
@@ -0,0 +1,21 @@
+package be.inze.spring.demo.jsf;
+
+import be.inze.spring.demo.service.SimpleProcessService;
+
+public class SimpleProcessBackingBean {
+
+ private SimpleProcessService simpleProcessService;
+
+ public boolean isProcessDeployed() {
+ return simpleProcessService.isProcessDeployed();
+ }
+
+ public void start() {
+ simpleProcessService.startProcess();
+ }
+
+ public void setSimpleProcessService(SimpleProcessService simpleProcessService) {
+ this.simpleProcessService = simpleProcessService;
+ }
+
+}
Property changes on: projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/jsf/SimpleProcessBackingBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/service/DeployService.java
===================================================================
--- projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/service/DeployService.java (rev 0)
+++ projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/service/DeployService.java 2009-07-22 20:44:20 UTC (rev 5339)
@@ -0,0 +1,15 @@
+/**
+ *
+ */
+package be.inze.spring.demo.service;
+
+
+/**
+ * @author ainze
+ *
+ */
+public interface DeployService {
+
+
+ void deploy(String processDefinition);
+}
Property changes on: projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/service/DeployService.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/service/EchoService.java
===================================================================
--- projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/service/EchoService.java (rev 0)
+++ projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/service/EchoService.java 2009-07-22 20:44:20 UTC (rev 5339)
@@ -0,0 +1,17 @@
+/**
+ *
+ */
+package be.inze.spring.demo.service;
+
+import org.jbpm.api.Execution;
+
+/**
+ * @author ainze
+ *
+ */
+public interface EchoService {
+
+ void sayHello();
+
+ void sayHelloWithExecution(Object execution);
+}
Property changes on: projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/service/EchoService.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/service/ProcessInformationService.java
===================================================================
--- projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/service/ProcessInformationService.java (rev 0)
+++ projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/service/ProcessInformationService.java 2009-07-22 20:44:20 UTC (rev 5339)
@@ -0,0 +1,22 @@
+/**
+ *
+ */
+package be.inze.spring.demo.service;
+
+import java.util.List;
+
+import org.jbpm.api.ProcessDefinition;
+import org.jbpm.api.ProcessInstance;
+
+/**
+ * @author Andries Inze
+ *
+ */
+public interface ProcessInformationService {
+
+ List<ProcessDefinition> getAllProcessDefinitionKeys();
+
+ public List<ProcessInstance> getAllOpenExecutions();
+
+
+}
Property changes on: projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/service/ProcessInformationService.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/service/SimpleProcessService.java
===================================================================
--- projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/service/SimpleProcessService.java (rev 0)
+++ projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/service/SimpleProcessService.java 2009-07-22 20:44:20 UTC (rev 5339)
@@ -0,0 +1,21 @@
+/**
+ *
+ */
+package be.inze.spring.demo.service;
+
+import org.jbpm.api.Execution;
+
+/**
+ * @author ainze
+ *
+ */
+public interface SimpleProcessService {
+
+ public boolean isProcessDeployed();
+
+ public void startProcess();
+
+ public void signal(Execution execution);
+
+
+}
Property changes on: projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/service/SimpleProcessService.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/service/impl/DeployServiceImpl.java
===================================================================
--- projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/service/impl/DeployServiceImpl.java (rev 0)
+++ projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/service/impl/DeployServiceImpl.java 2009-07-22 20:44:20 UTC (rev 5339)
@@ -0,0 +1,32 @@
+/**
+ *
+ */
+package be.inze.spring.demo.service.impl;
+
+import org.jbpm.api.Deployment;
+import org.jbpm.api.NewDeployment;
+import org.jbpm.api.RepositoryService;
+import org.jbpm.pvm.internal.repository.DeploymentImpl;
+
+import be.inze.spring.demo.service.DeployService;
+
+/**
+ * @author ainze
+ *
+ */
+public class DeployServiceImpl implements DeployService {
+
+ private RepositoryService repositoryService;
+
+
+ public void deploy(String processDefinition) {
+ NewDeployment deployment = repositoryService.createDeployment();
+ deployment.addResourceFromClasspath(processDefinition);
+ deployment.deploy();
+ }
+
+ public void setRepositoryService(RepositoryService repositoryService) {
+ this.repositoryService = repositoryService;
+ }
+
+}
Property changes on: projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/service/impl/DeployServiceImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/service/impl/EchoServiceImpl.java
===================================================================
--- projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/service/impl/EchoServiceImpl.java (rev 0)
+++ projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/service/impl/EchoServiceImpl.java 2009-07-22 20:44:20 UTC (rev 5339)
@@ -0,0 +1,28 @@
+/**
+ *
+ */
+package be.inze.spring.demo.service.impl;
+
+import org.jbpm.api.Execution;
+
+import be.inze.spring.demo.service.EchoService;
+
+/**
+ * @author ainze
+ *
+ */
+public class EchoServiceImpl implements EchoService {
+
+ /* (non-Javadoc)
+ * @see be.inze.spring.demo.service.EchoService#sayHello()
+ */
+ public void sayHello() {
+ System.out.println("Hello!!");
+ }
+
+ public void sayHelloWithExecution(Object execution) {
+ System.out.println("Hello Again!!");
+
+ }
+
+}
Property changes on: projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/service/impl/EchoServiceImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/service/impl/InitialFillServiceImpl.java
===================================================================
--- projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/service/impl/InitialFillServiceImpl.java (rev 0)
+++ projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/service/impl/InitialFillServiceImpl.java 2009-07-22 20:44:20 UTC (rev 5339)
@@ -0,0 +1,32 @@
+/**
+ *
+ */
+package be.inze.spring.demo.service.impl;
+
+import be.inze.spring.demo.service.DeployService;
+import be.inze.spring.demo.service.SimpleProcessService;
+
+/**
+ * @author ainze
+ *
+ */
+public class InitialFillServiceImpl {
+
+ private DeployService deployService;
+ private SimpleProcessService simpleProcessService;
+
+ public void init() {
+ deployService.deploy("be/inze/spring/process/Registration.jpdl.xml");
+ simpleProcessService.startProcess();
+ simpleProcessService.startProcess();
+ simpleProcessService.startProcess();
+ }
+
+ public void setDeployService(DeployService deployService) {
+ this.deployService = deployService;
+ }
+
+ public void setSimpleProcessService(SimpleProcessService simpleProcessService) {
+ this.simpleProcessService = simpleProcessService;
+ }
+}
Property changes on: projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/service/impl/InitialFillServiceImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/service/impl/ProcessInformationServiceImpl.java
===================================================================
--- projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/service/impl/ProcessInformationServiceImpl.java (rev 0)
+++ projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/service/impl/ProcessInformationServiceImpl.java 2009-07-22 20:44:20 UTC (rev 5339)
@@ -0,0 +1,41 @@
+/**
+ *
+ */
+package be.inze.spring.demo.service.impl;
+
+import java.util.List;
+
+import org.jbpm.api.ExecutionService;
+import org.jbpm.api.ProcessDefinition;
+import org.jbpm.api.ProcessInstance;
+import org.jbpm.api.RepositoryService;
+
+import be.inze.spring.demo.service.ProcessInformationService;
+
+/**
+ * @author Andries Inze
+ *
+ */
+public class ProcessInformationServiceImpl implements ProcessInformationService {
+
+ public RepositoryService repositoryService;
+ public ExecutionService executionService;
+
+ public List<ProcessDefinition> getAllProcessDefinitionKeys() {
+ return repositoryService.createProcessDefinitionQuery().list();
+ }
+
+ public List<ProcessInstance> getAllOpenExecutions() {
+ return executionService.createProcessInstanceQuery().list();
+ }
+
+ public void setRepositoryService(RepositoryService repositoryService) {
+ this.repositoryService = repositoryService;
+ }
+
+ public void setExecutionService(ExecutionService executionService) {
+ this.executionService = executionService;
+ }
+
+
+}
Property changes on: projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/service/impl/ProcessInformationServiceImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/service/impl/SimpleProcessServiceImpl.java
===================================================================
--- projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/service/impl/SimpleProcessServiceImpl.java (rev 0)
+++ projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/service/impl/SimpleProcessServiceImpl.java 2009-07-22 20:44:20 UTC (rev 5339)
@@ -0,0 +1,48 @@
+/**
+ *
+ */
+package be.inze.spring.demo.service.impl;
+
+import org.jbpm.api.Execution;
+import org.jbpm.api.ExecutionService;
+import org.jbpm.api.RepositoryService;
+
+import be.inze.spring.demo.service.SimpleProcessService;
+
+/**
+ * @author ainze
+ *
+ */
+public class SimpleProcessServiceImpl implements SimpleProcessService{
+
+ private RepositoryService repositoryService;
+ private ExecutionService executionService;
+
+ public boolean isProcessDeployed() {
+ return repositoryService.createProcessDefinitionQuery().processDefinitionKey("DemoProcess").list().size() > 0;
+ }
+
+ public void startProcess() {
+ executionService.startProcessInstanceByKey("DemoProcess");
+ }
+
+ public void signal(Execution execution) {
+ if (execution.getState().equals(Execution.STATE_INACTIVE_SCOPE)) {
+ System.out.println("INACTIVE SCOPE");
+
+ execution = execution.getExecutions().iterator().next();
+ }
+
+ executionService.signalExecutionById(execution.getId(), "transition");
+ }
+
+ public void setRepositoryService(RepositoryService repositoryService) {
+ this.repositoryService = repositoryService;
+ }
+
+ public void setExecutionService(ExecutionService executionService) {
+ this.executionService = executionService;
+ }
+
+
+}
Property changes on: projects/demos/richfaces-spring-jbpm4/trunk/src/main/java/be/inze/spring/demo/service/impl/SimpleProcessServiceImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/demo/applicationContext-common.xml
===================================================================
--- projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/demo/applicationContext-common.xml (rev 0)
+++ projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/demo/applicationContext-common.xml 2009-07-22 20:44:20 UTC (rev 5339)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
+
+
+ <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+ <property name="locations">
+ <list>
+ <value>classpath:/log4j.properties</value>
+ </list>
+ </property>
+ </bean>
+
+
+
+</beans>
\ No newline at end of file
Property changes on: projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/demo/applicationContext-common.xml
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
Added: projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/demo/applicationContext-dao.xml
===================================================================
--- projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/demo/applicationContext-dao.xml (rev 0)
+++ projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/demo/applicationContext-dao.xml 2009-07-22 20:44:20 UTC (rev 5339)
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
+
+ <bean id="sessionFactory"
+ class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
+ <property name="dataSource" ref="dataSource" />
+ <property name="hibernateProperties">
+ <props>
+ <prop key="hibernate.dialect">org.hibernate.dialect.HSQLDialect</prop>
+ <prop key="hibernate.show_sql">true</prop>
+ <prop key="hibernate.hbm2ddl.auto">create-drop</prop>
+ </props>
+ </property>
+ <property name="configLocations">
+ <list>
+ <value>classpath:be/inze/spring/demo/hibernate.cfg.xml</value>
+ </list>
+ </property>
+ <property name="mappingLocations">
+ <list>
+ <value>classpath:jbpm.execution.hbm.xml</value>
+ <value>classpath:jbpm.repository.hbm.xml</value>
+ <value>classpath:jbpm.task.hbm.xml</value>
+ <value>classpath:jbpm.history.hbm.xml</value>
+ </list>
+ </property>
+ </bean>
+
+ <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
+ <property name="url" value="jdbc:hsqldb:jbpm4;shutdown=true" />
+ <property name="username" value="sa" />
+ <property name="password" value="" />
+ </bean>
+
+</beans>
\ No newline at end of file
Property changes on: projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/demo/applicationContext-dao.xml
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
Added: projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/demo/applicationContext-process.xml
===================================================================
--- projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/demo/applicationContext-process.xml (rev 0)
+++ projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/demo/applicationContext-process.xml 2009-07-22 20:44:20 UTC (rev 5339)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
+
+
+ <bean id="jbpmConfiguration" class="org.jbpm.pvm.internal.cfg.SpringConfiguration">
+ <constructor-arg value="be/inze/spring/demo/jbpm.cfg.xml" />
+ </bean>
+
+ <bean id="processEngine" factory-bean="jbpmConfiguration" factory-method="buildProcessEngine" />
+ <bean id="repositoryService" factory-bean="processEngine" factory-method="getRepositoryService" />
+ <bean id="executionService" factory-bean="processEngine" factory-method="getExecutionService" />
+
+</beans>
\ No newline at end of file
Property changes on: projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/demo/applicationContext-process.xml
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
Added: projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/demo/applicationContext-service.xml
===================================================================
--- projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/demo/applicationContext-service.xml (rev 0)
+++ projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/demo/applicationContext-service.xml 2009-07-22 20:44:20 UTC (rev 5339)
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:aop="http://www.springframework.org/schema/aop"
+ xmlns:tx="http://www.springframework.org/schema/tx"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+ http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
+ http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd">
+
+ <bean id="transactionManager"
+ class="org.springframework.orm.hibernate3.HibernateTransactionManager">
+ <property name="sessionFactory" ref="sessionFactory" />
+ </bean>
+
+ <aop:aspectj-autoproxy />
+
+ <tx:advice id="txAdvice" transaction-manager="transactionManager">
+ <tx:attributes>
+ <tx:method name="*" propagation="REQUIRED" />
+ </tx:attributes>
+ </tx:advice>
+
+ <aop:config>
+ <aop:pointcut id="serviceOperation"
+ expression="execution(* be.inze.spring.demo.service.**.*(..))" type="regex" />
+ <aop:advisor advice-ref="txAdvice" pointcut-ref="serviceOperation" />
+ </aop:config>
+
+ <bean id="deployService" class="be.inze.spring.demo.service.impl.DeployServiceImpl">
+ <property name="repositoryService" ref="repositoryService" />
+ </bean>
+
+ <bean id="processInformationService"
+ class="be.inze.spring.demo.service.impl.ProcessInformationServiceImpl">
+ <property name="repositoryService" ref="repositoryService" />
+ <property name="executionService" ref="executionService" />
+ </bean>
+
+ <bean id="simpleProcessService"
+ class="be.inze.spring.demo.service.impl.SimpleProcessServiceImpl">
+ <property name="repositoryService" ref="repositoryService" />
+ <property name="executionService" ref="executionService" />
+ </bean>
+
+ <bean id="echoService" class="be.inze.spring.demo.service.impl.EchoServiceImpl" />
+
+ <bean id="initialFillService" class="be.inze.spring.demo.service.impl.InitialFillServiceImpl"
+ init-method="init">
+ <property name="deployService" ref="deployService" />
+ <property name="simpleProcessService" ref="simpleProcessService" />
+ </bean>
+</beans>
\ No newline at end of file
Property changes on: projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/demo/applicationContext-service.xml
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
Added: projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/demo/hibernate.cfg.xml
===================================================================
--- projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/demo/hibernate.cfg.xml (rev 0)
+++ projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/demo/hibernate.cfg.xml 2009-07-22 20:44:20 UTC (rev 5339)
@@ -0,0 +1,8 @@
+<?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 name="jbpm4-spring">
+ <property name="hibernate.bytecode.use_reflection_optimizer">false</property>
+ </session-factory>
+</hibernate-configuration>
Property changes on: projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/demo/hibernate.cfg.xml
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
Added: projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/demo/jbpm.cfg.xml
===================================================================
--- projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/demo/jbpm.cfg.xml (rev 0)
+++ projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/demo/jbpm.cfg.xml 2009-07-22 20:44:20 UTC (rev 5339)
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jbpm-configuration>
+
+ <import resource="jbpm.jpdl.cfg.xml" />
+ <import resource="jbpm.identity.cfg.xml" />
+ <import resource="jbpm.jobexecutor.cfg.xml" />
+
+ <process-engine-context>
+ <repository-service />
+ <repository-cache />
+ <execution-service />
+ <history-service />
+ <management-service />
+ <identity-service />
+ <task-service />
+
+ <!-- Here we needed to change the transaction interceptor -->
+ <command-service>
+ <retry-interceptor />
+ <environment-interceptor />
+ <spring-transaction-interceptor />
+ </command-service>
+
+ <!-- Added spring as read-context -->
+ <script-manager default-expression-language="juel"
+ default-script-language="juel"
+ read-contexts="execution, environment, process-engine, spring"
+ write-context="">
+ <script-language name="juel"
+ factory="org.jbpm.pvm.internal.script.JuelScriptEngineFactory" />
+ </script-manager>
+
+ <authentication />
+
+ <id-generator />
+ <types resource="jbpm.variable.types.xml" />
+
+ <address-resolver />
+
+ <business-calendar>
+ <monday hours="9:00-12:00 and 12:30-17:00" />
+ <tuesday hours="9:00-12:00 and 12:30-17:00" />
+ <wednesday hours="9:00-12:00 and 12:30-17:00" />
+ <thursday hours="9:00-12:00 and 12:30-17:00" />
+ <friday hours="9:00-12:00 and 12:30-17:00" />
+ <holiday period="01/07/2008 - 31/08/2008" />
+ </business-calendar>
+
+ <mail-template name='task-notification'>
+ <to users="${task.assignee}" />
+ <subject>${task.name}</subject>
+ <text><![CDATA[Hi ${task.assignee},
+Task "${task.name}" has been assigned to you.
+${task.description}
+
+Sent by JBoss jBPM
+]]></text>
+ </mail-template>
+
+ <mail-template name='task-reminder'>
+ <to users="${task.assignee}" />
+ <subject>${task.name}</subject>
+ <text><![CDATA[Hey ${task.assignee},
+Do not forget about task "${task.name}".
+${task.description}
+
+Sent by JBoss jBPM
+]]></text>
+ </mail-template>
+
+
+
+ </process-engine-context>
+
+ <transaction-context>
+ <repository-session />
+ <db-session />
+
+ <message-session />
+ <timer-session />
+ <history-session />
+ <mail-session>
+ <mail-server>
+ <session-properties resource="jbpm.mail.properties" />
+ </mail-server>
+ </mail-session>
+
+ <!-- Need to set explicitly that we don't want jbpm to create sessions -->
+ <hibernate-session current="true" />
+ </transaction-context>
+</jbpm-configuration>
\ No newline at end of file
Property changes on: projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/demo/jbpm.cfg.xml
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
Added: projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/process/Registration.jpdl.xml
===================================================================
--- projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/process/Registration.jpdl.xml (rev 0)
+++ projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/process/Registration.jpdl.xml 2009-07-22 20:44:20 UTC (rev 5339)
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<process name="DemoProcess" xmlns="http://jbpm.org/4.0/jpdl">
+
+ <start g="100,16,48,48">
+ <transition g="-5,-22" name="to fork" to="fork1"/>
+ </start>
+
+ <java expr="#{echoService}" g="16,176,92,52" method="sayHello" name="echo">
+ <transition g="-65,-22" name="to accept" to="join1"/>
+ </java>
+
+ <java expr="#{echoService}" g="140,176,92,52" method="sayHelloWithExecution" name="echo2">
+ <arg>
+ <env type="org.jbpm.pvm.internal.history.HistorySession"/>
+ </arg>
+ <transition g="-70,-22" name="accept" to="join1"/>
+ </java>
+ <state g="63,340,122,52" name="accept">
+ <transition g="-63,-22" name="transition" to="grant access"/>
+ <transition g="-63,-22" name="to timeout" to="timed out">
+ <timer duedate="10 seconds"/>
+ <timer duedate="10 seconds"/>
+ <timer duedate="10 seconds"/>
+ </transition>
+ </state>
+ <state g="16,424,92,52" name="grant access">
+ <transition g="-54,-22" name="transition" to="finish"/>
+ </state>
+ <state g="206,417,92,52" name="timed out">
+ <transition g="-54,-22" name="transition" to="timed out2">
+ <timer duedate="20 seconds"/>
+ <timer duedate="20 seconds"/>
+ <timer duedate="20 seconds"/>
+ <timer duedate="20 seconds"/>
+ </transition>
+ </state>
+ <state g="174,503,92,52" name="timed out2">
+ <transition g="-54,-22" name="transition" to="timed out3">
+ <timer duedate="30 seconds"/>
+ <timer duedate="30 seconds"/>
+ <timer duedate="30 seconds"/>
+ <timer duedate="30 seconds"/>
+ </transition>
+ </state>
+ <state g="89,592,92,52" name="timed out3">
+ <transition g="-54,-22" name="transition" to="finish"/>
+ </state>
+
+ <end g="38,676,48,48" name="finish"/>
+ <fork g="100,96,48,48" name="fork1">
+ <transition g="-53,-22" name="to echo" to="echo"/>
+ <transition g="-61,-22" name="to echo2" to="echo2"/>
+ </fork>
+ <join g="221,283,48,48" multiplicity="2" name="join1">
+ <transition name="to accept" to="accept" g="-65,-22"/>
+ </join>
+
+</process>
\ No newline at end of file
Property changes on: projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/process/Registration.jpdl.xml
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
Added: projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/properties/ApplicationResources_en.properties
===================================================================
--- projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/properties/ApplicationResources_en.properties (rev 0)
+++ projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/properties/ApplicationResources_en.properties 2009-07-22 20:44:20 UTC (rev 5339)
@@ -0,0 +1,16 @@
+website.header=jBPM4 Spring demo
+website.title=jBPM4 Spring demo
+website.subtitle=Demo explaining the integration of Spring - jBPM4 - JSF
+website.footer=� Created by Andries Inz�
+
+website.home.paragraph1=This website is intended as demo showing the integration between Spring and jBPM4
+website.home.paragraph2=You can start by selecting an example process on the right.
+website.home.paragraph3=
+
+menu.home=Home
+
+menu.client.title=Client
+menu.client.1=Start a simple process
+
+menu.processes.title=Demo's
+menu.processes.registration=Registration Process
\ No newline at end of file
Property changes on: projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/properties/ApplicationResources_en.properties
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
Added: projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/properties/ErrorCodes_en.properties
===================================================================
--- projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/properties/ErrorCodes_en.properties (rev 0)
+++ projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/properties/ErrorCodes_en.properties 2009-07-22 20:44:20 UTC (rev 5339)
@@ -0,0 +1,3 @@
+WSFORMATION001=(EN)De operatie is goed verwerkt
+WSFORMATION002=(EN)Er werd geen data gevonden
+WSFORMATION003=(EN)De operatie is goed verwerkt, maar niet alle data werd teruggegeven
\ No newline at end of file
Property changes on: projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/be/inze/spring/properties/ErrorCodes_en.properties
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
Added: projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/log4j.properties
===================================================================
--- projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/log4j.properties (rev 0)
+++ projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/log4j.properties 2009-07-22 20:44:20 UTC (rev 5339)
@@ -0,0 +1,12 @@
+log4j.rootLogger=INFO,CONSOLE,FILE
+log4j.logger.org.springframework=INFO,CONSOLE
+log4j.logger.org.apache=INFO,CONSOLE
+log4j.logger.CONTENT=INFO,contents
+
+log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
+log4j.appender.CONSOLE.immediateFlush=true
+log4j.appender.CONSOLE.target=System.out
+log4j.appender.CONSOLE.threshold=DEBUG
+log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
+log4j.appender.CONSOLE.layout.ConversionPattern=%d{dd-MMM-yyyy HH:mm:ss} %c %t%n[%p]: %m%n
+
Property changes on: projects/demos/richfaces-spring-jbpm4/trunk/src/main/resources/log4j.properties
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
Added: projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/META-INF/MANIFEST.MF
===================================================================
--- projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/META-INF/MANIFEST.MF (rev 0)
+++ projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/META-INF/MANIFEST.MF 2009-07-22 20:44:20 UTC (rev 5339)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
Property changes on: projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/META-INF/MANIFEST.MF
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
Added: projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/WEB-INF/config/.bean-config.xml.jsfdia
===================================================================
--- projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/WEB-INF/config/.bean-config.xml.jsfdia (rev 0)
+++ projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/WEB-INF/config/.bean-config.xml.jsfdia 2009-07-22 20:44:20 UTC (rev 5339)
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<PROCESS model-entity="JSFProcess"/>
Added: projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/WEB-INF/config/.navigation-config.xml.jsfdia
===================================================================
--- projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/WEB-INF/config/.navigation-config.xml.jsfdia (rev 0)
+++ projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/WEB-INF/config/.navigation-config.xml.jsfdia 2009-07-22 20:44:20 UTC (rev 5339)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<PROCESS model-entity="JSFProcess">
+ <PROCESS-ITEM NAME="rules:*" PATH="*" SHAPE="32,17,0,0" model-entity="JSFProcessGroup">
+ <PROCESS-ITEM ID="rules:*:0" NAME="item" PATH="*" model-entity="JSFProcessItem">
+ <PROCESS-ITEM-OUTPUT ID="home::#index.xhtml" NAME="output"
+ PATH="/index.xhtml" TARGET="rules:#index.xhtml" TITLE="home" model-entity="JSFProcessItemOutput"/>
+ <PROCESS-ITEM-OUTPUT
+ ID="registrationProcess::#pages#RegistrationProcess.xhtml"
+ NAME="output1" PATH="/pages/RegistrationProcess.xhtml"
+ TARGET="rules:#pages#RegistrationProcess.xhtml"
+ TITLE="registrationProcess" model-entity="JSFProcessItemOutput"/>
+ </PROCESS-ITEM>
+ </PROCESS-ITEM>
+ <PROCESS-ITEM NAME="rules:#index.xhtml" PATH="/index.xhtml"
+ SHAPE="288,33,0,0" model-entity="JSFProcessGroup"/>
+ <PROCESS-ITEM NAME="rules:#pages#RegistrationProcess.xhtml"
+ PATH="/pages/RegistrationProcess.xhtml" SHAPE="256,177,0,0" model-entity="JSFProcessGroup"/>
+</PROCESS>
Added: projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/WEB-INF/config/applicationContext.xml
===================================================================
--- projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/WEB-INF/config/applicationContext.xml (rev 0)
+++ projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/WEB-INF/config/applicationContext.xml 2009-07-22 20:44:20 UTC (rev 5339)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:aop="http://www.springframework.org/schema/aop"
+ xmlns:tx="http://www.springframework.org/schema/tx"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+ http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
+ http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
+
+ <import resource="classpath:be/inze/spring/demo/applicationContext-common.xml" />
+ <import resource="classpath:be/inze/spring/demo/applicationContext-dao.xml" />
+ <import resource="classpath:be/inze/spring/demo/applicationContext-service.xml" />
+ <import resource="classpath:be/inze/spring/demo/applicationContext-process.xml" />
+
+</beans>
\ No newline at end of file
Property changes on: projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/WEB-INF/config/applicationContext.xml
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
Added: projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/WEB-INF/config/bean-config.xml
===================================================================
--- projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/WEB-INF/config/bean-config.xml (rev 0)
+++ projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/WEB-INF/config/bean-config.xml 2009-07-22 20:44:20 UTC (rev 5339)
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE faces-config PUBLIC
+ "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
+ "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
+
+<faces-config>
+
+ <managed-bean>
+ <managed-bean-name>simpleProcessBackingBean</managed-bean-name>
+ <managed-bean-class>
+ be.inze.spring.demo.jsf.SimpleProcessBackingBean
+ </managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ <managed-property>
+ <property-name>simpleProcessService</property-name>
+ <value>#{simpleProcessService}</value>
+ </managed-property>
+ </managed-bean>
+
+ <managed-bean>
+ <managed-bean-name>deployBackingBean</managed-bean-name>
+ <managed-bean-class>
+ be.inze.spring.demo.jsf.DeployBackingBean
+ </managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ <managed-property>
+ <property-name>deployService</property-name>
+ <value>#{deployService}</value>
+ </managed-property>
+ </managed-bean>
+
+
+ <managed-bean>
+ <managed-bean-name>processInformationBackingBean</managed-bean-name>
+ <managed-bean-class>
+ be.inze.spring.demo.jsf.ProcessInformationBackingBean
+ </managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ <managed-property>
+ <property-name>processInformationService</property-name>
+ <value>#{processInformationService}</value>
+ </managed-property>
+ <managed-property>
+ <property-name>simpleProcessService</property-name>
+ <value>#{simpleProcessService}</value>
+ </managed-property>
+ </managed-bean>
+
+</faces-config>
\ No newline at end of file
Property changes on: projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/WEB-INF/config/bean-config.xml
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
Added: projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/WEB-INF/config/faces-config.xml
===================================================================
--- projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/WEB-INF/config/faces-config.xml (rev 0)
+++ projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/WEB-INF/config/faces-config.xml 2009-07-22 20:44:20 UTC (rev 5339)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE faces-config PUBLIC
+ "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
+ "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
+
+<faces-config>
+
+ <application>
+ <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
+ <variable-resolver>
+ org.springframework.web.jsf.DelegatingVariableResolver
+ </variable-resolver>
+ </application>
+</faces-config>
Property changes on: projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/WEB-INF/config/faces-config.xml
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
Added: projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/WEB-INF/config/navigation-config.xml
===================================================================
--- projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/WEB-INF/config/navigation-config.xml (rev 0)
+++ projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/WEB-INF/config/navigation-config.xml 2009-07-22 20:44:20 UTC (rev 5339)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE faces-config PUBLIC
+ "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
+ "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
+
+<faces-config>
+
+ <navigation-rule>
+ <from-view-id>*</from-view-id>
+ <navigation-case>
+ <from-outcome>home</from-outcome>
+ <to-view-id>/index.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>registrationProcess</from-outcome>
+ <to-view-id>/pages/RegistrationProcess.xhtml</to-view-id>
+ <redirect />
+ </navigation-case>
+ </navigation-rule>
+
+</faces-config>
\ No newline at end of file
Property changes on: projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/WEB-INF/config/navigation-config.xml
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
Added: projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/WEB-INF/facelets/custom_input_components.taglib.xml
===================================================================
--- projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/WEB-INF/facelets/custom_input_components.taglib.xml (rev 0)
+++ projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/WEB-INF/facelets/custom_input_components.taglib.xml 2009-07-22 20:44:20 UTC (rev 5339)
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<!DOCTYPE facelet-taglib PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN"
+ "http://java.sun.com/dtd/facelet-taglib_1_0.dtd">
+
+<facelet-taglib>
+ <namespace>http://www.inze.be/andries/common/jsf/custom</namespace>
+
+</facelet-taglib>
Property changes on: projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/WEB-INF/facelets/custom_input_components.taglib.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/WEB-INF/web.xml
===================================================================
--- projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/WEB-INF/web.xml (rev 0)
+++ projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/WEB-INF/web.xml 2009-07-22 20:44:20 UTC (rev 5339)
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app id="WebApp_ID" version="2.4"
+ xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+ <display-name>jBPM4 Spring Demo</display-name>
+ <context-param>
+ <param-name>facelets.REFRESH_PERIOD</param-name>
+ <param-value>2</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.CONFIG_FILES</param-name>
+ <param-value>/WEB-INF/config/faces-config.xml,/WEB-INF/config/bean-config.xml,/WEB-INF/config/navigation-config.xml</param-value>
+ </context-param>
+ <context-param>
+ <!--
+ enable Facelets debug logging.
+ -->
+ <param-name>facelets.DEVELOPMENT</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <!--
+ <context-param> <param-name>facelets.LIBRARIES</param-name>
+ <param-value>/WEB-INF/facelets/custom_input_components.taglib.xml</param-value>
+ </context-param>
+ -->
+ <context-param>
+ <!--
+
+ If you want to save the state on the server (this is the default in
+ the JavaServer Faces reference implementation), then specify server
+ instead of client in the param-value. Note that if the state is saved
+ on the client, the state of the entire view is rendered to a hidden
+ field on the page.
+ -->
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>server</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+ <param-value>.xhtml</param-value>
+ </context-param>
+ <context-param>
+ <param-name>facelets.SKIP_COMMENTS</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <!--
+
+ Set this flag to true if you want the JSF Reference Implementation to
+ validate the XML in your faces-config.xml resources against the DTD.
+ Default value is false.
+ -->
+ <param-name>com.sun.faces.validateXml</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.richfaces.SKIN</param-name>
+ <param-value>blueSky</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.richfaces.CONTROL_SKINNING</param-name>
+ <param-value>enable</param-value>
+ </context-param>
+ <context-param>
+ <!--
+
+ Set this flag to true if you want the JSF Reference Implementation to
+ verify that all of the application objects you have configured
+ (components, converters, renderers, and validators) can be
+ successfully created. Default value is false.
+ -->
+ <param-name>com.sun.faces.verifyObjects</param-name>
+ <param-value>false</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
+ <param-value>com.sun.facelets.FaceletViewHandler</param-value>
+ </context-param>
+ <context-param>
+ <param-name>contextConfigLocation</param-name>
+ <param-value>/WEB-INF/config/applicationContext.xml</param-value>
+ </context-param>
+ <!-- jboss el expressions allow method params -->
+ <context-param>
+ <param-name>com.sun.faces.expressionFactory</param-name>
+ <param-value>org.jboss.el.ExpressionFactoryImpl</param-value>
+ </context-param>
+ <listener>
+ <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+ </listener>
+ <listener>
+ <listener-class>
+ org.springframework.web.context.request.RequestContextListener</listener-class>
+ </listener>
+ <listener>
+ <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
+ </listener>
+ <filter>
+ <display-name>RichFaces Filter</display-name>
+ <filter-name>richfaces</filter-name>
+ <filter-class>org.ajax4jsf.Filter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>richfaces</filter-name>
+ <servlet-name>Faces Servlet</servlet-name>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>FORWARD</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
+ </filter-mapping>
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+ <welcome-file-list>
+ <welcome-file>index.jsf</welcome-file>
+ </welcome-file-list>
+</web-app>
\ No newline at end of file
Property changes on: projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/WEB-INF/web.xml
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
Added: projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/common/images/picto_derpage.gif
===================================================================
(Binary files differ)
Property changes on: projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/common/images/picto_derpage.gif
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/common/images/picto_loupe.gif
===================================================================
(Binary files differ)
Property changes on: projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/common/images/picto_loupe.gif
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/common/images/picto_precedent.gif
===================================================================
(Binary files differ)
Property changes on: projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/common/images/picto_precedent.gif
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/common/images/picto_prempage.gif
===================================================================
(Binary files differ)
Property changes on: projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/common/images/picto_prempage.gif
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/common/images/picto_suivant.gif
===================================================================
(Binary files differ)
Property changes on: projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/common/images/picto_suivant.gif
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/common/menu.xhtml
===================================================================
--- projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/common/menu.xhtml (rev 0)
+++ projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/common/menu.xhtml 2009-07-22 20:44:20 UTC (rev 5339)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:t="http://myfaces.apache.org/tomahawk"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:a4j="http://richfaces.org/a4j">
+
+<ui:composition>
+ <h:commandLink id="homeLink" action="home">
+ <h:outputText id="homeLinkText" value="#{messages['menu.home']}"/>
+ </h:commandLink>
+
+ <h2>#{messages['menu.processes.title']}</h2>
+ <ul>
+
+ <li>
+ <h:commandLink id="registrationProcess" action="registrationProcess">
+ <h:outputText id="registrationProcessText" value="#{messages['menu.processes.registration']}"/>
+ </h:commandLink>
+ </li>
+
+ </ul>
+</ui:composition>
+</html>
+
+
Property changes on: projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/common/menu.xhtml
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
Added: projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/index.xhtml
===================================================================
--- projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/index.xhtml (rev 0)
+++ projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/index.xhtml 2009-07-22 20:44:20 UTC (rev 5339)
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:fn="http://java.sun.com/jsp/jstl/functions"
+ >
+
+<f:view>
+ <ui:composition template="/template/template.xhtml">
+ <ui:define name="body">
+
+ <p>#{messages['website.home.paragraph1']}</p>
+ <br/>
+ <p>#{messages['website.home.paragraph2']}</p>
+ <br/>
+ <p>#{messages['website.home.paragraph3']}</p>
+
+ </ui:define>
+ </ui:composition>
+</f:view>
+</html>
\ No newline at end of file
Property changes on: projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/index.xhtml
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
Added: projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/pages/RegistrationProcess.xhtml
===================================================================
--- projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/pages/RegistrationProcess.xhtml (rev 0)
+++ projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/pages/RegistrationProcess.xhtml 2009-07-22 20:44:20 UTC (rev 5339)
@@ -0,0 +1,72 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:fn="http://java.sun.com/jsp/jstl/functions">
+<ui:composition template="/template/template.xhtml">
+ <ui:define name="body">
+ <a4j:queue id="myQueue" ignoreDupResponses="true"/>
+ <a4j:poll reRender="panel" interval="3000" />
+ <p>Add a new definition: <a4j:commandButton action="#{deployBackingBean.deploy()}" value="Deploy" reRender="panel1"/></p>
+ <p>Add a new processExecution: <a4j:commandButton action="#{simpleProcessBackingBean.start()}" value="start" reRender="panel"/></p>
+ <p>All processDefinitions:
+
+
+ <a4j:outputPanel id="panel1" ajaxRendered="true">
+ <h:dataTable value="#{processInformationBackingBean.getAllProcessDefinitionKeys()}" var="item" class="gridTab">
+ <h:column>
+ <f:facet name="header">Key</f:facet>
+ <h:outputLabel value="#{item.key}" />
+ </h:column>
+ <h:column>
+ <f:facet name="header">Name</f:facet>
+ <h:outputLabel value="#{item.name}" />
+ </h:column>
+ <h:column>
+ <f:facet name="header">Version</f:facet>
+ <h:outputLabel value="#{item.version}" />
+ </h:column>
+ </h:dataTable>
+ </a4j:outputPanel>
+ </p>
+
+ <a4j:outputPanel id="panel" ajaxRendered="true">
+ <p>All open executions:
+ <h:dataTable id="table" value="#{processInformationBackingBean.getAllOpenExecutions()}" var="item" >
+ <rich:column>
+ <f:facet name="header">Key</f:facet>
+ <h:outputLabel value="#{item.key}" />
+ </rich:column>
+ <h:column>
+ <f:facet name="header">Name</f:facet>
+ <h:outputLabel value="#{item.name}" />
+ </h:column>
+ <h:column>
+ <f:facet name="header">Id</f:facet>
+ <h:outputLabel value="#{item.id}" />
+ </h:column>
+ <h:column>
+ <f:facet name="header">State</f:facet>
+ <h:outputLabel value="#{item.state}" />
+ </h:column>
+ <h:column>
+ <f:facet name="header">Activity</f:facet>
+ <h:outputLabel value="#{item.activityName}" />
+ </h:column>
+ <h:column>
+ <f:facet name="header">signal</f:facet>
+ <a4j:commandButton action="#{processInformationBackingBean.signal(item)}" value="signal"/>
+ </h:column>
+ </h:dataTable>
+ </p>
+ <a4j:status id="commonstatus" startText="In progress..." stopText="No ajax request running"/>
+</a4j:outputPanel>
+
+ </ui:define>
+</ui:composition>
+</html>
\ No newline at end of file
Property changes on: projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/pages/RegistrationProcess.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/style/style.css
===================================================================
--- projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/style/style.css (rev 0)
+++ projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/style/style.css 2009-07-22 20:44:20 UTC (rev 5339)
@@ -0,0 +1,191 @@
+* {
+ padding: 0;
+ margin: 0;
+}
+
+body {
+ background: #000;
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 11px;
+ line-height: 18px;
+ color: #aaa;
+}
+
+img {
+ border: none;
+}
+
+a {
+ color: #97C4FF;
+ text-decoration: none;
+}
+
+a:hover {
+ text-decoration: underline;
+ color: #aaa;
+}
+
+#wrap {
+ margin: 40px auto 0 auto;
+ width: 1000px;
+}
+
+#header {
+ border: 5px solid #222;
+ height: 100px;
+ background: #333;
+}
+
+#header h1 {
+ font-size: 26px;
+ font-weight: 100;
+ letter-spacing: -1px;
+ padding: 12px 0 5px 10px;
+}
+
+#header h1 a {
+ color: #fff;
+ text-decoration: none;
+}
+
+#header h1 a:hover {
+ color: #aaa;
+ text-decoration: none;
+}
+
+#header h2 {
+ color: #ccc;
+ font-size: 15px;
+ font-weight: 100;
+ padding: 0 0 0 11px;
+ letter-spacing: -1px;
+ line-height: 15px;
+}
+
+.left {
+ margin-top: 10px;
+ width: 770px;
+ float: left;
+ border: 5px solid #222;
+ padding: 10px;
+ background: #333;
+ min-height: 150px;
+}
+
+.left h2 {
+ color: #FF4800;
+ font-size: 24px;
+ letter-spacing: -1px;
+ font-weight: 100;
+ padding: 25px 0 15px 0;
+}
+
+.left h3 {
+ color: #FF4800;
+ font-size: 18px;
+ letter-spacing: -1px;
+ font-weight: 60;
+ padding: 10px 0 15px 0;
+}
+
+.left label {
+ font-weight: bold;
+ padding: 0 35px 0 5px;
+}
+
+.right {
+ margin-top: 10px;
+ width: 160px;
+ float: right;
+ border: 5px solid #222;
+ font-size: 12px;
+ padding: 10px;
+ background: #333;
+}
+
+.right ul {
+ list-style-type: square;
+ padding: 5px 10px 10px 20px;
+ color: #59799F;
+}
+
+.right h2 {
+ height: 30px;
+ font-size: 12px;
+ color: #666;
+ line-height: 30px;
+}
+
+.right a {
+ text-decoration: none
+}
+
+#footer {
+ margin-top: 10px;
+ text-align: center;
+ color: #eee;
+ font-size: 11px;
+ border: 5px solid #222;
+ padding: 10px;
+ background: #333;
+}
+
+.bold {
+ font-weight: 700
+}
+
+.fullwidth {
+ width: 100%
+}
+
+.floatright {
+ float: right
+}
+
+.tdwidth05 {
+ width: 5%;
+}
+
+.tdwidth10 {
+ width: 10%;
+}
+
+.tdwidth15 {
+ width: 15%;
+}
+
+.tdwidth20 {
+ width: 20%;
+}
+
+.tdwidth25 {
+ width: 25%;
+}
+
+.tdwidth30 {
+ width: 30%;
+}
+
+.tdwidth35 {
+ width: 35%;
+}
+
+.tdwidth40 {
+ width: 40%;
+}
+
+.tdwidth45 {
+ width: 45%;
+}
+
+.tdwidth50 {
+ width: 50%;
+}
+
+.tdwidth55 {
+ width: 55%;
+}
+
+.tdwidth60 {
+ width: 60%;
+}
\ No newline at end of file
Property changes on: projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/style/style.css
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
Added: projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/template/template.xhtml
===================================================================
--- projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/template/template.xhtml (rev 0)
+++ projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/template/template.xhtml 2009-07-22 20:44:20 UTC (rev 5339)
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:fn="http://java.sun.com/jsp/jstl/functions"
+ >
+<f:view>
+<f:loadBundle basename="be.inze.spring.properties.ApplicationResources"
+ var="messages" />
+ <head>
+ <title>#{messages['website.header']}</title>
+ <link rel="stylesheet" type="text/css" href="/jbpm4-spring/style/style.css" />
+ </head>
+ <body>
+ <h:form id="mainForm">
+
+ <div id="wrap">
+
+ <div id="header">
+ <h1>#{messages['website.title']}</h1>
+ <br />
+ <h2>#{messages['website.subtitle']}</h2>
+ </div>
+
+
+ <div class="left"><ui:insert name="body" /></div>
+
+ <div class="right"><ui:include src="/common/menu.xhtml" /></div>
+
+ <div style="clear: both;" />
+
+ <div id="footer">#{messages['website.footer']}</div>
+
+ </div>
+
+ <br/>
+ </h:form>
+ </body>
+</f:view>
+</html>
\ No newline at end of file
Property changes on: projects/demos/richfaces-spring-jbpm4/trunk/src/main/webapp/template/template.xhtml
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
Added: projects/demos/richfaces-spring-jbpm4/trunk/src/test/java/be/inze/spring/demo/process/RegistrationProcessTests.java
===================================================================
--- projects/demos/richfaces-spring-jbpm4/trunk/src/test/java/be/inze/spring/demo/process/RegistrationProcessTests.java (rev 0)
+++ projects/demos/richfaces-spring-jbpm4/trunk/src/test/java/be/inze/spring/demo/process/RegistrationProcessTests.java 2009-07-22 20:44:20 UTC (rev 5339)
@@ -0,0 +1,65 @@
+package be.inze.spring.demo.process;
+
+import java.util.Collection;
+
+import org.jbpm.api.Execution;
+import org.jbpm.api.ProcessInstance;
+import org.jbpm.api.activity.ActivityExecution;
+import org.jbpm.api.job.Job;
+import org.jbpm.test.AbstractTransactionalSpringJbpmTestCase;
+
+public class RegistrationProcessTests extends
+ AbstractTransactionalSpringJbpmTestCase {
+
+ private String processInstanceId;
+
+ @Override
+ protected String[] getConfigLocations() {
+ return new String[] {
+ "be/inze/spring/demo/applicationContext-common.xml",
+ "be/inze/spring/demo/applicationContext-dao.xml",
+ "be/inze/spring/demo/applicationContext-process.xml",
+ "be/inze/spring/demo/applicationContext-service.xml" };
+ }
+
+ @Override
+ protected void onSetUpInTransaction() throws Exception {
+ super.onSetUpInTransaction();
+ deployJpdlFromClasspath("be/inze/spring/process/Registration.jpdl.xml");
+ }
+
+ public void testStart() {
+ ProcessInstance processInstance = executionService
+ .startProcessInstanceByKey("DemoProcess");
+ processInstanceId = processInstance.getId();
+ assertTrue(processInstance.isActive("accept"));
+ }
+
+ public void testSignalAccept() {
+ testStart();
+
+ Execution execution = executionService.findExecutionById(processInstanceId);
+
+ ProcessInstance processInstance = executionService.signalExecutionById(execution.getExecutions().iterator().next().getId(), "transition");
+ ActivityExecution activityExecution = (ActivityExecution) processInstance;
+ assertEquals("grant access", activityExecution.getActivityName());
+ }
+
+ public void testTimeOut() {
+ testStart();
+
+ Collection<Job> result = managementService.createJobQuery().processInstanceId(processInstanceId).list();
+ assertEquals(1, result.size());
+
+ managementService.executeJob(result.iterator().next().getId());
+
+ result = managementService.createJobQuery().processInstanceId(processInstanceId).list();
+ assertEquals(1, result.size());
+
+ ProcessInstance instance = executionService.findProcessInstanceById(processInstanceId);
+ ActivityExecution activityExecution = (ActivityExecution) instance;
+ assertEquals("timed out", activityExecution.getActivityName());
+
+ }
+
+}
Property changes on: projects/demos/richfaces-spring-jbpm4/trunk/src/test/java/be/inze/spring/demo/process/RegistrationProcessTests.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 3 months
JBoss JBPM SVN: r5337 - projects/demos.
by do-not-reply@jboss.org
Author: ainze
Date: 2009-07-22 16:30:48 -0400 (Wed, 22 Jul 2009)
New Revision: 5337
Added:
projects/demos/richfaces-spring-jbpm4/
Log:
creating new project
15 years, 3 months
JBoss JBPM SVN: r5336 - projects.
by do-not-reply@jboss.org
Author: ainze
Date: 2009-07-22 16:29:38 -0400 (Wed, 22 Jul 2009)
New Revision: 5336
Added:
projects/demos/
Log:
created demo's folder
15 years, 3 months
JBoss JBPM SVN: r5335 - in jbpm4/trunk/modules: devguide/src/main/docbook/en/modules and 1 other directories.
by do-not-reply@jboss.org
Author: jbarrez
Date: 2009-07-22 09:20:07 -0400 (Wed, 22 Jul 2009)
New Revision: 5335
Added:
jbpm4/trunk/modules/devguide/src/main/docbook/en/images/taskform_example.png
jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/taskform/process.jpdl.xml
Removed:
jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/taskform/accept_message.ftl
jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/taskform/reject_message.ftl
jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/taskform/vacation2.jpdl.xml
Modified:
jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch02-Incubation.xml
jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/taskform/request_vacation.ftl
jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/taskform/verify_request.ftl
Log:
JBPM-2423, JBPM-2351, JBPM-2317, JBPM-2301: make taskform example work in demo.setup.
Added: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/taskform_example.png
===================================================================
(Binary files differ)
Property changes on: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/taskform_example.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch02-Incubation.xml
===================================================================
--- jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch02-Incubation.xml 2009-07-21 20:42:34 UTC (rev 5334)
+++ jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch02-Incubation.xml 2009-07-22 13:20:07 UTC (rev 5335)
@@ -617,5 +617,79 @@
<ulink url="http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4241828">here</ulink>
</para>
</section>
+
+ <section id="taskforms">
+ <title>Task forms</title>
+ <para>
+ Human interaction happens nowadays most of the times through web interfaces
+ using some kind of form to capture input of the user. Using jBPM
+ task forms, a process designer can attach such input forms to a
+ <emphasis role="bold">task activity</emphasis> or a <emphasis role="bold">
+ start activity</emphasis>. When using the jBPM console, the forms will
+ automatically be displayed for user input when a process instance is started
+ or when a task is completed. An example process (<literal>VacationRequest</literal>)
+ is shipped with the default examples of the distribution demo.
+ </para>
+ <section id="taskformsusage">
+ <title>Usage</title>
+ <para>
+ Task form references can be put on start and task activities:
+ <programlisting>
+<start <emphasis role="bold">form="org/jbpm/examples/taskform/request_vacation.ftl"</emphasis> name="start">
+ <transition to="verify_request"/>
+</start>
+<task candidate-users="mike,peter" <emphasis role="bold">form="org/jbpm/examples/taskform/verify_request.ftl"</emphasis> name="verify_request">
+ <transition name="reject" to="vacation_rejected"/>
+ <transition name="accept" to="vacation_accepted"/>
+</task>
+ </programlisting>
+ </para>
+ </section>
+ <section id="taskformsformat">
+ <title>Form format</title>
+ <para>
+ Task forms are plain text files containing arbitray content. However,
+ when using the jBPM console, HTML pages containing a form element
+ are required. The default form plugin of the console leverages the
+ <ulink url="http://freemarker.sourceforge.net/">freemarker</ulink>
+ templating library. It builds on the following constraints:
+ <itemizedlist>
+ <listitem>Templates need to be suffixed *.ftl and be included with the deployment:
+ <programlisting>deployment.addResourceFromClasspath("org/jbpm/examples/taskform/verify_request.ftl");</programlisting>
+ </listitem>
+ <listitem>The action of the form must be "${form.action}"</listitem>
+ <listitem>HTML forms need to provide the correct enctype: "multipart/form-data"</listitem>
+ <listitem>Form field names become process variables names and vice versa</listitem>
+ <listitem>A reserved field name is available for signaling execution upon task completion: "outcome"</listitem>
+ </itemizedlist>
+
+ <programlisting>
+<html>
+ <body>
+ <form action="${form.action}" method="POST" enctype="multipart/form-data">
+ <h3>Your employee, ${employee_name} would like to go on vacation</h3>
+ Number of days: ${number_of_days}<br/>
+ <hr>
+ In case you reject, please provide a reason:<br/>
+ <input type="textarea" name="reason"/><br/>
+ <#list outcome.values as transition>
+ <input type="submit" name="outcome" value="${transition}">
+ </#list>
+ </form>
+ </body>
+</html>
+ </programlisting>
+ In this example, the process variables <literal>employee_name</literal>
+ and <literal>number_of_days</literal> is displayed on the
+ screen using a variable reference expression. The value of the input
+ field <literal>reason</literal> will be stored as a process
+ variable.
+ </para>
+ <para>
+ The jBPM console will render the taskforms automatically:
+ <mediaobject><imageobject><imagedata align="center" fileref="images/taskform_example.png"/></imageobject></mediaobject>
+ </para>
+ </section>
+ </section>
</chapter>
Deleted: jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/taskform/accept_message.ftl
===================================================================
--- jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/taskform/accept_message.ftl 2009-07-21 20:42:34 UTC (rev 5334)
+++ jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/taskform/accept_message.ftl 2009-07-22 13:20:07 UTC (rev 5335)
@@ -1,12 +0,0 @@
-<html>
-<body>
-
-<h2>Your vacation request has been accepted</h2>
-Number of days: ${number_of_days}
-
-<form action="${form.action}" method="POST" enctype="multipart/form-data">
- <input type="submit" name="Done"/>
-</form>
-
-</body>
-</html>
\ No newline at end of file
Copied: jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/taskform/process.jpdl.xml (from rev 5323, jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/taskform/vacation2.jpdl.xml)
===================================================================
--- jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/taskform/process.jpdl.xml (rev 0)
+++ jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/taskform/process.jpdl.xml 2009-07-22 13:20:07 UTC (rev 5335)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<process name="VacationRequest" xmlns="http://jbpm.org/4.0/jpdl">
+ <start form="org/jbpm/examples/taskform/request_vacation.ftl" g="16,56,48,48" name="start">
+ <transition to="verify_request"/>
+ </start>
+ <task candidate-users="mike,peter" form="org/jbpm/examples/taskform/verify_request.ftl" g="96,54,178,52" name="verify_request">
+ <transition g="-34,9" name="reject" to="vacation_rejected"/>
+ <transition g="-46,-26" name="accept" to="vacation_accepted"/>
+ </task>
+ <end g="306,16,48,48" name="vacation_accepted"/>
+ <end g="306,96,48,48" name="vacation_rejected"/>
+</process>
\ No newline at end of file
Deleted: jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/taskform/reject_message.ftl
===================================================================
--- jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/taskform/reject_message.ftl 2009-07-21 20:42:34 UTC (rev 5334)
+++ jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/taskform/reject_message.ftl 2009-07-22 13:20:07 UTC (rev 5335)
@@ -1,10 +0,0 @@
-<html>
-<body>
-
-<h2>Your vacation request has been rejected</h2>
-Reason: ${reason}
-<form action="${form.action}" method="POST" enctype="multipart/form-data">
- <input type="submit" name="Done"/>
-</form>
-</body>
-</html>
\ No newline at end of file
Modified: jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/taskform/request_vacation.ftl
===================================================================
--- jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/taskform/request_vacation.ftl 2009-07-21 20:42:34 UTC (rev 5334)
+++ jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/taskform/request_vacation.ftl 2009-07-22 13:20:07 UTC (rev 5335)
@@ -1,18 +1,25 @@
<html>
-<body>
+ <body>
+
+ <form action="${form.action}" method="POST" enctype="multipart/form-data">
+
+ <h3>How many days would you like to go on vacation?</h3>
+ <select name="number_of_days">
+ <option value="3">3 days</option>
+ <option value="5">5 days</option>
+ <option value="10">10 days</option>
+ </select><br>
+
+ <br/>
+ <br/>
+
+ Your name: <input type="text" name="employee_name" /><br/>
+
+ <br/>
+ <br/>
+
+ <input type="submit" name="Done"/>
-<h2>How many days would you like to go on vacation?</h2>
-<form action="${form.action}" method="POST" enctype="multipart/form-data">
-<select name="number_of_days">
- <option value="3">3 days</option>
- <option value="5">5 days</option>
- <option value="10">10 days</option>
-</select><br>
-
-<#list outcome.values as transition>
- <input type="submit" name="outcome" value="${transition}">
-</#list>
-
-</form>
-</body>
+ </form>
+ </body>
</html>
\ No newline at end of file
Deleted: jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/taskform/vacation2.jpdl.xml
===================================================================
--- jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/taskform/vacation2.jpdl.xml 2009-07-21 20:42:34 UTC (rev 5334)
+++ jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/taskform/vacation2.jpdl.xml 2009-07-22 13:20:07 UTC (rev 5335)
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<process name="VacationRequest" xmlns="http://jbpm.org/4.0/jpdl">
- <start g="274,13,48,48" name="start1">
- <transition g="-109,-18" name="to number_of_days" to="request_vacation"/>
- </start>
- <end g="185,364,48,48" name="vacation_rejected"/>
- <task candidate-users="peter,mary" g="237,97,126,52" name="request_vacation">
- <transition g="-99,-18" name="to grant_vacation" to="verify_request"/>
- </task>
- <task candidate-users="mike" g="247,193,101,52" name="verify_request">
- <transition g="-84,-1" name="reject" to="reject_message"/>
- <transition g="32,-4" name="accept" to="accept_message"/>
- </task>
- <task candidate-groups="sales" g="148,273,118,52" name="reject_message">
- <transition g="-51,-9" name="done_rejected" to="vacation_rejected"/>
- </task>
- <task candidate-groups="sales" g="371,274,108,52" name="accept_message">
- <transition g="-46,-18" name="done_accepted" to="vacation_accepted"/>
- </task>
- <end g="408,359,48,48" name="vacation_accepted"/>
-</process>
\ No newline at end of file
Modified: jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/taskform/verify_request.ftl
===================================================================
--- jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/taskform/verify_request.ftl 2009-07-21 20:42:34 UTC (rev 5334)
+++ jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/taskform/verify_request.ftl 2009-07-22 13:20:07 UTC (rev 5335)
@@ -1,15 +1,20 @@
<html>
-<body>
+ <body>
-<h2>Your employee would like to go on vacation</h2>
-<form action="${form.action}" method="POST" enctype="multipart/form-data">
-Number of days: ${number_of_days}<br/>
-<hr>
-In case you reject, please provide a reason:<br/>
-<input type="textarea" name="reason"/><br/>
-<#list outcome.values as transition>
- <input type="submit" name="outcome" value="${transition}">
-</#list>
-</form>
-</body>
+ <form action="${form.action}" method="POST" enctype="multipart/form-data">
+
+ <h3>Your employee, ${employee_name} would like to go on vacation</h3>
+ Number of days: ${number_of_days}<br/>
+
+ <hr>
+
+ In case you reject, please provide a reason:<br/>
+ <input type="textarea" name="reason"/><br/>
+
+ <#list outcome.values as transition>
+ <input type="submit" name="outcome" value="${transition}">
+ </#list>
+
+ </form>
+ </body>
</html>
\ No newline at end of file
15 years, 3 months