JBoss JBPM SVN: r6789 - in jbpm3/branches/jbpm-3.2-soa: core/src/test/java/org/jbpm/jbpm2605 and 5 other directories.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2010-10-29 03:04:27 -0400 (Fri, 29 Oct 2010)
New Revision: 6789
Modified:
jbpm3/branches/jbpm-3.2-soa/core/pom.xml
jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm2605/JBPM2605Test.java
jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm2630/JBPM2630Test.java
jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/persistence/db/PersistenceServiceDbTest.java
jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/taskmgmt/exe/SwimlaneDbTest.java
jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/taskmgmt/exe/SwimlaneTest.java
jbpm3/branches/jbpm-3.2-soa/db/pom.xml
jbpm3/branches/jbpm-3.2-soa/db/scripts/antrun-jbpmschema.xml
Log:
JBPM-2971 work around lack of configurable delimiter in DatabaseInitializer;
sanetize various custom configuration tests
Modified: jbpm3/branches/jbpm-3.2-soa/core/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/pom.xml 2010-10-28 02:12:59 UTC (rev 6788)
+++ jbpm3/branches/jbpm-3.2-soa/core/pom.xml 2010-10-29 07:04:27 UTC (rev 6789)
@@ -185,12 +185,21 @@
</execution>
</executions>
</plugin>
+
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <excludes>
+ <exclude>org/jbpm/db/JbpmSchemaDbTest.java</exclude>
+ <exclude>org/jbpm/perf/PerformanceTest.java</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
</plugins>
</build>
<!-- Profiles -->
<profiles>
-
<!--
Name: jdk14
Desc: Dependencies specific to JDK 1.4
@@ -210,32 +219,6 @@
</profile>
<!--
- Name: db2
- Desc: DB2 Test Exclusions
- -->
- <profile>
- <id>db2</id>
- <activation>
- <property>
- <name>database</name>
- <value>db2</value>
- </property>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <excludes>
- <exclude>org/jbpm/db/JbpmSchemaDbTest.java</exclude>
- </excludes>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
-
- <!--
Name: mssql
Desc: SQL Server Test Exclusions
-->
@@ -253,7 +236,9 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
+ <exclude>org/jbpm/db/JbpmSchemaDbTest.java</exclude>
<exclude>org/jbpm/job/executor/JobExecutorDbTest.java</exclude>
+ <exclude>org/jbpm/perf/PerformanceTest.java</exclude>
</excludes>
</configuration>
</plugin>
@@ -262,15 +247,15 @@
</profile>
<!--
- Name: oracle
- Desc: Oracle Test Exclusions
+ Name: sybase
+ Desc: Sybase Test Exclusions
-->
<profile>
- <id>oracle</id>
+ <id>sybase</id>
<activation>
<property>
<name>database</name>
- <value>oracle</value>
+ <value>sybase</value>
</property>
</activation>
<build>
@@ -280,6 +265,8 @@
<configuration>
<excludes>
<exclude>org/jbpm/db/JbpmSchemaDbTest.java</exclude>
+ <exclude>org/jbpm/jbpm2958/TimerCalendarTest.java</exclude>
+ <exclude>org/jbpm/perf/PerformanceTest.java</exclude>
</excludes>
</configuration>
</plugin>
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm2605/JBPM2605Test.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm2605/JBPM2605Test.java 2010-10-28 02:12:59 UTC (rev 6788)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm2605/JBPM2605Test.java 2010-10-29 07:04:27 UTC (rev 6789)
@@ -22,10 +22,12 @@
package org.jbpm.jbpm2605;
import org.hibernate.SessionFactory;
-import org.hibernate.cfg.Configuration;
-import org.jbpm.db.AbstractDbTestCase;
-import org.jbpm.graph.def.ProcessDefinition;
+
+import org.jbpm.AbstractJbpmTestCase;
+import org.jbpm.JbpmConfiguration;
+import org.jbpm.JbpmContext;
import org.jbpm.persistence.db.DbPersistenceServiceFactory;
+import org.jbpm.persistence.db.MockSessionFactory;
/**
* {@link DbPersistenceServiceFactory} should not close {@link SessionFactory} if it did not
@@ -34,32 +36,20 @@
* @see <a href="https://jira.jboss.org/browse/JBPM-2605">JBPM-2605</a>
* @author Alejandro Guizar
*/
-public class JBPM2605Test extends AbstractDbTestCase {
+public class JBPM2605Test extends AbstractJbpmTestCase {
- private SessionFactory sessionFactory;
-
- protected void setUp() throws Exception {
- super.setUp();
- sessionFactory = new Configuration().configure().buildSessionFactory();
- jbpmContext.setSessionFactory(sessionFactory);
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- sessionFactory.close();
- }
-
public void testExternalSessionFactory() {
- deployProcessDefinition(new ProcessDefinition(getName()));
- closeJbpmContext();
+ SessionFactory sessionFactory = new MockSessionFactory();
+
+ JbpmConfiguration jbpmConfiguration = JbpmConfiguration.parseResource("jbpm.cfg.xml");
try {
- jbpmConfiguration.close();
- jbpmConfiguration = null;
- assertFalse("expected external session factory to remain open", sessionFactory.isClosed());
+ JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
+ jbpmContext.setSessionFactory(sessionFactory);
}
finally {
- createJbpmContext();
- jbpmContext.setSessionFactory(sessionFactory);
+ jbpmConfiguration.close();
}
+
+ assert !sessionFactory.isClosed() : "expected external session factory to remain open";
}
}
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm2630/JBPM2630Test.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm2630/JBPM2630Test.java 2010-10-28 02:12:59 UTC (rev 6788)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm2630/JBPM2630Test.java 2010-10-29 07:04:27 UTC (rev 6789)
@@ -35,59 +35,59 @@
*/
public class JBPM2630Test extends AbstractJbpmTestCase {
- JbpmConfiguration testConfiguration;
- JbpmConfiguration noLogConfiguration;
+ JbpmConfiguration baseConfiguration;
+ JbpmConfiguration alternateConfiguration;
protected void setUp() throws Exception {
super.setUp();
- testConfiguration = JbpmConfiguration.getInstance();
- noLogConfiguration = JbpmConfiguration.parseResource("org/jbpm/jbpm2630/jbpm.nolog.cfg.xml");
+ baseConfiguration = JbpmConfiguration.parseResource("jbpm.cfg.xml");
+ alternateConfiguration = JbpmConfiguration.parseResource("org/jbpm/jbpm2630/jbpm.nolog.cfg.xml");
}
protected void tearDown() throws Exception {
- noLogConfiguration.close();
- testConfiguration.close();
+ alternateConfiguration.close();
+ baseConfiguration.close();
super.tearDown();
}
public void testBlockStructuredContextClose() {
- JbpmContext testContext1 = testConfiguration.createJbpmContext();
+ JbpmContext baseContext1 = baseConfiguration.createJbpmContext();
try {
- JbpmContext noLogContext = noLogConfiguration.createJbpmContext();
+ JbpmContext alternateContext = alternateConfiguration.createJbpmContext();
try {
- JbpmContext testContext2 = testConfiguration.createJbpmContext();
+ JbpmContext baseContext2 = baseConfiguration.createJbpmContext();
try {
- assertSame(testConfiguration,
+ assertSame(baseConfiguration,
JbpmConfigurationTestHelper.getCurrentJbpmConfiguration());
}
finally {
- testContext2.close();
+ baseContext2.close();
}
- assertSame(noLogConfiguration,
+ assertSame(alternateConfiguration,
JbpmConfigurationTestHelper.getCurrentJbpmConfiguration());
}
finally {
- noLogContext.close();
+ alternateContext.close();
}
- assertSame(testConfiguration, JbpmConfigurationTestHelper.getCurrentJbpmConfiguration());
+ assertSame(baseConfiguration, JbpmConfigurationTestHelper.getCurrentJbpmConfiguration());
}
finally {
- testContext1.close();
+ baseContext1.close();
}
}
public void testUnstructuredContextClose() {
- JbpmContext testContext = testConfiguration.createJbpmContext();
- assertSame(testConfiguration,
+ JbpmContext baseContext = baseConfiguration.createJbpmContext();
+ assertSame(baseConfiguration,
JbpmConfigurationTestHelper.getCurrentJbpmConfiguration());
- JbpmContext noLogContext = noLogConfiguration.createJbpmContext();
- assertSame(noLogConfiguration,
+ JbpmContext alternateContext = alternateConfiguration.createJbpmContext();
+ assertSame(alternateConfiguration,
JbpmConfigurationTestHelper.getCurrentJbpmConfiguration());
// this will emit a block-structured warning, but still succeed
- testContext.close();
- noLogContext.close();
+ baseContext.close();
+ alternateContext.close();
assertNull(JbpmConfigurationTestHelper.getCurrentJbpmConfiguration());
}
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/persistence/db/PersistenceServiceDbTest.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/persistence/db/PersistenceServiceDbTest.java 2010-10-28 02:12:59 UTC (rev 6788)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/persistence/db/PersistenceServiceDbTest.java 2010-10-29 07:04:27 UTC (rev 6789)
@@ -44,7 +44,7 @@
protected void setUp() throws Exception {
super.setUp();
// pristine, unshared configuration object
- jbpmConfiguration = JbpmConfiguration.parseInputStream(null);
+ jbpmConfiguration = JbpmConfiguration.parseResource("jbpm.cfg.xml");
}
protected void tearDown() throws Exception {
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/taskmgmt/exe/SwimlaneDbTest.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/taskmgmt/exe/SwimlaneDbTest.java 2010-10-28 02:12:59 UTC (rev 6788)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/taskmgmt/exe/SwimlaneDbTest.java 2010-10-29 07:04:27 UTC (rev 6789)
@@ -634,4 +634,60 @@
assertNull(changeNappy.getActorId());
assertEquals(0, changeNappy.getPooledActors().size());
}
+
+ public void testTwoSwimlanes() {
+ ProcessDefinition processDefinition = ProcessDefinition.parseXmlString("<process-definition name='two swimlanes'>"
+ + " <swimlane name='hooligan'>"
+ + " <assignment actor-id='johndoe' />"
+ + " </swimlane>"
+ + " <swimlane name='policeman'>"
+ + " <assignment actor-id='joesmoe' />"
+ + " </swimlane>"
+ + " <start-state>"
+ + " <transition to='a' />"
+ + " </start-state>"
+ + " <task-node name='a'>"
+ + " <task name='throw rock' swimlane='hooligan' />"
+ + " <transition to='b' />"
+ + " </task-node>"
+ + " <task-node name='b'>"
+ + " <task name='hit him with your rithem stick' swimlane='policeman' />"
+ + " <transition to='c' />"
+ + " </task-node>"
+ + " <task-node name='c'>"
+ + " <task name='get nursed' swimlane='hooligan' />"
+ + " <transition to='a' />"
+ + " </task-node>"
+ + "</process-definition>");
+ deployProcessDefinition(processDefinition);
+
+ ProcessInstance processInstance = jbpmContext.newProcessInstanceForUpdate("two swimlanes");
+ processInstance.signal();
+
+ TaskMgmtInstance taskMgmtInstance = processInstance.getTaskMgmtInstance();
+ Token token = processInstance.getRootToken();
+ TaskInstance throwRock = (TaskInstance) taskMgmtInstance.getUnfinishedTasks(token)
+ .iterator()
+ .next();
+ assertEquals("johndoe", throwRock.getActorId());
+ throwRock.end();
+
+ TaskInstance hitWithRithmStick = (TaskInstance) taskMgmtInstance.getUnfinishedTasks(token)
+ .iterator()
+ .next();
+ assertEquals("joesmoe", hitWithRithmStick.getActorId());
+ hitWithRithmStick.end();
+
+ TaskInstance getNursed = (TaskInstance) taskMgmtInstance.getUnfinishedTasks(token)
+ .iterator()
+ .next();
+ assertEquals("johndoe", getNursed.getActorId());
+
+ SwimlaneInstance hooligan = taskMgmtInstance.getSwimlaneInstance("hooligan");
+ hooligan.setActorId("janedane");
+ getNursed.end();
+
+ throwRock = (TaskInstance) taskMgmtInstance.getUnfinishedTasks(token).iterator().next();
+ assertEquals("janedane", throwRock.getActorId());
+ }
}
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/taskmgmt/exe/SwimlaneTest.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/taskmgmt/exe/SwimlaneTest.java 2010-10-28 02:12:59 UTC (rev 6788)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/taskmgmt/exe/SwimlaneTest.java 2010-10-29 07:04:27 UTC (rev 6789)
@@ -30,6 +30,7 @@
import org.jbpm.AbstractJbpmTestCase;
import org.jbpm.JbpmConfiguration;
import org.jbpm.JbpmContext;
+import org.jbpm.context.exe.ContextInstance;
import org.jbpm.graph.def.ProcessDefinition;
import org.jbpm.graph.exe.ExecutionContext;
import org.jbpm.graph.exe.ProcessInstance;
@@ -38,13 +39,6 @@
public class SwimlaneTest extends AbstractJbpmTestCase {
- static JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance();
- static int invocationCount = 0;
-
- protected void setUp() {
- invocationCount = 0;
- }
-
public void testStartStateSwimlaneInitialization() {
ProcessDefinition processDefinition = ProcessDefinition.parseXmlString("<process-definition>"
+ " <swimlane name='initiator' />"
@@ -55,22 +49,27 @@
+ " <state name='a' />"
+ "</process-definition>");
- ProcessInstance processInstance;
- TaskMgmtInstance taskMgmtInstance;
- JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
- jbpmContext.setActorId("the other guy");
+ JbpmConfiguration jbpmConfiguration = JbpmConfiguration.parseXmlString("<jbpm-configuration>"
+ + " <jbpm-context>"
+ + " <service name='authentication' factory='org.jbpm.security.authentication.DefaultAuthenticationServiceFactory' />"
+ + " <service name='tx' factory='org.jbpm.tx.TxServiceFactory' />"
+ + " </jbpm-context>"
+ + "</jbpm-configuration>");
try {
- processInstance = new ProcessInstance(processDefinition);
- taskMgmtInstance = processInstance.getTaskMgmtInstance();
+ JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
+ jbpmContext.setActorId("the other guy");
+
+ ProcessInstance processInstance = new ProcessInstance(processDefinition);
+ TaskMgmtInstance taskMgmtInstance = processInstance.getTaskMgmtInstance();
taskMgmtInstance.createStartTaskInstance();
processInstance.signal();
+
+ assertEquals("the other guy", taskMgmtInstance.getSwimlaneInstance("initiator")
+ .getActorId());
}
finally {
- jbpmContext.setActorId(null);
- jbpmContext.close();
+ jbpmConfiguration.close();
}
- assertEquals("the other guy", taskMgmtInstance.getSwimlaneInstance("initiator")
- .getActorId());
}
public static class TestAssignmentHandler implements AssignmentHandler {
@@ -78,7 +77,9 @@
public void assign(Assignable assignable, ExecutionContext executionContext)
throws Exception {
- invocationCount++;
+ Integer count = (Integer) executionContext.getVariable("count");
+ executionContext.setVariable("count", new Integer(count != null ? count.intValue() + 1
+ : 1));
assignable.setActorId("me");
}
}
@@ -103,20 +104,20 @@
ProcessInstance processInstance = new ProcessInstance(processDefinition);
processInstance.signal();
+ Integer count = (Integer) processInstance.getContextInstance().getVariable("count");
+ assertEquals(1, count.intValue());
+
TaskMgmtInstance taskMgmtInstance = processInstance.getTaskMgmtInstance();
+ SwimlaneInstance stalker = taskMgmtInstance.getSwimlaneInstance("stalker");
+ assertEquals("me", stalker.getActorId());
+
TaskInstance changeNappy = (TaskInstance) taskMgmtInstance.getTaskInstances()
.iterator()
.next();
- SwimlaneInstance stalker = taskMgmtInstance.getSwimlaneInstance("stalker");
- assertNotNull(stalker);
- assertEquals(1, invocationCount);
- assertEquals("me", stalker.getActorId());
assertEquals("me", changeNappy.getActorId());
-
+
changeNappy.end();
-
- Token token = processInstance.getRootToken();
- TaskInstance beautySleep = (TaskInstance) taskMgmtInstance.getUnfinishedTasks(token)
+ TaskInstance beautySleep = (TaskInstance) taskMgmtInstance.getUnfinishedTasks(processInstance.getRootToken())
.iterator()
.next();
assertEquals("me", beautySleep.getActorId());
@@ -139,12 +140,12 @@
processInstance.signal();
TaskMgmtInstance taskMgmtInstance = processInstance.getTaskMgmtInstance();
+ SwimlaneInstance stalker = taskMgmtInstance.getSwimlaneInstance("stalker");
+ assertEquals("johndoe", stalker.getActorId());
+
TaskInstance changeNappy = (TaskInstance) taskMgmtInstance.getTaskInstances()
.iterator()
.next();
- SwimlaneInstance stalker = taskMgmtInstance.getSwimlaneInstance("stalker");
- assertNotNull(stalker);
- assertEquals("johndoe", stalker.getActorId());
assertEquals("johndoe", changeNappy.getActorId());
}
@@ -165,34 +166,29 @@
processInstance.signal();
TaskMgmtInstance taskMgmtInstance = processInstance.getTaskMgmtInstance();
+ SwimlaneInstance stalker = taskMgmtInstance.getSwimlaneInstance("stalker");
+ assertNull(stalker.getActorId());
+
TaskInstance changeNappy = (TaskInstance) taskMgmtInstance.getTaskInstances()
.iterator()
.next();
- SwimlaneInstance stalker = taskMgmtInstance.getSwimlaneInstance("stalker");
- assertNotNull(stalker);
- assertNull(stalker.getActorId());
assertNull(changeNappy.getActorId());
Set retrievedSwimlaneInstancePooledActorIds = new HashSet();
- Iterator iter = stalker.getPooledActors().iterator();
- while (iter.hasNext()) {
+ for (Iterator iter = stalker.getPooledActors().iterator(); iter.hasNext();) {
PooledActor pooledActor = (PooledActor) iter.next();
retrievedSwimlaneInstancePooledActorIds.add(pooledActor.getActorId());
}
-
Set expectedPooledActorIds = new HashSet();
expectedPooledActorIds.add("hippies");
expectedPooledActorIds.add("hells angles");
-
assertEquals(expectedPooledActorIds, retrievedSwimlaneInstancePooledActorIds);
Set retrievedTaskInstancePooledActorIds = new HashSet();
- iter = changeNappy.getPooledActors().iterator();
- while (iter.hasNext()) {
+ for (Iterator iter = changeNappy.getPooledActors().iterator(); iter.hasNext();) {
PooledActor pooledActor = (PooledActor) iter.next();
retrievedTaskInstancePooledActorIds.add(pooledActor.getActorId());
}
-
assertEquals(expectedPooledActorIds, retrievedTaskInstancePooledActorIds);
}
@@ -213,16 +209,15 @@
processInstance.signal();
TaskMgmtInstance taskMgmtInstance = processInstance.getTaskMgmtInstance();
+ SwimlaneInstance stalker = taskMgmtInstance.getSwimlaneInstance("stalker");
+ assertNull(stalker.getActorId());
+
TaskInstance changeNappy = (TaskInstance) taskMgmtInstance.getTaskInstances()
.iterator()
.next();
- SwimlaneInstance stalker = taskMgmtInstance.getSwimlaneInstance("stalker");
- assertNotNull(stalker);
- assertNull(stalker.getActorId());
assertNull(changeNappy.getActorId());
-
+
changeNappy.setActorId("johndoe");
-
assertEquals("johndoe", stalker.getActorId());
assertEquals("johndoe", changeNappy.getActorId());
}
@@ -244,17 +239,16 @@
processInstance.signal();
TaskMgmtInstance taskMgmtInstance = processInstance.getTaskMgmtInstance();
+ SwimlaneInstance stalker = taskMgmtInstance.getSwimlaneInstance("stalker");
+ assertNull(stalker.getActorId());
+
TaskInstance changeNappy = (TaskInstance) taskMgmtInstance.getTaskInstances()
.iterator()
.next();
- SwimlaneInstance stalker = taskMgmtInstance.getSwimlaneInstance("stalker");
- assertNotNull(stalker);
- assertNull(stalker.getActorId());
assertNull(changeNappy.getActorId());
changeNappy.setActorId("johndoe");
changeNappy.setActorId("joesmoe");
-
assertEquals("joesmoe", stalker.getActorId());
assertEquals("joesmoe", changeNappy.getActorId());
}
@@ -276,16 +270,15 @@
processInstance.signal();
TaskMgmtInstance taskMgmtInstance = processInstance.getTaskMgmtInstance();
+ SwimlaneInstance stalker = taskMgmtInstance.getSwimlaneInstance("stalker");
+ assertNull(stalker.getActorId());
+
TaskInstance changeNappy = (TaskInstance) taskMgmtInstance.getTaskInstances()
.iterator()
.next();
- SwimlaneInstance stalker = taskMgmtInstance.getSwimlaneInstance("stalker");
- assertNotNull(stalker);
- assertNull(stalker.getActorId());
assertNull(changeNappy.getActorId());
stalker.setActorId("johndoe");
-
assertEquals("johndoe", stalker.getActorId());
assertNull(changeNappy.getActorId());
}
@@ -325,8 +318,7 @@
assertEquals("johndoe", makeBottle.getActorId());
Set retrievedTaskInstancePooledActorIds = new HashSet();
- Iterator iter = makeBottle.getPooledActors().iterator();
- while (iter.hasNext()) {
+ for (Iterator iter = makeBottle.getPooledActors().iterator(); iter.hasNext();) {
PooledActor pooledActor = (PooledActor) iter.next();
retrievedTaskInstancePooledActorIds.add(pooledActor.getActorId());
}
@@ -334,7 +326,6 @@
Set expectedPooledActorIds = new HashSet();
expectedPooledActorIds.add("hippies");
expectedPooledActorIds.add("hells angles");
-
assertEquals(expectedPooledActorIds, retrievedTaskInstancePooledActorIds);
}
@@ -361,13 +352,15 @@
processInstance.signal();
TaskMgmtInstance taskMgmtInstance = processInstance.getTaskMgmtInstance();
+ SwimlaneInstance stalker = taskMgmtInstance.getSwimlaneInstance("hero");
+ stalker.setPooledActors(new String[] {
+ "footballers", "hooligans", "stewards"
+ });
+
TaskInstance changeNappy = (TaskInstance) taskMgmtInstance.getTaskInstances()
.iterator()
.next();
- SwimlaneInstance stalker = taskMgmtInstance.getSwimlaneInstance("hero");
changeNappy.setActorId("johndoe");
- stalker.setPooledActors(new String[] { "footballers", "hooligans", "stewards" });
-
changeNappy.end();
Token token = processInstance.getRootToken();
@@ -377,17 +370,14 @@
assertEquals("johndoe", makeBottle.getActorId());
Set retrievedTaskInstancePooledActorIds = new HashSet();
- Iterator iter = makeBottle.getPooledActors().iterator();
- while (iter.hasNext()) {
+ for (Iterator iter = makeBottle.getPooledActors().iterator(); iter.hasNext();) {
PooledActor pooledActor = (PooledActor) iter.next();
retrievedTaskInstancePooledActorIds.add(pooledActor.getActorId());
}
-
Set expectedPooledActorIds = new HashSet();
expectedPooledActorIds.add("footballers");
expectedPooledActorIds.add("hooligans");
expectedPooledActorIds.add("stewards");
-
assertEquals(expectedPooledActorIds, retrievedTaskInstancePooledActorIds);
}
@@ -413,18 +403,24 @@
ProcessInstance processInstance = new ProcessInstance(processDefinition);
processInstance.signal();
+ ContextInstance contextInstance = processInstance.getContextInstance();
+ Integer count = (Integer) contextInstance.getVariable("count");
+ assertEquals(1, count.intValue());
+
TaskMgmtInstance taskMgmtInstance = processInstance.getTaskMgmtInstance();
TaskInstance changeNappy = (TaskInstance) taskMgmtInstance.getTaskInstances()
.iterator()
.next();
assertEquals("me", changeNappy.getActorId());
- assertEquals(1, invocationCount);
+
changeNappy.end();
+ TaskInstance makeBottle = (TaskInstance) taskMgmtInstance.getUnfinishedTasks(processInstance.getRootToken())
+ .iterator()
+ .next();
+ assertEquals("me", makeBottle.getActorId());
- TaskInstance makeBottle = (TaskInstance) taskMgmtInstance.getUnfinishedTasks(
- processInstance.getRootToken()).iterator().next();
- assertEquals("me", makeBottle.getActorId());
- assertEquals(1, invocationCount);
+ count = (Integer) contextInstance.getVariable("count");
+ assertEquals(1, count.intValue());
}
public static class MultipleAssignmentHandler implements AssignmentHandler {
@@ -432,8 +428,13 @@
public void assign(Assignable assignable, ExecutionContext executionContext)
throws Exception {
- invocationCount++;
- assignable.setPooledActors(new String[] { "me", "you", "them" });
+ Integer count = (Integer) executionContext.getVariable("count");
+ executionContext.setVariable("count", new Integer(count != null ? count.intValue() + 1
+ : 1));
+
+ assignable.setPooledActors(new String[] {
+ "me", "you", "them"
+ });
}
}
@@ -452,6 +453,10 @@
ProcessInstance processInstance = new ProcessInstance(processDefinition);
processInstance.signal();
+
+ Integer count = (Integer) processInstance.getContextInstance().getVariable("count");
+ assertEquals(1, count.intValue());
+
TaskMgmtInstance taskMgmtInstance = processInstance.getTaskMgmtInstance();
TaskInstance changeNappy = (TaskInstance) taskMgmtInstance.getTaskInstances()
.iterator()
@@ -460,11 +465,11 @@
Set pooledActors = changeNappy.getPooledActors();
assertEquals(3, pooledActors.size());
- assertEquals(1, invocationCount);
- List expectedPooledActorIds = Arrays.asList(new String[] { "me", "you", "them" });
- Iterator iter = pooledActors.iterator();
- while (iter.hasNext()) {
+ List expectedPooledActorIds = Arrays.asList(new String[] {
+ "me", "you", "them"
+ });
+ for (Iterator iter = pooledActors.iterator(); iter.hasNext();) {
PooledActor pooledActor = (PooledActor) iter.next();
assertTrue(expectedPooledActorIds.contains(pooledActor.getActorId()));
}
@@ -491,22 +496,24 @@
ProcessInstance processInstance = new ProcessInstance(processDefinition);
processInstance.signal();
+
+ Integer count = (Integer) processInstance.getContextInstance().getVariable("count");
+ assertEquals(1, count.intValue());
+
TaskMgmtInstance taskMgmtInstance = processInstance.getTaskMgmtInstance();
- SwimlaneInstance swimlaneInstance = taskMgmtInstance.getSwimlaneInstance("hero");
TaskInstance changeNappy = (TaskInstance) taskMgmtInstance.getTaskInstances()
.iterator()
.next();
-
assertNull(changeNappy.getActorId());
assertEquals(3, changeNappy.getPooledActors().size());
+
+ SwimlaneInstance swimlaneInstance = taskMgmtInstance.getSwimlaneInstance("hero");
assertEquals(changeNappy.getPooledActors(), swimlaneInstance.getPooledActors());
-
+
changeNappy.end();
-
- assertEquals(1, invocationCount);
-
- TaskInstance makeBottle = (TaskInstance) taskMgmtInstance.getUnfinishedTasks(
- processInstance.getRootToken()).iterator().next();
+ TaskInstance makeBottle = (TaskInstance) taskMgmtInstance.getUnfinishedTasks(processInstance.getRootToken())
+ .iterator()
+ .next();
assertNull(makeBottle.getActorId());
assertEquals(3, makeBottle.getPooledActors().size());
assertEquals(makeBottle.getPooledActors(), swimlaneInstance.getPooledActors());
@@ -533,24 +540,25 @@
ProcessInstance processInstance = new ProcessInstance(processDefinition);
processInstance.signal();
+
+ Integer count = (Integer) processInstance.getContextInstance().getVariable("count");
+ assertEquals(1, count.intValue());
+
TaskMgmtInstance taskMgmtInstance = processInstance.getTaskMgmtInstance();
SwimlaneInstance swimlaneInstance = taskMgmtInstance.getSwimlaneInstance("hero");
TaskInstance changeNappy = (TaskInstance) taskMgmtInstance.getTaskInstances()
.iterator()
.next();
changeNappy.setActorId("should-be-one-of-the-actors-in-the-pool-but-doesnt-have-to");
-
assertEquals("should-be-one-of-the-actors-in-the-pool-but-doesnt-have-to",
changeNappy.getActorId());
assertEquals(3, changeNappy.getPooledActors().size());
assertEquals(changeNappy.getPooledActors(), swimlaneInstance.getPooledActors());
changeNappy.end();
-
- assertEquals(1, invocationCount);
-
- TaskInstance makeBottle = (TaskInstance) taskMgmtInstance.getUnfinishedTasks(
- processInstance.getRootToken()).iterator().next();
+ TaskInstance makeBottle = (TaskInstance) taskMgmtInstance.getUnfinishedTasks(processInstance.getRootToken())
+ .iterator()
+ .next();
assertEquals("should-be-one-of-the-actors-in-the-pool-but-doesnt-have-to",
makeBottle.getActorId());
assertEquals(3, makeBottle.getPooledActors().size());
@@ -583,12 +591,12 @@
TaskMgmtInstance taskMgmtInstance = processInstance.getTaskMgmtInstance();
SwimlaneInstance swimlaneInstance = taskMgmtInstance.getSwimlaneInstance("hero");
+ assertNull(swimlaneInstance.getActorId());
+ assertNull(swimlaneInstance.getPooledActors());
+
TaskInstance changeNappy = (TaskInstance) taskMgmtInstance.getTaskInstances()
.iterator()
.next();
-
- assertNull(swimlaneInstance.getActorId());
- assertNull(swimlaneInstance.getPooledActors());
assertNull(changeNappy.getActorId());
assertNull(changeNappy.getPooledActors());
}
Modified: jbpm3/branches/jbpm-3.2-soa/db/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/db/pom.xml 2010-10-28 02:12:59 UTC (rev 6788)
+++ jbpm3/branches/jbpm-3.2-soa/db/pom.xml 2010-10-29 07:04:27 UTC (rev 6789)
@@ -105,12 +105,14 @@
<condition property="skip">
<equals arg1="${database}" arg2="hsqldb" />
</condition>
- <condition property="delimiter" value="go" else=";">
+ <condition property="delimiter" value="" else=";">
<equals arg1="${database}" arg2="sybase" />
</condition>
+ <!-- JBPM-2971 DatabaseInitializer does not support alternate delimiters
<condition property="delimitertype" value="row" else="normal">
<equals arg1="${database}" arg2="sybase" />
</condition>
+ -->
<ant antfile="scripts/antrun-jbpmschema.xml" target="update-schema"
inheritRefs="true" />
</tasks>
@@ -154,7 +156,6 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>sql-maven-plugin</artifactId>
-
<executions>
<execution>
<id>drop-current-schema</id>
@@ -489,13 +490,35 @@
<url>${jdbc.sybase.url}</url>
<username>${jdbc.sybase.username}</username>
<password>${jdbc.sybase.password}</password>
- <delimiter>go</delimiter>
+ <delimiter />
+ <!-- JBPM-2971 DatabaseInitializer does not support alternate delimiters
<delimiterType>row</delimiterType>
+ -->
</configuration>
</plugin>
+
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>remove-row-delimiters</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <replace file="${previous.version.directory}/jbpm.jpdl.${database}.sql">
+ <replacetoken><![CDATA[go
+]]></replacetoken>
+ </replace>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
</profile>
-
</profiles>
</project>
Modified: jbpm3/branches/jbpm-3.2-soa/db/scripts/antrun-jbpmschema.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/db/scripts/antrun-jbpmschema.xml 2010-10-28 02:12:59 UTC (rev 6788)
+++ jbpm3/branches/jbpm-3.2-soa/db/scripts/antrun-jbpmschema.xml 2010-10-29 07:04:27 UTC (rev 6789)
@@ -37,11 +37,11 @@
<jbpmschema output="${project.output.dir}/jbpm.jpdl.postgresql.sql"
config="hibernate.cfg.postgresql.xml"
action="create" />
+ <!-- JBPM-2971 DatabaseInitializer does not support alternate delimiters -->
<jbpmschema output="${project.output.dir}/jbpm.jpdl.sybase.sql"
config="hibernate.cfg.sybase.xml"
action="create"
- delimiter="go"
- delimiterType="row" />
+ delimiter="" />
</target>
<target name="drop-schema" depends="init" description="Generate schema drop scripts">
@@ -63,21 +63,21 @@
<jbpmschema output="${project.output.dir}/jbpm.jpdl.postgresql.drop.sql"
config="hibernate.cfg.postgresql.xml"
action="drop" />
+ <!-- JBPM-2971 DatabaseInitializer does not support alternate delimiters -->
<jbpmschema output="${project.output.dir}/jbpm.jpdl.sybase.drop.sql"
config="hibernate.cfg.sybase.xml"
action="drop"
- delimiter="go"
- delimiterType="row" />
+ delimiter="" />
</target>
<target name="update-schema"
depends="init"
unless="skip"
description="Generate schema update scripts">
+ <!-- JBPM-2971 DatabaseInitializer does not support alternate delimiters -->
<jbpmschema output="${project.output.dir}/jbpm.jpdl.${database}.update.sql"
config="hibernate.cfg.${database}.xml"
action="update"
- delimiter="${delimiter}"
- delimiterType="${delimitertype}" />
+ delimiter="${delimiter}" />
</target>
</project>
13 years, 6 months
JBoss JBPM SVN: r6788 - in jbpm3/branches/jbpm-3.2-soa: core/src/test/java/org/jbpm/persistence/db and 1 other directories.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2010-10-27 22:12:59 -0400 (Wed, 27 Oct 2010)
New Revision: 6788
Modified:
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/persistence/db/DbPersistenceService.java
jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/persistence/db/MockSession.java
jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/persistence/db/MockSessionFactory.java
jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/persistence/db/PersistenceDbServiceTest.java
jbpm3/branches/jbpm-3.2-soa/enterprise-jee5/pom.xml
Log:
JBPM-2964 catch any RuntimeException thrown inside DbPersistenceService wrap-up methods, not just HibernateException
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/persistence/db/DbPersistenceService.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/persistence/db/DbPersistenceService.java 2010-10-27 07:42:18 UTC (rev 6787)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/persistence/db/DbPersistenceService.java 2010-10-28 02:12:59 UTC (rev 6788)
@@ -32,13 +32,13 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.hibernate.ConnectionReleaseMode;
import org.hibernate.HibernateException;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.StaleStateException;
import org.hibernate.Transaction;
-import org.hibernate.cfg.Configuration;
-import org.hibernate.cfg.Environment;
+import org.hibernate.engine.SessionFactoryImplementor;
import org.hibernate.exception.LockAcquisitionException;
import org.jbpm.JbpmContext;
@@ -162,33 +162,26 @@
}
}
else {
- if (session == null && resolveSession) {
- // initializes the session member
- getSession();
- }
- if (session != null) {
+ // resolve session or return
+ Session session = this.session;
+ if (session != null || resolveSession && (session = getSession()) != null) {
+ // get connection from session
connection = session.connection();
/*
- * If the session is using aggressive collection release (as in a CMT environment),
+ * If the session is using aggressive connection release (as in a CMT environment),
* the application is responsible for closing the returned connection. Otherwise, the
* application should not close the connection.
*/
- Configuration configuration = persistenceServiceFactory.getConfiguration();
- String releaseMode = configuration.getProperty(Environment.RELEASE_CONNECTIONS);
- mustConnectionBeClosed = "after_statement".equals(releaseMode)
- || ("auto".equals(releaseMode) && isJtaOrCmtStrategy(configuration));
+ SessionFactoryImplementor sessionFactory = (SessionFactoryImplementor) session.getSessionFactory();
+ ConnectionReleaseMode releaseMode = sessionFactory.getSettings()
+ .getConnectionReleaseMode();
+ mustConnectionBeClosed = releaseMode == ConnectionReleaseMode.AFTER_STATEMENT;
}
}
}
return connection;
}
- private static boolean isJtaOrCmtStrategy(Configuration configuration) {
- String transactionStrategy = configuration.getProperty(Environment.TRANSACTION_STRATEGY);
- return transactionStrategy != null
- && (transactionStrategy.indexOf("JTA") != -1 || transactionStrategy.indexOf("CMT") != -1);
- }
-
public boolean isTransactionActive() {
return transaction != null && transaction.isActive();
}
@@ -207,18 +200,21 @@
}
public void close() {
+ // flush session
Exception flushException = flushSession();
if (flushException != null) {
- // JBPM-1465: enabling transaction disables flush, see beginTransaction()
- // alternatively, transaction is managed externally
- // in either case, rolling back is unnecessary and possibly disruptive
+ // JBPM-1465: if transaction is enabled, flush is disabled, see beginTransaction()
+ // otherwise, transaction is managed externally
+ // in either case, rolling back is unnecessary and possibly disastrous
closeSession();
closeConnection();
throw new JbpmPersistenceException("failed to flush hibernate session", flushException);
}
+ // commit or roll back transaction
endTransaction();
+ // close session
Exception closeSessionException = closeSession();
if (closeSessionException != null) {
closeConnection();
@@ -226,6 +222,7 @@
closeSessionException);
}
+ // close jdbc connection
Exception closeConnectionException = closeConnection();
if (closeConnectionException != null) {
throw new JbpmPersistenceException("failed to close hibernate connection",
@@ -238,7 +235,7 @@
try {
transaction.commit();
}
- catch (HibernateException e) {
+ catch (RuntimeException e) {
return e;
}
}
@@ -254,7 +251,7 @@
try {
transaction.rollback();
}
- catch (HibernateException e) {
+ catch (RuntimeException e) {
return e;
}
}
@@ -267,7 +264,7 @@
try {
session.flush();
}
- catch (HibernateException e) {
+ catch (RuntimeException e) {
return e;
}
}
@@ -284,7 +281,7 @@
try {
session.close();
}
- catch (HibernateException e) {
+ catch (RuntimeException e) {
return e;
}
}
@@ -301,6 +298,9 @@
try {
connection.close();
}
+ catch (RuntimeException e) {
+ return e;
+ }
catch (SQLException e) {
return e;
}
@@ -313,14 +313,17 @@
}
public void assignId(Object object) {
- try {
- getSession().save(object);
+ Session session = getSession();
+ if (session != null) {
+ try {
+ session.save(object);
+ }
+ catch (HibernateException e) {
+ // NOTE that Errors are not caught because that might halt the JVM
+ // and mask the original Error.
+ throw new JbpmPersistenceException("could not assign id to " + object, e);
+ }
}
- catch (HibernateException e) {
- // NOTE that Errors are not caught because that might halt the JVM
- // and mask the original Error.
- throw new JbpmPersistenceException("could not assign id to " + object, e);
- }
}
// getters and setters //////////////////////////////////////////////////////
@@ -374,9 +377,13 @@
if (customSession != null) return customSession;
}
try {
- Constructor constructor = sessionClass.getConstructor(new Class[] { Session.class });
+ Constructor constructor = sessionClass.getConstructor(new Class[] {
+ Session.class
+ });
try {
- Object customSession = constructor.newInstance(new Object[] { session });
+ Object customSession = constructor.newInstance(new Object[] {
+ session
+ });
customSessions.put(sessionClass, customSession);
return customSession;
}
@@ -526,6 +533,10 @@
this.isTransactionEnabled = isTransactionEnabled;
}
+ /**
+ * Tells whether the given exception or any of its causes is a persistence exception.
+ * Currently a <em>persistence exception</em> is an instance of {@link HibernateException}.
+ */
public static boolean isPersistenceException(Exception exception) {
for (Throwable t = exception; t != null; t = t.getCause()) {
if (t instanceof HibernateException) return true;
@@ -533,6 +544,12 @@
return false;
}
+ /**
+ * Tells whether the given exception or any of its causes is a locking exception. Currently a
+ * <em>locking exception</em> is an instance of {@link StaleStateException} or
+ * {@link LockAcquisitionException}. Note that Hibernate dialects have limited ability to map
+ * native locking error codes to {@link LockAcquisitionException}s.
+ */
public static boolean isLockingException(Exception exception) {
for (Throwable t = exception; t != null; t = t.getCause()) {
if (t instanceof StaleStateException || t instanceof LockAcquisitionException) {
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/persistence/db/MockSession.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/persistence/db/MockSession.java 2010-10-27 07:42:18 UTC (rev 6787)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/persistence/db/MockSession.java 2010-10-28 02:12:59 UTC (rev 6788)
@@ -26,19 +26,23 @@
private static final long serialVersionUID = 1L;
- MockTransaction transaction = null;
- Connection connection = null;
- boolean isFlushed = false;
- boolean isClosed = false;
+ final Connection connection;
+ final SessionFactory sessionFactory;
+ MockTransaction transaction;
+ boolean isFlushed;
+ boolean isClosed;
+
boolean failOnFlush;
boolean failOnClose;
- public MockSession() {
+ public MockSession(SessionFactory sessionFactory) {
+ this(sessionFactory, null);
}
- public MockSession(Connection connection) {
+ public MockSession(SessionFactory sessionFactory, Connection connection) {
this.connection = connection;
+ this.sessionFactory = sessionFactory;
}
public void setFailOnFlush(boolean fail) {
@@ -106,7 +110,7 @@
}
public SessionFactory getSessionFactory() {
- throw new UnsupportedOperationException();
+ return sessionFactory;
}
public void cancelQuery() throws HibernateException {
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/persistence/db/MockSessionFactory.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/persistence/db/MockSessionFactory.java 2010-10-27 07:42:18 UTC (rev 6787)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/persistence/db/MockSessionFactory.java 2010-10-28 02:12:59 UTC (rev 6788)
@@ -7,25 +7,54 @@
import javax.naming.NamingException;
import javax.naming.Reference;
+import javax.transaction.TransactionManager;
+import org.hibernate.ConnectionReleaseMode;
import org.hibernate.HibernateException;
import org.hibernate.Interceptor;
-import org.hibernate.SessionFactory;
+import org.hibernate.MappingException;
import org.hibernate.StatelessSession;
+import org.hibernate.cache.Cache;
+import org.hibernate.cache.QueryCache;
+import org.hibernate.cache.UpdateTimestampsCache;
+import org.hibernate.cfg.Configuration;
+import org.hibernate.cfg.Settings;
import org.hibernate.classic.Session;
+import org.hibernate.connection.ConnectionProvider;
+import org.hibernate.dialect.Dialect;
+import org.hibernate.dialect.function.SQLFunctionRegistry;
import org.hibernate.engine.FilterDefinition;
+import org.hibernate.engine.NamedQueryDefinition;
+import org.hibernate.engine.NamedSQLQueryDefinition;
+import org.hibernate.engine.ResultSetMappingDefinition;
+import org.hibernate.engine.SessionFactoryImplementor;
+import org.hibernate.engine.query.QueryPlanCache;
+import org.hibernate.exception.SQLExceptionConverter;
+import org.hibernate.id.IdentifierGenerator;
import org.hibernate.metadata.ClassMetadata;
import org.hibernate.metadata.CollectionMetadata;
+import org.hibernate.persister.collection.CollectionPersister;
+import org.hibernate.persister.entity.EntityPersister;
+import org.hibernate.proxy.EntityNotFoundDelegate;
import org.hibernate.stat.Statistics;
+import org.hibernate.stat.StatisticsImplementor;
+import org.hibernate.type.Type;
-public class MockSessionFactory implements SessionFactory {
+public class MockSessionFactory implements SessionFactoryImplementor {
+ private Settings settings;
private boolean failOnFlush;
private boolean failOnClose;
private boolean isClosed;
private static final long serialVersionUID = 1L;
+ public MockSessionFactory() {
+ Configuration configuration = new Configuration();
+ configuration.configure();
+ settings = configuration.buildSettings();
+ }
+
public void setFailOnFlush(boolean fail) {
failOnFlush = fail;
}
@@ -35,14 +64,14 @@
}
public Session openSession(Connection connection) {
- MockSession session = new MockSession(connection);
+ MockSession session = new MockSession(this, connection);
session.setFailOnFlush(failOnFlush);
session.setFailOnClose(failOnClose);
return session;
}
public Session openSession() throws HibernateException {
- MockSession session = new MockSession();
+ MockSession session = new MockSession(this);
session.setFailOnFlush(failOnFlush);
session.setFailOnClose(failOnClose);
return session;
@@ -145,4 +174,131 @@
public Reference getReference() throws NamingException {
throw new UnsupportedOperationException();
}
+
+ public Map getAllSecondLevelCacheRegions() {
+ throw new UnsupportedOperationException();
+ }
+
+ public CollectionPersister getCollectionPersister(String role) throws MappingException {
+ throw new UnsupportedOperationException();
+ }
+
+ public Set getCollectionRolesByEntityParticipant(String entityName) {
+ throw new UnsupportedOperationException();
+ }
+
+ public ConnectionProvider getConnectionProvider() {
+ throw new UnsupportedOperationException();
+ }
+
+ public Dialect getDialect() {
+ throw new UnsupportedOperationException();
+ }
+
+ public EntityNotFoundDelegate getEntityNotFoundDelegate() {
+ throw new UnsupportedOperationException();
+ }
+
+ public EntityPersister getEntityPersister(String entityName) throws MappingException {
+ throw new UnsupportedOperationException();
+ }
+
+ public IdentifierGenerator getIdentifierGenerator(String rootEntityName) {
+ throw new UnsupportedOperationException();
+ }
+
+ public String[] getImplementors(String className) throws MappingException {
+ throw new UnsupportedOperationException();
+ }
+
+ public String getImportedClassName(String name) {
+ throw new UnsupportedOperationException();
+ }
+
+ public Interceptor getInterceptor() {
+ throw new UnsupportedOperationException();
+ }
+
+ public NamedQueryDefinition getNamedQuery(String queryName) {
+ throw new UnsupportedOperationException();
+ }
+
+ public NamedSQLQueryDefinition getNamedSQLQuery(String queryName) {
+ throw new UnsupportedOperationException();
+ }
+
+ public QueryCache getQueryCache() {
+ throw new UnsupportedOperationException();
+ }
+
+ public QueryCache getQueryCache(String regionName) throws HibernateException {
+ throw new UnsupportedOperationException();
+ }
+
+ public QueryPlanCache getQueryPlanCache() {
+ throw new UnsupportedOperationException();
+ }
+
+ public ResultSetMappingDefinition getResultSetMapping(String name) {
+ throw new UnsupportedOperationException();
+ }
+
+ public String[] getReturnAliases(String queryString) throws HibernateException {
+ throw new UnsupportedOperationException();
+ }
+
+ public Type[] getReturnTypes(String queryString) throws HibernateException {
+ throw new UnsupportedOperationException();
+ }
+
+ public SQLExceptionConverter getSQLExceptionConverter() {
+ throw new UnsupportedOperationException();
+ }
+
+ public Cache getSecondLevelCacheRegion(String regionName) {
+ throw new UnsupportedOperationException();
+ }
+
+ public Settings getSettings() {
+ return settings;
+ }
+
+ public SQLFunctionRegistry getSqlFunctionRegistry() {
+ throw new UnsupportedOperationException();
+ }
+
+ public StatisticsImplementor getStatisticsImplementor() {
+ throw new UnsupportedOperationException();
+ }
+
+ public TransactionManager getTransactionManager() {
+ throw new UnsupportedOperationException();
+ }
+
+ public UpdateTimestampsCache getUpdateTimestampsCache() {
+ throw new UnsupportedOperationException();
+ }
+
+ public Session openSession(Connection connection, boolean flushBeforeCompletionEnabled,
+ boolean autoCloseSessionEnabled, ConnectionReleaseMode connectionReleaseMode)
+ throws HibernateException {
+ throw new UnsupportedOperationException();
+ }
+
+ public Session openTemporarySession() throws HibernateException {
+ throw new UnsupportedOperationException();
+ }
+
+ public String getIdentifierPropertyName(String className) throws MappingException {
+ throw new UnsupportedOperationException();
+ }
+
+ public Type getIdentifierType(String className) throws MappingException {
+ throw new UnsupportedOperationException();
+ }
+
+ public Type getReferencedPropertyType(String className, String propertyName)
+ throws MappingException {
+ throw new UnsupportedOperationException();
+ }
}
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/persistence/db/PersistenceDbServiceTest.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/persistence/db/PersistenceDbServiceTest.java 2010-10-27 07:42:18 UTC (rev 6787)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/persistence/db/PersistenceDbServiceTest.java 2010-10-28 02:12:59 UTC (rev 6788)
@@ -10,14 +10,12 @@
JbpmConfiguration jbpmConfiguration;
JbpmContext jbpmContext;
- MockSessionFactory mockSessionFactory;
protected void setUp() throws Exception {
super.setUp();
jbpmConfiguration = JbpmConfiguration.parseXmlString("<jbpm-configuration/>");
jbpmContext = jbpmConfiguration.createJbpmContext();
- mockSessionFactory = new MockSessionFactory();
- jbpmContext.setSessionFactory(mockSessionFactory);
+ jbpmContext.setSessionFactory(new MockSessionFactory());
}
protected void tearDown() throws Exception {
Modified: jbpm3/branches/jbpm-3.2-soa/enterprise-jee5/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/enterprise-jee5/pom.xml 2010-10-27 07:42:18 UTC (rev 6787)
+++ jbpm3/branches/jbpm-3.2-soa/enterprise-jee5/pom.xml 2010-10-28 02:12:59 UTC (rev 6788)
@@ -1,119 +1,127 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ====================================================================== -->
+<!-- jBPM: Workflow in Java -->
+<!-- -->
+<!-- Distributable under LGPL license. -->
+<!-- See terms of license at http://www.gnu.org. -->
+<!-- ====================================================================== -->
+
<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/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <name>jBPM3 - JEE5 Enterprise</name>
- <groupId>org.jbpm.jbpm3</groupId>
- <artifactId>jbpm-enterprise-jee5</artifactId>
- <packaging>ejb</packaging>
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <name>jBPM3 - JEE5 Enterprise</name>
+ <groupId>org.jbpm.jbpm3</groupId>
+ <artifactId>jbpm-enterprise-jee5</artifactId>
+ <packaging>ejb</packaging>
- <parent>
- <groupId>org.jbpm.jbpm3</groupId>
- <artifactId>jbpm</artifactId>
- <version>3.2.10-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
+ <parent>
+ <groupId>org.jbpm.jbpm3</groupId>
+ <artifactId>jbpm</artifactId>
+ <version>3.2.10-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
- <plugin>
- <artifactId>maven-javadoc-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- </configuration>
- </plugin>
+ <plugin>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ </configuration>
+ </plugin>
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <executions>
- <execution>
- <id>assembly-config</id>
- <phase>package</phase>
- <goals>
- <goal>single</goal>
- </goals>
- <configuration>
- <descriptors>
- <descriptor>scripts/assembly-config.xml</descriptor>
- </descriptors>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- <profiles>
- <profile>
- <id>soa4x</id>
-
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <build>
- <finalName>${project.artifactId}-${project.version}-soa4x.jar</finalName>
- <resources>
- <resource>
- <directory>src/main/resources</directory>
- <excludes>
- <exclude>*soa5x*</exclude>
- </excludes>
- </resource>
- </resources>
- </build>
- </profile>
- <profile>
- <id>soa5x</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <finalName>${project.artifactId}-${project.version}-soa5x.jar</finalName>
- <resources>
- <resource>
- <directory>src/main/resources</directory>
- <excludes>
- <exclude>*soa5x*</exclude>
- </excludes>
- </resource>
- </resources>
- </build>
- </profile>
- </profiles>
- <dependencies>
- <dependency>
- <groupId>org.jbpm.jbpm3</groupId>
- <artifactId>jbpm-jpdl</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>javax.jms</groupId>
- <artifactId>jms</artifactId>
- <version>1.1</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.ejb</groupId>
- <artifactId>ejb-api</artifactId>
- <version>3.0</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.annotation</groupId>
- <artifactId>jsr250-api</artifactId>
- <version>1.0</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>commons-lang</groupId>
- <artifactId>commons-lang</artifactId>
- <scope>provided</scope>
- </dependency>
- </dependencies>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>assembly-config</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <descriptors>
+ <descriptor>scripts/assembly-config.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.jbpm.jbpm3</groupId>
+ <artifactId>jbpm-jpdl</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.jms</groupId>
+ <artifactId>jms</artifactId>
+ <version>1.1</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.ejb</groupId>
+ <artifactId>ejb-api</artifactId>
+ <version>3.0</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.annotation</groupId>
+ <artifactId>jsr250-api</artifactId>
+ <version>1.0</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+
+ <profiles>
+ <profile>
+ <id>soa4x</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <build>
+ <finalName>${project.artifactId}-${project.version}-soa4x.jar</finalName>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ <excludes>
+ <exclude>*soa5x*</exclude>
+ </excludes>
+ </resource>
+ </resources>
+ </build>
+ </profile>
+
+ <profile>
+ <id>soa5x</id>
+ <build>
+ <finalName>${project.artifactId}-${project.version}-soa5x.jar</finalName>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ <excludes>
+ <exclude>*soa5x*</exclude>
+ </excludes>
+ </resource>
+ </resources>
+ </build>
+ </profile>
+ </profiles>
</project>
13 years, 6 months
JBoss JBPM SVN: r6787 - jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2010-10-27 03:42:18 -0400 (Wed, 27 Oct 2010)
New Revision: 6787
Added:
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/.gpd.testPageflowWithoutNamespace.xml
Modified:
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/.gpd.testPageflowWithNamespace.xml
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/.gpd.testPageflowWithSchemaLocation.xml
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/testPageflowWithNamespace.xml
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/testPageflowWithSchemaLocation.xml
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/testPageflowWithoutNamespace.xml
Log:
JBPM-1707 provide test pageflows with GPD data
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/.gpd.testPageflowWithNamespace.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/.gpd.testPageflowWithNamespace.xml 2010-10-27 07:33:01 UTC (rev 6786)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/.gpd.testPageflowWithNamespace.xml 2010-10-27 07:42:18 UTC (rev 6787)
@@ -1,3 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
-<root-container/>
\ No newline at end of file
+<root-container name="numberGuess" width="842" height="614">
+ <node name="displayGuess" x="36" y="36" width="133" height="37">
+ <edge>
+ <label x="5" y="-10"/>
+ </edge>
+ </node>
+ <node name="evaluateGuess" x="36" y="108" width="133" height="37">
+ <edge>
+ <label x="-36" y="-13"/>
+ </edge>
+ <edge>
+ <label x="-19" y="8"/>
+ </edge>
+ </node>
+ <node name="evaluateRemainingGuesses" x="228" y="108" width="193" height="36">
+ <edge>
+ <label x="5" y="-10"/>
+ </edge>
+ <edge>
+ <label x="0" y="-18"/>
+ </edge>
+ </node>
+ <node name="win" x="36" y="180" width="133" height="37"/>
+ <node name="lose" x="264" y="180" width="121" height="37"/>
+</root-container>
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/.gpd.testPageflowWithSchemaLocation.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/.gpd.testPageflowWithSchemaLocation.xml 2010-10-27 07:33:01 UTC (rev 6786)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/.gpd.testPageflowWithSchemaLocation.xml 2010-10-27 07:42:18 UTC (rev 6787)
@@ -1,3 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
-<root-container/>
\ No newline at end of file
+<root-container name="numberGuess" width="842" height="614">
+ <node name="displayGuess" x="36" y="36" width="132" height="36">
+ <edge>
+ <label x="5" y="-10"/>
+ </edge>
+ </node>
+ <node name="evaluateGuess" x="36" y="108" width="132" height="36">
+ <edge>
+ <label x="5" y="-10"/>
+ </edge>
+ <edge>
+ <label x="-25" y="6"/>
+ </edge>
+ </node>
+ <node name="evaluateRemainingGuesses" x="228" y="108" width="193" height="36">
+ <edge>
+ <label x="5" y="-10"/>
+ </edge>
+ <edge>
+ <label x="5" y="-10"/>
+ </edge>
+ </node>
+ <node name="win" x="36" y="180" width="132" height="36"/>
+ <node name="lose" x="264" y="180" width="121" height="36"/>
+</root-container>
Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/.gpd.testPageflowWithoutNamespace.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/.gpd.testPageflowWithoutNamespace.xml (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/.gpd.testPageflowWithoutNamespace.xml 2010-10-27 07:42:18 UTC (rev 6787)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<root-container name="numberGuess" width="842" height="614">
+ <node name="displayGuess" x="36" y="36" width="132" height="36">
+ <edge>
+ <label x="5" y="-10"/>
+ </edge>
+ </node>
+ <node name="evaluateGuess" x="36" y="108" width="132" height="36">
+ <edge>
+ <label x="5" y="-10"/>
+ </edge>
+ <edge>
+ <label x="-22" y="8"/>
+ </edge>
+ </node>
+ <node name="evaluateRemainingGuesses" x="228" y="108" width="193" height="36">
+ <edge>
+ <label x="5" y="-10"/>
+ </edge>
+ <edge>
+ <label x="1" y="-19"/>
+ </edge>
+ </node>
+ <node name="win" x="36" y="180" width="132" height="36"/>
+ <node name="lose" x="264" y="180" width="120" height="36"/>
+</root-container>
Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/.gpd.testPageflowWithoutNamespace.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/testPageflowWithNamespace.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/testPageflowWithNamespace.xml 2010-10-27 07:33:01 UTC (rev 6786)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/testPageflowWithNamespace.xml 2010-10-27 07:42:18 UTC (rev 6787)
@@ -17,7 +17,7 @@
<decision name="evaluateRemainingGuesses" expression="#{numberGuess.lastGuess}">
<transition name="true" to="lose" />
- <transition name="false" to="evaluateGuess">
+ <transition name="false" to="displayGuess">
<action expression="#{numberGuess.guess}" />
</transition>
</decision>
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/testPageflowWithSchemaLocation.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/testPageflowWithSchemaLocation.xml 2010-10-27 07:33:01 UTC (rev 6786)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/testPageflowWithSchemaLocation.xml 2010-10-27 07:42:18 UTC (rev 6787)
@@ -18,7 +18,7 @@
<decision name="evaluateRemainingGuesses"
expression="#{numberGuess.lastGuess}">
<transition name="true" to="lose" />
- <transition name="false" to="evaluateGuess">
+ <transition name="false" to="displayGuess">
<action expression="#{numberGuess.guess}" />
</transition>
</decision>
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/testPageflowWithoutNamespace.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/testPageflowWithoutNamespace.xml 2010-10-27 07:33:01 UTC (rev 6786)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/testPageflowWithoutNamespace.xml 2010-10-27 07:42:18 UTC (rev 6787)
@@ -18,7 +18,7 @@
<decision name="evaluateRemainingGuesses"
expression="#{numberGuess.lastGuess}">
<transition name="true" to="lose" />
- <transition name="false" to="evaluateGuess">
+ <transition name="false" to="displayGuess">
<action expression="#{numberGuess.guess}" />
</transition>
</decision>
13 years, 6 months
JBoss JBPM SVN: r6786 - in jbpm3/branches/jbpm-3.2-soa/core/src: main/java/org/jbpm/jpdl/xml and 13 other directories.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2010-10-27 03:33:01 -0400 (Wed, 27 Oct 2010)
New Revision: 6786
Added:
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/configuration/SetInfo.java
jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jboss/
jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jboss/seam/
jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jboss/seam/pageflow/
jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jboss/seam/pageflow/Page.java
jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm2774/
jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm2774/PageflowParsingTest.java
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jboss/seam/pageflow-2.1.xsd
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jboss/seam/pageflow-2.2.xsd
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/.gpd.testPageflowWithNamespace.xml
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/.gpd.testPageflowWithSchemaLocation.xml
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/.gpd.pageflow-2.0.xml
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/.gpd.pageflow-2.1.xml
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/.gpd.pageflow-2.2.xml
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/pageflow-2.0.xml
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/pageflow-2.1.xml
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/pageflow-2.2.xml
Removed:
jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jpdl/xml/SchemaTest.java
Modified:
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/configuration/ObjectFactoryParser.java
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/jpdl/xml/JpdlParser.java
jbpm3/branches/jbpm-3.2-soa/core/src/main/resources/org/jbpm/default.jbpm.cfg.xml
jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm1707/JBPM1707Test.java
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jboss/seam/pageflow-2.0.xsd
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/testPageflowWithNamespace.xml
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/testPageflowWithSchemaLocation.xml
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/testPageflowWithoutNamespace.xml
Log:
JBPM-2774 introduce configuration property jbpm.schema.resources;
load resources from the classpath and set them as the schemas to validate against
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/configuration/ObjectFactoryParser.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/configuration/ObjectFactoryParser.java 2010-10-21 21:26:52 UTC (rev 6785)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/configuration/ObjectFactoryParser.java 2010-10-27 07:33:01 UTC (rev 6786)
@@ -49,6 +49,7 @@
addMapping(mappings, "bean", BeanInfo.class);
addMapping(mappings, "ref", RefInfo.class);
addMapping(mappings, "list", ListInfo.class);
+ addMapping(mappings, "set", SetInfo.class);
addMapping(mappings, "map", MapInfo.class);
addMapping(mappings, "string", StringInfo.class);
addMapping(mappings, "int", IntegerInfo.class);
Added: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/configuration/SetInfo.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/configuration/SetInfo.java (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/configuration/SetInfo.java 2010-10-27 07:33:01 UTC (rev 6786)
@@ -0,0 +1,60 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.configuration;
+
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.w3c.dom.Element;
+
+import org.jbpm.util.XmlUtil;
+
+public class SetInfo extends AbstractObjectInfo {
+
+ private static final long serialVersionUID = 1L;
+
+ private ObjectInfo[] elementInfos;
+
+ public SetInfo(Element listElement, ObjectFactoryParser configParser) {
+ super(listElement, configParser);
+
+ List elementElements = XmlUtil.elements(listElement);
+ elementInfos = new ObjectInfo[elementElements.size()];
+ for (int i = 0; i < elementElements.size(); i++) {
+ Element elementElement = (Element) elementElements.get(i);
+ elementInfos[i] = configParser.parse(elementElement);
+ }
+ }
+
+ public Object createObject(ObjectFactory objectFactory) {
+ Set set = new HashSet();
+ if (elementInfos != null) {
+ for (int i = 0; i < elementInfos.length; i++) {
+ Object element = objectFactory.getObject(elementInfos[i]);
+ set.add(element);
+ }
+ }
+ return set;
+ }
+
+}
Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/configuration/SetInfo.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/jpdl/xml/JpdlParser.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/jpdl/xml/JpdlParser.java 2010-10-21 21:26:52 UTC (rev 6785)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/jpdl/xml/JpdlParser.java 2010-10-27 07:33:01 UTC (rev 6786)
@@ -24,7 +24,6 @@
import java.io.Serializable;
import java.net.URL;
import java.util.ArrayList;
-import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
@@ -44,11 +43,12 @@
import org.xml.sax.SAXParseException;
import org.xml.sax.XMLReader;
+import org.jbpm.JbpmConfiguration.Configs;
import org.jbpm.util.ClassLoaderUtil;
/**
- * Validate an XML document using JAXP techniques and an XML Schema. This helper class wraps the
- * processing of a schema to aid in schema validation throughout the product.
+ * This helper class wraps the processing of XML schema documents to aid {@link JpdlXmlReader}
+ * in validation.
*
* @author Tom Baeyens
* @author Jim Rigsbee
@@ -62,8 +62,8 @@
private static final String JAXP_SCHEMA_SOURCE = "http://java.sun.com/xml/jaxp/properties/schemaSource";
private static final SAXParserFactory saxParserFactory = createSaxParserFactory();
- private static final Set schemaResources = getDefaultSchemaResources();
- private static Object schemaSource;
+ private static final Set schemaResources = (Set) Configs.getObject("jbpm.schema.resources");
+ private static String[] schemaSource;
private JpdlParser() {
// hide default constructor to prevent instantiation
@@ -135,12 +135,13 @@
schemaLocations.add(schemaLocation);
}
}
- schemaSource = schemaLocations.toArray(new String[schemaLocations.size()]);
+ schemaSource = new String[schemaLocations.size()];
+ schemaLocations.toArray(schemaSource);
}
return schemaSource;
}
- static class JpdlErrorHandler implements ErrorHandler, Serializable {
+ private static class JpdlErrorHandler implements ErrorHandler, Serializable {
private ProblemListener problemListener;
@@ -171,21 +172,13 @@
}
}
- public synchronized static void addSchemaResource(String resource) {
- schemaResources.add(resource);
+ public synchronized static void addSchemaResource(String resourceName) {
+ // register resource
+ schemaResources.add(resourceName);
+ // invalidate existing schema source
schemaSource = null;
}
- private static Set getDefaultSchemaResources() {
- Set schemaResources = new HashSet();
- schemaResources.add("org/jbpm/jpdl/xml/jpdl-3.0.xsd");
- schemaResources.add("org/jbpm/jpdl/xml/jpdl-3.1.xsd");
- schemaResources.add("org/jbpm/jpdl/xml/jpdl-3.2.xsd");
- schemaResources.add("org/jbpm/jpdl/xml/jpdl-3.3.xsd");
- schemaResources.add("org/jboss/seam/pageflow-2.0.xsd");
- return schemaResources;
- }
-
private static SAXParserFactory createSaxParserFactory() {
SAXParserFactory saxParserFactory = SAXParserFactory.newInstance();
saxParserFactory.setValidating(true);
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/resources/org/jbpm/default.jbpm.cfg.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/resources/org/jbpm/default.jbpm.cfg.xml 2010-10-21 21:26:52 UTC (rev 6785)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/resources/org/jbpm/default.jbpm.cfg.xml 2010-10-27 07:33:01 UTC (rev 6786)
@@ -43,6 +43,13 @@
<string name="resource.varmapping" value="org/jbpm/context/exe/jbpm.varmapping.xml" />
<string name="resource.mail.templates" value="jbpm.mail.templates.xml" />
+ <set name="jbpm.schema.resources">
+ <string value="org/jbpm/jpdl/xml/jpdl-3.0.xsd" />
+ <string value="org/jbpm/jpdl/xml/jpdl-3.1.xsd" />
+ <string value="org/jbpm/jpdl/xml/jpdl-3.2.xsd" />
+ <string value="org/jboss/seam/pageflow-2.2.xsd" />
+ </set>
+
<!-- alternate delegation class loader
<string name="jbpm.class.loader" value="context" />
-->
Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jboss/seam/pageflow/Page.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jboss/seam/pageflow/Page.java (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jboss/seam/pageflow/Page.java 2010-10-27 07:33:01 UTC (rev 6786)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.seam.pageflow;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.dom4j.Element;
+
+import org.jbpm.graph.def.Node;
+import org.jbpm.graph.exe.ExecutionContext;
+import org.jbpm.jpdl.xml.JpdlXmlReader;
+
+/**
+ * Placeholder for the Seam page node.
+ *
+ * @author Alejandro Guizar
+ */
+public class Page extends Node {
+
+ private String viewId;
+
+ private static final long serialVersionUID = 1L;
+ private static final Log log = LogFactory.getLog(Page.class);
+
+ public void read(Element nodeElement, JpdlXmlReader jpdlXmlReader) {
+ viewId = nodeElement.attributeValue("view-id");
+ }
+
+ public void execute(ExecutionContext executionContext) {
+ log.info("rendering view: " + viewId);
+ executionContext.leaveNode();
+ }
+
+}
Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jboss/seam/pageflow/Page.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm1707/JBPM1707Test.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm1707/JBPM1707Test.java 2010-10-21 21:26:52 UTC (rev 6785)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm1707/JBPM1707Test.java 2010-10-27 07:33:01 UTC (rev 6786)
@@ -21,7 +21,6 @@
*/
package org.jbpm.jbpm1707;
-import java.io.InputStream;
import java.util.List;
import org.jbpm.AbstractJbpmTestCase;
@@ -60,7 +59,6 @@
}
private ProcessDefinition parseXmlForThisMethod() {
- InputStream xmlStream = getClass().getResourceAsStream(getName() + ".xml");
- return ProcessDefinition.parseXmlInputStream(xmlStream);
+ return ProcessDefinition.parseXmlResource("org/jbpm/jbpm1707/" + getName() + ".xml");
}
}
Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm2774/PageflowParsingTest.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm2774/PageflowParsingTest.java (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm2774/PageflowParsingTest.java 2010-10-27 07:33:01 UTC (rev 6786)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.jbpm2774;
+
+import org.jbpm.AbstractJbpmTestCase;
+import org.jbpm.graph.def.ProcessDefinition;
+
+/**
+ * Pageflow parsing requires Internet connection.
+ *
+ * @see <a href="https://jira.jboss.org/browse/JBPM-2774">JBPM-2774</a>
+ * @author Alejandro Guizar
+ */
+public class PageflowParsingTest extends AbstractJbpmTestCase {
+
+ public void testPageflow2_0() {
+ ProcessDefinition.parseXmlResource("org/jbpm/jbpm2774/pageflow-2.0.xml");
+ }
+
+ public void testPageflow2_1() {
+ ProcessDefinition.parseXmlResource("org/jbpm/jbpm2774/pageflow-2.1.xml");
+ }
+
+ public void testPageflow2_2() {
+ ProcessDefinition.parseXmlResource("org/jbpm/jbpm2774/pageflow-2.2.xml");
+ }
+}
Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm2774/PageflowParsingTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Deleted: jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jpdl/xml/SchemaTest.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jpdl/xml/SchemaTest.java 2010-10-21 21:26:52 UTC (rev 6785)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jpdl/xml/SchemaTest.java 2010-10-27 07:33:01 UTC (rev 6786)
@@ -1,268 +0,0 @@
-package org.jbpm.jpdl.xml;
-
-import java.io.StringReader;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-
-import org.w3c.dom.Document;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-import org.jbpm.AbstractJbpmTestCase;
-import org.jbpm.util.XmlUtil;
-
-public class SchemaTest extends AbstractJbpmTestCase {
-
- public static class TestEntityResolver implements EntityResolver {
- Map schemas;
-
- public TestEntityResolver(Map schemas) {
- this.schemas = schemas;
- }
-
- public InputSource resolveEntity(String publicId, String systemId) {
- String schemaXmlString = (String) schemas.get(systemId);
- if (schemaXmlString == null) {
- return null;
- }
- return new InputSource(new StringReader(schemaXmlString));
- }
- }
-
- public static class TestErrorHandler implements ErrorHandler {
- List errors = new ArrayList();
-
- public void error(SAXParseException exception) throws SAXException {
- errors.add("[" + exception.getLineNumber() + "] " + exception.getMessage());
- }
-
- public void fatalError(SAXParseException exception) throws SAXException {
- error(exception);
- }
-
- public void warning(SAXParseException exception) throws SAXException {
- error(exception);
- }
- }
-
- DocumentBuilderFactory dbf;
- DocumentBuilder db;
- Map schemas;
- TestEntityResolver testEntityResolver;
-
- protected void setUp() throws Exception {
- super.setUp();
-
- dbf = DocumentBuilderFactory.newInstance();
- dbf.setValidating(true);
- dbf.setNamespaceAware(true);
- dbf.setAttribute("http://java.sun.com/xml/jaxp/properties/schemaLanguage",
- "http://www.w3.org/2001/XMLSchema");
-
- schemas = new HashMap();
- testEntityResolver = new TestEntityResolver(schemas);
- }
-
- public void addSchema(String schemaXmlString) {
- String systemId = "urn:schema" + schemas.size();
- schemas.put(systemId, schemaXmlString);
-
- String[] schemaSources = new String[schemas.size()];
- for (int i = 0; i < schemas.size(); i++) {
- schemaSources[i] = "urn:schema" + i;
- }
-
- dbf.setAttribute("http://java.sun.com/xml/jaxp/properties/schemaSource", schemaSources);
- }
-
- public Document assertValidXml(String documentXmlString) {
- try {
- db = dbf.newDocumentBuilder();
- db.setEntityResolver(testEntityResolver);
-
- TestErrorHandler errorHandler = new TestErrorHandler();
- db.setErrorHandler(errorHandler);
- Document document = db.parse(new InputSource(new StringReader(documentXmlString)));
- if (!errorHandler.errors.isEmpty()) {
- StringBuffer buffer = new StringBuffer();
- buffer.append("parsing problems: \n");
- Iterator iter = errorHandler.errors.iterator();
- while (iter.hasNext()) {
- buffer.append("ERR: ");
- buffer.append(iter.next());
- }
- throw new XmlException(buffer.toString());
- }
-
- return document;
- }
- catch (XmlException e) {
- throw e;
- }
- catch (Exception e) {
- throw new XmlException("couldn't parse", e);
- }
- }
-
- public void printDocument(Document document) {
- log.debug(XmlUtil.toString(document.getDocumentElement()));
- }
-
- public static class XmlException extends RuntimeException {
- private static final long serialVersionUID = 1L;
-
- public XmlException(String message) {
- super(message);
- }
-
- public XmlException(String message, Throwable cause) {
- super(message, cause);
- }
- }
-
- public void testSchemaChoices() {
- addSchema("<xs:schema targetNamespace='urn:jbpm.org:test'\n"
- + " xmlns='urn:jbpm.org:test'\n"
- + " xmlns:xs='http://www.w3.org/2001/XMLSchema'\n"
- + " elementFormDefault='qualified'>\n"
- + " <xs:element name='root'>\n"
- + " <xs:complexType>\n"
- + " <xs:choice minOccurs='0' maxOccurs='3'>\n"
- + " <xs:element name='hello' />\n"
- + " <xs:element name='world' />\n"
- + " </xs:choice>\n"
- + " </xs:complexType>\n"
- + " </xs:element>\n"
- + "</xs:schema>");
-
- assertValidXml("<?xml version='1.0'?>\n"
- + "<root xmlns='urn:jbpm.org:test'>\n"
- + " <hello />\n"
- + "</root>");
-
- assertValidXml("<?xml version='1.0'?>\n"
- + "<root xmlns='urn:jbpm.org:test'>\n"
- + " <hello />\n"
- + " <world />\n"
- + " <hello />\n"
- + "</root>");
-
- try {
- assertValidXml("<?xml version='1.0'?>\n"
- + "<root xmlns='urn:jbpm.org:test'>\n"
- + " <hello />\n"
- + " <world />\n"
- + " <hello />\n"
- + " <hello />\n"
- + "</root>");
- fail("expected exception");
- }
- catch (XmlException e) {
- // OK
- }
- }
-
- public void testSchemaSequenceOfChoice() {
- addSchema("<xs:schema targetNamespace='urn:jbpm.org:test'\n"
- + " xmlns='urn:jbpm.org:test'\n"
- + " xmlns:xs='http://www.w3.org/2001/XMLSchema'\n"
- + " elementFormDefault='qualified'>\n"
- + " <xs:element name='root'>\n"
- + " <xs:complexType>\n"
- + " <xs:sequence maxOccurs='3'>\n"
- + " <xs:choice>\n"
- + " <xs:element name='hello' />\n"
- + " <xs:element name='world' />\n"
- + " </xs:choice>\n"
- + " </xs:sequence>\n"
- + " </xs:complexType>\n"
- + " </xs:element>\n"
- + "</xs:schema>");
-
- assertValidXml("<?xml version='1.0'?>\n"
- + "<root xmlns='urn:jbpm.org:test'>\n"
- + " <hello />\n"
- + "</root>");
-
- assertValidXml("<?xml version='1.0'?>\n"
- + "<root xmlns='urn:jbpm.org:test'>\n"
- + " <hello />\n"
- + " <world />\n"
- + " <hello />\n"
- + "</root>");
-
- assertValidXml("<?xml version='1.0'?>\n"
- + "<root xmlns='urn:jbpm.org:test'>\n"
- + " <hello />\n"
- + " <world />\n"
- + " <hello />\n"
- + "</root>");
-
- try {
- assertValidXml("<?xml version='1.0'?>\n"
- + "<root xmlns='urn:jbpm.org:test'>\n"
- + " <hello />\n"
- + " <world />\n"
- + " <hello />\n"
- + " <hello />\n"
- + "</root>");
- fail("expected exception");
- }
- catch (XmlException e) {
- // OK
- }
- }
-
- public void testMultiSchemas() {
- addSchema("<xs:schema targetNamespace='urn:jbpm.org:default' \n"
- + " xmlns='urn:jbpm.org:default' \n"
- + " xmlns:xs='http://www.w3.org/2001/XMLSchema'\n"
- + " elementFormDefault='qualified'>\n"
- + " <xs:element name='root'>\n"
- + " <xs:complexType>\n"
- + " <xs:choice minOccurs='0' maxOccurs='3'>\n"
- + " <xs:element name='hello' />\n"
- + " <xs:element name='world' />\n"
- + " <xs:any processContents='lax' minOccurs='0' maxOccurs='unbounded'/>\n"
- + " <xs:any namespace='##other' processContents='lax' minOccurs='0' maxOccurs='unbounded'/>\n"
- + " </xs:choice>\n"
- + " </xs:complexType>\n"
- + " </xs:element>\n"
- + " <xs:element name='tuut' />\n"
- + "</xs:schema>");
-
- addSchema("<xs:schema targetNamespace='urn:jbpm.org:other' \n"
- + " xmlns='urn:jbpm.org:other' \n"
- + " xmlns:xs='http://www.w3.org/2001/XMLSchema'\n"
- + " elementFormDefault='qualified'>\n"
- + " <xs:element name='tree'>\n"
- + " <xs:complexType>\n"
- + " <xs:choice minOccurs='0' maxOccurs='3'>\n"
- + " <xs:element name='tree' />\n"
- + " <xs:element name='leaf' />\n"
- + " </xs:choice>\n"
- + " </xs:complexType>\n"
- + " </xs:element>\n"
- + " <xs:element name='leaf' />\n"
- + "</xs:schema>");
-
- assertValidXml("<?xml version='1.0'?>\n"
- + "<root xmlns='urn:jbpm.org:default'"
- + " xmlns:other='urn:jbpm.org:other'>\n"
- + " <hello />\n"
- + " <hello />\n"
- + " <tuut />"
- + " <other:tree />"
- + "</root>");
- }
-
-}
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jboss/seam/pageflow-2.0.xsd
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jboss/seam/pageflow-2.0.xsd 2010-10-21 21:26:52 UTC (rev 6785)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jboss/seam/pageflow-2.0.xsd 2010-10-27 07:33:01 UTC (rev 6786)
@@ -54,15 +54,14 @@
<xs:element ref="exception-handler" />
</xs:choice>
<xs:attribute name="name" type="xs:string" />
- <xs:attribute name="binding" type="bindingType" />
+ <xs:attribute name="binding" type="bindingType" />
</xs:complexType>
</xs:element>
<xs:element name="sub-process">
<xs:complexType>
<xs:attribute name="name" type="xs:string" use="required" />
- <xs:attribute name="version" type="xs:integer" />
-
+ <xs:attribute name="version" type="xs:integer" />
</xs:complexType>
</xs:element>
Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jboss/seam/pageflow-2.1.xsd
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jboss/seam/pageflow-2.1.xsd (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jboss/seam/pageflow-2.1.xsd 2010-10-27 07:33:01 UTC (rev 6786)
@@ -0,0 +1,326 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<xs:schema xmlns="http://jboss.com/products/seam/pageflow"
+ targetNamespace="http://jboss.com/products/seam/pageflow"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified">
+
+ <!-- PAGEFLOW-DEFINITION -->
+ <!-- ################### -->
+ <xs:element name="pageflow-definition">
+ <xs:complexType>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:group ref="start-node-elements" />
+ <xs:group ref="node-elements" />
+ <xs:group ref="end-node-elements" />
+ <xs:group ref="action-elements" />
+ <xs:element ref="event" />
+ <xs:element ref="exception-handler" />
+ </xs:choice>
+ <xs:attribute name="name" type="xs:string" use="required" />
+ <xs:attribute name="start-page" type="xs:string" />
+ </xs:complexType>
+ </xs:element>
+
+ <!-- NODES -->
+ <!-- ##### -->
+ <xs:element name="start-state">
+ <xs:complexType>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="transition" />
+ <xs:element ref="event" />
+ <xs:element ref="exception-handler" />
+ </xs:choice>
+ <xs:attribute name="name" type="xs:string" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="end-state">
+ <xs:complexType>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="event" />
+ <xs:element ref="exception-handler" />
+ </xs:choice>
+ <xs:attribute name="name" type="xs:string" use="required" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="process-state">
+ <xs:complexType>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="sub-process" />
+ <xs:element ref="transition" />
+ <xs:element ref="event" />
+ <xs:element ref="exception-handler" />
+ </xs:choice>
+ <xs:attribute name="name" type="xs:string" />
+ <xs:attribute name="binding" type="bindingType" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="sub-process">
+ <xs:complexType>
+ <xs:attribute name="name" type="xs:string" use="required" />
+ <xs:attribute name="version" type="xs:integer" />
+ <xs:attribute name="binding" type="bindingType" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="start-page">
+ <xs:complexType>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:group ref="page-elements" />
+ </xs:choice>
+ <xs:attributeGroup ref="page-attributes" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="decision">
+ <xs:complexType>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="handler" type="delegation" />
+ <xs:element ref="event" />
+ <xs:element ref="exception-handler" />
+ <xs:element name="transition">
+ <xs:complexType>
+ <xs:choice minOccurs="0"
+ maxOccurs="unbounded">
+ <xs:element name="condition">
+ <xs:complexType mixed="true">
+ <xs:sequence minOccurs="0"
+ maxOccurs="unbounded">
+ <xs:any processContents="lax"
+ minOccurs="0" maxOccurs="unbounded" />
+ </xs:sequence>
+ <xs:attribute name="expression"
+ type="xs:string" />
+ </xs:complexType>
+ </xs:element>
+ <xs:group ref="action-elements" />
+ <xs:element ref="exception-handler" />
+ </xs:choice>
+ <xs:attribute name="to" type="xs:string"
+ use="required" />
+ <xs:attribute name="name" type="xs:string" />
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ <xs:attribute name="name" type="xs:string" use="required" />
+ <xs:attribute name="expression" type="xs:string" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="page">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:choice minOccurs="0" maxOccurs="1">
+ <xs:element ref="end-conversation" />
+ </xs:choice>
+ <xs:choice minOccurs="0" maxOccurs="1">
+ <xs:element ref="end-task" />
+ </xs:choice>
+ <xs:group ref="page-elements" />
+ </xs:sequence>
+ <xs:attributeGroup ref="page-attributes" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="redirect" />
+ <xs:element name="description" type="xs:string" />
+
+ <xs:element name="end-conversation">
+ <xs:complexType>
+ <xs:attribute name="before-redirect" type="booleanType" />
+ <xs:attribute name="create-process" type="xs:string" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="end-task">
+ <xs:complexType>
+ <xs:attribute name="transition" type="xs:string" />
+ </xs:complexType>
+ </xs:element>
+
+ <!-- TRANSITION -->
+ <!-- ########## -->
+ <xs:element name="transition">
+ <xs:complexType>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:group ref="action-elements" />
+ <xs:element ref="exception-handler" />
+ </xs:choice>
+ <xs:attribute name="to" type="xs:string" use="required" />
+ <xs:attribute name="name" type="xs:string" />
+ </xs:complexType>
+ </xs:element>
+
+ <!-- ACTIONS -->
+ <!-- ####### -->
+ <xs:element name="action">
+ <xs:complexType mixed="true">
+ <xs:sequence>
+ <xs:any processContents="lax" minOccurs="0"
+ maxOccurs="unbounded" />
+ </xs:sequence>
+ <xs:attribute name="class" type="xs:string" />
+ <xs:attribute name="config-type" default="field" type="xs:string" />
+ <xs:attribute name="name" type="xs:string" />
+ <xs:attribute name="ref-name" type="xs:string" />
+ <xs:attribute name="accept-propagated-events"
+ type="booleanType" default="true" />
+ <xs:attribute name="expression" type="xs:string" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="script">
+ <xs:complexType mixed="true">
+ <xs:sequence>
+ <xs:any processContents="lax" minOccurs="0"
+ maxOccurs="unbounded" />
+ </xs:sequence>
+ <xs:attribute name="name" type="xs:string" />
+ <xs:attribute name="accept-propagated-events"
+ type="booleanType" default="true" />
+ </xs:complexType>
+ </xs:element>
+
+ <!-- EVENT -->
+ <!-- ##### -->
+ <xs:element name="event">
+ <xs:complexType>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:group ref="action-elements" />
+ </xs:choice>
+ <xs:attribute name="type" use="required">
+ <xs:simpleType>
+ <xs:union>
+ <xs:simpleType>
+ <xs:restriction base="xs:string" />
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="node-enter" />
+ <xs:enumeration value="node-leave" />
+ <xs:enumeration value="process-start" />
+ <xs:enumeration value="process-end" />
+ <xs:enumeration value="task-create" />
+ <xs:enumeration value="task-assign" />
+ <xs:enumeration value="task-start" />
+ <xs:enumeration value="task-end" />
+ <xs:enumeration value="before-signal" />
+ <xs:enumeration value="after-signal" />
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:union>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:complexType>
+ </xs:element>
+
+ <!-- EXCEPTION-HANDLER -->
+ <!-- ################# -->
+ <xs:element name="exception-handler">
+ <xs:complexType>
+ <xs:choice minOccurs="1" maxOccurs="unbounded">
+ <xs:element ref="action" />
+ <xs:element ref="script" />
+ </xs:choice>
+ <xs:attribute name="exception-class" type="xs:string" />
+ </xs:complexType>
+ </xs:element>
+
+ <!-- TYPES AND GROUPS -->
+ <!-- ################ -->
+ <xs:complexType name="delegation" mixed="true">
+ <xs:sequence>
+ <xs:any processContents="lax" minOccurs="0"
+ maxOccurs="unbounded" />
+ </xs:sequence>
+ <xs:attribute name="class" type="xs:string" />
+ <xs:attribute name="config-type" default="field" type="xs:string" />
+ </xs:complexType>
+
+ <xs:simpleType name="configType">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="field" />
+ <xs:enumeration value="bean" />
+ <xs:enumeration value="constructor" />
+ <xs:enumeration value="configuration-property" />
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="booleanType">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="yes" />
+ <xs:enumeration value="no" />
+ <xs:enumeration value="true" />
+ <xs:enumeration value="false" />
+ <xs:enumeration value="on" />
+ <xs:enumeration value="off" />
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="enabledType">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="enabled" />
+ <xs:enumeration value="disabled" />
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:group name="start-node-elements">
+ <xs:choice>
+ <xs:element ref="start-state" />
+ <xs:element ref="start-page" />
+ </xs:choice>
+ </xs:group>
+
+ <xs:group name="node-elements">
+ <xs:choice>
+ <xs:element ref="page" />
+ <xs:element ref="decision" />
+ <xs:element ref="process-state" />
+ </xs:choice>
+ </xs:group>
+
+ <xs:group name="end-node-elements">
+ <xs:choice>
+ <xs:element ref="end-state" />
+ </xs:choice>
+ </xs:group>
+
+ <xs:group name="action-elements">
+ <xs:choice>
+ <xs:element ref="action" />
+ <xs:element ref="script"/>
+ </xs:choice>
+ </xs:group>
+
+ <xs:group name="page-elements">
+ <xs:sequence>
+ <xs:element ref="description" maxOccurs="1" minOccurs="0"/>
+ <xs:element ref="redirect" maxOccurs="1" minOccurs="0"/>
+ <xs:element ref="event" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element ref="exception-handler" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element ref="transition" maxOccurs="unbounded" minOccurs="0"/>
+ <xs:group ref="action-elements" minOccurs="0" maxOccurs="1" />
+ </xs:sequence>
+ </xs:group>
+
+ <xs:attributeGroup name="page-attributes">
+ <xs:attribute name="redirect" type="xs:boolean" />
+ <xs:attribute name="switch" type="enabledType" />
+ <xs:attribute name="no-conversation-view-id" type="xs:string" />
+ <xs:attribute name="timeout" type="xs:int" />
+ <xs:attribute name="back" type="enabledType" />
+ <xs:attribute name="view-id" type="xs:string" use="required" />
+ <xs:attribute name="name" type="xs:string" use="required" />
+ </xs:attributeGroup>
+
+ <xs:simpleType name="bindingType">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="late" />
+ <xs:enumeration value="early" />
+ </xs:restriction>
+ </xs:simpleType>
+
+</xs:schema>
Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jboss/seam/pageflow-2.1.xsd
___________________________________________________________________
Name: svn:eol-style
+ native
Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jboss/seam/pageflow-2.2.xsd
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jboss/seam/pageflow-2.2.xsd (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jboss/seam/pageflow-2.2.xsd 2010-10-27 07:33:01 UTC (rev 6786)
@@ -0,0 +1,326 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<xs:schema xmlns="http://jboss.com/products/seam/pageflow"
+ targetNamespace="http://jboss.com/products/seam/pageflow"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified">
+
+ <!-- PAGEFLOW-DEFINITION -->
+ <!-- ################### -->
+ <xs:element name="pageflow-definition">
+ <xs:complexType>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:group ref="start-node-elements" />
+ <xs:group ref="node-elements" />
+ <xs:group ref="end-node-elements" />
+ <xs:group ref="action-elements" />
+ <xs:element ref="event" />
+ <xs:element ref="exception-handler" />
+ </xs:choice>
+ <xs:attribute name="name" type="xs:string" use="required" />
+ <xs:attribute name="start-page" type="xs:string" />
+ </xs:complexType>
+ </xs:element>
+
+ <!-- NODES -->
+ <!-- ##### -->
+ <xs:element name="start-state">
+ <xs:complexType>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="transition" />
+ <xs:element ref="event" />
+ <xs:element ref="exception-handler" />
+ </xs:choice>
+ <xs:attribute name="name" type="xs:string" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="end-state">
+ <xs:complexType>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="event" />
+ <xs:element ref="exception-handler" />
+ </xs:choice>
+ <xs:attribute name="name" type="xs:string" use="required" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="process-state">
+ <xs:complexType>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="sub-process" />
+ <xs:element ref="transition" />
+ <xs:element ref="event" />
+ <xs:element ref="exception-handler" />
+ </xs:choice>
+ <xs:attribute name="name" type="xs:string" />
+ <xs:attribute name="binding" type="bindingType" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="sub-process">
+ <xs:complexType>
+ <xs:attribute name="name" type="xs:string" use="required" />
+ <xs:attribute name="version" type="xs:integer" />
+ <xs:attribute name="binding" type="bindingType" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="start-page">
+ <xs:complexType>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:group ref="page-elements" />
+ </xs:choice>
+ <xs:attributeGroup ref="page-attributes" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="decision">
+ <xs:complexType>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="handler" type="delegation" />
+ <xs:element ref="event" />
+ <xs:element ref="exception-handler" />
+ <xs:element name="transition">
+ <xs:complexType>
+ <xs:choice minOccurs="0"
+ maxOccurs="unbounded">
+ <xs:element name="condition">
+ <xs:complexType mixed="true">
+ <xs:sequence minOccurs="0"
+ maxOccurs="unbounded">
+ <xs:any processContents="lax"
+ minOccurs="0" maxOccurs="unbounded" />
+ </xs:sequence>
+ <xs:attribute name="expression"
+ type="xs:string" />
+ </xs:complexType>
+ </xs:element>
+ <xs:group ref="action-elements" />
+ <xs:element ref="exception-handler" />
+ </xs:choice>
+ <xs:attribute name="to" type="xs:string"
+ use="required" />
+ <xs:attribute name="name" type="xs:string" />
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ <xs:attribute name="name" type="xs:string" use="required" />
+ <xs:attribute name="expression" type="xs:string" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="page">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:choice minOccurs="0" maxOccurs="1">
+ <xs:element ref="end-conversation" />
+ </xs:choice>
+ <xs:choice minOccurs="0" maxOccurs="1">
+ <xs:element ref="end-task" />
+ </xs:choice>
+ <xs:group ref="page-elements" />
+ </xs:sequence>
+ <xs:attributeGroup ref="page-attributes" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="redirect" />
+ <xs:element name="description" type="xs:string" />
+
+ <xs:element name="end-conversation">
+ <xs:complexType>
+ <xs:attribute name="before-redirect" type="booleanType" />
+ <xs:attribute name="create-process" type="xs:string" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="end-task">
+ <xs:complexType>
+ <xs:attribute name="transition" type="xs:string" />
+ </xs:complexType>
+ </xs:element>
+
+ <!-- TRANSITION -->
+ <!-- ########## -->
+ <xs:element name="transition">
+ <xs:complexType>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:group ref="action-elements" />
+ <xs:element ref="exception-handler" />
+ </xs:choice>
+ <xs:attribute name="to" type="xs:string" use="required" />
+ <xs:attribute name="name" type="xs:string" />
+ </xs:complexType>
+ </xs:element>
+
+ <!-- ACTIONS -->
+ <!-- ####### -->
+ <xs:element name="action">
+ <xs:complexType mixed="true">
+ <xs:sequence>
+ <xs:any processContents="lax" minOccurs="0"
+ maxOccurs="unbounded" />
+ </xs:sequence>
+ <xs:attribute name="class" type="xs:string" />
+ <xs:attribute name="config-type" default="field" type="xs:string" />
+ <xs:attribute name="name" type="xs:string" />
+ <xs:attribute name="ref-name" type="xs:string" />
+ <xs:attribute name="accept-propagated-events"
+ type="booleanType" default="true" />
+ <xs:attribute name="expression" type="xs:string" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="script">
+ <xs:complexType mixed="true">
+ <xs:sequence>
+ <xs:any processContents="lax" minOccurs="0"
+ maxOccurs="unbounded" />
+ </xs:sequence>
+ <xs:attribute name="name" type="xs:string" />
+ <xs:attribute name="accept-propagated-events"
+ type="booleanType" default="true" />
+ </xs:complexType>
+ </xs:element>
+
+ <!-- EVENT -->
+ <!-- ##### -->
+ <xs:element name="event">
+ <xs:complexType>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:group ref="action-elements" />
+ </xs:choice>
+ <xs:attribute name="type" use="required">
+ <xs:simpleType>
+ <xs:union>
+ <xs:simpleType>
+ <xs:restriction base="xs:string" />
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="node-enter" />
+ <xs:enumeration value="node-leave" />
+ <xs:enumeration value="process-start" />
+ <xs:enumeration value="process-end" />
+ <xs:enumeration value="task-create" />
+ <xs:enumeration value="task-assign" />
+ <xs:enumeration value="task-start" />
+ <xs:enumeration value="task-end" />
+ <xs:enumeration value="before-signal" />
+ <xs:enumeration value="after-signal" />
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:union>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:complexType>
+ </xs:element>
+
+ <!-- EXCEPTION-HANDLER -->
+ <!-- ################# -->
+ <xs:element name="exception-handler">
+ <xs:complexType>
+ <xs:choice minOccurs="1" maxOccurs="unbounded">
+ <xs:element ref="action" />
+ <xs:element ref="script" />
+ </xs:choice>
+ <xs:attribute name="exception-class" type="xs:string" />
+ </xs:complexType>
+ </xs:element>
+
+ <!-- TYPES AND GROUPS -->
+ <!-- ################ -->
+ <xs:complexType name="delegation" mixed="true">
+ <xs:sequence>
+ <xs:any processContents="lax" minOccurs="0"
+ maxOccurs="unbounded" />
+ </xs:sequence>
+ <xs:attribute name="class" type="xs:string" />
+ <xs:attribute name="config-type" default="field" type="xs:string" />
+ </xs:complexType>
+
+ <xs:simpleType name="configType">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="field" />
+ <xs:enumeration value="bean" />
+ <xs:enumeration value="constructor" />
+ <xs:enumeration value="configuration-property" />
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="booleanType">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="yes" />
+ <xs:enumeration value="no" />
+ <xs:enumeration value="true" />
+ <xs:enumeration value="false" />
+ <xs:enumeration value="on" />
+ <xs:enumeration value="off" />
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="enabledType">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="enabled" />
+ <xs:enumeration value="disabled" />
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:group name="start-node-elements">
+ <xs:choice>
+ <xs:element ref="start-state" />
+ <xs:element ref="start-page" />
+ </xs:choice>
+ </xs:group>
+
+ <xs:group name="node-elements">
+ <xs:choice>
+ <xs:element ref="page" />
+ <xs:element ref="decision" />
+ <xs:element ref="process-state" />
+ </xs:choice>
+ </xs:group>
+
+ <xs:group name="end-node-elements">
+ <xs:choice>
+ <xs:element ref="end-state" />
+ </xs:choice>
+ </xs:group>
+
+ <xs:group name="action-elements">
+ <xs:choice>
+ <xs:element ref="action" />
+ <xs:element ref="script"/>
+ </xs:choice>
+ </xs:group>
+
+ <xs:group name="page-elements">
+ <xs:sequence>
+ <xs:element ref="description" maxOccurs="1" minOccurs="0"/>
+ <xs:element ref="redirect" maxOccurs="1" minOccurs="0"/>
+ <xs:element ref="event" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element ref="exception-handler" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element ref="transition" maxOccurs="unbounded" minOccurs="0"/>
+ <xs:group ref="action-elements" minOccurs="0" maxOccurs="1" />
+ </xs:sequence>
+ </xs:group>
+
+ <xs:attributeGroup name="page-attributes">
+ <xs:attribute name="redirect" type="xs:boolean" />
+ <xs:attribute name="switch" type="enabledType" />
+ <xs:attribute name="no-conversation-view-id" type="xs:string" />
+ <xs:attribute name="timeout" type="xs:int" />
+ <xs:attribute name="back" type="enabledType" />
+ <xs:attribute name="view-id" type="xs:string" use="required" />
+ <xs:attribute name="name" type="xs:string" use="required" />
+ </xs:attributeGroup>
+
+ <xs:simpleType name="bindingType">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="late" />
+ <xs:enumeration value="early" />
+ </xs:restriction>
+ </xs:simpleType>
+
+</xs:schema>
Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jboss/seam/pageflow-2.2.xsd
___________________________________________________________________
Name: svn:eol-style
+ native
Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/.gpd.testPageflowWithNamespace.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/.gpd.testPageflowWithNamespace.xml (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/.gpd.testPageflowWithNamespace.xml 2010-10-27 07:33:01 UTC (rev 6786)
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<root-container/>
\ No newline at end of file
Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/.gpd.testPageflowWithNamespace.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/.gpd.testPageflowWithSchemaLocation.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/.gpd.testPageflowWithSchemaLocation.xml (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/.gpd.testPageflowWithSchemaLocation.xml 2010-10-27 07:33:01 UTC (rev 6786)
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<root-container/>
\ No newline at end of file
Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/.gpd.testPageflowWithSchemaLocation.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/testPageflowWithNamespace.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/testPageflowWithNamespace.xml 2010-10-21 21:26:52 UTC (rev 6785)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/testPageflowWithNamespace.xml 2010-10-27 07:33:01 UTC (rev 6786)
@@ -4,27 +4,26 @@
<!-- the parser will notice because a schema is associated to the namespace above -->
</i-do-not-belong-here>
- <start-state name="displayGuess">
+ <start-page name="displayGuess" view-id="/numberGuess.jspx">
<transition name="guess" to="evaluateGuess">
<action expression="#{numberGuess.guess}" />
</transition>
- </start-state>
+ </start-page>
<decision name="evaluateGuess" expression="#{numberGuess.correctGuess}">
<transition name="true" to="win" />
<transition name="false" to="evaluateRemainingGuesses" />
</decision>
- <decision name="evaluateRemainingGuesses"
- expression="#{numberGuess.lastGuess}">
+ <decision name="evaluateRemainingGuesses" expression="#{numberGuess.lastGuess}">
<transition name="true" to="lose" />
<transition name="false" to="evaluateGuess">
<action expression="#{numberGuess.guess}" />
</transition>
</decision>
- <end-state name="win" />
+ <page name="win" view-id="/win.jspx" />
- <end-state name="lose" />
+ <page name="lose" view-id="/lose.jspx" />
</pageflow-definition>
\ No newline at end of file
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/testPageflowWithSchemaLocation.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/testPageflowWithSchemaLocation.xml 2010-10-21 21:26:52 UTC (rev 6785)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/testPageflowWithSchemaLocation.xml 2010-10-27 07:33:01 UTC (rev 6786)
@@ -1,15 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
-<pageflow-definition name="numberGuess"
- xsi:schemaLocation="http://jboss.com/products/seam/pageflow
- http://jboss.com/products/seam/pageflow-2.0.xsd"
+<pageflow-definition name="numberGuess" xmlns="http://jboss.com/products/seam/pageflow"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="http://jboss.com/products/seam/pageflow">
+ xsi:schemaLocation="http://jboss.com/products/seam/pageflow
+ http://jboss.com/products/seam/pageflow-2.2.xsd">
- <start-state name="displayGuess">
+ <start-page name="displayGuess" view-id="/numberGuess.jspx">
<transition name="guess" to="evaluateGuess">
<action expression="#{numberGuess.guess}" />
</transition>
- </start-state>
+ </start-page>
<decision name="evaluateGuess" expression="#{numberGuess.correctGuess}">
<transition name="true" to="win" />
@@ -24,8 +23,8 @@
</transition>
</decision>
- <end-state name="win" />
+ <page name="win" view-id="/win.jspx" />
- <end-state name="lose" />
+ <page name="lose" view-id="/lose.jspx" />
</pageflow-definition>
\ No newline at end of file
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/testPageflowWithoutNamespace.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/testPageflowWithoutNamespace.xml 2010-10-21 21:26:52 UTC (rev 6785)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/testPageflowWithoutNamespace.xml 2010-10-27 07:33:01 UTC (rev 6786)
@@ -4,11 +4,11 @@
<!-- the parser will not notice because no namespace was specified -->
</i-do-not-belong-here>
- <start-state name="displayGuess">
+ <start-page name="displayGuess" view-id="/numberGuess.jspx">
<transition name="guess" to="evaluateGuess">
<action expression="#{numberGuess.guess}" />
</transition>
- </start-state>
+ </start-page>
<decision name="evaluateGuess" expression="#{numberGuess.correctGuess}">
<transition name="true" to="win" />
@@ -23,8 +23,8 @@
</transition>
</decision>
- <end-state name="win" />
+ <page name="win" view-id="/win.jspx" />
- <end-state name="lose" />
+ <page name="lose" view-id="/lose.jspx" />
</pageflow-definition>
\ No newline at end of file
Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/.gpd.pageflow-2.0.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/.gpd.pageflow-2.0.xml (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/.gpd.pageflow-2.0.xml 2010-10-27 07:33:01 UTC (rev 6786)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<root-container name="jbpm2774" width="784" height="581">
+ <node name="guess number" x="36" y="108" width="145" height="37">
+ <edge>
+ <label x="5" y="-10"/>
+ </edge>
+ </node>
+ <node name="is guess correct?" x="36" y="180" width="145" height="37">
+ <edge>
+ <label x="5" y="-10"/>
+ </edge>
+ <edge>
+ <label x="5" y="-10"/>
+ <bendpoint w1="108" h1="1" w2="108" h2="73"/>
+ <bendpoint w1="108" h1="-73" w2="108" h2="-1"/>
+ </edge>
+ </node>
+ <node name="show attempts" x="36" y="264" width="144" height="36"/>
+</root-container>
Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/.gpd.pageflow-2.0.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/.gpd.pageflow-2.1.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/.gpd.pageflow-2.1.xml (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/.gpd.pageflow-2.1.xml 2010-10-27 07:33:01 UTC (rev 6786)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<root-container name="jbpm2774" width="784" height="581">
+ <node name="guess number" x="36" y="108" width="145" height="37">
+ <edge>
+ <label x="5" y="-10"/>
+ </edge>
+ </node>
+ <node name="is guess correct?" x="36" y="180" width="145" height="37">
+ <edge>
+ <label x="5" y="-10"/>
+ </edge>
+ <edge>
+ <label x="5" y="-10"/>
+ <bendpoint w1="108" h1="1" w2="108" h2="73"/>
+ <bendpoint w1="108" h1="-73" w2="108" h2="-1"/>
+ </edge>
+ </node>
+ <node name="show attempts" x="36" y="264" width="144" height="36"/>
+</root-container>
Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/.gpd.pageflow-2.1.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/.gpd.pageflow-2.2.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/.gpd.pageflow-2.2.xml (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/.gpd.pageflow-2.2.xml 2010-10-27 07:33:01 UTC (rev 6786)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<root-container name="jbpm2774" width="784" height="581">
+ <node name="guess number" x="36" y="108" width="145" height="37">
+ <edge>
+ <label x="5" y="-10"/>
+ </edge>
+ </node>
+ <node name="is guess correct?" x="36" y="180" width="145" height="37">
+ <edge>
+ <label x="5" y="-10"/>
+ </edge>
+ <edge>
+ <label x="5" y="-10"/>
+ <bendpoint w1="108" h1="1" w2="108" h2="73"/>
+ <bendpoint w1="108" h1="-73" w2="108" h2="-1"/>
+ </edge>
+ </node>
+ <node name="show attempts" x="36" y="264" width="144" height="36"/>
+</root-container>
Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/.gpd.pageflow-2.2.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/pageflow-2.0.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/pageflow-2.0.xml (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/pageflow-2.0.xml 2010-10-27 07:33:01 UTC (rev 6786)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<pageflow-definition name="jbpm2774" xmlns="http://jboss.com/products/seam/pageflow"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://jboss.com/products/seam/pageflow
+ http://jboss.com/products/seam/pageflow-2.0.xsd">
+ <start-page name="guess number" view-id="guess.xhtml">
+ <transition to="is guess correct?" />
+ </start-page>
+
+ <decision name="is guess correct?">
+ <transition to="show attempts" name="yes" />
+ <transition name="no" to="guess number" />
+ </decision>
+
+ <page name="show attempts" view-id="show.xhtml" />
+</pageflow-definition>
Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/pageflow-2.0.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/pageflow-2.1.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/pageflow-2.1.xml (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/pageflow-2.1.xml 2010-10-27 07:33:01 UTC (rev 6786)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<pageflow-definition name="jbpm2774" xmlns="http://jboss.com/products/seam/pageflow"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://jboss.com/products/seam/pageflow
+ http://jboss.com/products/seam/pageflow-2.1.xsd">
+ <event type="process-start">
+ <script>executionContext.setVariable("number", (int) System.currentTimeMillis() % 100);</script>
+ </event>
+
+ <start-page name="guess number" view-id="guess.xhtml">
+ <transition to="is guess correct?" ></transition>
+ </start-page>
+
+ <decision name="is guess correct?">
+ <transition to="show attempts" name="yes" />
+ <transition name="no" to="guess number" />
+ </decision>
+
+ <page name="show attempts" view-id="show.xhtml" />
+</pageflow-definition>
Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/pageflow-2.1.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/pageflow-2.2.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/pageflow-2.2.xml (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/pageflow-2.2.xml 2010-10-27 07:33:01 UTC (rev 6786)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<pageflow-definition name="jbpm2774" xmlns="http://jboss.com/products/seam/pageflow"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://jboss.com/products/seam/pageflow
+ http://jboss.com/products/seam/pageflow-2.2.xsd">
+ <event type="process-start">
+ <script>executionContext.setVariable("number", (int) System.currentTimeMillis() % 100);</script>
+ </event>
+
+ <start-page name="guess number" view-id="guess.xhtml">
+ <transition to="is guess correct?" />
+ </start-page>
+
+ <decision name="is guess correct?">
+ <transition to="show attempts" name="yes" />
+ <transition name="no" to="guess number" />
+ </decision>
+
+ <page name="show attempts" view-id="show.xhtml" />
+</pageflow-definition>
Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/pageflow-2.2.xml
___________________________________________________________________
Name: svn:eol-style
+ native
13 years, 6 months
JBoss JBPM SVN: r6784 - projects/migration_tool/trunk/src/main/xslt.
by do-not-reply@jboss.org
Author: MohReece
Date: 2010-10-21 17:24:47 -0400 (Thu, 21 Oct 2010)
New Revision: 6784
Modified:
projects/migration_tool/trunk/src/main/xslt/migrate.xslt
Log:
Consolidated Marc O's work in the migrate.xslt file (src/main/xslt dir).
Modified: projects/migration_tool/trunk/src/main/xslt/migrate.xslt
===================================================================
--- projects/migration_tool/trunk/src/main/xslt/migrate.xslt 2010-10-21 21:17:59 UTC (rev 6783)
+++ projects/migration_tool/trunk/src/main/xslt/migrate.xslt 2010-10-21 21:24:47 UTC (rev 6784)
@@ -23,6 +23,80 @@
</definitions>
</xsl:template>
+<xsl:template match="jpdl:process">
+ <process>
+ <xsl:attribute name="id"><xsl:value-of select="@name"/></xsl:attribute>
+ <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
+ <xsl:apply-templates/>
+ </process>
+</xsl:template>
+<xsl:template match="jpdl:start">
+ <xsl:variable name="id"><xsl:value-of select="@name"/></xsl:variable>
+ <startEvent>
+ <xsl:attribute name="id"><xsl:value-of select="$id"/></xsl:attribute>
+ <xsl:attribute name="name"><xsl:value-of select="$id"/></xsl:attribute>
+ <xsl:if test="@g">
+ <xsl:attribute name="g:x"><xsl:value-of select="substring-before(@g,',')"/></xsl:attribute>
+ <xsl:variable name="g2"><xsl:value-of select="substring-after(@g,',')"/></xsl:variable>
+ <xsl:attribute name="g:y"><xsl:value-of select="substring-before($g2,',')"/></xsl:attribute>
+ <xsl:variable name="g3"><xsl:value-of select="substring-after($g2,',')"/></xsl:variable>
+ <xsl:attribute name="g:width"><xsl:value-of select="substring-before($g3,',')"/></xsl:attribute>
+ <xsl:attribute name="g:height"><xsl:value-of select="substring-after($g3,',')"/></xsl:attribute>
+ </xsl:if>
+ </startEvent>
+ <xsl:for-each select="jpdl:transition">
+ <sequenceFlow>
+ <xsl:attribute name="sourceRef"><xsl:value-of select="$id"/></xsl:attribute>
+ <xsl:attribute name="targetRef"><xsl:value-of select="@to"/></xsl:attribute>
+ </sequenceFlow>
+ </xsl:for-each>
+</xsl:template>
+
+<xsl:template match="jpdl:end">
+ <xsl:variable name="id"><xsl:value-of select="@name"/></xsl:variable>
+ <endEvent>
+ <xsl:attribute name="id"><xsl:value-of select="$id"/></xsl:attribute>
+ <xsl:attribute name="name"><xsl:value-of select="$id"/></xsl:attribute>
+ <xsl:if test="@g">
+ <xsl:attribute name="g:x"><xsl:value-of select="substring-before(@g,',')"/></xsl:attribute>
+ <xsl:variable name="g2"><xsl:value-of select="substring-after(@g,',')"/></xsl:variable>
+ <xsl:attribute name="g:y"><xsl:value-of select="substring-before($g2,',')"/></xsl:attribute>
+ <xsl:variable name="g3"><xsl:value-of select="substring-after($g2,',')"/></xsl:variable>
+ <xsl:attribute name="g:width"><xsl:value-of select="substring-before($g3,',')"/></xsl:attribute>
+ <xsl:attribute name="g:height"><xsl:value-of select="substring-after($g3,',')"/></xsl:attribute>
+ </xsl:if>
+ <terminateEventDefinition/>
+ </endEvent>
+</xsl:template>
+
+<xsl:template match="jpdl:task">
+ <xsl:variable name="id"><xsl:value-of select="@name"/></xsl:variable>
+ <userTask>
+ <xsl:attribute name="id"><xsl:value-of select="$id"/></xsl:attribute>
+ <xsl:attribute name="name"><xsl:value-of select="$id"/></xsl:attribute>
+ <xsl:if test="@g">
+ <xsl:attribute name="g:x"><xsl:value-of select="substring-before(@g,',')"/></xsl:attribute>
+ <xsl:variable name="g2"><xsl:value-of select="substring-after(@g,',')"/></xsl:variable>
+ <xsl:attribute name="g:y"><xsl:value-of select="substring-before($g2,',')"/></xsl:attribute>
+ <xsl:variable name="g3"><xsl:value-of select="substring-after($g2,',')"/></xsl:variable>
+ <xsl:attribute name="g:width"><xsl:value-of select="substring-before($g3,',')"/></xsl:attribute>
+ <xsl:attribute name="g:height"><xsl:value-of select="substring-after($g3,',')"/></xsl:attribute>
+ </xsl:if>
+ <xsl:if test="@assignee">
+ <potentialOwner>
+ <resourceAssignmentExpression>
+ <formalExpression><xsl:value-of select="@assignee"/></formalExpression>
+ </resourceAssignmentExpression>
+ </potentialOwner>
+ </xsl:if>
+ </userTask>
+ <xsl:for-each select="jpdl:transition">
+ <sequenceFlow>
+ <xsl:attribute name="sourceRef"><xsl:value-of select="$id"/></xsl:attribute>
+ <xsl:attribute name="targetRef"><xsl:value-of select="@to"/></xsl:attribute>
+ </sequenceFlow>
+ </xsl:for-each>
+</xsl:template>
</xsl:stylesheet>
\ No newline at end of file
13 years, 6 months
JBoss JBPM SVN: r6783 - projects/migration_tool/tags.
by do-not-reply@jboss.org
Author: MohReece
Date: 2010-10-21 17:17:59 -0400 (Thu, 21 Oct 2010)
New Revision: 6783
Added:
projects/migration_tool/tags/temp/
Log:
Copied: projects/migration_tool/tags/temp (from rev 6774, projects/migration_tool/trunk/src/main/resources)
13 years, 6 months
JBoss JBPM SVN: r6781 - projects/migration_tool/trunk/src/main/resources.
by do-not-reply@jboss.org
Author: MohReece
Date: 2010-10-21 17:08:36 -0400 (Thu, 21 Oct 2010)
New Revision: 6781
Removed:
projects/migration_tool/trunk/src/main/resources/jbjPDL4ToBPMN2.xsl
Log:
Consolidated Marc O's work in the migrate.xslt file (src/main/xslt dir).
Deleted: projects/migration_tool/trunk/src/main/resources/jbjPDL4ToBPMN2.xsl
===================================================================
--- projects/migration_tool/trunk/src/main/resources/jbjPDL4ToBPMN2.xsl 2010-10-21 20:01:35 UTC (rev 6780)
+++ projects/migration_tool/trunk/src/main/resources/jbjPDL4ToBPMN2.xsl 2010-10-21 21:08:36 UTC (rev 6781)
@@ -1,102 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet version="2.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:jpdl="http://jbpm.org/4.3/jpdl">
-
-<!-- Converts a jPDL4.3 file to a BPMN2 file-->
-<xsl:output method="xml" indent="yes" />
-
-<xsl:template match="/">
- <definitions id="Definition"
- targetNamespace="http://www.jboss.org/drools"
- typeLanguage="http://www.java.com/javaTypes"
- expressionLanguage="http://www.mvel.org/2.0"
- xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
- xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
- xs:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"
- xmlns:g="http://www.jboss.org/drools/flow/gpd"
- xmlns:tns="http://www.jboss.org/drools">
-
- <xsl:apply-templates select="jpdl:process"/>
-
- </definitions>
-</xsl:template>
-
-<xsl:template match="jpdl:process">
- <process>
- <xsl:attribute name="id"><xsl:value-of select="@name"/></xsl:attribute>
- <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
- <xsl:apply-templates/>
- </process>
-</xsl:template>
-
-<xsl:template match="jpdl:start">
- <xsl:variable name="id"><xsl:value-of select="@name"/></xsl:variable>
- <startEvent>
- <xsl:attribute name="id"><xsl:value-of select="$id"/></xsl:attribute>
- <xsl:attribute name="name"><xsl:value-of select="$id"/></xsl:attribute>
- <xsl:if test="@g">
- <xsl:attribute name="g:x"><xsl:value-of select="substring-before(@g,',')"/></xsl:attribute>
- <xsl:variable name="g2"><xsl:value-of select="substring-after(@g,',')"/></xsl:variable>
- <xsl:attribute name="g:y"><xsl:value-of select="substring-before($g2,',')"/></xsl:attribute>
- <xsl:variable name="g3"><xsl:value-of select="substring-after($g2,',')"/></xsl:variable>
- <xsl:attribute name="g:width"><xsl:value-of select="substring-before($g3,',')"/></xsl:attribute>
- <xsl:attribute name="g:height"><xsl:value-of select="substring-after($g3,',')"/></xsl:attribute>
- </xsl:if>
- </startEvent>
- <xsl:for-each select="jpdl:transition">
- <sequenceFlow>
- <xsl:attribute name="sourceRef"><xsl:value-of select="$id"/></xsl:attribute>
- <xsl:attribute name="targetRef"><xsl:value-of select="@to"/></xsl:attribute>
- </sequenceFlow>
- </xsl:for-each>
-</xsl:template>
-
-<xsl:template match="jpdl:end">
- <xsl:variable name="id"><xsl:value-of select="@name"/></xsl:variable>
- <endEvent>
- <xsl:attribute name="id"><xsl:value-of select="$id"/></xsl:attribute>
- <xsl:attribute name="name"><xsl:value-of select="$id"/></xsl:attribute>
- <xsl:if test="@g">
- <xsl:attribute name="g:x"><xsl:value-of select="substring-before(@g,',')"/></xsl:attribute>
- <xsl:variable name="g2"><xsl:value-of select="substring-after(@g,',')"/></xsl:variable>
- <xsl:attribute name="g:y"><xsl:value-of select="substring-before($g2,',')"/></xsl:attribute>
- <xsl:variable name="g3"><xsl:value-of select="substring-after($g2,',')"/></xsl:variable>
- <xsl:attribute name="g:width"><xsl:value-of select="substring-before($g3,',')"/></xsl:attribute>
- <xsl:attribute name="g:height"><xsl:value-of select="substring-after($g3,',')"/></xsl:attribute>
- </xsl:if>
- <terminateEventDefinition/>
- </endEvent>
-</xsl:template>
-
-<xsl:template match="jpdl:task">
- <xsl:variable name="id"><xsl:value-of select="@name"/></xsl:variable>
- <userTask>
- <xsl:attribute name="id"><xsl:value-of select="$id"/></xsl:attribute>
- <xsl:attribute name="name"><xsl:value-of select="$id"/></xsl:attribute>
- <xsl:if test="@g">
- <xsl:attribute name="g:x"><xsl:value-of select="substring-before(@g,',')"/></xsl:attribute>
- <xsl:variable name="g2"><xsl:value-of select="substring-after(@g,',')"/></xsl:variable>
- <xsl:attribute name="g:y"><xsl:value-of select="substring-before($g2,',')"/></xsl:attribute>
- <xsl:variable name="g3"><xsl:value-of select="substring-after($g2,',')"/></xsl:variable>
- <xsl:attribute name="g:width"><xsl:value-of select="substring-before($g3,',')"/></xsl:attribute>
- <xsl:attribute name="g:height"><xsl:value-of select="substring-after($g3,',')"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="@assignee">
- <potentialOwner>
- <resourceAssignmentExpression>
- <formalExpression><xsl:value-of select="@assignee"/></formalExpression>
- </resourceAssignmentExpression>
- </potentialOwner>
- </xsl:if>
- </userTask>
- <xsl:for-each select="jpdl:transition">
- <sequenceFlow>
- <xsl:attribute name="sourceRef"><xsl:value-of select="$id"/></xsl:attribute>
- <xsl:attribute name="targetRef"><xsl:value-of select="@to"/></xsl:attribute>
- </sequenceFlow>
- </xsl:for-each>
-</xsl:template>
-
-</xsl:stylesheet>
\ No newline at end of file
13 years, 6 months
JBoss JBPM SVN: r6780 - in projects/migration_tool/trunk/src/test/resources: jpdl and 2 other directories.
by do-not-reply@jboss.org
Author: MohReece
Date: 2010-10-21 16:01:35 -0400 (Thu, 21 Oct 2010)
New Revision: 6780
Added:
projects/migration_tool/trunk/src/test/resources/jpdl3/
projects/migration_tool/trunk/src/test/resources/jpdl3/singleNode/
projects/migration_tool/trunk/src/test/resources/jpdl3/singleNode/gpd.xml
projects/migration_tool/trunk/src/test/resources/jpdl3/singleNode/processdefinition.xml
projects/migration_tool/trunk/src/test/resources/jpdl3/singleNode/processimage.jpg
Removed:
projects/migration_tool/trunk/src/test/resources/jpdl/test/
projects/migration_tool/trunk/src/test/resources/jpdl3/singleNode/gpd.xml
projects/migration_tool/trunk/src/test/resources/jpdl3/singleNode/processdefinition.xml
projects/migration_tool/trunk/src/test/resources/jpdl3/singleNode/processimage.jpg
Log:
Renamed first jPDL test process definition.
Copied: projects/migration_tool/trunk/src/test/resources/jpdl3/singleNode (from rev 6772, projects/migration_tool/trunk/src/test/resources/jpdl/test)
Deleted: projects/migration_tool/trunk/src/test/resources/jpdl3/singleNode/gpd.xml
===================================================================
--- projects/migration_tool/trunk/src/test/resources/jpdl/test/gpd.xml 2010-10-21 18:11:12 UTC (rev 6772)
+++ projects/migration_tool/trunk/src/test/resources/jpdl3/singleNode/gpd.xml 2010-10-21 20:01:35 UTC (rev 6780)
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<root-container name="Test" width="1111" height="594">
- <node name="start-state1" x="468" y="75" width="132" height="36">
- <edge>
- <label x="5" y="-10"/>
- </edge>
- </node>
- <node name="node1" x="473" y="206" width="132" height="36">
- <edge>
- <label x="5" y="-10"/>
- </edge>
- </node>
- <node name="end-state1" x="476" y="328" width="132" height="36"/>
-</root-container>
Copied: projects/migration_tool/trunk/src/test/resources/jpdl3/singleNode/gpd.xml (from rev 6777, projects/migration_tool/trunk/src/test/resources/jpdl/test/gpd.xml)
===================================================================
--- projects/migration_tool/trunk/src/test/resources/jpdl3/singleNode/gpd.xml (rev 0)
+++ projects/migration_tool/trunk/src/test/resources/jpdl3/singleNode/gpd.xml 2010-10-21 20:01:35 UTC (rev 6780)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<root-container name="Single Node" width="856" height="422">
+ <node name="start-state" x="37" y="25" width="132" height="36">
+ <edge>
+ <label x="5" y="-10"/>
+ </edge>
+ </node>
+ <node name="node" x="37" y="101" width="132" height="36">
+ <edge>
+ <label x="5" y="-10"/>
+ </edge>
+ </node>
+ <node name="end-state" x="37" y="193" width="132" height="36"/>
+</root-container>
Deleted: projects/migration_tool/trunk/src/test/resources/jpdl3/singleNode/processdefinition.xml
===================================================================
--- projects/migration_tool/trunk/src/test/resources/jpdl/test/processdefinition.xml 2010-10-21 18:11:12 UTC (rev 6772)
+++ projects/migration_tool/trunk/src/test/resources/jpdl3/singleNode/processdefinition.xml 2010-10-21 20:01:35 UTC (rev 6780)
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<process-definition xmlns="" name="Test">
-
-
- <start-state name="start-state1">
- <transition to="node1"></transition>
- </start-state>
-
-
- <node name="node1">
- <transition to="end-state1"></transition>
- </node>
-
-
- <end-state name="end-state1"></end-state>
-
-
-</process-definition>
\ No newline at end of file
Copied: projects/migration_tool/trunk/src/test/resources/jpdl3/singleNode/processdefinition.xml (from rev 6777, projects/migration_tool/trunk/src/test/resources/jpdl/test/processdefinition.xml)
===================================================================
--- projects/migration_tool/trunk/src/test/resources/jpdl3/singleNode/processdefinition.xml (rev 0)
+++ projects/migration_tool/trunk/src/test/resources/jpdl3/singleNode/processdefinition.xml 2010-10-21 20:01:35 UTC (rev 6780)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<process-definition xmlns="urn:jbpm.org:jpdl-3.2" name="Single Node">
+
+ <start-state name="start-state">
+ <transition to="node" />
+ </start-state>
+
+ <node name="node">
+ <transition to="end-state" />
+ </node>
+
+ <end-state name="end-state" />
+
+</process-definition>
\ No newline at end of file
Deleted: projects/migration_tool/trunk/src/test/resources/jpdl3/singleNode/processimage.jpg
===================================================================
(Binary files differ)
Copied: projects/migration_tool/trunk/src/test/resources/jpdl3/singleNode/processimage.jpg (from rev 6777, projects/migration_tool/trunk/src/test/resources/jpdl/test/processimage.jpg)
===================================================================
(Binary files differ)
13 years, 6 months