JBoss JBPM SVN: r4148 - jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/test/java/org/jbpm/perf.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2009-03-05 01:26:51 -0500 (Thu, 05 Mar 2009)
New Revision: 4148
Modified:
jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/test/java/org/jbpm/perf/SimplePerformanceTest.java
Log:
JBPM-2043: merge r4145 from branch 3.2.6.GA
Modified: jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/test/java/org/jbpm/perf/SimplePerformanceTest.java
===================================================================
--- jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/test/java/org/jbpm/perf/SimplePerformanceTest.java 2009-03-05 06:21:49 UTC (rev 4147)
+++ jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/test/java/org/jbpm/perf/SimplePerformanceTest.java 2009-03-05 06:26:51 UTC (rev 4148)
@@ -30,9 +30,9 @@
import org.jbpm.graph.exe.ProcessInstance;
/**
- * This tests creates a number of process instances. Every instance has a call to an ActionHandler.
- * https://jira.jboss.org/jira/browse/JBPM-2043
+ * This test creates a number of process instances. Every instance has a call to an ActionHandler.
*
+ * @see <a href="https://jira.jboss.org/jira/browse/JBPM-2043">JBPM-2043</a>
* @author mvecera(a)redhat.com
* @author pmacik(a)redhat.com
* @author thomas.diesler(a)jboss.com
@@ -48,7 +48,7 @@
private ProcessDefinition processDefinition;
@Override
- public void setUp() throws Exception {
+ protected void setUp() throws Exception {
super.setUp();
processDefinition = ProcessDefinition.parseXmlString("<process-definition name='perf'>"
@@ -69,7 +69,7 @@
}
@Override
- public void tearDown() throws Exception {
+ protected void tearDown() throws Exception {
stopJobExecutor();
newTransaction();
@@ -79,6 +79,9 @@
}
public void testAsyncCall() {
+ // Won't Fix [JBPM-2043] Performance test coverage
+ if (getHibernateDialect().indexOf("HSQL") != -1) return;
+
launchProcessInstances(WARMUP_INSTANCES);
long startTime = System.currentTimeMillis();
17 years, 2 months
JBoss JBPM SVN: r4147 - jbpm3/branches/jbpm-3.2.6.GA/modules/core/src/main/java/org/jbpm/graph/exe.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2009-03-05 01:21:49 -0500 (Thu, 05 Mar 2009)
New Revision: 4147
Modified:
jbpm3/branches/jbpm-3.2.6.GA/modules/core/src/main/java/org/jbpm/graph/exe/ExecutionContext.java
Log:
replace Stack in ExecutionContext with List to eliminate the undue synchronization overhead
Modified: jbpm3/branches/jbpm-3.2.6.GA/modules/core/src/main/java/org/jbpm/graph/exe/ExecutionContext.java
===================================================================
--- jbpm3/branches/jbpm-3.2.6.GA/modules/core/src/main/java/org/jbpm/graph/exe/ExecutionContext.java 2009-03-05 06:12:12 UTC (rev 4146)
+++ jbpm3/branches/jbpm-3.2.6.GA/modules/core/src/main/java/org/jbpm/graph/exe/ExecutionContext.java 2009-03-05 06:21:49 UTC (rev 4147)
@@ -21,7 +21,8 @@
*/
package org.jbpm.graph.exe;
-import java.util.Stack;
+import java.util.ArrayList;
+import java.util.List;
import org.jbpm.JbpmContext;
import org.jbpm.JbpmException;
@@ -286,27 +287,29 @@
// thread local execution context
- static ThreadLocal<Stack<ExecutionContext>> threadLocalContextStack = new ThreadLocal<Stack<ExecutionContext>>();
-
- static Stack<ExecutionContext> getContextStack()
+ static final ThreadLocal<List<ExecutionContext>> threadLocalContextStack = new ThreadLocal<List<ExecutionContext>>()
{
- Stack<ExecutionContext> stack = threadLocalContextStack.get();
- if (stack == null)
+ @Override
+ protected List<ExecutionContext> initialValue()
{
- stack = new Stack<ExecutionContext>();
- threadLocalContextStack.set(stack);
+ return new ArrayList<ExecutionContext>();
}
- return stack;
+ };
+
+ static List<ExecutionContext> getContextStack()
+ {
+ return threadLocalContextStack.get();
}
public static void pushCurrentContext(ExecutionContext executionContext)
{
- getContextStack().push(executionContext);
+ getContextStack().add(executionContext);
}
public static void popCurrentContext(ExecutionContext executionContext)
{
- if (getContextStack().pop() != executionContext)
+ List<ExecutionContext> contextStack = getContextStack();
+ if (contextStack.remove(contextStack.size() - 1) != executionContext)
{
throw new JbpmException("current execution context mismatch. make sure that every pushed context gets popped");
}
@@ -315,10 +318,10 @@
public static ExecutionContext currentExecutionContext()
{
ExecutionContext executionContext = null;
- Stack<ExecutionContext> stack = getContextStack();
+ List<ExecutionContext> stack = getContextStack();
if (!stack.isEmpty())
{
- executionContext = stack.peek();
+ executionContext = stack.get(stack.size() - 1);
}
return executionContext;
}
17 years, 2 months
JBoss JBPM SVN: r4146 - in jbpm3/branches/jbpm-3.2.6.GA/modules: core/src/test/java/org/jbpm/jbpm1072 and 3 other directories.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2009-03-05 01:12:12 -0500 (Thu, 05 Mar 2009)
New Revision: 4146
Modified:
jbpm3/branches/jbpm-3.2.6.GA/modules/core/src/main/java/org/jbpm/graph/def/EventCallback.java
jbpm3/branches/jbpm-3.2.6.GA/modules/core/src/test/java/org/jbpm/jbpm1072/JBPM1072Test.java
jbpm3/branches/jbpm-3.2.6.GA/modules/enterprise/src/test/java/org/jbpm/enterprise/AbstractEnterpriseTestCase.java
jbpm3/branches/jbpm-3.2.6.GA/modules/enterprise/src/test/java/org/jbpm/enterprise/jbpm1952/JBPM1952Test.java
jbpm3/branches/jbpm-3.2.6.GA/modules/enterprise/src/test/java/org/jbpm/enterprise/jms/JmsMessageTest.java
Log:
stabilize JBPM-1952 test and JBPM-1072 by leveraging the java.util.concurrent package
Modified: jbpm3/branches/jbpm-3.2.6.GA/modules/core/src/main/java/org/jbpm/graph/def/EventCallback.java
===================================================================
--- jbpm3/branches/jbpm-3.2.6.GA/modules/core/src/main/java/org/jbpm/graph/def/EventCallback.java 2009-03-05 06:02:49 UTC (rev 4145)
+++ jbpm3/branches/jbpm-3.2.6.GA/modules/core/src/main/java/org/jbpm/graph/def/EventCallback.java 2009-03-05 06:12:12 UTC (rev 4146)
@@ -142,14 +142,22 @@
}
public static void waitForEvent(String event) {
- waitForEvent(event, DEFAULT_TIMEOUT);
+ waitForEvent(1, event, DEFAULT_TIMEOUT);
}
public static void waitForEvent(String event, long timeout) {
+ waitForEvent(1, event, timeout);
+ }
+
+ public static void waitForEvent(int occurrences, String event) {
+ waitForEvent(occurrences, event, DEFAULT_TIMEOUT);
+ }
+
+ public static void waitForEvent(int occurrences, String event, long timeout) {
log.debug("waiting for " + event);
Semaphore eventSemaphore = getEventSemaphore(event);
try {
- if (eventSemaphore.tryAcquire(timeout, TimeUnit.MILLISECONDS)) {
+ if (eventSemaphore.tryAcquire(occurrences, timeout, TimeUnit.MILLISECONDS)) {
log.debug("received '" + event + "' notification");
}
else {
Modified: jbpm3/branches/jbpm-3.2.6.GA/modules/core/src/test/java/org/jbpm/jbpm1072/JBPM1072Test.java
===================================================================
--- jbpm3/branches/jbpm-3.2.6.GA/modules/core/src/test/java/org/jbpm/jbpm1072/JBPM1072Test.java 2009-03-05 06:02:49 UTC (rev 4145)
+++ jbpm3/branches/jbpm-3.2.6.GA/modules/core/src/test/java/org/jbpm/jbpm1072/JBPM1072Test.java 2009-03-05 06:12:12 UTC (rev 4146)
@@ -21,6 +21,8 @@
*/
package org.jbpm.jbpm1072;
+import java.util.concurrent.atomic.AtomicInteger;
+
import org.jbpm.JbpmConfiguration;
import org.jbpm.db.AbstractDbTestCase;
import org.jbpm.graph.def.ActionHandler;
@@ -32,11 +34,9 @@
import org.jbpm.job.executor.JobExecutor;
/**
- * Concurrent job executors can process the same job in parallel.
- * The test simulates multiple nodes in the network processing a common job set.
- * The key setting is to give each job executor a different name;
- * normally, a job executor is named after the node's inet address
- *
+ * Concurrent job executors can process the same job in parallel. The test simulates multiple nodes
+ * in the network processing a common job set. The key setting is to give each job executor a
+ * different name; normally, a job executor is named after the node's inet address
* https://jira.jboss.org/jira/browse/JBPM-1072
*
* @author Jiri Pechanec
@@ -49,8 +49,6 @@
private JobExecutor[] jobExecutors = new JobExecutor[JOB_EXECUTOR_COUNT];
private long processDefinitionId;
- private volatile static int executionCount;
-
private static final String PROCESS_DEFINITION = "<process-definition name='job-executors'>"
+ "<event type='process-end'>"
+ "<action expression='#{eventCallback.processEnd}' />"
@@ -94,16 +92,10 @@
EventCallback.clear();
}
- public void testMultipleJobExecutors()
- {
- executionCount = 0;
-
+ public void testMultipleJobExecutors() {
// Won't Fix [JBPM-1072] Concurrent JobExecutors can process the same job in parallel
- if (getHibernateDialect().indexOf("HSQL") != -1)
- {
- return;
- }
-
+ if (getHibernateDialect().indexOf("HSQL") != -1) return;
+
// kick off process instance
ProcessDefinition processDefinition = graphSession.loadProcessDefinition(processDefinitionId);
ProcessInstance processInstance = new ProcessInstance(processDefinition);
@@ -114,7 +106,7 @@
commitAndCloseSession();
try {
EventCallback.waitForEvent(Event.EVENTTYPE_PROCESS_END);
- assertEquals(2, executionCount);
+ assertEquals(2, Counter.getCount());
waitForJobs(EventCallback.DEFAULT_TIMEOUT);
}
@@ -142,17 +134,19 @@
}
}
- private static synchronized void incrementCount() {
- ++executionCount;
- }
-
public static class Counter implements ActionHandler {
+ private static final AtomicInteger count = new AtomicInteger();
+
private static final long serialVersionUID = 1L;
public void execute(ExecutionContext exeContext) throws Exception {
- incrementCount();
+ count.incrementAndGet();
exeContext.leaveNode();
}
+
+ public static int getCount() {
+ return count.get();
+ }
}
}
Modified: jbpm3/branches/jbpm-3.2.6.GA/modules/enterprise/src/test/java/org/jbpm/enterprise/AbstractEnterpriseTestCase.java
===================================================================
--- jbpm3/branches/jbpm-3.2.6.GA/modules/enterprise/src/test/java/org/jbpm/enterprise/AbstractEnterpriseTestCase.java 2009-03-05 06:02:49 UTC (rev 4145)
+++ jbpm3/branches/jbpm-3.2.6.GA/modules/enterprise/src/test/java/org/jbpm/enterprise/AbstractEnterpriseTestCase.java 2009-03-05 06:12:12 UTC (rev 4146)
@@ -46,7 +46,6 @@
import org.jbpm.command.SignalCommand;
import org.jbpm.command.StartProcessInstanceCommand;
import org.jbpm.ejb.LocalCommandServiceHome;
-import org.jbpm.graph.def.Event;
import org.jbpm.graph.def.EventCallback;
import org.jbpm.graph.def.ProcessDefinition;
import org.jbpm.graph.exe.ProcessInstance;
@@ -64,7 +63,6 @@
private static Destination commandQueue;
private static ConnectionFactory jmsConnectionFactory;
- private static final int MAX_WAIT_TIME = 30 * 1000;
private static final Log log = LogFactory.getLog(AbstractEnterpriseTestCase.class);
protected AbstractEnterpriseTestCase() {
@@ -123,15 +121,6 @@
return processInstance.hasEnded();
}
- protected boolean waitForProcessInstanceEnd(long processInstanceId) {
- long startTime = System.currentTimeMillis();
- do {
- EventCallback.waitForEvent(Event.EVENTTYPE_PROCESS_END, 1000);
- if (System.currentTimeMillis() - startTime > MAX_WAIT_TIME) return false;
- } while (!hasProcessInstanceEnded(processInstanceId));
- return true;
- }
-
protected Object getVariable(final long processInstanceId, final String variableName) {
return commandService.execute(new Command() {
private static final long serialVersionUID = 1L;
Modified: jbpm3/branches/jbpm-3.2.6.GA/modules/enterprise/src/test/java/org/jbpm/enterprise/jbpm1952/JBPM1952Test.java
===================================================================
--- jbpm3/branches/jbpm-3.2.6.GA/modules/enterprise/src/test/java/org/jbpm/enterprise/jbpm1952/JBPM1952Test.java 2009-03-05 06:02:49 UTC (rev 4145)
+++ jbpm3/branches/jbpm-3.2.6.GA/modules/enterprise/src/test/java/org/jbpm/enterprise/jbpm1952/JBPM1952Test.java 2009-03-05 06:12:12 UTC (rev 4146)
@@ -4,6 +4,8 @@
import org.jboss.bpm.api.test.IntegrationTestSetup;
import org.jbpm.enterprise.AbstractEnterpriseTestCase;
+import org.jbpm.graph.def.Event;
+import org.jbpm.graph.def.EventCallback;
/**
* Use JMS instead of DBMS for storing jobs, so that each job is not taken by multiple job executor
@@ -62,10 +64,12 @@
processInstanceIds[i] = startProcessInstance("jbpm1952").getId();
}
+ EventCallback.waitForEvent(PROCESS_EXECUTION_COUNT, Event.EVENTTYPE_PROCESS_END);
+
for (int i = 0; i < PROCESS_EXECUTION_COUNT; i++) {
long processInstanceId = processInstanceIds[i];
assertTrue("expected process instance " + processInstanceId + " to have ended",
- waitForProcessInstanceEnd(processInstanceId));
+ hasProcessInstanceEnded(processInstanceId));
}
}
Modified: jbpm3/branches/jbpm-3.2.6.GA/modules/enterprise/src/test/java/org/jbpm/enterprise/jms/JmsMessageTest.java
===================================================================
--- jbpm3/branches/jbpm-3.2.6.GA/modules/enterprise/src/test/java/org/jbpm/enterprise/jms/JmsMessageTest.java 2009-03-05 06:02:49 UTC (rev 4145)
+++ jbpm3/branches/jbpm-3.2.6.GA/modules/enterprise/src/test/java/org/jbpm/enterprise/jms/JmsMessageTest.java 2009-03-05 06:12:12 UTC (rev 4146)
@@ -210,13 +210,14 @@
processInstanceIds[i] = startProcessInstance("execution").getId();
EventCallback.waitForEvent(Event.EVENTTYPE_NODE_ENTER);
}
+
+ EventCallback.waitForEvent(PROCESS_INSTANCE_COUNT, Event.EVENTTYPE_NODE_LEAVE);
+ EventCallback.waitForEvent(PROCESS_INSTANCE_COUNT, Event.EVENTTYPE_PROCESS_END);
+
for (int i = 0; i < PROCESS_INSTANCE_COUNT; i++) {
- EventCallback.waitForEvent(Event.EVENTTYPE_NODE_LEAVE);
- }
- for (int i = 0; i < PROCESS_INSTANCE_COUNT; i++) {
long processInstanceId = processInstanceIds[i];
assertTrue("expected process instance " + processInstanceId + " to have ended",
- waitForProcessInstanceEnd(processInstanceId));
+ hasProcessInstanceEnded(processInstanceId));
}
}
}
17 years, 2 months
JBoss JBPM SVN: r4145 - jbpm3/branches/jbpm-3.2.6.GA/modules/core/src/test/java/org/jbpm/perf.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2009-03-05 01:02:49 -0500 (Thu, 05 Mar 2009)
New Revision: 4145
Modified:
jbpm3/branches/jbpm-3.2.6.GA/modules/core/src/test/java/org/jbpm/perf/SimplePerformanceTest.java
Log:
JBPM-2043: exclude performance test from HSQL test suite, concurrent job processing is unreliable due to lack of isolation
Modified: jbpm3/branches/jbpm-3.2.6.GA/modules/core/src/test/java/org/jbpm/perf/SimplePerformanceTest.java
===================================================================
--- jbpm3/branches/jbpm-3.2.6.GA/modules/core/src/test/java/org/jbpm/perf/SimplePerformanceTest.java 2009-03-04 22:21:58 UTC (rev 4144)
+++ jbpm3/branches/jbpm-3.2.6.GA/modules/core/src/test/java/org/jbpm/perf/SimplePerformanceTest.java 2009-03-05 06:02:49 UTC (rev 4145)
@@ -30,9 +30,9 @@
import org.jbpm.graph.exe.ProcessInstance;
/**
- * This tests creates a number of process instances. Every instance has a call to an ActionHandler.
- * https://jira.jboss.org/jira/browse/JBPM-2043
+ * This test creates a number of process instances. Every instance has a call to an ActionHandler.
*
+ * @see <a href="https://jira.jboss.org/jira/browse/JBPM-2043">JBPM-2043</a>
* @author mvecera(a)redhat.com
* @author pmacik(a)redhat.com
* @author thomas.diesler(a)jboss.com
@@ -49,7 +49,7 @@
private ProcessDefinition processDefinition;
@Override
- public void setUp() throws Exception {
+ protected void setUp() throws Exception {
super.setUp();
processDefinition = ProcessDefinition.parseXmlString("<process-definition name='perf'>"
@@ -69,13 +69,16 @@
}
@Override
- public void tearDown() throws Exception {
+ protected void tearDown() throws Exception {
stopJobExecutor();
jbpmContext.getGraphSession().deleteProcessDefinition(processDefinition.getId());
super.tearDown();
}
public void testAsyncCall() {
+ // Won't Fix [JBPM-2043] Performance test coverage
+ if (getHibernateDialect().indexOf("HSQL") != -1) return;
+
launchProcessInstances(WARMUP_INSTANCES);
long startTime = System.currentTimeMillis();
17 years, 2 months
JBoss JBPM SVN: r4144 - jbpm3/tags.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2009-03-04 17:21:58 -0500 (Wed, 04 Mar 2009)
New Revision: 4144
Added:
jbpm3/tags/jbpm-3.2.5.SP3/
Log:
JBPM-2085: tag 3.2.5.SP3
Copied: jbpm3/tags/jbpm-3.2.5.SP3 (from rev 4143, jbpm3/branches/jbpm-3.2.5.SP)
17 years, 2 months
JBoss JBPM SVN: r4143 - jbpm3/branches/jbpm-3.2.5.SP/modules/distribution/src/main/etc.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2009-03-04 17:20:22 -0500 (Wed, 04 Mar 2009)
New Revision: 4143
Modified:
jbpm3/branches/jbpm-3.2.5.SP/modules/distribution/src/main/etc/release.notes.html
Log:
JBPM-2085: release 3.2.5.SP3
Modified: jbpm3/branches/jbpm-3.2.5.SP/modules/distribution/src/main/etc/release.notes.html
===================================================================
--- jbpm3/branches/jbpm-3.2.5.SP/modules/distribution/src/main/etc/release.notes.html 2009-03-04 20:18:54 UTC (rev 4142)
+++ jbpm3/branches/jbpm-3.2.5.SP/modules/distribution/src/main/etc/release.notes.html 2009-03-04 22:20:22 UTC (rev 4143)
@@ -1,85 +1,19 @@
-<body><h1>jBPM-3.3.1.GA Release Notes</h1>
-<h3>Bug</h3>
+<html>
+<head>
+<title>Release Notes - JBoss jBPM - Version 3.2.5.SP3</title>
+</head>
+<body>
+<h2>Task
+</h2>
<ul>
-<li>[<a href="https://jira.jboss.org/jira/browse/JBPM-1716">JBPM-1716</a>] - NPE in Transition.fireSuperStateEnterEvents() when destination is null </li>
-<li>[<a href="https://jira.jboss.org/jira/browse/JBPM-1756">JBPM-1756</a>] - NullPointerException using bcc recipients in org.jbpm.mail.Mail </li>
-<li>[<a href="https://jira.jboss.org/jira/browse/JBPM-1778">JBPM-1778</a>] - Empty map variables on process creation is set as null </li>
-<li>[<a href="https://jira.jboss.org/jira/browse/JBPM-1811">JBPM-1811</a>] - JmsMessageTest fails intermitently on HSQLDB </li>
-<li>[<a href="https://jira.jboss.org/jira/browse/JBPM-1829">JBPM-1829</a>] - Sybase transaction log full - dump needed </li>
-<li>[<a href="https://jira.jboss.org/jira/browse/JBPM-1830">JBPM-1830</a>] - Fix AppServerConfigurationsTest for sybase on jboss500 </li>
-<li>[<a href="https://jira.jboss.org/jira/browse/JBPM-1913">JBPM-1913</a>] - Support JBoss AS 5.0 for JSF Console </li>
-<li>[<a href="https://jira.jboss.org/jira/browse/JBPM-1921">JBPM-1921</a>] - getGroupTaskList(List actorids) behaviour changed </li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2043'>JBPM-2043</a>] - Add jBPM performance test coverage
+</li>
</ul>
-<p> </p>
-<h3>Feature Request</h3>
+<h2>Release
+</h2>
<ul>
-<li>[<a href="https://jira.jboss.org/jira/browse/JBPM-1888">JBPM-1888</a>] - Allow unlocking Token without knowing the lock owner </li>
-<li>[<a href="https://jira.jboss.org/jira/browse/JBPM-1909">JBPM-1909</a>] - Fix SubjectAuthenticationService </li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2085'>JBPM-2085</a>] - Release jBPM 3.2.5.SP3
+</li>
</ul>
-<p> </p>
-<h3>Quality Risk</h3>
-<ul>
-<li>[<a href="https://jira.jboss.org/jira/browse/JBPM-1765">JBPM-1765</a>] - Unclosed InputStream in org.jbpm.util.ClassLoaderUtil.getProperties </li>
-<li>[<a href="https://jira.jboss.org/jira/browse/JBPM-1887">JBPM-1887</a>] - ExceptionHandler may cause infinite loop </li>
-</ul>
-<p> </p>
-<h3>Task</h3>
-<ul>
-<li>[<a href="https://jira.jboss.org/jira/browse/JBPM-1303">JBPM-1303</a>] - Add installer support for jboss-5.0.0 </li>
-<li>[<a href="https://jira.jboss.org/jira/browse/JBPM-1764">JBPM-1764</a>] - Deadlocks make job execution tests fail on Sybase </li>
-<li>[<a href="https://jira.jboss.org/jira/browse/JBPM-1775">JBPM-1775</a>] - verify if collection exceptionHandlers can be loaded lazy </li>
-<li>[<a href="https://jira.jboss.org/jira/browse/JBPM-1814">JBPM-1814</a>] - make jbpm installation in jboss optional </li>
-<li>[<a href="https://jira.jboss.org/jira/browse/JBPM-1816">JBPM-1816</a>] - Sanitize tests that leak JDBC connections </li>
-<li>[<a href="https://jira.jboss.org/jira/browse/JBPM-1819">JBPM-1819</a>] - re-enable the standard configuration </li>
-<li>[<a href="https://jira.jboss.org/jira/browse/JBPM-1823">JBPM-1823</a>] - re-enable the datbase upgrade tool </li>
-<li>[<a href="https://jira.jboss.org/jira/browse/JBPM-1824">JBPM-1824</a>] - Investigate core test failures against Sybase </li>
-<li>[<a href="https://jira.jboss.org/jira/browse/JBPM-1831">JBPM-1831</a>] - Provide a start/stop script for sybase </li>
-<li>[<a href="https://jira.jboss.org/jira/browse/JBPM-1843">JBPM-1843</a>] - Revert to jbpm-3.2.2 schema and provide a defined migration path </li>
-<li>[<a href="https://jira.jboss.org/jira/browse/JBPM-1852">JBPM-1852</a>] - Fix sporadic MailTest failure </li>
-<li>[<a href="https://jira.jboss.org/jira/browse/JBPM-1854">JBPM-1854</a>] - Update to jbpm-gpd-3.1.6 </li>
-<li>[<a href="https://jira.jboss.org/jira/browse/JBPM-1855">JBPM-1855</a>] - Release jBPM 3.3.1 GA </li>
-<li>[<a href="https://jira.jboss.org/jira/browse/JBPM-1856">JBPM-1856</a>] - Support API-1.0.0 Alpha3 on jBPM3 </li>
-<li>[<a href="https://jira.jboss.org/jira/browse/JBPM-1866">JBPM-1866</a>] - add javadocs to installer </li>
-<li>[<a href="https://jira.jboss.org/jira/browse/JBPM-1883">JBPM-1883</a>] - Provide an initial implementation of an AS4 deployer </li>
-<li>[<a href="https://jira.jboss.org/jira/browse/JBPM-1884">JBPM-1884</a>] - Provide an initial implementation of an AS5 deployer </li>
-<li>[<a href="https://jira.jboss.org/jira/browse/JBPM-1894">JBPM-1894</a>] - Check jBPM library versions </li>
-<li>[<a href="https://jira.jboss.org/jira/browse/JBPM-1902">JBPM-1902</a>] - Add support for JBoss-5.0.0.GA </li>
-<li>[<a href="https://jira.jboss.org/jira/browse/JBPM-1904">JBPM-1904</a>] - Add toString() to Commands </li>
-<li>[<a href="https://jira.jboss.org/jira/browse/JBPM-1905">JBPM-1905</a>] - Improve Commands </li>
-<li>[<a href="https://jira.jboss.org/jira/browse/JBPM-1919">JBPM-1919</a>] - Ensure backward compatibility of the API </li>
-<li>[<a href="https://jira.jboss.org/jira/browse/JBPM-1920">JBPM-1920</a>] - Include SOA-P overlays in jbpm build </li>
-<li>[<a href="https://jira.jboss.org/jira/browse/JBPM-1932">JBPM-1932</a>] - Release the JSF Console 3.3.1.GA </li>
-</ul>
-<h3>Known limitations</h3>
-<h3>XML editing in the process designer</h3>
-<p>Direct editing of XML can lead to crashes in the graphical designer. This will be fixed in one of the next releases. Before you start editing the process XML source, make sure you create a backup copy.</p>
-<h3>Transition buttons in task forms</h3>
-<p>When generating a task form for a task, the transitions are not automatically populated in the generation dialog. Users have to enter the transition names and the button labels manually. If you don't do this no transition buttons will be generated to complete the task in the task form.</p>
-<p><strong>Workaround</strong>: First option is to add the transition buttons in the task form generation dialog. If you generated a task form without transition buttons, you still can complete the task with the console. Just save the variables in the task form and then in the 'Views' menu, select 'Transitions'. There you can click the 'end task' link for each of the available transitions.</p>
-<h3>Security vulnerability for GPD deployment</h3>
-<p>In the suite distribution, the console that is deployed in the server contains a servlet that allows the designer to deploy processes directly to a running server. This servlet is unprotected and people could load any process into a default installation. <a href="https://jira.jboss.org/jira/browse/GPD-278">[GPD-278]</a></p>
-<h3>Excluded test cases</h3>
-<p> </p>
-<p><strong>Core tests, HSQLDB</strong></p>
-<p> </p>
-<pre class="jive_text_macro jive_macro_code" jivemacro="code" ___default_attr="plain"><p><!-- [JBPM-1810] Fix clean, drop, create schema with JbpmSchema --></p><p><exclude>org/jbpm/db/JbpmSchemaDbTest.java</exclude></p></pre>
-<p> </p>
-<p><strong>Core tests - MySQL</strong></p>
-<pre class="jive_text_macro jive_macro_code" jivemacro="code" ___default_attr="plain"><p><!-- [JBPM-1166] SEAM timer transaction integration --><br /><exclude>org/jbpm/seam/JobExecutorCustomizationTest.java</exclude><br /><!-- [JBPM-1810] Fix clean, drop, create schema with JbpmSchema --><br /><exclude>org/jbpm/db/JbpmSchemaDbTest.java</exclude></p></pre>
-<p> </p>
-<p><strong>Core test, Sybase</strong></p>
-<pre class="jive_text_macro jive_macro_code" jivemacro="code" ___default_attr="plain"><p><!-- [JBPM-1810] Fix clean, drop, create schema with JbpmSchema --><br /><exclude>org/jbpm/db/JbpmSchemaDbTest.java</exclude></p></pre>
-<p> </p>
-<p><strong>Enterprise tests - HSQLDB</strong></p>
-<p> </p>
-<pre class="jive_text_macro jive_macro_code" jivemacro="code" ___default_attr="plain"><p><!-- [JBPM-1708] Enterprise EjbSchedulerTest fails --></p><p><exclude>org/jbpm/scheduler/ejbtimer/EjbSchedulerTest.java</exclude></p></pre>
-<p> </p>
-<p><strong>Enterprise tests, Sybase</strong></p>
-<p> </p>
-<pre class="jive_text_macro jive_macro_code" jivemacro="code" ___default_attr="plain"><p><!-- [JBPM-1818] Use Sybase instance that supports XA Transaction --><br /><exclude>org/jbpm/scheduler/ejbtimer/EjbSchedulerTest.java</exclude><br /><exclude>org/jbpm/persistence/jta/JtaDbPersistenceTest.java</exclude><br /><exclude>org/jbpm/msg/jms/JmsMessageTest.java</exclude></p></pre>
-<p> </p>
-<p> </p>
-<p><strong>Examples tests, Sybase</strong></p>
-<p> </p>
-<pre class="jive_text_macro jive_macro_code" jivemacro="code" ___default_attr="plain"><p><!-- [JBPM-1827] Investigate example test failures against Sybase --></p><p><exclude>org/jbpm/examples/taskinstance/CustomTaskInstanceTest.java</exclude></p></pre>
-<p> </p></body>
\ No newline at end of file
+</body>
+</html>
\ No newline at end of file
17 years, 2 months
JBoss JBPM SVN: r4142 - in jbpm4/branches/tbaeyens: modules/api and 4 other directories.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2009-03-04 15:18:54 -0500 (Wed, 04 Mar 2009)
New Revision: 4142
Modified:
jbpm4/branches/tbaeyens/modules/api/pom.xml
jbpm4/branches/tbaeyens/modules/examples/pom.xml
jbpm4/branches/tbaeyens/modules/log/pom.xml
jbpm4/branches/tbaeyens/modules/pvm/pom.xml
jbpm4/branches/tbaeyens/modules/test-db/pom.xml
jbpm4/branches/tbaeyens/pom.xml
Log:
pom cleaning
Modified: jbpm4/branches/tbaeyens/modules/api/pom.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/api/pom.xml 2009-03-04 19:24:25 UTC (rev 4141)
+++ jbpm4/branches/tbaeyens/modules/api/pom.xml 2009-03-04 20:18:54 UTC (rev 4142)
@@ -11,7 +11,8 @@
<!-- $Id: pom.xml 3182 2008-12-03 13:48:29Z tom.baeyens(a)jboss.com $ -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
+
+ <!-- Module info -->
<modelVersion>4.0.0</modelVersion>
<name>jBPM 4 - API</name>
<groupId>org.jbpm.jbpm4</groupId>
@@ -26,16 +27,6 @@
<relativePath>../../pom.xml</relativePath>
</parent>
- <!-- Properties -->
- <properties>
- </properties>
-
- <!-- DependencyManagement -->
- <dependencyManagement>
- <dependencies>
- </dependencies>
- </dependencyManagement>
-
<!-- Dependencies -->
<dependencies>
<dependency>
@@ -44,24 +35,10 @@
</dependency>
</dependencies>
- <!-- Plugins -->
- <build>
- <plugins>
- </plugins>
- </build>
-
- <!-- Reporting -->
- <reporting>
- <plugins>
- </plugins>
- </reporting>
-
+ <!-- Profiles -->
<profiles>
<profile>
<id>distro</id>
- <properties>
- <xsddocs>true</xsddocs>
- </properties>
<build>
<plugins>
<plugin>
Modified: jbpm4/branches/tbaeyens/modules/examples/pom.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/examples/pom.xml 2009-03-04 19:24:25 UTC (rev 4141)
+++ jbpm4/branches/tbaeyens/modules/examples/pom.xml 2009-03-04 20:18:54 UTC (rev 4142)
@@ -30,35 +30,24 @@
<dependency>
<groupId>org.jbpm.jbpm4</groupId>
<artifactId>jbpm-api</artifactId>
- <version>${version}</version>
</dependency>
<dependency>
<groupId>org.jbpm.jbpm4</groupId>
<artifactId>jbpm-test-base</artifactId>
- <version>${version}</version>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>org.jbpm.jbpm4</groupId>
<artifactId>jbpm-jpdl</artifactId>
- <version>${version}</version>
- <scope>test</scope>
- <!--exclusions> TODO: Re-enable when JBPM-1997 is done.
- <exclusion>
- <artifactId>org.jbpm.jbpm4</artifactId>
- <groupId>jbpm-pvm</groupId>
- </exclusion>
- </exclusions-->
+ <scope>runtime</scope>
</dependency>
+
<dependency>
- <groupId>org.jbpm.jbpm4.dependencies.esb</groupId>
- <artifactId>test-util</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
<groupId>org.codehaus.woodstox</groupId>
<artifactId>wstx-lgpl</artifactId>
<scope>test</scope>
- </dependency>
+ </dependency>
+
<dependency>
<groupId>org.jbpm.jbpm4.dependencies.esb</groupId>
<artifactId>jbossesb-rosetta</artifactId>
@@ -66,56 +55,8 @@
<dependency>
<groupId>org.jbpm.jbpm4.dependencies.esb</groupId>
<artifactId>test-util</artifactId>
+ <scope>test</scope>
</dependency>
</dependencies>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>unpack.jbpm.db</id>
- <phase>generate-test-resources</phase>
- <goals>
- <goal>unpack</goal>
- </goals>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>org.jbpm.jbpm4</groupId>
- <artifactId>jbpm-jpdl</artifactId>
- <classifier>config</classifier>
- <overWrite>true</overWrite>
- </artifactItem>
- </artifactItems>
- <excludeTransitive>true</excludeTransitive>
- <outputDirectory>target/jpdl-config</outputDirectory>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>install.hibernate.database.properties</id>
- <phase>generate-test-resources</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <tasks>
- <copy file="target/jpdl-config/hibernate.cfg.${database}.xml"
- tofile="target/test-classes/examples-hibernate.cfg.xml"
- overwrite="true" />
- </tasks>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
- </plugins>
- </build>
</project>
\ No newline at end of file
Modified: jbpm4/branches/tbaeyens/modules/log/pom.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/log/pom.xml 2009-03-04 19:24:25 UTC (rev 4141)
+++ jbpm4/branches/tbaeyens/modules/log/pom.xml 2009-03-04 20:18:54 UTC (rev 4142)
@@ -11,6 +11,8 @@
<!-- $Id: pom.xml 2702 2008-10-31 10:49:02Z tom.baeyens(a)jboss.com $ -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <!-- Module Info -->
<modelVersion>4.0.0</modelVersion>
<name>jBPM 4 - Log</name>
<groupId>org.jbpm.jbpm4</groupId>
@@ -33,10 +35,4 @@
</dependency>
</dependencies>
- <!-- Plugins -->
- <build>
- <plugins>
- </plugins>
- </build>
-
</project>
\ No newline at end of file
Modified: jbpm4/branches/tbaeyens/modules/pvm/pom.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/pvm/pom.xml 2009-03-04 19:24:25 UTC (rev 4141)
+++ jbpm4/branches/tbaeyens/modules/pvm/pom.xml 2009-03-04 20:18:54 UTC (rev 4142)
@@ -126,23 +126,24 @@
<!-- Profiles -->
<profiles>
+ <profile>
+ <id>distro</id>
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <configuration>
+ <quiet>true</quiet>
+ <source>1.5</source>
+ <verbose>false</verbose>
+ <noqualifier>all</noqualifier>
+ <excludePackageNames>*.internal:*.test</excludePackageNames>
+ </configuration>
+ </plugin>
+ </plugins>
+ </reporting>
+ </profile>
</profiles>
- <reporting>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <configuration>
- <quiet>true</quiet>
- <source>1.5</source>
- <verbose>false</verbose>
- <noqualifier>all</noqualifier>
- <excludePackageNames>*.internal:*.test</excludePackageNames>
- </configuration>
- </plugin>
-
- </plugins>
- </reporting>
-
</project>
\ No newline at end of file
Modified: jbpm4/branches/tbaeyens/modules/test-db/pom.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/test-db/pom.xml 2009-03-04 19:24:25 UTC (rev 4141)
+++ jbpm4/branches/tbaeyens/modules/test-db/pom.xml 2009-03-04 20:18:54 UTC (rev 4142)
@@ -31,70 +31,14 @@
<dependency>
<groupId>org.jbpm.jbpm4</groupId>
<artifactId>jbpm-api</artifactId>
- <version>${version}</version>
</dependency>
<dependency>
<groupId>org.jbpm.jbpm4</groupId>
<artifactId>jbpm-jpdl</artifactId>
- <version>${version}</version>
<scope>runtime</scope>
</dependency>
- <dependency>
- <groupId>org.jbpm.jbpm4</groupId>
- <artifactId>jbpm-test-base</artifactId>
- <version>${version}</version>
- </dependency>
-
</dependencies>
- <!-- Plugins -->
- <build>
- <plugins>
- <!--
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- this tells surefire that the test classes are
- to be found in the src directory src/main/java.
- The test classes are in the source directory to make
- a distinction between the compile time classpath and the
- runtime test classpath. The compile time classpath only should
- have the api module in its dependencies.
- <testSourceDirectory>src/main/java</testSourceDirectory>
- <classesDirectory>target/classes</classesDirectory>
- <testClassesDirectory>target/classes</testClassesDirectory>
- </configuration>
- </plugin>
-
- <plugin>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>unpack.jbpm.db</id>
- <phase>generate-test-resources</phase>
- <goals>
- <goal>unpack</goal>
- </goals>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>org.jbpm.jbpm4</groupId>
- <artifactId>jbpm-jpdl</artifactId>
- <classifier>config</classifier>
- <overWrite>true</overWrite>
- </artifactItem>
- </artifactItems>
- <excludeTransitive>true</excludeTransitive>
- <outputDirectory>target/jpdl-config</outputDirectory>
- </configuration>
- </execution>
- </executions>
- </plugin>
- -->
-
- </plugins>
- </build>
-
</project>
\ No newline at end of file
Modified: jbpm4/branches/tbaeyens/pom.xml
===================================================================
--- jbpm4/branches/tbaeyens/pom.xml 2009-03-04 19:24:25 UTC (rev 4141)
+++ jbpm4/branches/tbaeyens/pom.xml 2009-03-04 20:18:54 UTC (rev 4142)
@@ -102,6 +102,16 @@
<artifactId>jbpm-db</artifactId>
<version>${version}</version>
</dependency>
+ <dependency>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-jpdl</artifactId>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-config</artifactId>
+ <version>${version}</version>
+ </dependency>
<!-- GWT console -->
<dependency>
@@ -283,12 +293,6 @@
<!-- Plugins -->
<build>
- <resources>
- <resource>
- <directory>src/main/resources</directory>
- <filtering>true</filtering>
- </resource>
- </resources>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
@@ -321,6 +325,9 @@
<value>${project.build.directory}</value>
</property>
</systemProperties>
+ <excludes>
+ <exclude>**/*TestCase.java</exclude>
+ </excludes>
</configuration>
</plugin>
17 years, 2 months
JBoss JBPM SVN: r4141 - in jbpm4/branches/tbaeyens/modules/test-db/src/test/java: org and 9 other directories.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2009-03-04 14:24:25 -0500 (Wed, 04 Mar 2009)
New Revision: 4141
Added:
jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/
jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/
jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/
jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/activities/
jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/activities/ExclusiveTest.java
jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/activities/StateTest.java
jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/cfg/
jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/cfg/ConfigurationTest.java
jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/execution/
jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/execution/FindExecutionTest.java
jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/execution/SignalExecutionTest.java
jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/execution/StartExecutionTest.java
jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/history/
jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/history/AvgDurationTest.java
jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/history/ChoiceDistributionTest.java
jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/history/EndProcessInstanceTest.java
jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/history/ProcessInstanceHistoryTest.java
jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/mgmt/
jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/process/
jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/process/ProcessAttachmentsTest.java
jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/process/ProcessDefinitionQueryTest.java
jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/process/ProcessServiceTest.java
jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/task/
jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/task/SubTaskTest.java
jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/task/TaskCommentsTest.java
jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/task/TaskCreateUpdateDeleteTest.java
jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/task/TaskListTest.java
jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/task/TaskParticipationsTest.java
jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/task/TaskQueryTest.java
jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/variables/
jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/variables/BasicVariablesTest.java
jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/variables/VariableBasicTypesTest.java
Log:
updates :-)
Added: jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/activities/ExclusiveTest.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/activities/ExclusiveTest.java (rev 0)
+++ jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/activities/ExclusiveTest.java 2009-03-04 19:24:25 UTC (rev 4141)
@@ -0,0 +1,96 @@
+/*
+ * 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.test.activities;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.jbpm.Execution;
+import org.jbpm.test.JbpmTestCase;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class ExclusiveTest extends JbpmTestCase {
+
+ public void testExclusiveExpression() {
+ deployJpdlXmlString(
+ "<process name='Poolcar'>" +
+ " <start>" +
+ " <transition to='How far?' />" +
+ " </start>" +
+ " <exclusive name='How far?' expr='#{distance}'>" +
+ " <transition name='far' to='Big car' />" +
+ " <transition name='nearby' to='Small car' />" +
+ " </exclusive>" +
+ " <state name='Big car' />" +
+ " <state name='Small car' />" +
+ "</process>"
+ );
+
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("distance", "far");
+ Execution execution = executionService.startProcessInstanceByKey("Poolcar", variables);
+ assertEquals("Big car", execution.getActivityName());
+
+ variables.put("distance", "nearby");
+ execution = executionService.startProcessInstanceByKey("Poolcar", variables);
+ assertEquals("Small car", execution.getActivityName());
+ }
+
+ public void testExclusiveWithConditions() {
+ deployJpdlXmlString(
+ "<process name='Poolcar'>" +
+ " <start>" +
+ " <transition to='How far?' />" +
+ " </start>" +
+ " <exclusive name='How far?'>" +
+ " <transition to='Big car'>" +
+ " <condition expr='#{distance > 10}' />" +
+ " </transition>" +
+ " <transition to='Small car'>" +
+ " <condition expr='#{distance >= 3}' />" +
+ " </transition>" +
+ " <transition to='No car' />" +
+ " </exclusive>" +
+ " <state name='Big car' />" +
+ " <state name='Small car' />" +
+ " <state name='No car' />" +
+ "</process>"
+ );
+
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("distance", new Integer(69));
+ Execution execution = executionService.startProcessInstanceByKey("Poolcar", variables);
+ assertEquals("Big car", execution.getActivityName());
+
+ variables.put("distance", new Integer(6));
+ execution = executionService.startProcessInstanceByKey("Poolcar", variables);
+ assertEquals("Small car", execution.getActivityName());
+
+ variables.put("distance", new Integer(2));
+ execution = executionService.startProcessInstanceByKey("Poolcar", variables);
+ assertEquals("No car", execution.getActivityName());
+ }
+
+}
Added: jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/activities/StateTest.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/activities/StateTest.java (rev 0)
+++ jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/activities/StateTest.java 2009-03-04 19:24:25 UTC (rev 4141)
@@ -0,0 +1,153 @@
+/*
+ * 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.test.activities;
+
+import org.jbpm.Execution;
+import org.jbpm.JbpmException;
+import org.jbpm.test.JbpmTestCase;
+
+/**
+ * @author Tom Baeyens
+ */
+public class StateTest extends JbpmTestCase {
+
+ public void testWaitStatesSequence() {
+ deployJpdlXmlString(
+ "<process name='ThreeStates'>" +
+ " <start name='a'>" +
+ " <transition to='b' />" +
+ " </start>" +
+ " <state name='b'>" +
+ " <transition to='c' />" +
+ " </state>" +
+ " <state name='c'>" +
+ " <transition to='d' />" +
+ " </state>" +
+ " <end name='d' />" +
+ "</process>"
+ );
+
+ Execution execution = executionService.startProcessInstanceById("ThreeStates:1");
+ assertEquals("b", execution.getActivityName());
+
+ String executionId = execution.getId();
+ execution = executionService.signalExecutionById(executionId);
+ assertEquals("c", execution.getActivityName());
+
+ execution = executionService.signalExecutionById(executionId);
+ assertEquals("d", execution.getActivityName());
+ assertTrue(execution.isEnded());
+ }
+
+ public void testExternalDecision() {
+ deployJpdlXmlString(
+ "<process name='p'>" +
+ " <start>" +
+ " <transition to='ed' />" +
+ " </start>" +
+ " <state name='ed'>" +
+ " <transition name='left' to='b' />" +
+ " <transition name='middle' to='c' />" +
+ " <transition name='right' to='d' />" +
+ " </state>" +
+ " <state name='b' />" +
+ " <state name='c' />" +
+ " <state name='d' />" +
+ "</process>"
+ );
+
+ Execution execution = executionService.startProcessInstanceByKey("p", "one");
+ assertEquals("ed", execution.getActivityName());
+ execution = executionService.signalExecutionById("p/one", "left");
+ assertEquals("b", execution.getActivityName());
+
+ executionService.startProcessInstanceById("p:1", "two");
+ execution = executionService.signalExecutionById("p/two", "middle");
+ assertEquals("c", execution.getActivityName());
+
+ executionService.startProcessInstanceById("p:1", "three");
+ execution = executionService.signalExecutionById("p/three", "right");
+ assertEquals("d", execution.getActivityName());
+ }
+
+ public void testDefaultSignalWithNamedTransitions() {
+ deployJpdlXmlString(
+ "<process name='p'>" +
+ " <start>" +
+ " <transition to='a' />" +
+ " </start>" +
+ " <state name='a'>" +
+ " <transition name='left' to='b' />" +
+ " <transition name='middle' to='c' />" +
+ " <transition name='right' to='d' />" +
+ " </state>" +
+ " <state name='b' />" +
+ " <state name='c' />" +
+ " <state name='d' />" +
+ "</process>"
+ );
+
+ executionService.startProcessInstanceByKey("p", "one");
+ try {
+ executionService.signalExecutionById("p/one", "left");
+ } catch (JbpmException e) {
+ assertTextPresent("no matching transition or event for default signal in state(a)", e.getMessage());
+ }
+ }
+
+ public void testNamedSignalWithoutMatchingTransition() {
+ deployJpdlXmlString(
+ "<process name='p'>" +
+ " <start>" +
+ " <transition to='a' />" +
+ " </start>" +
+ " <state name='a'>" +
+ " <transition name='left' to='b' />" +
+ " <transition name='middle' to='c' />" +
+ " <transition name='right' to='d' />" +
+ " </state>" +
+ " <state name='b' />" +
+ " <state name='c' />" +
+ " <state name='d' />" +
+ "</process>"
+ );
+
+ executionService.startProcessInstanceByKey("p", "one");
+ Execution execution = executionService.signalExecutionById("p/one", "up");
+ assertEquals("a", execution.getActivityName());
+ }
+
+ public void testDefaultSignalWithoutTransitions() {
+ deployJpdlXmlString(
+ "<process name='p'>" +
+ " <start>" +
+ " <transition to='a' />" +
+ " </start>" +
+ " <state name='a' />" +
+ "</process>"
+ );
+
+ executionService.startProcessInstanceByKey("p", "one");
+ Execution execution = executionService.signalExecutionById("p/one");
+ assertEquals("a", execution.getActivityName());
+ }
+}
Added: jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/cfg/ConfigurationTest.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/cfg/ConfigurationTest.java (rev 0)
+++ jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/cfg/ConfigurationTest.java 2009-03-04 19:24:25 UTC (rev 4141)
@@ -0,0 +1,63 @@
+/*
+ * 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.test.cfg;
+
+import org.jbpm.Configuration;
+import org.jbpm.ProcessEngine;
+import org.jbpm.test.BaseJbpmTestCase;
+
+/**
+ * @author Tom Baeyens
+ */
+public class ConfigurationTest extends BaseJbpmTestCase {
+
+ public void testDefaultConfiguration() {
+ ProcessEngine processEngine = new Configuration()
+ .buildProcessEngine();
+ assertNotNull(processEngine);
+ }
+
+ public void testMinimalConfiguration() {
+ ProcessEngine processEngine = new Configuration()
+ .setXmlString("<jbpm-configuration />")
+ .buildProcessEngine();
+ assertNotNull(processEngine);
+ }
+
+ public void testConfigurationServices() {
+ ProcessEngine processEngine = new Configuration()
+ .setXmlString(
+ "<jbpm-configuration>" +
+ " <process-engine-context>" +
+ " <process-service />" +
+ " <execution-service />" +
+ " <management-service />" +
+ " </process-engine-context>" +
+ "</jbpm-configuration>"
+ )
+ .buildProcessEngine();
+ assertNotNull(processEngine);
+ assertNotNull(processEngine.getProcessService());
+ assertNotNull(processEngine.getExecutionService());
+ assertNotNull(processEngine.getManagementService());
+ }
+}
Added: jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/execution/FindExecutionTest.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/execution/FindExecutionTest.java (rev 0)
+++ jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/execution/FindExecutionTest.java 2009-03-04 19:24:25 UTC (rev 4141)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.test.execution;
+
+import org.jbpm.Execution;
+import org.jbpm.test.JbpmTestCase;
+
+/**
+ * @author Tom Baeyens
+ */
+public class FindExecutionTest extends JbpmTestCase {
+
+ public void testFindExecutionById() {
+ deployJpdlXmlString(
+ "<process name='p'>" +
+ " <start>" +
+ " <transition to='a' />" +
+ " </start>" +
+ " <state name='a' />" +
+ "</process>"
+ );
+
+ Execution execution = executionService.startProcessInstanceByKey("p");
+
+ // take the id and see if the execution service can still find it back
+ execution = executionService.findExecution(execution.getId());
+ assertNotNull(execution);
+ assertEquals("a", execution.getActivityName());
+ }
+
+}
Added: jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/execution/SignalExecutionTest.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/execution/SignalExecutionTest.java (rev 0)
+++ jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/execution/SignalExecutionTest.java 2009-03-04 19:24:25 UTC (rev 4141)
@@ -0,0 +1,254 @@
+/*
+ * 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.test.execution;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.jbpm.Execution;
+import org.jbpm.test.JbpmTestCase;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class SignalExecutionTest extends JbpmTestCase {
+
+ public void testSignalExecutionByKey() {
+ deployJpdlXmlString(
+ "<process name='Insurance claim' key='ICL'>" +
+ " <start>" +
+ " <transition to='a' />" +
+ " </start>" +
+ " <state name='a'>" +
+ " <transition to='b' />" +
+ " </state>" +
+ " <state name='b'>" +
+ " <transition to='c' />" +
+ " </state>" +
+ " <state name='c' />" +
+ "</process>"
+ );
+
+ Execution execution = executionService.startProcessInstanceByKey("ICL", "82436");
+
+ assertEquals("a", execution.getActivityName());
+
+ execution = executionService.signalExecutionByKey("ICL", "82436");
+
+ assertEquals("b", execution.getActivityName());
+
+ execution = executionService.signalExecutionByKey("ICL", "82436");
+
+ assertEquals("c", execution.getActivityName());
+ }
+
+ public void testSignalExecutionById() {
+ deployJpdlXmlString(
+ "<process name='Insurance claim' key='ICL'>" +
+ " <start>" +
+ " <transition to='a' />" +
+ " </start>" +
+ " <state name='a'>" +
+ " <transition to='b' />" +
+ " </state>" +
+ " <state name='b'>" +
+ " <transition to='c' />" +
+ " </state>" +
+ " <state name='c' />" +
+ "</process>"
+ );
+
+ Execution execution = executionService.startProcessInstanceByKey("ICL", "82436");
+
+ assertEquals("a", execution.getActivityName());
+
+ execution = executionService.signalExecutionById("ICL/82436");
+
+ assertEquals("b", execution.getActivityName());
+
+ execution = executionService.signalExecutionById("ICL/82436");
+
+ assertEquals("c", execution.getActivityName());
+ }
+
+ public void testSignalExecutionWithVariables() {
+ deployJpdlXmlString(
+ "<process name='Insurance claim' key='ICL'>" +
+ " <start>" +
+ " <transition to='a' />" +
+ " </start>" +
+ " <state name='a'>" +
+ " <transition to='b' />" +
+ " </state>" +
+ " <state name='b' />" +
+ "</process>"
+ );
+
+ Execution execution = executionService.startProcessInstanceByKey("ICL", "82436");
+
+ Map<String,Object> variables = new HashMap<String,Object>();
+ variables.put("customer", "John Doe");
+ variables.put("type", "Accident");
+ variables.put("amount", new Float(763.74));
+
+ execution = executionService.signalExecutionById("ICL/82436", variables);
+
+ assertNotNull(execution);
+ String executionId = execution.getId();
+ assertEquals("b", execution.getActivityName());
+
+ Map<String,Object> expectedVariables = new HashMap<String, Object>(variables);
+ Set<String> expectedVariableNames = new HashSet<String>(expectedVariables.keySet());
+ Set<String> variableNames = new HashSet<String>(executionService.getVariableNames(executionId));
+ assertEquals(expectedVariableNames, variableNames);
+
+ variables = executionService.getVariables(executionId, variableNames);
+ assertEquals(expectedVariables, variables);
+ }
+
+
+ public void testDefaultSignalWithoutTransitions() {
+ deployJpdlXmlString(
+ "<process name='p'>" +
+ " <start>" +
+ " <transition to='a' />" +
+ " </start>" +
+ " <state name='a' />" +
+ "</process>"
+ );
+
+ Execution execution = executionService.startProcessInstanceByKey("p");
+ execution = executionService.signalExecutionById(execution.getId());
+ assertEquals("a", execution.getActivityName());
+ }
+
+ /*
+
+ public void testSetVariable()
+ {
+ Execution execution = startExecution();
+
+ String executionId = execution.getId();
+ // set variable a to value text
+ executionService.setVariable(executionId, "a", "text");
+ // check if we can read that value back
+ assertEquals("text", executionService.getVariable(executionId, "a"));
+
+ // overwrite the value of variable a with another text
+ executionService.setVariable(executionId, "a", "another text");
+ // see if we can read another text back from the variable
+ assertEquals("another text", executionService.getVariable(executionId, "a"));
+ }
+
+ public void testSetVariables()
+ {
+ Execution execution = startExecution();
+
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("a", new Integer(1));
+ variables.put("b", "text");
+
+ // set variables in bulk by providing a map
+ executionService.setVariables(execution.getId(), variables);
+
+ Map<String, Object> expected = new HashMap<String, Object>(variables);
+
+ Set<String> variableNames = new HashSet<String>();
+ variableNames.add("a");
+ variableNames.add("b");
+
+ // read the variables back and compare
+ assertEquals(expected, executionService.getVariables(execution.getId(), variableNames));
+
+ // now set variables b and c with a map
+ variables = new HashMap<String, Object>();
+ variables.put("b", new Integer(99));
+ variables.put("c", "another text");
+
+ // this should leave a untouched, overwrite b and create c
+ executionService.setVariables(execution.getId(), variables);
+
+ // update the expected map
+ expected.put("b", new Integer(99));
+ expected.put("c", "another text");
+
+ // add c to the variable names that should be collected
+ variableNames.add("c");
+
+ // read the variables back and compare
+ assertEquals(expected, executionService.getVariables(execution.getId(), variableNames));
+ }
+
+ // helper methods ///////////////////////////////////////////////////////////
+
+ /**
+ * deploys 3 versions of process with name 'nuclear fusion', 2 versions of the processes 'ultimate seduction' and
+ * 'publish book'
+ void deployMultipleVersionsOfProcesses()
+ {
+ ProcessService processService = getEnvironmentFactory().get(ProcessService.class);
+
+ ProcessDefinition processDefinition = ProcessFactory.build("nuclear fusion").key("NFU").activity("initial").initial().behaviour(
+ WaitState.class).done();
+ DeploymentImpl deploymentImpl = new DeploymentImpl(processDefinition);
+ processService.deploy(deploymentImpl);
+
+ processDefinition = ProcessFactory.build("ultimate seduction").key("USD").activity("initial").initial().behaviour(WaitState.class).done();
+ deploymentImpl = new DeploymentImpl(processDefinition);
+ processService.deploy(deploymentImpl);
+
+ processDefinition = ProcessFactory.build("ultimate seduction").key("USD").activity("initial").initial().behaviour(WaitState.class).done();
+ deploymentImpl = new DeploymentImpl(processDefinition);
+ processService.deploy(deploymentImpl);
+
+ processDefinition = ProcessFactory.build("nuclear fusion").key("NFU").activity("initial").initial().behaviour(WaitState.class).done();
+ deploymentImpl = new DeploymentImpl(processDefinition);
+ processService.deploy(deploymentImpl);
+
+ processDefinition = ProcessFactory.build("publish book").key("PBO").activity("initial").initial().behaviour(WaitState.class).done();
+ deploymentImpl = new DeploymentImpl(processDefinition);
+ processService.deploy(deploymentImpl);
+
+ processDefinition = ProcessFactory.build("nuclear fusion").key("NFU").activity("initial").initial().behaviour(WaitState.class).done();
+ deploymentImpl = new DeploymentImpl(processDefinition);
+ processService.deploy(deploymentImpl);
+ }
+
+ Execution startExecution()
+ {
+ ProcessService processService = getEnvironmentFactory().get(ProcessService.class);
+
+ ProcessDefinition processDefinition = ProcessFactory.build("nuclear fusion").activity("initial").initial().behaviour(WaitState.class)
+ .done();
+ DeploymentImpl deploymentImpl = new DeploymentImpl(processDefinition);
+ processService.deploy(deploymentImpl);
+
+ ExecutionService executionService = getEnvironmentFactory().get(ExecutionService.class);
+
+ return executionService.startExecutionByName("nuclear fusion");
+ }
+
+ */
+}
Added: jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/execution/StartExecutionTest.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/execution/StartExecutionTest.java (rev 0)
+++ jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/execution/StartExecutionTest.java 2009-03-04 19:24:25 UTC (rev 4141)
@@ -0,0 +1,219 @@
+/*
+ * 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.test.execution;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.jbpm.Execution;
+import org.jbpm.ProcessDefinition;
+import org.jbpm.test.JbpmTestCase;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class StartExecutionTest extends JbpmTestCase {
+
+ public void testStartNewExecutionByKey() {
+ deployJpdlXmlString(
+ "<process name='Insurance claim' key='ICL'>" +
+ " <start>" +
+ " <transition to='a' />" +
+ " </start>" +
+ " <state name='a' />" +
+ "</process>"
+ );
+
+ Execution execution = executionService.startProcessInstanceByKey("ICL");
+
+ assertNotNull(execution);
+ assertEquals("a", execution.getActivityName());
+ }
+
+ public void testStartNewExecutionInLatestProcessDefinition() {
+ deployJpdlXmlString(
+ "<process name='Insurance claim' key='ICL'>" +
+ " <start>" +
+ " <transition to='a' />" +
+ " </start>" +
+ " <state name='a' />" +
+ "</process>"
+ );
+
+ Execution execution = executionService.startProcessInstanceByKey("ICL");
+
+ assertNotNull(execution);
+ assertEquals("a", execution.getActivityName());
+
+ deployJpdlXmlString(
+ "<process name='Insurance claim' key='ICL'>" +
+ " <start>" +
+ " <transition to='b' />" +
+ " </start>" +
+ " <state name='b' />" +
+ "</process>"
+ );
+
+ execution = executionService.startProcessInstanceByKey("ICL");
+
+ assertNotNull(execution);
+ assertEquals("b", execution.getActivityName());
+ }
+
+ public void testStartExecutionInLatestByNameWithVariables() {
+ deployJpdlXmlString(
+ "<process name='Insurance claim' key='ICL'>" +
+ " <start>" +
+ " <transition to='a' />" +
+ " </start>" +
+ " <state name='a' />" +
+ "</process>"
+ );
+
+ deployJpdlXmlString(
+ "<process name='Insurance claim' key='ICL'>" +
+ " <start>" +
+ " <transition to='b' />" +
+ " </start>" +
+ " <state name='b' />" +
+ "</process>"
+ );
+
+ // create variables that are fed into the process before it starts executing
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("a", new Integer(1));
+ variables.put("b", "text");
+
+ // feed the variables in
+ Execution execution = executionService.startProcessInstanceByKey("ICL", variables);
+ String executionId = execution.getId();
+ assertEquals("b", execution.getActivityName());
+
+ // verify that the variables are actually set
+ assertEquals(new Integer(1), executionService.getVariable(executionId, "a"));
+ assertEquals("text", executionService.getVariable(executionId, "b"));
+
+ // in the generated id, we can see if the right process definition version was taken
+ assertTrue(execution.getId().startsWith("ICL/"));
+ }
+
+ public void testStartNewProcessInstanceWithAKey() {
+ deployJpdlXmlString(
+ "<process name='Insurance claim' key='ICL'>" +
+ " <start>" +
+ " <transition to='a' />" +
+ " </start>" +
+ " <state name='a' />" +
+ "</process>"
+ );
+
+ Execution execution = executionService.startProcessInstanceByKey("ICL", "one");
+
+ assertNotNull(execution);
+ assertEquals("ICL/one", execution.getId());
+ }
+
+ public void testStartNewProcessInstanceWithVariables() {
+ deployJpdlXmlString(
+ "<process name='Insurance claim' key='ICL'>" +
+ " <start>" +
+ " <transition to='a' />" +
+ " </start>" +
+ " <state name='a' />" +
+ "</process>"
+ );
+
+ Map<String,Object> variables = new HashMap<String,Object>();
+ variables.put("customer", "John Doe");
+ variables.put("type", "Accident");
+ variables.put("amount", new Float(763.74));
+
+ Execution execution = executionService.startProcessInstanceByKey("ICL", variables);
+
+ String executionId = execution.getId();
+
+ assertNotNull(execution);
+
+ Map<String,Object> expectedVariables = new HashMap<String, Object>(variables);
+ Set<String> expectedVariableNames = new HashSet<String>(expectedVariables.keySet());
+ Set<String> variableNames = new HashSet<String>(executionService.getVariableNames(executionId));
+ assertEquals(expectedVariableNames, variableNames);
+
+ variables = executionService.getVariables(executionId, variableNames);
+ assertEquals(expectedVariables, variables);
+ }
+
+ public void testStartExecutionById() {
+ deployJpdlXmlString(
+ "<process name='Insurance claim' key='ICL'>" +
+ " <start>" +
+ " <transition to='a' />" +
+ " </start>" +
+ " <state name='a' />" +
+ "</process>"
+ );
+
+ ProcessDefinition processDefinition = processService.findProcessDefinitionsByKey("ICL").get(0);
+
+ // start an execution for the process with the given id
+ Execution execution = executionService.startProcessInstanceById("ICL:1");
+ assertNotNull(execution);
+
+ // checking the state
+ assertEquals("a", execution.getActivityName());
+
+ // checking the generated id
+ assertNull(execution.getName());
+ assertNull(execution.getKey());
+ // if there is no user defined name or key specified in the execution,
+ // the default id generator will create a unique id like this: processDefinitionId/execution.dbid
+ assertTrue(execution.getId().startsWith("ICL/"));
+ // the last part of the execution key should be the dbid.
+ Long.parseLong(execution.getId().substring(4));
+ }
+
+ public void testStartExecutionByIdWithVariables() {
+ deployJpdlXmlString(
+ "<process name='Insurance claim' key='ICL'>" +
+ " <start>" +
+ " <transition to='a' />" +
+ " </start>" +
+ " <state name='a' />" +
+ "</process>"
+ );
+
+ // create the map with variables
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("a", new Integer(1));
+ variables.put("b", "text");
+
+ // provide the variables in the start execution method
+ Execution execution = executionService.startProcessInstanceById("ICL:1", variables);
+ String executionId = execution.getId();
+
+ assertEquals(new Integer(1), executionService.getVariable(executionId, "a"));
+ assertEquals("text", executionService.getVariable(executionId, "b"));
+ }
+}
Added: jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/history/AvgDurationTest.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/history/AvgDurationTest.java (rev 0)
+++ jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/history/AvgDurationTest.java 2009-03-04 19:24:25 UTC (rev 4141)
@@ -0,0 +1,83 @@
+/*
+ * 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.test.history;
+
+import java.util.Map;
+
+import org.jbpm.Execution;
+import org.jbpm.test.JbpmTestCase;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class AvgDurationTest extends JbpmTestCase {
+
+ public void testAvgDuration() throws Exception {
+ deployJpdlXmlString(
+ "<process name='Insurance claim' key='ICL'>" +
+ " <start>" +
+ " <transition to='one' />" +
+ " </start>" +
+ " <state name='one'>" +
+ " <transition to='two' />" +
+ " </state>" +
+ " <state name='two'>" +
+ " <transition to='three' />" +
+ " </state>" +
+ " <state name='three'>" +
+ " <transition to='end' />" +
+ " </state>" +
+ " <end name='end' />" +
+ "</process>"
+ );
+
+ executeProcess();
+ executeProcess();
+ executeProcess();
+
+ Map<String, Long> avgDurations = historyService.avgDurationPerActivity("ICL:1");
+
+
+ Long avgDurationOne = avgDurations.get("one");
+ assertNotNull(avgDurationOne);
+ assertTrue("expected avg duration bigger then 40, but was"+avgDurationOne, avgDurationOne>40);
+ Long avgDurationTwo = avgDurations.get("two");
+ assertNotNull(avgDurationTwo);
+ assertTrue("expected avg duration bigger then 10, but was"+avgDurationTwo, avgDurationTwo>10);
+ Long avgDurationThree = avgDurations.get("three");
+ assertNotNull(avgDurationThree);
+ assertTrue("expected avg duration bigger then 0, but was"+avgDurationThree, avgDurationThree>=0);
+
+ assertEquals(3, avgDurations.size());
+ }
+
+ protected void executeProcess() throws InterruptedException {
+ Execution execution = executionService.startProcessInstanceByKey("ICL");
+ Thread.sleep(50);
+ executionService.signalExecutionById(execution.getId());
+ Thread.sleep(20);
+ executionService.signalExecutionById(execution.getId());
+ executionService.signalExecutionById(execution.getId());
+ }
+
+}
Added: jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/history/ChoiceDistributionTest.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/history/ChoiceDistributionTest.java (rev 0)
+++ jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/history/ChoiceDistributionTest.java 2009-03-04 19:24:25 UTC (rev 4141)
@@ -0,0 +1,75 @@
+/*
+ * 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.test.history;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.jbpm.Execution;
+import org.jbpm.test.JbpmTestCase;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class ChoiceDistributionTest extends JbpmTestCase {
+
+ public void testExclusiveExpression() {
+ deployJpdlXmlString(
+ "<process name='Transport Selection' key='TRS'>" +
+ " <start>" +
+ " <transition to='How far?' />" +
+ " </start>" +
+ " <exclusive name='How far?' expr='#{distance}'>" +
+ " <transition name='far' to='Big car' />" +
+ " <transition name='nearby' to='Small car' />" +
+ " <transition name='other country' to='Airoplane' />" +
+ " </exclusive>" +
+ " <state name='Big car' />" +
+ " <state name='Small car' />" +
+ " <state name='Airoplane' />" +
+ "</process>"
+ );
+
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("distance", "far");
+ executionService.startProcessInstanceByKey("TRS", variables);
+
+ variables.put("distance", "nearby");
+ executionService.startProcessInstanceByKey("TRS", variables);
+ executionService.startProcessInstanceByKey("TRS", variables);
+ executionService.startProcessInstanceByKey("TRS", variables);
+
+ variables.put("distance", "other country");
+ executionService.startProcessInstanceByKey("TRS", variables);
+ executionService.startProcessInstanceByKey("TRS", variables);
+
+ Map<String, Integer> choiceDistribution = historyService.choiceDistribution("TRS:1", "How far?");
+
+ assertEquals(1, (int)choiceDistribution.get("far"));
+ assertEquals(3, (int)choiceDistribution.get("nearby"));
+ assertEquals(2, (int)choiceDistribution.get("other country"));
+
+ }
+
+
+}
Added: jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/history/EndProcessInstanceTest.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/history/EndProcessInstanceTest.java (rev 0)
+++ jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/history/EndProcessInstanceTest.java 2009-03-04 19:24:25 UTC (rev 4141)
@@ -0,0 +1,65 @@
+/*
+ * 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.test.history;
+
+import java.util.List;
+
+import org.jbpm.Execution;
+import org.jbpm.history.HistoryProcessInstance;
+import org.jbpm.test.JbpmTestCase;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class EndProcessInstanceTest extends JbpmTestCase {
+
+ public void testCancelProcessInstance() {
+ deployJpdlXmlString(
+ "<process name='Insurance claim' key='ICL'>" +
+ " <start>" +
+ " <transition to='wait' />" +
+ " </start>" +
+ " <state name='wait'>" +
+ " <transition to='end' />" +
+ " </state>" +
+ " <end name='end' />" +
+ "</process>"
+ );
+
+ Execution execution = executionService.startProcessInstanceByKey("ICL");
+ String processInstanceId = execution.getId();
+ executionService.endProcessInstance(processInstanceId, Execution.STATE_CANCELLED);
+
+ List<Execution> executions = executionService.createExecutionQuery()
+ .processInstanceId(processInstanceId)
+ .execute();
+ assertEquals(0, executions.size());
+
+ HistoryProcessInstance historyProcessInstance = historyService.createHistoryProcessInstanceQuery()
+ .processInstanceId(processInstanceId)
+ .executeUniqueResult();
+
+ assertNotNull(historyProcessInstance.getEndTime());
+ assertEquals(Execution.STATE_CANCELLED, historyProcessInstance.getState());
+ }
+}
Added: jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/history/ProcessInstanceHistoryTest.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/history/ProcessInstanceHistoryTest.java (rev 0)
+++ jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/history/ProcessInstanceHistoryTest.java 2009-03-04 19:24:25 UTC (rev 4141)
@@ -0,0 +1,75 @@
+/*
+ * 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.test.history;
+
+import java.util.List;
+
+import org.jbpm.Execution;
+import org.jbpm.history.HistoryProcessInstance;
+import org.jbpm.history.HistoryProcessInstanceQuery;
+import org.jbpm.test.JbpmTestCase;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class ProcessInstanceHistoryTest extends JbpmTestCase {
+
+ public void testProcessInstanceHistory() {
+ deployJpdlXmlString(
+ "<process name='Insurance claim' key='ICL'>" +
+ " <start>" +
+ " <transition to='end' />" +
+ " </start>" +
+ " <end name='end' />" +
+ "</process>"
+ );
+
+ executionService.startProcessInstanceByKey("ICL");
+ executionService.startProcessInstanceByKey("ICL");
+ executionService.startProcessInstanceByKey("ICL");
+
+ List<HistoryProcessInstance> historyProcessInstances = historyService
+ .createHistoryProcessInstanceQuery()
+ .processDefinitionId("ICL:1")
+ .orderAsc(HistoryProcessInstanceQuery.PROPERTY_STARTTIME)
+ .execute();
+
+ assertEquals(3, historyProcessInstances.size());
+
+ for (HistoryProcessInstance historyProcessInstance: historyProcessInstances) {
+ assertTrue(historyProcessInstance.getProcessInstanceId().startsWith("ICL"));
+ assertEquals(HistoryProcessInstance.STATE_ENDED, historyProcessInstance.getState());
+ assertNotNull(historyProcessInstance.getStartTime());
+ assertNotNull(historyProcessInstance.getEndTime());
+ }
+
+ // also check that the ended process instances have been removed from the
+ // runtime database
+ List<Execution> executions = executionService
+ .createExecutionQuery()
+ .processDefinitionId("ICL:1")
+ .execute();
+
+ assertEquals(0, executions.size());
+ }
+}
Added: jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/process/ProcessAttachmentsTest.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/process/ProcessAttachmentsTest.java (rev 0)
+++ jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/process/ProcessAttachmentsTest.java 2009-03-04 19:24:25 UTC (rev 4141)
@@ -0,0 +1,68 @@
+/*
+ * 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.test.process;
+
+import java.io.ByteArrayInputStream;
+import java.util.Arrays;
+import java.util.List;
+
+import org.jbpm.ProcessDefinition;
+import org.jbpm.test.JbpmTestCase;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class ProcessAttachmentsTest extends JbpmTestCase {
+
+ public void testProcessWithNameOnly() {
+ byte[] lotOfBytes = generateString("a lot of bytes ", 5000).getBytes();
+ byte[] otherBytes = generateString("other bytes ", 5000).getBytes();
+
+ List<ProcessDefinition> deployedProcessDefinitions =
+ processService.createDeployment()
+ .addString("xmlstring.jpdl.xml",
+ "<process name='Insurance claim'>" +
+ " <start />" +
+ "</process>")
+ .addInputStream("a lot of attachment", new ByteArrayInputStream(lotOfBytes))
+ .addInputStream("other attachment", new ByteArrayInputStream(otherBytes))
+ .deploy()
+ .getProcessDefinitions();
+ ProcessDefinition processDefinition = registerDeployedProcessDefinitions(deployedProcessDefinitions);
+
+ byte[] retrievedLotOfBytes = processService.getAttachment(processDefinition.getId(), "a lot of attachment");
+ assertTrue(Arrays.equals(lotOfBytes, retrievedLotOfBytes));
+
+ byte[] retrievedOtherBytes = processService.getAttachment(processDefinition.getId(), "other attachment");
+ assertTrue(Arrays.equals(otherBytes, retrievedOtherBytes));
+ }
+
+ protected String generateString(String base, int multiplier) {
+ StringBuffer buffer = new StringBuffer();
+ for (int i=0; i<multiplier; i++) {
+ buffer.append(base);
+ }
+ String string = buffer.toString();
+ return string;
+ }
+}
Added: jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/process/ProcessDefinitionQueryTest.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/process/ProcessDefinitionQueryTest.java (rev 0)
+++ jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/process/ProcessDefinitionQueryTest.java 2009-03-04 19:24:25 UTC (rev 4141)
@@ -0,0 +1,139 @@
+/*
+ * 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.test.process;
+
+import java.util.List;
+
+import org.jbpm.ProcessDefinition;
+import org.jbpm.ProcessDefinitionQuery;
+import org.jbpm.test.JbpmTestCase;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class ProcessDefinitionQueryTest extends JbpmTestCase {
+
+ public void testQueryProcessDefinitionsEmpty() {
+ List<ProcessDefinition> processDefinitions = processService
+ .createProcessDefinitionQuery()
+ .execute();
+
+ assertEquals(0, processDefinitions.size());
+ }
+
+ public void testQueryProcessDefinitionsNameLike() {
+ deployJpdlXmlString(
+ "<process name='make print'>" +
+ " <start />" +
+ "</process>"
+ );
+
+ deployJpdlXmlString(
+ "<process name='use phone'>" +
+ " <start />" +
+ "</process>"
+ );
+
+ deployJpdlXmlString(
+ "<process name='make friends'>" +
+ " <start />" +
+ "</process>"
+ );
+
+ deployJpdlXmlString(
+ "<process name='clean whiteboard'>" +
+ " <start />" +
+ "</process>"
+ );
+
+ deployJpdlXmlString(
+ "<process name='fix coffeemaker'>" +
+ " <start />" +
+ "</process>"
+ );
+
+ List<ProcessDefinition> processDefinitions = processService.createProcessDefinitionQuery()
+ .nameLike("%make%")
+ .orderAsc(ProcessDefinitionQuery.PROPERTY_NAME)
+ .execute();
+
+ assertEquals("fix coffeemaker", processDefinitions.get(0).getName());
+ assertEquals("make friends", processDefinitions.get(1).getName());
+ assertEquals("make print", processDefinitions.get(2).getName());
+ }
+
+ public void testQueryProcessDefinitionsKeyLike() {
+ deployJpdlXmlString(
+ "<process name='make print'>" +
+ " <start />" +
+ "</process>"
+ );
+
+ deployJpdlXmlString(
+ "<process name='use phone'>" +
+ " <start />" +
+ "</process>"
+ );
+
+ deployJpdlXmlString(
+ "<process name='make friends'>" +
+ " <start />" +
+ "</process>"
+ );
+
+ deployJpdlXmlString(
+ "<process name='make friends'>" +
+ " <start />" +
+ "</process>"
+ );
+
+ deployJpdlXmlString(
+ "<process name='make friends'>" +
+ " <start />" +
+ "</process>"
+ );
+
+ deployJpdlXmlString(
+ "<process name='clean whiteboard'>" +
+ " <start />" +
+ "</process>"
+ );
+
+ deployJpdlXmlString(
+ "<process name='fix coffeemaker'>" +
+ " <start />" +
+ "</process>"
+ );
+
+ List<ProcessDefinition> processDefinitions = processService.createProcessDefinitionQuery()
+ .keyLike("make%")
+ .orderAsc(ProcessDefinitionQuery.PROPERTY_NAME)
+ .orderDesc(ProcessDefinitionQuery.PROPERTY_VERSION)
+ .execute();
+
+ assertEquals("make_friends:3", processDefinitions.get(0).getId());
+ assertEquals("make_friends:2", processDefinitions.get(1).getId());
+ assertEquals("make_friends:1", processDefinitions.get(2).getId());
+ assertEquals("make_print:1", processDefinitions.get(3).getId());
+ }
+}
Added: jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/process/ProcessServiceTest.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/process/ProcessServiceTest.java (rev 0)
+++ jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/process/ProcessServiceTest.java 2009-03-04 19:24:25 UTC (rev 4141)
@@ -0,0 +1,356 @@
+/*
+ * 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.test.process;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jbpm.Execution;
+import org.jbpm.JbpmException;
+import org.jbpm.ProcessDefinition;
+import org.jbpm.test.JbpmTestCase;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class ProcessServiceTest extends JbpmTestCase {
+
+ public void testProcessWithNameOnly() {
+ ProcessDefinition processDefinition = deployJpdlXmlString(
+ "<process name='Insurance claim'>" +
+ " <start />" +
+ "</process>"
+ );
+
+ assertNotNull(processDefinition);
+ assertEquals("Insurance claim", processDefinition.getName());
+ assertEquals("Insurance_claim", processDefinition.getKey());
+ assertEquals(1, processDefinition.getVersion());
+ assertEquals("Insurance_claim:1", processDefinition.getId());
+ }
+
+ public void testProcessWithNameAndKey() {
+ deployJpdlXmlString(
+ "<process name='Insurance claim' key='ICL'>" +
+ " <start />" +
+ "</process>"
+ );
+
+ ProcessDefinition processDefinition = processService.findLatestProcessDefinitionByKey("ICL");
+
+ assertNotNull(processDefinition);
+ assertEquals("Insurance claim", processDefinition.getName());
+ assertEquals("ICL", processDefinition.getKey());
+ assertEquals(1, processDefinition.getVersion());
+ assertEquals("ICL:1", processDefinition.getId());
+ }
+
+ // interface methods ////////////////////////////////////////////////////////
+
+ public void testFindProcessDefinitionKeys() {
+ deployMultipleVersionsOfProcesses();
+
+ List<String> processKeys = processService.findProcessDefinitionKeys();
+
+ List<String> expected = new ArrayList<String>();
+ expected.add("nuclear_fusion");
+ expected.add("publish_book");
+ expected.add("ultimate_seduction");
+
+ assertEquals(expected, processKeys);
+ }
+
+
+ public void testFindProcessByKey() {
+ deployJpdlXmlString(
+ "<process name='Name with spaces'>" +
+ " <start />" +
+ "</process>"
+ );
+
+ ProcessDefinition processDefinition = processService.findLatestProcessDefinitionByKey("Name_with_spaces");
+ assertNotNull(processDefinition);
+ assertEquals("Name with spaces", processDefinition.getName());
+ assertEquals("Name_with_spaces", processDefinition.getKey());
+ assertEquals(1, processDefinition.getVersion());
+ assertEquals("Name_with_spaces:1", processDefinition.getId());
+ }
+
+ public void testFindProcessDefinitions() {
+ deployMultipleVersionsOfProcesses();
+
+ List<ProcessDefinition> processDefinitions = processService.findProcessDefinitionsByKey("nuclear_fusion");
+ assertNotNull(processDefinitions);
+
+ assertEquals("expected 3 but was " + processDefinitions.size() + ": " + processDefinitions, 3, processDefinitions.size());
+ assertEquals("nuclear fusion", processDefinitions.get(0).getName());
+ assertEquals(3, processDefinitions.get(0).getVersion());
+
+ assertEquals("nuclear fusion", processDefinitions.get(1).getName());
+ assertEquals(2, processDefinitions.get(1).getVersion());
+
+ assertEquals("nuclear fusion", processDefinitions.get(2).getName());
+ assertEquals(1, processDefinitions.get(2).getVersion());
+ }
+
+ public void testFindLatestProcessDefinition() {
+ deployMultipleVersionsOfProcesses();
+
+ ProcessDefinition retrieved = processService.findLatestProcessDefinitionByKey("nuclear_fusion");
+ assertNotNull(retrieved);
+
+ assertEquals(3, retrieved.getVersion());
+ assertEquals("nuclear fusion", retrieved.getName());
+ assertEquals("nuclear_fusion", retrieved.getKey());
+ }
+
+ public void testFindProcessDefinitionById() {
+ deployJpdlXmlString(
+ "<process name='given' version='33'>" +
+ " <start />" +
+ "</process>"
+ );
+
+ // load it
+ ProcessDefinition processDefinition = processService.findProcessDefinitionById("given:33");
+ assertNotNull(processDefinition);
+ assertEquals("given", processDefinition.getName());
+ assertEquals(33, processDefinition.getVersion());
+ }
+
+ public void testDeleteProcessDefinition() {
+ processService.createDeployment()
+ .addString("xmlstring.jpdl.xml",
+ "<process name='deleteme' version='33'>" +
+ " <start />" +
+ "</process>")
+ .deploy();
+
+ // delete it
+ processService.deleteProcessDefinition("deleteme:33");
+
+ // check if the db is empty
+ assertEquals(0, processService.createProcessDefinitionQuery().execute().size());
+ }
+
+ public void testDeleteProcessDefinitionAndInstances() {
+ processService.createDeployment()
+ .addString("xmlstring.jpdl.xml",
+ "<process name='deleteme' version='33'>" +
+ " <start>" +
+ " <transition to='w' />" +
+ " </start>" +
+ " <state name='w' />" +
+ "</process>")
+ .deploy();
+
+ executionService.startProcessInstanceByKey("deleteme");
+ executionService.startProcessInstanceByKey("deleteme");
+ executionService.startProcessInstanceByKey("deleteme");
+ executionService.startProcessInstanceByKey("deleteme");
+
+ // delete it all
+ processService.deleteProcessDefinitionCascade("deleteme:33");
+
+ // check if the db is empty
+ assertEquals(0, processService.createProcessDefinitionQuery().execute().size());
+ assertEquals(0, executionService.createExecutionQuery().execute().size());
+ }
+
+ public void testDeleteProcessDefinitionButNotInstances() {
+ deployJpdlXmlString(
+ "<process name='deleteme' version='33'>" +
+ " <start>" +
+ " <transition to='w' />" +
+ " </start>" +
+ " <state name='w' />" +
+ "</process>"
+ );
+
+ executionService.startProcessInstanceByKey("deleteme");
+ executionService.startProcessInstanceByKey("deleteme");
+ executionService.startProcessInstanceByKey("deleteme");
+ executionService.startProcessInstanceByKey("deleteme");
+
+ // delete it all
+ try {
+ processService.deleteProcessDefinition("deleteme:33");
+ fail("expected exception");
+ } catch (JbpmException e) {
+ assertTextPresent("still 4 process instances for process definition deleteme:33", e.getMessage());
+ }
+ }
+
+ // various other aspects ////////////////////////////////////////////////////
+
+ public void testAutomaticVersioning() {
+ deployJpdlXmlString(
+ "<process name='versionme'>" +
+ " <start />" +
+ "</process>"
+ );
+
+ // look it up again
+ List<ProcessDefinition> processDefinitions = processService.findProcessDefinitionsByKey("versionme");
+ assertNotNull(processDefinitions);
+ // verify that there is only one
+ assertEquals(processDefinitions.toString(), 1, processDefinitions.size());
+ ProcessDefinition processDefinition = processDefinitions.get(0);
+ // and check that automatically assigned version starts with 1
+ assertEquals(1, processDefinition.getVersion());
+
+ deployJpdlXmlString(
+ "<process name='versionme'>" +
+ " <start />" +
+ "</process>"
+ );
+
+ // look them up again
+ processDefinitions = processService.findProcessDefinitionsByKey("versionme");
+ // verify that there is only one
+ assertEquals(processDefinitions.toString(), 2, processDefinitions.size());
+ // and check that automatically assigned version starts with 1
+ assertEquals(2, processDefinitions.get(0).getVersion());
+ assertEquals(1, processDefinitions.get(1).getVersion());
+ }
+
+ public void testUserProvidedVersion() {
+ deployJpdlXmlString(
+ "<process name='takethis' version='234'>" +
+ " <start />" +
+ "</process>"
+ );
+
+ // load it
+ List<ProcessDefinition> processDefinitions = processService.findProcessDefinitionsByKey("takethis");
+ assertNotNull(processDefinitions);
+ assertEquals(processDefinitions.toString(), 1, processDefinitions.size());
+ ProcessDefinition processDefinition = processDefinitions.get(0);
+ // verify that the user specified version was used
+ // (and not overwritten by an automatically assigned versioning)
+ assertEquals(234, processDefinition.getVersion());
+ }
+
+ public void testDuplicateUserProvidedVersion() {
+ deployJpdlXmlString(
+ "<process name='takethis' version='234'>" +
+ " <start />" +
+ "</process>"
+ );
+
+ try {
+ deployJpdlXmlString(
+ "<process name='takethis' version='234'>" +
+ " <start />" +
+ "</process>"
+ );
+ fail("expected exception");
+ } catch (JbpmException e) {
+ assertTextPresent("process 'takethis:234' already exists", e.getMessage());
+ }
+ }
+
+ /**
+ * deploys 3 versions of process with name 'nuclear fusion', 2 versions of the processes 'ultimate seduction' and
+ * 'publish book'
+ */
+ void deployMultipleVersionsOfProcesses() {
+ deployJpdlXmlString(
+ "<process name='nuclear fusion'>" +
+ " <start />" +
+ "</process>"
+ );
+
+ deployJpdlXmlString(
+ "<process name='ultimate seduction'>" +
+ " <start />" +
+ "</process>"
+ );
+
+ deployJpdlXmlString(
+ "<process name='ultimate seduction'>" +
+ " <start />" +
+ "</process>"
+ );
+
+ deployJpdlXmlString(
+ "<process name='ultimate seduction'>" +
+ " <start />" +
+ "</process>"
+ );
+
+ deployJpdlXmlString(
+ "<process name='ultimate seduction'>" +
+ " <start />" +
+ "</process>"
+ );
+
+ deployJpdlXmlString(
+ "<process name='publish book'>" +
+ " <start />" +
+ "</process>"
+ );
+
+ deployJpdlXmlString(
+ "<process name='nuclear fusion'>" +
+ " <start />" +
+ "</process>"
+ );
+
+ deployJpdlXmlString(
+ "<process name='nuclear fusion'>" +
+ " <start />" +
+ "</process>"
+ );
+ }
+
+ public void testMinimalProcess() {
+ deployJpdlXmlString(
+ "<process name='minimal'>" +
+ " <start>" +
+ " <transition to='end' />" +
+ " </start>" +
+ " <end name='end' />" +
+ "</process>"
+ );
+
+ Execution execution = executionService.startProcessInstanceByKey("minimal");
+
+ assertEquals("end", execution.getActivityName());
+ assertTrue(execution.isEnded());
+ assertFalse(execution.isActive());
+ }
+
+ public void testMostMinimalProcess() {
+ deployJpdlXmlString(
+ "<process name='minimal'>" +
+ " <start />" +
+ "</process>"
+ );
+
+ Execution execution = executionService.startProcessInstanceByKey("minimal");
+
+ assertTrue(execution.isEnded());
+ assertFalse(execution.isActive());
+ }
+}
Added: jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/task/SubTaskTest.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/task/SubTaskTest.java (rev 0)
+++ jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/task/SubTaskTest.java 2009-03-04 19:24:25 UTC (rev 4141)
@@ -0,0 +1,167 @@
+/*
+ * 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.test.task;
+
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.jbpm.task.Task;
+import org.jbpm.test.JbpmTestCase;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class SubTaskTest extends JbpmTestCase {
+
+ public void testTaskParticipants() {
+
+ // create top level task
+ // * clean da house
+
+ Task task = taskService.newTask();
+ task.setName("clean da house");
+ saveAndRegisterTask(task);
+ long taskDbid = task.getDbid();
+
+ // create 3 sub tasks:
+ // * clean da house
+ // * dishes
+ // * laundry
+ // * sweep floor
+
+ Task subTask = taskService.newTask(taskDbid);
+ subTask.setName("dishes");
+ taskService.saveTask(subTask);
+ long dishesTaskDbid = subTask.getDbid();
+
+ subTask = taskService.newTask(taskDbid);
+ subTask.setName("laundry");
+ taskService.saveTask(subTask);
+ long laundryTaskDbid = subTask.getDbid();
+
+ subTask = taskService.newTask(taskDbid);
+ subTask.setName("sweep floor");
+ taskService.saveTask(subTask);
+ long sweepFloorTaskDbid = subTask.getDbid();
+
+ // verify 3 sub tasks of clean da house
+
+ List<Task> subTasks = taskService.getSubTasks(taskDbid);
+ Set<String> subTaskNames = getTaskNames(subTasks);
+
+ Set<String> expectedTaskNames = new HashSet<String>();
+ expectedTaskNames.add("dishes");
+ expectedTaskNames.add("laundry");
+ expectedTaskNames.add("sweep floor");
+
+ assertEquals(expectedTaskNames, subTaskNames);
+
+ // add 3 sub tasks for sweep floor:
+ // * clean da house
+ // * dishes
+ // * laundry
+ // * sweep floor
+ // * find broom
+ // * find water
+ // * scrub
+
+ // now second level subtasks under sweep floor
+ subTask = taskService.newTask(sweepFloorTaskDbid);
+ subTask.setName("find broom");
+ taskService.saveTask(subTask);
+
+ subTask = taskService.newTask(sweepFloorTaskDbid);
+ subTask.setName("find water");
+ taskService.saveTask(subTask);
+
+ subTask = taskService.newTask(sweepFloorTaskDbid);
+ subTask.setName("scrub");
+ taskService.saveTask(subTask);
+
+ // verify all the sub tasks of 'clean da house' and 'sweep floor'
+
+ subTaskNames = getTaskNames(taskService.getSubTasks(taskDbid));
+
+ expectedTaskNames = new HashSet<String>();
+ expectedTaskNames.add("dishes");
+ expectedTaskNames.add("laundry");
+ expectedTaskNames.add("sweep floor");
+
+ assertEquals(expectedTaskNames, subTaskNames);
+
+ subTaskNames = getTaskNames(taskService.getSubTasks(sweepFloorTaskDbid));
+
+ expectedTaskNames = new HashSet<String>();
+ expectedTaskNames.add("find broom");
+ expectedTaskNames.add("find water");
+ expectedTaskNames.add("scrub");
+
+ assertEquals(expectedTaskNames, subTaskNames);
+
+ // delete task dishes
+ taskService.deleteTask(dishesTaskDbid);
+
+ // verify all the sub tasks of 'clean da house' and 'sweep floor'
+
+ subTaskNames = getTaskNames(taskService.getSubTasks(taskDbid));
+
+ expectedTaskNames = new HashSet<String>();
+ expectedTaskNames.add("laundry");
+ expectedTaskNames.add("sweep floor");
+
+ assertEquals(expectedTaskNames, subTaskNames);
+
+ subTaskNames = getTaskNames(taskService.getSubTasks(sweepFloorTaskDbid));
+
+ expectedTaskNames = new HashSet<String>();
+ expectedTaskNames.add("find broom");
+ expectedTaskNames.add("find water");
+ expectedTaskNames.add("scrub");
+
+ assertEquals(expectedTaskNames, subTaskNames);
+
+ // delete laundry and delete sweep floor
+ // NOTE: deleting sweep floor should recursively delete the subtasks
+ taskService.deleteTask(laundryTaskDbid);
+ taskService.deleteTask(sweepFloorTaskDbid);
+
+ subTaskNames = getTaskNames(taskService.getSubTasks(taskDbid));
+
+ expectedTaskNames = new HashSet<String>();
+ assertEquals(expectedTaskNames, subTaskNames);
+
+ subTaskNames = getTaskNames(taskService.getSubTasks(sweepFloorTaskDbid));
+
+ expectedTaskNames = new HashSet<String>();
+ assertEquals(expectedTaskNames, subTaskNames);
+ }
+
+ private Set<String> getTaskNames(List<Task> tasks) {
+ Set<String> taskNames = new HashSet<String>();
+ for (Task task: tasks) {
+ taskNames.add(task.getName());
+ }
+ return taskNames;
+ }
+}
Added: jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/task/TaskCommentsTest.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/task/TaskCommentsTest.java (rev 0)
+++ jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/task/TaskCommentsTest.java 2009-03-04 19:24:25 UTC (rev 4141)
@@ -0,0 +1,73 @@
+/*
+ * 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.test.task;
+
+import java.util.List;
+
+import org.jbpm.model.Comment;
+import org.jbpm.task.Task;
+import org.jbpm.test.JbpmTestCase;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class TaskCommentsTest extends JbpmTestCase {
+
+ public void testComments() {
+ Task task = taskService.newTask();
+ task.setName("clean da house");
+ taskService.saveTask(task);
+ long taskDbid = task.getDbid();
+
+ // what a party yesterday
+ // - what! you had a party while i was out ?!
+ // - euh yes. it was a great party :-)
+ // i'll clean up the mess
+ Comment comment = taskService.addTaskComment(taskDbid, "what a party yesterday");
+ long whatAPartyDbid = comment.getDbid();
+ comment = taskService.addReplyComment(whatAPartyDbid, "what! you had a party while i was out ?!");
+ long youHadAPartyDbid = comment.getDbid();
+ taskService.addReplyComment(youHadAPartyDbid, "euh yes. it was a great party :-)");
+
+ taskService.addTaskComment(taskDbid, "i'll clean up the mess");
+
+ List<Comment> taskComments = taskService.getTaskComments(taskDbid);
+ assertEquals("what a party yesterday", taskComments.get(0).getMessage());
+ assertEquals("i'll clean up the mess", taskComments.get(1).getMessage());
+
+ taskComments = taskComments.get(0).getComments();
+ assertEquals("what! you had a party while i was out ?!", taskComments.get(0).getMessage());
+
+ taskComments = taskComments.get(0).getComments();
+ assertEquals("euh yes. it was a great party :-)", taskComments.get(0).getMessage());
+
+ taskService.deleteComment(whatAPartyDbid);
+
+ taskComments = taskService.getTaskComments(taskDbid);
+ assertEquals("i'll clean up the mess", taskComments.get(0).getMessage());
+
+ // the following should delete the remaining comment. if not, this
+ // will show up as a fixme.
+ taskService.deleteTask(taskDbid);
+ }
+}
Added: jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/task/TaskCreateUpdateDeleteTest.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/task/TaskCreateUpdateDeleteTest.java (rev 0)
+++ jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/task/TaskCreateUpdateDeleteTest.java 2009-03-04 19:24:25 UTC (rev 4141)
@@ -0,0 +1,73 @@
+/*
+ * 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.test.task;
+
+import java.util.Date;
+import java.text.DateFormat;
+
+import org.jbpm.task.Task;
+import org.jbpm.test.JbpmTestCase;
+
+/**
+ * @author Alejandro Guizar
+ */
+public class TaskCreateUpdateDeleteTest extends JbpmTestCase {
+
+ public void testNewTask() {
+ // creation of a new non-persisted task
+ Task task = taskService.newTask();
+ task = taskService.getTask(task.getDbid());
+ assertNull(task);
+ }
+
+ public void testSaveTask() {
+ Task task = taskService.newTask();
+ saveAndRegisterTask(task);
+ long taskDbid = task.getDbid();
+ // task was made persistent
+ task = taskService.getTask(taskDbid);
+ assertNotNull("expected non-null task", task);
+ // make some change
+ Date dueDate = new Date();
+ task.setDueDate(dueDate);
+ taskService.saveTask(task);
+ // verify change is applied
+ task = taskService.getTask(taskDbid);
+
+ // task.getDueDate() return an java.sql.Timestamp
+ DateFormat df = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG);
+ assertEquals(df.format(dueDate), df.format(task.getDueDate()));
+ }
+
+ public void testDeleteTask() {
+ Task task = taskService.newTask();
+ taskService.saveTask(task);
+ long taskDbid = task.getDbid();
+
+ // task was made persistent
+ assertNotNull("expected non-null task", taskService.getTask(taskDbid));
+ // delete task and verify it does not exist
+ taskService.deleteTask(taskDbid);
+ task = taskService.getTask(taskDbid);
+ assertNull("expected null, but was " + task, task);
+ }
+}
Added: jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/task/TaskListTest.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/task/TaskListTest.java (rev 0)
+++ jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/task/TaskListTest.java 2009-03-04 19:24:25 UTC (rev 4141)
@@ -0,0 +1,115 @@
+/*
+ * 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.test.task;
+
+import java.util.List;
+
+import org.jbpm.task.Task;
+import org.jbpm.test.JbpmTestCase;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class TaskListTest extends JbpmTestCase {
+
+ public void testPersonalTaskList() {
+ Task task = taskService.newTask();
+ task.setName("do laundry");
+ task.setAssignee("johndoe");
+ saveAndRegisterTask(task);
+
+ task = taskService.newTask();
+ task.setName("get good idea");
+ task.setAssignee("joesmoe");
+ saveAndRegisterTask(task);
+
+ task = taskService.newTask();
+ task.setName("find venture capital");
+ task.setAssignee("joesmoe");
+ saveAndRegisterTask(task);
+
+ task = taskService.newTask();
+ task.setName("start new business");
+ task.setAssignee("joesmoe");
+ saveAndRegisterTask(task);
+
+ List<Task> taskList = taskService.getPersonalTaskList("johndoe", 0, 10);
+ assertNotNull(taskList);
+
+ assertEquals("do laundry", taskList.get(0).getName());
+ assertEquals(1, taskList.size());
+
+ taskList = taskService.getPersonalTaskList("joesmoe", 0, 10);
+ assertNotNull(taskList);
+
+ assertContainsTask(taskList, "get good idea");
+ assertContainsTask(taskList, "start new business");
+ assertContainsTask(taskList, "find venture capital");
+
+ assertEquals(3, taskList.size());
+ }
+
+ public void testPersonalTaskListDefaultSortOrder() {
+ Task task = taskService.newTask();
+ task.setName("get good idea");
+ task.setAssignee("joesmoe");
+ task.setPriority(3);
+ saveAndRegisterTask(task);
+
+ task = taskService.newTask();
+ task.setName("find venture capital");
+ task.setAssignee("joesmoe");
+ task.setPriority(2);
+ saveAndRegisterTask(task);
+
+ task = taskService.newTask();
+ task.setName("start new business");
+ task.setAssignee("joesmoe");
+ task.setPriority(1);
+ saveAndRegisterTask(task);
+
+ task = taskService.newTask();
+ task.setName("take a day off");
+ task.setAssignee("joesmoe");
+ task.setPriority(-5);
+ saveAndRegisterTask(task);
+
+ task = taskService.newTask();
+ task.setName("make profit");
+ task.setAssignee("joesmoe");
+ task.setPriority(10);
+ saveAndRegisterTask(task);
+
+ List<Task> taskList = taskService.getPersonalTaskList("joesmoe", 0, 10);
+ assertNotNull(taskList);
+
+ // default sort order is based on the priority
+ assertEquals("make profit", taskList.get(0).getName());
+ assertEquals("get good idea", taskList.get(1).getName());
+ assertEquals("find venture capital", taskList.get(2).getName());
+ assertEquals("start new business", taskList.get(3).getName());
+ assertEquals("take a day off", taskList.get(4).getName());
+
+ assertEquals(5, taskList.size());
+ }
+}
Added: jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/task/TaskParticipationsTest.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/task/TaskParticipationsTest.java (rev 0)
+++ jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/task/TaskParticipationsTest.java 2009-03-04 19:24:25 UTC (rev 4141)
@@ -0,0 +1,104 @@
+/*
+ * 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.test.task;
+
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.jbpm.task.GroupRef;
+import org.jbpm.task.IdentityRef;
+import org.jbpm.task.Participant;
+import org.jbpm.task.Task;
+import org.jbpm.task.UserRef;
+import org.jbpm.test.JbpmTestCase;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class TaskParticipationsTest extends JbpmTestCase {
+
+ public void testTaskParticipants() {
+ Task task = taskService.newTask();
+ task.setName("do laundry");
+ saveAndRegisterTask(task);
+
+ long taskDbid = task.getDbid();
+
+ taskService.addTaskParticipant(taskDbid, new UserRef("johndoe"), Participant.CANDIDATE);
+ taskService.addTaskParticipant(taskDbid, new UserRef("joesmoe"), Participant.CANDIDATE);
+ taskService.addTaskParticipant(taskDbid, new UserRef("joesmoe"), Participant.OWNER);
+ taskService.addTaskParticipant(taskDbid, new GroupRef("losers"), Participant.CANDIDATE);
+ taskService.addTaskParticipant(taskDbid, new GroupRef("dummies"), Participant.CANDIDATE);
+
+ List<Participant> taskParticipants = taskService.getTaskParticipants(taskDbid);
+
+ Set<IdentityRef> candidateIdentityRefs = getIdentityRefs(taskParticipants, Participant.CANDIDATE);
+
+ Set<IdentityRef> expectedIdentityRefs = new HashSet<IdentityRef>();
+ expectedIdentityRefs.add(new UserRef("johndoe"));
+ expectedIdentityRefs.add(new UserRef("joesmoe"));
+ expectedIdentityRefs.add(new GroupRef("losers"));
+ expectedIdentityRefs.add(new GroupRef("dummies"));
+
+ assertEquals(expectedIdentityRefs, candidateIdentityRefs);
+
+ candidateIdentityRefs = getIdentityRefs(taskParticipants, Participant.OWNER);
+
+ expectedIdentityRefs = new HashSet<IdentityRef>();
+ expectedIdentityRefs.add(new UserRef("joesmoe"));
+
+ assertEquals(expectedIdentityRefs, candidateIdentityRefs);
+
+ taskService.removeTaskParticipant(taskDbid, new UserRef("joesmoe"), Participant.OWNER);
+ taskService.removeTaskParticipant(taskDbid, new GroupRef("losers"), Participant.CANDIDATE);
+
+
+ taskParticipants = taskService.getTaskParticipants(taskDbid);
+
+ candidateIdentityRefs = getIdentityRefs(taskParticipants, Participant.CANDIDATE);
+
+ expectedIdentityRefs = new HashSet<IdentityRef>();
+ expectedIdentityRefs.add(new UserRef("johndoe"));
+ expectedIdentityRefs.add(new UserRef("joesmoe"));
+ expectedIdentityRefs.add(new GroupRef("dummies"));
+
+ assertEquals(expectedIdentityRefs, candidateIdentityRefs);
+
+ candidateIdentityRefs = getIdentityRefs(taskParticipants, Participant.OWNER);
+
+ expectedIdentityRefs = new HashSet<IdentityRef>();
+
+ assertEquals(expectedIdentityRefs, candidateIdentityRefs);
+ }
+
+ public Set<IdentityRef> getIdentityRefs(List<Participant> taskParticipants, String participation) {
+ Set<IdentityRef> identityRefs = new HashSet<IdentityRef>();
+ for (Participant participant: taskParticipants) {
+ if (participation.equals(participant.getParticipation())) {
+ identityRefs.add(participant.getIdentityRef());
+ }
+ }
+ return identityRefs;
+ }
+}
Added: jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/task/TaskQueryTest.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/task/TaskQueryTest.java (rev 0)
+++ jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/task/TaskQueryTest.java 2009-03-04 19:24:25 UTC (rev 4141)
@@ -0,0 +1,111 @@
+/*
+ * 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.test.task;
+
+import java.util.List;
+
+import org.jbpm.TaskQuery;
+import org.jbpm.task.Task;
+import org.jbpm.test.JbpmTestCase;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class TaskQueryTest extends JbpmTestCase {
+
+ public void testSimplestTaskQuery() {
+ Task task = taskService.newTask();
+ task.setName("do laundry");
+ task.setAssignee("johndoe");
+ task.setPriority(3);
+ saveAndRegisterTask(task);
+
+ task = taskService.newTask();
+ task.setName("change dyper");
+ task.setAssignee("johndoe");
+ task.setPriority(1);
+ saveAndRegisterTask(task);
+
+ task = taskService.newTask();
+ task.setName("start new business");
+ task.setAssignee("joesmoe");
+ task.setPriority(4);
+ saveAndRegisterTask(task);
+
+ task = taskService.newTask();
+ task.setName("find venture capital");
+ task.setPriority(4);
+ saveAndRegisterTask(task);
+
+ List<Task> taskList = taskService
+ .createTaskQuery()
+ .execute();
+ assertNotNull(taskList);
+
+ assertContainsTask(taskList, "do laundry");
+ assertContainsTask(taskList, "change dyper");
+ assertContainsTask(taskList, "start new business");
+ assertContainsTask(taskList, "find venture capital");
+
+ assertEquals(4, taskList.size());
+ }
+
+ public void testSimplestTaskQuerySortBy() {
+ Task task = taskService.newTask();
+ task.setName("do laundry");
+ task.setAssignee("johndoe");
+ task.setPriority(3);
+ saveAndRegisterTask(task);
+
+ task = taskService.newTask();
+ task.setName("change dyper");
+ task.setAssignee("johndoe");
+ task.setPriority(1);
+ saveAndRegisterTask(task);
+
+ task = taskService.newTask();
+ task.setName("start new business");
+ task.setAssignee("joesmoe");
+ task.setPriority(4);
+ saveAndRegisterTask(task);
+
+ task = taskService.newTask();
+ task.setName("find venture capital");
+ task.setPriority(7);
+ saveAndRegisterTask(task);
+
+ List<Task> taskList = taskService
+ .createTaskQuery()
+ .orderAsc(TaskQuery.PROPERTY_NAME)
+ .execute();
+ assertNotNull(taskList);
+
+ assertEquals("change dyper", taskList.get(0).getName());
+ assertEquals("do laundry", taskList.get(1).getName());
+ assertEquals("find venture capital", taskList.get(2).getName());
+ assertEquals("start new business", taskList.get(3).getName());
+
+ assertEquals(4, taskList.size());
+ }
+
+}
Added: jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/variables/BasicVariablesTest.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/variables/BasicVariablesTest.java (rev 0)
+++ jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/variables/BasicVariablesTest.java 2009-03-04 19:24:25 UTC (rev 4141)
@@ -0,0 +1,116 @@
+/*
+ * 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.test.variables;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.jbpm.test.JbpmTestCase;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class BasicVariablesTest extends JbpmTestCase {
+
+ public void testStartProcessInstanceWithoutVariables() {
+ deployJpdlXmlString(
+ "<process name='var'>" +
+ " <start name='a'>" +
+ " <transition to='b' />" +
+ " </start>" +
+ " <state name='b'/>" +
+ "</process>"
+ );
+
+ executionService.startProcessInstanceByKey("var", "one");
+ Set<String> variableNames = executionService.getVariableNames("var/one");
+ assertNotNull(variableNames);
+ assertEquals(0, variableNames.size());
+ }
+
+ public void testStartProcessInstanceWithThreeVariables() {
+ deployJpdlXmlString(
+ "<process name='var'>" +
+ " <start name='a'>" +
+ " <transition to='b' />" +
+ " </start>" +
+ " <state name='b'/>" +
+ "</process>"
+ );
+
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("customer", "John Doe");
+ variables.put("type", "Accident");
+ variables.put("amount", new Float(763.74));
+
+ Set<String> expectedVariableNames = new HashSet<String>(variables.keySet());
+ Map<String, Object> expectedVariables = new HashMap<String, Object>(variables);
+
+ executionService.startProcessInstanceByKey("var", variables, "one");
+
+ Set<String> variableNames = executionService.getVariableNames("var/one");
+ assertNotNull(variableNames);
+
+ assertEquals(expectedVariableNames, variableNames);
+
+ variables = executionService.getVariables("var/one", variableNames);
+
+ assertEquals(expectedVariables, variables);
+ }
+
+ public void testSetAndUpdateVariable() {
+ deployJpdlXmlString(
+ "<process name='var'>" +
+ " <start name='a'>" +
+ " <transition to='b' />" +
+ " </start>" +
+ " <state name='b'/>" +
+ "</process>"
+ );
+
+ executionService.startProcessInstanceByKey("var", "one");
+ executionService.setVariable("var/one", "msg", "hello");
+ assertEquals("hello", executionService.getVariable("var/one", "msg"));
+ executionService.setVariable("var/one", "msg", "world");
+ assertEquals("world", executionService.getVariable("var/one", "msg"));
+ }
+
+ public void testUpdateVariableToDifferentType() {
+ deployJpdlXmlString(
+ "<process name='var'>" +
+ " <start name='a'>" +
+ " <transition to='b' />" +
+ " </start>" +
+ " <state name='b'/>" +
+ "</process>"
+ );
+
+ executionService.startProcessInstanceByKey("var", "one");
+ executionService.setVariable("var/one", "msg", "hello");
+ assertEquals("hello", executionService.getVariable("var/one", "msg"));
+ executionService.setVariable("var/one", "msg", new Integer(5));
+ assertEquals(new Integer(5), executionService.getVariable("var/one", "msg"));
+ }
+}
Added: jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/variables/VariableBasicTypesTest.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/variables/VariableBasicTypesTest.java (rev 0)
+++ jbpm4/branches/tbaeyens/modules/test-db/src/test/java/org/jbpm/test/variables/VariableBasicTypesTest.java 2009-03-04 19:24:25 UTC (rev 4141)
@@ -0,0 +1,138 @@
+/*
+ * 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.test.variables;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import org.jbpm.test.JbpmTestCase;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class VariableBasicTypesTest extends JbpmTestCase {
+
+ public void checkVariableValue(Object variableValue) {
+ deployJpdlXmlString(
+ "<process name='var'>" +
+ " <start name='a'>" +
+ " <transition to='b' />" +
+ " </start>" +
+ " <state name='b'/>" +
+ "</process>"
+ );
+
+ executionService.startProcessInstanceByKey("var", "one");
+ executionService.setVariable("var/one", "msg", variableValue);
+ assertEquals(variableValue, executionService.getVariable("var/one", "msg"));
+ }
+
+ public void testVariableTypeString() {
+ checkVariableValue("hello");
+ }
+
+ public void testVariableTypeCharacter() {
+ checkVariableValue(new Character('x'));
+ }
+
+ public void testVariableTypeBoolean() {
+ checkVariableValue(Boolean.TRUE);
+ }
+
+ public void testVariableTypeByte() {
+ checkVariableValue(new Byte((byte)5));
+ }
+
+ public void testVariableTypeShort() {
+ checkVariableValue(new Short((short)5));
+ }
+
+ public void testVariableTypeInteger() {
+ checkVariableValue(new Integer(5));
+ }
+
+ public void testVariableTypeLong() {
+ checkVariableValue(new Long(5));
+ }
+
+ public void testVariableTypeFloat() {
+ checkVariableValue(new Float(5.7));
+ }
+
+ public void testVariableTypeDouble() {
+ checkVariableValue(new Double(5.7));
+ }
+
+ public void testVariableTypeDate() {
+ checkVariableValue(new Date());
+ }
+
+ public static class SerializeMe implements Serializable {
+ private static final long serialVersionUID = 1L;
+ String text;
+ public SerializeMe(String text) {
+ this.text = text;
+ }
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((text == null) ? 0 : text.hashCode());
+ return result;
+ }
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ SerializeMe other = (SerializeMe) obj;
+ if (text == null) {
+ if (other.text != null)
+ return false;
+ } else if (!text.equals(other.text))
+ return false;
+ return true;
+ }
+ }
+
+ public void testVariableTypeSerializable() {
+ SerializeMe originalValue = new SerializeMe(generateString("a lot of text ", 500));
+ checkVariableValue(originalValue);
+
+ // now check if an update still works ok
+ // updating a serialized object might fail when the blob is cached by hibernate
+ SerializeMe newValue = new SerializeMe(generateString("another text ", 500));
+ executionService.setVariable("var/one", "msg", newValue);
+ assertEquals(newValue, executionService.getVariable("var/one", "msg"));
+ }
+
+ protected String generateString(String base, int multiplier) {
+ StringBuffer buffer = new StringBuffer();
+ for (int i=0; i<multiplier; i++) {
+ buffer.append(base);
+ }
+ String string = buffer.toString();
+ return string;
+ }
+}
17 years, 2 months
JBoss JBPM SVN: r4140 - in jbpm4/branches/tbaeyens/modules/test-db: src/main/java and 1 other directory.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2009-03-04 13:47:07 -0500 (Wed, 04 Mar 2009)
New Revision: 4140
Removed:
jbpm4/branches/tbaeyens/modules/test-db/src/main/java/org/
Modified:
jbpm4/branches/tbaeyens/modules/test-db/pom.xml
Log:
updates :-)
Modified: jbpm4/branches/tbaeyens/modules/test-db/pom.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/test-db/pom.xml 2009-03-04 16:56:46 UTC (rev 4139)
+++ jbpm4/branches/tbaeyens/modules/test-db/pom.xml 2009-03-04 18:47:07 UTC (rev 4140)
@@ -30,9 +30,15 @@
<dependency>
<groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-api</artifactId>
+ <version>${version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jbpm.jbpm4</groupId>
<artifactId>jbpm-jpdl</artifactId>
<version>${version}</version>
- <scope>test</scope>
+ <scope>runtime</scope>
</dependency>
<dependency>
@@ -46,15 +52,16 @@
<!-- Plugins -->
<build>
<plugins>
+ <!--
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <!-- this tells surefire that the test classes are
+ this tells surefire that the test classes are
to be found in the src directory src/main/java.
The test classes are in the source directory to make
a distinction between the compile time classpath and the
runtime test classpath. The compile time classpath only should
- have the api module in its dependencies. -->
+ have the api module in its dependencies.
<testSourceDirectory>src/main/java</testSourceDirectory>
<classesDirectory>target/classes</classesDirectory>
<testClassesDirectory>target/classes</testClassesDirectory>
@@ -85,6 +92,8 @@
</execution>
</executions>
</plugin>
+ -->
+
</plugins>
</build>
17 years, 2 months
JBoss JBPM SVN: r4139 - in jbpm4/branches/tbaeyens: modules/config/src/main/files and 18 other directories.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2009-03-04 11:56:46 -0500 (Wed, 04 Mar 2009)
New Revision: 4139
Added:
jbpm4/branches/tbaeyens/modules/config/src/main/files/jdk/
jbpm4/branches/tbaeyens/modules/config/src/main/files/jdk/logging.properties
jbpm4/branches/tbaeyens/modules/examples/src/main/
jbpm4/branches/tbaeyens/modules/examples/src/main/config/
jbpm4/branches/tbaeyens/modules/examples/src/test/resources/META-INF/
jbpm4/branches/tbaeyens/modules/examples/src/test/resources/META-INF/persistence.xml
jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.cache.xml
jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.definition.hbm.xml
jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.execution.hbm.xml
jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.hibernate.cfg.xml
jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.history.hbm.xml
jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.identity.cfg.xml
jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.jpdl.activities.xml
jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.jpdl.hbm.xml
jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.task.hbm.xml
jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.task.lifecycle.xml
jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.variable.types.xml
jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.wire.bindings.xml
jbpm4/branches/tbaeyens/modules/test-db/src/main/config/
jbpm4/branches/tbaeyens/modules/test-db/src/test/
jbpm4/branches/tbaeyens/modules/test-db/src/test/java/
jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/
jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/META-INF/
jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/META-INF/persistence.xml
jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.cache.xml
jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.cfg.xml
jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.definition.hbm.xml
jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.execution.hbm.xml
jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.hibernate.cfg.xml
jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.history.hbm.xml
jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.identity.cfg.xml
jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.jpdl.activities.xml
jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.jpdl.hbm.xml
jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.task.hbm.xml
jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.task.lifecycle.xml
jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.variable.types.xml
jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.wire.bindings.xml
jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/logging.properties
Removed:
jbpm4/branches/tbaeyens/modules/jpdl/src/main/config/build.properties
jbpm4/branches/tbaeyens/modules/test-db/src/main/resources/jbpm.cfg.xml
jbpm4/branches/tbaeyens/modules/test-db/src/main/resources/logging.properties
Modified:
jbpm4/branches/tbaeyens/build.xml
jbpm4/branches/tbaeyens/modules/config/src/main/files/build.xml
jbpm4/branches/tbaeyens/modules/distro/.settings/attachedFile.properties
jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.cfg.xml
jbpm4/branches/tbaeyens/modules/examples/src/test/resources/logging.properties
jbpm4/branches/tbaeyens/modules/jpdl/src/test/resources/logging.properties
jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/task/TaskImpl.java
jbpm4/branches/tbaeyens/modules/test-db/.classpath
jbpm4/branches/tbaeyens/modules/test-db/pom.xml
jbpm4/branches/tbaeyens/modules/test-pojo/src/main/resources/logging.properties
jbpm4/branches/tbaeyens/modules/userguide/.settings/attachedFile.properties
jbpm4/branches/tbaeyens/pom.xml
Log:
updates :-)
Modified: jbpm4/branches/tbaeyens/build.xml
===================================================================
--- jbpm4/branches/tbaeyens/build.xml 2009-03-04 15:24:38 UTC (rev 4138)
+++ jbpm4/branches/tbaeyens/build.xml 2009-03-04 16:56:46 UTC (rev 4139)
@@ -119,6 +119,8 @@
<target name="update.configurations" description="update the pvm and jpdl test resources by running the config tool">
<update-config module="pvm"/>
<update-config module="jpdl"/>
+ <update-config module="examples"/>
+ <update-config module="test-db"/>
</target>
<!-- HTML -->
Modified: jbpm4/branches/tbaeyens/modules/config/src/main/files/build.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/config/src/main/files/build.xml 2009-03-04 15:24:38 UTC (rev 4138)
+++ jbpm4/branches/tbaeyens/modules/config/src/main/files/build.xml 2009-03-04 16:56:46 UTC (rev 4139)
@@ -17,6 +17,10 @@
</condition>
<antcall target="identity.config.files" />
<antcall target="jbpm.configuration.files" />
+ <condition property="is.jdk.logging.included">
+ <equals arg1="${jbpm.config.jdk.logging}" arg2="include" />
+ </condition>
+ <antcall target="jdk.logging" />
</target>
<target name="jbpm.hibernate.cfg.xml">
@@ -106,11 +110,16 @@
</filelist>
</concat>
</target>
-
+
+ <target name="jdk.logging" if="is.jdk.logging.included">
+ <copy todir="${jbpm.config.dest.dir}">
+ <fileset dir="${jbpm.config.tmp.dir}/jdk" />
+ </copy>
+ </target>
+
<target name="clean">
<delete dir="${jbpm.config.tmp.dir}" />
<delete dir="${jbpm.config.dest.dir}" />
</target>
-
-
-</project>
\ No newline at end of file
+
+</project>
Added: jbpm4/branches/tbaeyens/modules/config/src/main/files/jdk/logging.properties
===================================================================
--- jbpm4/branches/tbaeyens/modules/config/src/main/files/jdk/logging.properties (rev 0)
+++ jbpm4/branches/tbaeyens/modules/config/src/main/files/jdk/logging.properties 2009-03-04 16:56:46 UTC (rev 4139)
@@ -0,0 +1,18 @@
+handlers= java.util.logging.ConsoleHandler
+redirect.commons.logging = enabled
+
+java.util.logging.ConsoleHandler.level = FINE
+java.util.logging.ConsoleHandler.formatter = org.jbpm.internal.log.LogFormatter
+
+org.jbpm.level=FINE
+# org.jbpm.pvm.internal.tx.level=FINE
+# org.jbpm.pvm.internal.wire.level=FINE
+# org.jbpm.pvm.internal.util.level=FINE
+
+org.hibernate.level=INFO
+org.hibernate.cfg.SettingsFactory.level=SEVERE
+org.hibernate.cfg.HbmBinder.level=SEVERE
+# org.hibernate.SQL.level=FINEST
+# org.hibernate.type.level=FINEST
+# org.hibernate.tool.hbm2ddl.SchemaExport.level=FINEST
+# org.hibernate.transaction.level=FINEST
\ No newline at end of file
Modified: jbpm4/branches/tbaeyens/modules/distro/.settings/attachedFile.properties
===================================================================
--- jbpm4/branches/tbaeyens/modules/distro/.settings/attachedFile.properties 2009-03-04 15:24:38 UTC (rev 4138)
+++ jbpm4/branches/tbaeyens/modules/distro/.settings/attachedFile.properties 2009-03-04 16:56:46 UTC (rev 4139)
@@ -1,2 +1,2 @@
## index of importer -> set(imports)
-#Wed Mar 04 15:45:37 CET 2009
+#Wed Mar 04 17:02:43 CET 2009
Added: jbpm4/branches/tbaeyens/modules/examples/src/test/resources/META-INF/persistence.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/examples/src/test/resources/META-INF/persistence.xml (rev 0)
+++ jbpm4/branches/tbaeyens/modules/examples/src/test/resources/META-INF/persistence.xml 2009-03-04 16:56:46 UTC (rev 4139)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<persistence xmlns="http://java.sun.com/xml/ns/persistence"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
+ http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
+ version="1.0">
+
+ <persistence-unit name="jboss-identity-jbpm" transaction-type="RESOURCE_LOCAL">
+
+ <provider>org.hibernate.ejb.HibernatePersistence</provider>
+
+ <class>org.jboss.identity.idm.impl.model.hibernate.HibernateRealm</class>
+ <class>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObject</class>
+ <class>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectCredential</class>
+ <class>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectCredentialType</class>
+ <class>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectAttribute</class>
+ <class>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectType</class>
+ <class>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationship</class>
+ <class>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipType</class>
+ <class>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipName</class>
+
+ <exclude-unlisted-classes>true</exclude-unlisted-classes>
+
+ <properties>
+ <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect" />
+ <property name="hibernate.connection.driver_class" value="org.hsqldb.jdbcDriver" />
+ <property name="hibernate.connection.url" value="jdbc:hsqldb:mem:." />
+ <property name="hibernate.connection.username" value="sa" />
+ <property name="hibernate.connection.password" value="" />
+ <property name="hibernate.hbm2ddl.auto" value="create-drop" />
+ </properties>
+
+ </persistence-unit>
+
+</persistence>
\ No newline at end of file
Property changes on: jbpm4/branches/tbaeyens/modules/examples/src/test/resources/META-INF/persistence.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.cache.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.cache.xml (rev 0)
+++ jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.cache.xml 2009-03-04 16:56:46 UTC (rev 4139)
@@ -0,0 +1,39 @@
+<hibernate-cache>
+
+ <class-cache class="org.jbpm.pvm.internal.model.ProcessDefinitionImpl" />
+ <class-cache class="org.jbpm.pvm.internal.model.ActivityImpl" />
+ <class-cache class="org.jbpm.pvm.internal.model.TransitionImpl" />
+ <class-cache class="org.jbpm.pvm.internal.model.EventImpl" />
+ <class-cache class="org.jbpm.pvm.internal.model.ExceptionHandlerImpl" />
+ <class-cache class="org.jbpm.pvm.internal.model.ObjectReference" />
+ <class-cache class="org.jbpm.pvm.internal.model.VariableDefinitionImpl" />
+ <class-cache class="org.jbpm.pvm.internal.model.TimerDefinitionImpl" />
+ <class-cache class="org.jbpm.pvm.internal.wire.descriptor.AbstractDescriptor" />
+
+ <collection-cache collection="org.jbpm.pvm.internal.model.ProcessDefinitionImpl.exceptionHandlers" />
+ <collection-cache collection="org.jbpm.pvm.internal.model.ProcessDefinitionImpl.events" />
+ <collection-cache collection="org.jbpm.pvm.internal.model.ProcessDefinitionImpl.activities" />
+ <collection-cache collection="org.jbpm.pvm.internal.model.ProcessDefinitionImpl.variableDefinitions" />
+ <collection-cache collection="org.jbpm.pvm.internal.model.ProcessDefinitionImpl.timerDefinitions" />
+ <collection-cache collection="org.jbpm.pvm.internal.model.ProcessDefinitionImpl.attachments" />
+
+ <collection-cache collection="org.jbpm.pvm.internal.model.ActivityImpl.exceptionHandlers" />
+ <collection-cache collection="org.jbpm.pvm.internal.model.ActivityImpl.events" />
+ <collection-cache collection="org.jbpm.pvm.internal.model.ActivityImpl.activities" />
+ <collection-cache collection="org.jbpm.pvm.internal.model.ActivityImpl.variableDefinitions" />
+ <collection-cache collection="org.jbpm.pvm.internal.model.ActivityImpl.timerDefinitions" />
+ <collection-cache collection="org.jbpm.pvm.internal.model.ActivityImpl.incomingTransitions" />
+ <collection-cache collection="org.jbpm.pvm.internal.model.ActivityImpl.outgoingTransitions" />
+
+ <collection-cache collection="org.jbpm.pvm.internal.model.TransitionImpl.exceptionHandlers" />
+ <collection-cache collection="org.jbpm.pvm.internal.model.TransitionImpl.events" />
+
+ <collection-cache collection="org.jbpm.pvm.internal.model.EventImpl.exceptionHandlers" />
+ <collection-cache collection="org.jbpm.pvm.internal.model.EventImpl.listenerReferences" />
+
+ <collection-cache collection="org.jbpm.pvm.internal.model.ExceptionHandlerImpl.eventListenerReferences" />
+
+ <collection-cache collection="org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor.argDescriptors" />
+ <collection-cache collection="org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor.operations" />
+
+</hibernate-cache>
Property changes on: jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.cache.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.cfg.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.cfg.xml 2009-03-04 15:24:38 UTC (rev 4138)
+++ jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.cfg.xml 2009-03-04 16:56:46 UTC (rev 4139)
@@ -4,47 +4,50 @@
<process-engine-context>
- <deployer-manager>
- <assign-file-type>
- <file extension=".jpdl.xml" type="jpdl" />
- </assign-file-type>
- <parse-jpdl />
- <check-process />
- <check-problems />
- <save />
- </deployer-manager>
-
<process-service />
<execution-service />
<history-service />
<management-service />
<task-service />
-
+ <identity-service />
+
<command-service>
<retry-interceptor />
<environment-interceptor />
<standard-transaction-interceptor />
</command-service>
- <hibernate-configuration resource="examples-hibernate.cfg.xml">
- <cache-configuration resource="jbpm.pvm.cache.xml"
+ <hibernate-configuration>
+ <cfg resource="jbpm.hibernate.cfg.xml" />
+ <cache-configuration resource="jbpm.cache.xml"
usage="nonstrict-read-write" />
</hibernate-configuration>
-
+
<hibernate-session-factory />
-
+
+ <identity-session-factory resource="jbpm.identity.cfg.xml" />
+
+ <deployer-manager>
+ <assign-file-type>
+ <file extension=".jpdl.xml" type="jpdl" />
+ </assign-file-type>
+ <parse-jpdl />
+ <check-process />
+ <check-problems />
+ <save />
+ </deployer-manager>
+
<script-manager default-expression-language="juel"
default-script-language="juel"
read-contexts="execution, environment, process-engine"
write-context="">
<script-language name="juel" factory="com.sun.script.juel.JuelScriptEngineFactory" />
</script-manager>
-
+
<job-executor auto-start="false" />
- <job-test-helper />
<id-generator />
- <types resource="jbpm.pvm.types.xml" />
+ <types resource="jbpm.variable.types.xml" />
<business-calendar>
<monday hours="9:00-12:00 and 12:30-17:00"/>
@@ -66,6 +69,7 @@
<message-session />
<timer-session />
<history-session />
+ <identity-session realm="realm://jbpm-identity" />
</transaction-context>
</jbpm-configuration>
Added: jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.definition.hbm.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.definition.hbm.xml (rev 0)
+++ jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.definition.hbm.xml 2009-03-04 16:56:46 UTC (rev 4139)
@@ -0,0 +1,641 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping package="org.jbpm.pvm.internal.model" default-access="field">
+
+ <!-- ### PROCESS DEFINITION ############################################# -->
+ <class name="ProcessDefinitionImpl" table="JBPM_PROCESS">
+ <!-- ProcessElementImpl part ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <id name="dbid" column="DBID_">
+ <generator class="native" />
+ </id>
+ <version name="dbversion" column="DBVERSION_" />
+ <many-to-one name="properties"
+ class="WireProperties"
+ column="PROPS_"
+ foreign-key="FK_PROCDEF_PROPS"
+ index="IDX_PROCDEF_PROPS"
+ cascade="all" />
+ <list name="exceptionHandlers" cascade="all">
+ <key foreign-key="FK_EXHDLR_PROCESS">
+ <column name="PROCESS_" index="IDX_EXHDLR_PROCESS"/>
+ </key>
+ <index column="PROCESS_IDX_" />
+ <one-to-many class="ExceptionHandlerImpl"/>
+ </list>
+
+ <!-- ObservableElementImpl part ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <property name="name" column="NAME_" />
+ <property name="description" column="DESCR_" />
+ <map name="events" cascade="all-delete-orphan">
+ <key foreign-key="FK_EVENT_PROCESS">
+ <column name="PROCESS_" index="IDX_EVENT_PROCESS" />
+ </key>
+ <map-key type="string" column="NAME_" />
+ <one-to-many class="org.jbpm.pvm.internal.model.EventImpl"/>
+ </map>
+
+ <!-- CompositeElementImpl part ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <list name="activities" cascade="all" inverse="false">
+ <key foreign-key="FK_ACTS_PROCESS">
+ <column name="ACTSPROCESS_" index="IDX_ACTS_PROCESS"/>
+ </key>
+ <list-index column="ACTSPROCESS_IDX_" />
+ <one-to-many class="ActivityImpl" />
+ </list>
+ <property name="hasVariableDefinitions" column="HAS_VAR_DEF_" />
+ <list name="variableDefinitions" cascade="all">
+ <key foreign-key="FK_VARDEF_PROCESS">
+ <column name="PROCESS_" index="IDX_VARDEF_PROCESS"/>
+ </key>
+ <index column="PROCESS_IDX_" />
+ <one-to-many class="VariableDefinitionImpl" />
+ </list>
+ <property name="hasTimerDefinitions" column="HAS_TIMER_DEF_" />
+ <set name="timerDefinitions" cascade="all">
+ <key foreign-key="FK_TMRDEF_PROCESS">
+ <column name="PROCESS_" index="IDX_TMRDEF_PROCESS"/>
+ </key>
+ <one-to-many class="TimerDefinitionImpl" />
+ </set>
+
+ <!-- ProcessDefinitionImpl part ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <property name="key" column="KEY_" />
+ <property name="id" column="ID_" unique="true" />
+
+ <property name="packageName" column="PACKAGE_" />
+ <property name="version" column="VERSION_" />
+ <property name="deploymentTime" column="DEPLOYED_" />
+ <many-to-one name="initial"
+ column="INITIAL_"
+ class="ActivityImpl"
+ cascade="all"
+ foreign-key="FK_PROCDEF_INITIAL"
+ index="IDX_PROCDEF_INIT"
+ fetch="select" />
+
+ <map name="attachments" cascade="all-delete-orphan">
+ <key foreign-key="FK_LOB_PROCESS">
+ <column name="PROCESS_" index="IDX_LOB_PROCESS" />
+ </key>
+ <map-key type="string" column="NAME_" />
+ <one-to-many class="org.jbpm.pvm.internal.lob.Lob"/>
+ </map>
+ </class>
+
+ <!-- ### Activity ############################################################## -->
+ <class name="ActivityImpl" table="JBPM_ACTIVITY">
+ <!-- ProcessElementImpl part ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <id name="dbid" column="DBID_">
+ <generator class="native" />
+ </id>
+ <version name="dbversion" column="DBVERSION_" />
+ <many-to-one name="processDefinition"
+ class="ProcessDefinitionImpl"
+ column="PROCESS_"
+ foreign-key="FK_ACT_PROCESS"
+ index="IDX_ACT_PROCESS" />
+ <many-to-one name="properties"
+ class="WireProperties"
+ column="PROPS_"
+ foreign-key="FK_ACT_PROPS"
+ index="IDX_ACT_PROPS"
+ cascade="all" />
+ <list name="exceptionHandlers" cascade="all">
+ <key foreign-key="FK_EXHDLR_ACT">
+ <column name="ACT_" index="IDX_EXHDLR_ACT"/>
+ </key>
+ <index column="ACT_IDX_" />
+ <one-to-many class="ExceptionHandlerImpl" />
+ </list>
+
+ <!-- ObservableElementImpl part ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <property name="name" column="NAME_"/>
+ <property name="description" column="DESCR_"/>
+ <map name="events" cascade="all-delete-orphan">
+ <key foreign-key="FK_EVENT_ACT">
+ <column name="ACT_" index="IDX_EVENT_ACT" />
+ </key>
+ <map-key type="string" column="NAME_" />
+ <one-to-many class="org.jbpm.pvm.internal.model.EventImpl" />
+ </map>
+
+ <!-- CompositeElementImpl part ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <list name="activities" cascade="all" inverse="false">
+ <key column="PARENT_" foreign-key="none" />
+ <list-index column="PARENT_IDX_" />
+ <one-to-many class="ActivityImpl" />
+ </list>
+ <property name="hasVariableDefinitions" column="HAS_VAR_DEF_" />
+ <list name="variableDefinitions" cascade="all">
+ <key foreign-key="FK_VARDEF_ACT">
+ <column name="ACT_" index="IDX_VARDEF_ACT"/>
+ </key>
+ <index column="ACT_IDX_" />
+ <one-to-many class="VariableDefinitionImpl" />
+ </list>
+ <property name="hasTimerDefinitions" column="HAS_TIMER_DEF_" />
+ <set name="timerDefinitions" cascade="all">
+ <key foreign-key="FK_TMRDEF_ACT">
+ <column name="ACT_" index="IDX_TMRDEF_ACT"/>
+ </key>
+ <one-to-many class="TimerDefinitionImpl" />
+ </set>
+
+ <!-- ActivityImpl part ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <property name="isLocalScope" column="LOCAL_SCOPE_" />
+ <property name="isExecutionAsync" column="EXEC_ASYNC_" />
+ <property name="isSignalAsync" column="SIGNAL_ASYNC_" />
+ <property name="isPreviousNeeded" column="PREV_NEEDED_" />
+
+ <many-to-one name="parentActivity"
+ column="PARENT_"
+ class="ActivityImpl"
+ cascade="all"
+ foreign-key="FK_ACT_PARENT"
+ index="IDX_ACT_PARENT" />
+
+ <many-to-one name="defaultTransition"
+ column="DEFTRANS_"
+ class="TransitionImpl"
+ fetch="select"
+ foreign-key="FK_ACT_DEFTRANS"
+ index="IDX_ACT_DEFTRANS" />
+
+ <list name="incomingTransitions" inverse="false">
+ <key column="DESTINATION_" />
+ <index column="IN_IDX_" />
+ <one-to-many class="TransitionImpl" />
+ </list>
+
+ <list name="outgoingTransitions" inverse="false" cascade="all">
+ <key column="SOURCE_" />
+ <index column="OUT_IDX_" />
+ <one-to-many class="TransitionImpl" />
+ </list>
+
+ <component name="behaviourReference" class="ObjectReference">
+ <many-to-one name="descriptor"
+ column="BEHAV_DESCR_"
+ cascade="all"
+ class="org.jbpm.pvm.internal.wire.descriptor.AbstractDescriptor"
+ foreign-key="FK_NODE_BEHAV_DESCR"
+ index="IDX_NODE_BEHAV_DESCR" />
+ <any name="object" id-type="long" cascade="all">
+ <!-- TODO: Specify names for classes -->
+ <!-- <meta-value value="bpel::activity" class="org.jbpm.pvm.bpel.BpelActivity"/> -->
+ <column name="BEHAV_CLASS_" />
+ <column name="BEHAV_ID_" />
+ </any>
+ </component>
+ </class>
+
+ <!-- ### TRANSITION ##################################################### -->
+ <class name="TransitionImpl" table="JBPM_TRANSITION">
+ <!-- ProcessElementImpl part ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <id name="dbid" column="DBID_">
+ <generator class="native" />
+ </id>
+ <version name="dbversion" column="DBVERSION_" />
+ <many-to-one name="processDefinition"
+ class="ProcessDefinitionImpl"
+ column="PROCESS_"
+ foreign-key="FK_TRANS_PROCDEF"
+ index="IDX_TRANS_PROCDEF" />
+ <many-to-one name="properties"
+ class="WireProperties"
+ column="PROPS_"
+ foreign-key="FK_TRANS_PROPS"
+ index="IDX_TRANS_PROPS"
+ cascade="all" />
+ <list name="exceptionHandlers" cascade="all">
+ <key foreign-key="FK_EXHDLR_TRANS">
+ <column name="TRANSITION_" index="IDX_EXHDLR_TRANS" />
+ </key>
+ <index column="TRANSITION_IDX_" />
+ <one-to-many class="ExceptionHandlerImpl" />
+ </list>
+
+ <!-- ObservableElementImpl part ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <property name="name" column="NAME_" />
+ <property name="description" column="DESCR_" />
+ <map name="events" cascade="all-delete-orphan">
+ <key foreign-key="FK_EVENT_TRANS">
+ <column name="TRANSITION_" index="IDX_EVENT_TRANS" />
+ </key>
+ <map-key type="string" column="NAME_" />
+ <one-to-many class="org.jbpm.pvm.internal.model.EventImpl" />
+ </map>
+
+ <!-- TransitionImpl part ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <many-to-one name="source"
+ column="SRC_"
+ class="ActivityImpl"
+ fetch="select"
+ foreign-key="FK_TRANS_SRC"
+ index="IDX_TRANS_SRC" />
+
+ <many-to-one name="destination"
+ column="DEST_"
+ class="ActivityImpl"
+ fetch="select"
+ cascade="all"
+ foreign-key="FK_TRANS_DST"
+ index="IDX_TRANS_DST" />
+
+ <many-to-one name="conditionDescriptor"
+ column="COND_DESCR_"
+ class="org.jbpm.pvm.internal.wire.descriptor.AbstractDescriptor"
+ cascade="all"
+ foreign-key="FK_TRANS_COND"
+ index="IDX_TRANS_COND" />
+
+ <!--
+ <many-to-one name="waitConditionDescriptor"
+ column="WAIT_DESCR_"
+ class="org.jbpm.pvm.internal.wire.descriptor.AbstractDescriptor"
+ cascade="all"
+ foreign-key="FK_TRANS_WAIT_DESCR"
+ index="IDX_TRANS_WAIT_DESCR" />
+ -->
+
+ <property name="isTakeAsync" column="TAKEASYNC_" />
+ </class>
+
+ <!-- ### EVENT ########################################################## -->
+ <class name="EventImpl" table="JBPM_EVENT">
+ <!-- ProcessElementImpl part ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <id name="dbid" column="DBID_">
+ <generator class="native" />
+ </id>
+ <version name="dbversion" column="DBVERSION_" />
+ <many-to-one name="processDefinition"
+ class="ProcessDefinitionImpl"
+ column="PROCESSDEF_"
+ foreign-key="FK_EVENT_PROCDEF"
+ index="IDX_EVENT_PROCDEF" />
+ <many-to-one name="properties"
+ class="WireProperties"
+ column="PROPS_"
+ foreign-key="FK_EVENT_PROPS"
+ index="IDX_EVENT_PROPS"
+ cascade="all" />
+ <list name="exceptionHandlers" cascade="all">
+ <key foreign-key="FK_EXHDLR_EVENT">
+ <column name="EVENT_" index="IDX_EXHDLR_EVENT"/>
+ </key>
+ <index column="EVENT_IDX_" />
+ <one-to-many class="ExceptionHandlerImpl" />
+ </list>
+
+ <!-- EventImpl part ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <property name="name" column="NAME_" />
+ <list name="listenerReferences" table="JBPM_OBJECTREFERENCES" cascade="all-delete-orphan">
+ <key foreign-key="FK_OBJECTREF_EVENT">
+ <column name="EVENT_" index="IDX_OBJREF_EVENT"/>
+ </key>
+ <list-index column="EVENT_IDX_" />
+ <one-to-many class="EventListenerReference" />
+ </list>
+ </class>
+
+ <!-- ### EXCEPTION HANDLER ############################################## -->
+ <class name="ExceptionHandlerImpl" table="JBPM_EXCEPTHNDLR">
+ <id name="dbid" column="DBID_">
+ <generator class="native" />
+ </id>
+ <version name="dbversion" column="DBVERSION_" />
+ <property name="exceptionClassName" column="EXCEPT_CLASS_" />
+ <property name="isTransactional" column="TRANSACT_" />
+ <property name="isRethrowMasked" column="RETHROW_MASKED_"/>
+ <property name="transitionName" column="TRANSITIONNAME_" />
+ <property name="activityName" column="NODENAME_" />
+ <list name="eventListenerReferences"
+ inverse="false"
+ cascade="all-delete-orphan"
+ table="JBPM_OBJECTREFERENCES">
+ <key foreign-key="FK_OBJREF_EXHNDLR" not-null="false">
+ <column name="EXHNDLR_" index="IDX_OBJREF_EXHNDLR" />
+ </key>
+ <list-index column="EXHNDLR_IDX_" />
+ <one-to-many class="ObjectReference" />
+ </list>
+ </class>
+
+ <!-- ### OBJECT REFERENCE ############################################### -->
+ <class name="ObjectReference" discriminator-value="objref" table="JBPM_OBJECTREF">
+ <id name="dbid" column="DBID_">
+ <generator class="native" />
+ </id>
+ <discriminator column="CLASS_" />
+ <version name="dbversion" column="DBVERSION_" />
+ <many-to-one name="descriptor"
+ column="OBJ_DESCR_"
+ class="org.jbpm.pvm.internal.wire.descriptor.AbstractDescriptor"
+ cascade="all"
+ foreign-key="FK_OBJREF_EVENT"
+ index="IDX_OBJREF_EVENT"/>
+ <any name="object" id-type="long" cascade="all">
+ <!-- TODO: Specify names for classes -->
+ <column name="OBJ_CLASS_" />
+ <column name="OBJ_ID_" />
+ </any>
+ <property name="expression" column="OBJ_EXPRESSION_"/>
+ <property name="expressionLanguage" column="OBJ_EXPRLANG_"/>
+
+ <subclass name="EventListenerReference" discriminator-value="evtlis">
+ <property name="isPropagationEnabled" column="PROPAGATE_" />
+ </subclass>
+
+ </class>
+
+ <!-- ### VARIABLE DEFINITION ############################################ -->
+ <class name="VariableDefinitionImpl" table="JBPM_VARIABLEDEF">
+ <id name="dbid" column="DBID_">
+ <generator class="native" />
+ </id>
+ <version name="dbversion" column="DBVERSION_" />
+ <property name="name" column="NAME_"/>
+ <property name="typeName" column="TYPE_"/>
+
+ <property name="inVariableName" column="INVAR_" />
+ <property name="inExpression" column="INEXPR_" />
+ <many-to-one name="inDescriptor"
+ column="INDESCR_"
+ class="org.jbpm.pvm.internal.wire.descriptor.AbstractDescriptor"
+ cascade="all"
+ foreign-key="FK_VARDEF_INDES"
+ index="IDX_VARDEF_INDES"/>
+ <property name="outVariableName" column="OUTVAR_" />
+ <property name="outExpression" column="OUTEXPR_" />
+ </class>
+
+ <!-- ### TIMER DEFINITION ############################################### -->
+ <class name="TimerDefinitionImpl" table="JBPM_TIMERDEF">
+ <id name="dbid" column="DBID_">
+ <generator class="native" />
+ </id>
+ <version name="dbversion" column="DBVERSION_" />
+ <property name="dueDateDescription" column="DUEDATEDESCR_"/>
+ <property name="repeat" column="REPEAT_"/>
+ <property name="isExclusive" column="ISEXCL_"/>
+ <property name="retries" column="RETRIES_"/>
+ <property name="eventName" column="EVENT_"/>
+ <property name="signalName" column="SIGNAL_"/>
+ <property name="dueDate" column="DUEDATE_" type="timestamp"/>
+ </class>
+
+ <!-- ### DESCRIPTORS #################################################### -->
+ <class name="org.jbpm.pvm.internal.wire.descriptor.AbstractDescriptor" table="JBPM_DESCRIPTOR" abstract="true"
+ discriminator-value="abstract">
+ <!--
+ byte : ByteDescriptor
+ string : StringDescriptor
+ char : CharacterDescriptor
+ class : ClassDescriptor
+ double : DoubleDescriptor
+ expr : ExpressionDescriptor
+ float : FloatDescriptor
+ long : LongDescriptor
+ int : IntegerDescriptor
+ short : ShortDescriptor
+ coll : CollectionDescriptor
+ map : MapDescriptor
+ list : ListDescriptor
+ set : SetDescriptor
+ object : ObjectDescriptor
+ ref : ReferenceDescriptor
+ null : NullDescriptor
+ true : TrueDescriptor
+ false : FalseDescriptor
+ provided : ProvidedObjectDescriptor
+ -->
+ <id name="dbid" column="DBID_">
+ <generator class="native" />
+ </id>
+ <discriminator column="CLASS_" />
+ <version name="dbversion" column="DBVERSION_" />
+
+ <property name="name" column="NAME_" />
+ <property name="init" column="INIT_" />
+
+ <subclass name="org.jbpm.pvm.internal.wire.descriptor.NullDescriptor" discriminator-value="null_" />
+ <subclass name="org.jbpm.pvm.internal.wire.descriptor.TrueDescriptor" discriminator-value="true" />
+ <subclass name="org.jbpm.pvm.internal.wire.descriptor.FalseDescriptor" discriminator-value="false" />
+
+ <subclass name="org.jbpm.pvm.internal.wire.descriptor.StringDescriptor" discriminator-value="string">
+ <property name="text" column="TEXT_" />
+ </subclass>
+
+ <subclass name="org.jbpm.pvm.internal.wire.descriptor.CharacterDescriptor" discriminator-value="char">
+ <property name="text" column="TEXT_" />
+ </subclass>
+ <subclass name="org.jbpm.pvm.internal.wire.descriptor.ClassDescriptor" discriminator-value="class">
+ <property name="text" column="TEXT_" />
+ </subclass>
+ <subclass name="org.jbpm.pvm.internal.wire.descriptor.ReferenceDescriptor" discriminator-value="ref">
+ <property name="text" column="TEXT_" />
+ </subclass>
+
+ <subclass name="org.jbpm.pvm.internal.wire.descriptor.DoubleDescriptor" discriminator-value="double">
+ <property name="doubleVal" column="DOUBLEVAL_" />
+ </subclass>
+ <subclass name="org.jbpm.pvm.internal.wire.descriptor.FloatDescriptor" discriminator-value="float">
+ <property name="doubleVal" column="DOUBLEVAL_" />
+ </subclass>
+
+ <subclass name="org.jbpm.pvm.internal.wire.descriptor.LongDescriptor" discriminator-value="long">
+ <property name="longVal" column="LONGVAL_" />
+ </subclass>
+ <subclass name="org.jbpm.pvm.internal.wire.descriptor.IntegerDescriptor" discriminator-value="int">
+ <property name="longVal" column="LONGVAL_" />
+ </subclass>
+ <subclass name="org.jbpm.pvm.internal.wire.descriptor.ShortDescriptor" discriminator-value="short">
+ <property name="longVal" column="LONGVAL_" />
+ </subclass>
+ <subclass name="org.jbpm.pvm.internal.wire.descriptor.ByteDescriptor" discriminator-value="byte">
+ <property name="longVal" column="LONGVAL_" />
+ </subclass>
+
+ <subclass name="org.jbpm.pvm.internal.wire.descriptor.CollectionDescriptor" discriminator-value="coll">
+ <property name="className" column="CLASSNAME_" />
+ <list name="valueDescriptors" cascade="all-delete-orphan">
+ <key foreign-key="FK_DESCR_VALDESCR">
+ <column name="VALUEDESCR_" index="IDX_DESCR_VALDESCR" />
+ </key>
+ <list-index column="VALUEDESCR_IDX_" />
+ <one-to-many class="org.jbpm.pvm.internal.wire.descriptor.AbstractDescriptor" />
+ </list>
+
+ <subclass name="org.jbpm.pvm.internal.wire.descriptor.MapDescriptor" discriminator-value="map">
+ <list name="keyDescriptors" cascade="all-delete-orphan">
+ <key column="KEYDESCR_" foreign-key="FK_DESCR_KEYDESCR" />
+ <list-index column="KEYDESCR_IDX_" />
+ <one-to-many class="org.jbpm.pvm.internal.wire.descriptor.AbstractDescriptor" />
+ </list>
+ </subclass>
+
+ <subclass name="org.jbpm.pvm.internal.wire.descriptor.ListDescriptor" discriminator-value="list" />
+ <subclass name="org.jbpm.pvm.internal.wire.descriptor.SetDescriptor" discriminator-value="set" />
+ </subclass>
+
+
+ <subclass name="org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor" discriminator-value="object">
+ <property name="className" column="TEXT_" />
+ <property name="methodName" column="METHOD_" />
+ <property name="isAutoWireEnabled" column="BOOLVAL_" />
+ <property name="factoryObjectName" column="FACTORYNAME_" />
+
+ <many-to-one name="factoryDescriptor" class="org.jbpm.pvm.internal.wire.descriptor.AbstractDescriptor" column="FACTORYDESCR_"
+ foreign-key="FK_DESCR_ARG_REF" index="IDX_DESCR_ARG_REF" cascade="all" />
+
+ <list name="argDescriptors" cascade="all-delete-orphan">
+ <key foreign-key="FK_OBJARG_DESCR">
+ <column name="OBJARG_DESCR_" index="IDX_OBJARG_DESCR" />
+ </key>
+ <list-index column="OBJARG_DESCR_IDX_" />
+ <one-to-many class="org.jbpm.pvm.internal.wire.descriptor.ArgDescriptor" />
+ </list>
+
+ <list name="operations" cascade="all-delete-orphan">
+ <key foreign-key="FK_OBJOPER_DESCR">
+ <column name="OBJOPER_DESCR_" index="IDX_OBJOPER_DESCR" />
+ </key>
+ <list-index column="OBJOPER_DESCR_IDX_" />
+ <one-to-many class="org.jbpm.pvm.internal.wire.operation.AbstractOperation" />
+ </list>
+ </subclass>
+
+ <subclass name="org.jbpm.pvm.internal.wire.descriptor.ExpressionDescriptor" discriminator-value="expr">
+ <property name="expr" column="TEXT_" />
+ <property name="lang" column="METHOD_" />
+ </subclass>
+
+ <subclass name="org.jbpm.pvm.internal.wire.descriptor.ProvidedObjectDescriptor" discriminator-value="provided">
+ <any name="providedObject" id-type="long" cascade="all">
+ <column name="TEXT_" />
+ <column name="LONGVAL_" />
+ </any>
+ <property name="exposeType" column="BOOLVAL_" />
+ </subclass>
+
+ <subclass name="org.jbpm.pvm.internal.wire.descriptor.EnvDescriptor" discriminator-value="env">
+ <property name="objectName" column="TEXT_" />
+ <property name="typeName" column="CLASSNAME_" />
+ </subclass>
+
+ </class>
+
+ <!-- ### OPERATIONS ##################################################### -->
+ <class name="org.jbpm.pvm.internal.wire.operation.AbstractOperation" abstract="true"
+ table="JBPM_OPERATION" discriminator-value="oper">
+ <id name="dbid" column="DBID_">
+ <generator class="native" />
+ </id>
+ <discriminator column="CLASS_" />
+ <version name="dbversion" column="DBVERSION_" />
+
+ <subclass name="org.jbpm.pvm.internal.wire.operation.FieldOperation"
+ discriminator-value="field">
+ <property name="fieldName" column="TEXT_" />
+ <many-to-one name="descriptor" column="DESCR_" cascade="all"
+ class="org.jbpm.pvm.internal.wire.descriptor.AbstractDescriptor"
+ foreign-key="FK_OPER_DESC" index="IDX_OPER_DESC" />
+ </subclass>
+
+ <subclass name="org.jbpm.pvm.internal.wire.operation.PropertyOperation"
+ discriminator-value="prop">
+ <property name="setterName" column="TEXT_" />
+ <many-to-one name="descriptor" column="DESCR_" cascade="all"
+ class="org.jbpm.pvm.internal.wire.descriptor.AbstractDescriptor" />
+ </subclass>
+
+ <subclass name="org.jbpm.pvm.internal.wire.operation.InvokeOperation"
+ discriminator-value="invoke">
+ <property name="methodName" column="TEXT_" />
+ <list name="argDescriptors" cascade="all-delete-orphan">
+ <key foreign-key="FK_ARGDSCR_OPER">
+ <column name="OPER_" index="IDX_ARGDSCR_OPER" />
+ </key>
+ <list-index column="OPER_IDX_" />
+ <one-to-many class="org.jbpm.pvm.internal.wire.descriptor.ArgDescriptor" />
+ </list>
+ </subclass>
+ </class>
+
+ <!-- ### ARG DESCRIPTOR ################################################# -->
+ <class name="org.jbpm.pvm.internal.wire.descriptor.ArgDescriptor" table="JBPM_ARGDESCRIPTOR">
+ <id name="dbid" column="DBID_">
+ <generator class="native" />
+ </id>
+ <version name="dbversion" column="DBVERSION_" />
+ <property name="typeName" column="TYPENAME_" />
+ <many-to-one name="descriptor" column="DESCRIPTOR_"
+ class="org.jbpm.pvm.internal.wire.descriptor.AbstractDescriptor"
+ foreign-key="FK_ARGDESCR_DESCR" index="IDX_ARGDESCR_DESCR" cascade="all" />
+ </class>
+
+ <!-- ### PROPERTIES ##################################################### -->
+ <class name="org.jbpm.pvm.internal.model.WireProperties" table="JBPM_WIREPROPS">
+ <id name="dbid" column="DBID_">
+ <generator class="native" />
+ </id>
+ <version name="dbversion" column="DBVERSION_" />
+ <component name="wireContext" class="org.jbpm.pvm.internal.wire.WireContext">
+ <component name="wireDefinition" class="org.jbpm.pvm.internal.wire.WireDefinition">
+ <map name="descriptors" cascade="all-delete-orphan" lazy="false">
+ <key foreign-key="FK_DESCR_PROPS">
+ <column name="PROPS_" index="IDX_DESCR_PROPS" />
+ </key>
+ <map-key type="string" column="NAME_" />
+ <one-to-many class="org.jbpm.pvm.internal.wire.descriptor.AbstractDescriptor" />
+ </map>
+ </component>
+ </component>
+ </class>
+
+
+ <!-- ### QUERIES ######################################################## -->
+
+ <query name="findProcessDefinitionKeys">
+ <![CDATA[
+ select distinct process.key
+ from org.jbpm.pvm.internal.model.ProcessDefinitionImpl as process
+ order by process.key asc
+ ]]>
+ </query>
+
+ <query name="findProcessDefinitionsByKey">
+ <![CDATA[
+ select process
+ from org.jbpm.pvm.internal.model.ProcessDefinitionImpl as process
+ where process.key = :key
+ order by process.version desc
+ ]]>
+ </query>
+
+ <query name="findProcessDefinitionById">
+ <![CDATA[
+ select process
+ from org.jbpm.pvm.internal.model.ProcessDefinitionImpl as process
+ where process.id = :id
+ ]]>
+ </query>
+
+ <query name="findProcessDefinitionKeysByName">
+ <![CDATA[
+ select process.key
+ from org.jbpm.pvm.internal.model.ProcessDefinitionImpl as process
+ where process.name = :name
+ ]]>
+ </query>
+
+ <query name="findProcessDefinitionNamesByKey">
+ <![CDATA[
+ select process.name
+ from org.jbpm.pvm.internal.model.ProcessDefinitionImpl as process
+ where process.key = :key
+ ]]>
+ </query>
+
+</hibernate-mapping>
\ No newline at end of file
Property changes on: jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.definition.hbm.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.execution.hbm.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.execution.hbm.xml (rev 0)
+++ jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.execution.hbm.xml 2009-03-04 16:56:46 UTC (rev 4139)
@@ -0,0 +1,375 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping package="org.jbpm.pvm.internal.model" default-access="field">
+
+ <!-- ### TYPEDEFS ####################################################### -->
+ <typedef name="converter" class="org.jbpm.pvm.internal.hibernate.ConverterType">
+ <param name="org.jbpm.pvm.internal.type.converter.BooleanToStringConverter" >bool-str</param>
+ <param name="org.jbpm.pvm.internal.type.converter.ByteToLongConverter" >byte-long</param>
+ <param name="org.jbpm.pvm.internal.type.converter.CharacterToStringConverter" >char-str</param>
+ <param name="org.jbpm.pvm.internal.type.converter.DateToLongConverter" >date-long</param>
+ <param name="org.jbpm.pvm.internal.type.converter.DateToStringConverter" >date-str</param>
+ <param name="org.jbpm.pvm.internal.type.converter.DoubleToStringConverter" >double-str</param>
+ <param name="org.jbpm.pvm.internal.type.converter.FloatToDoubleConverter" >float-double</param>
+ <param name="org.jbpm.pvm.internal.type.converter.FloatToStringConverter" >float-str</param>
+ <param name="org.jbpm.pvm.internal.type.converter.IntegerToLongConverter" >int-long</param>
+ <param name="org.jbpm.pvm.internal.type.converter.SerializableToBytesConverter">ser-bytes</param>
+ <param name="org.jbpm.pvm.internal.type.converter.ShortToLongConverter" >short-long</param>
+ </typedef>
+
+ <!-- ### PROCESS DEFINITION ############################################# -->
+ <class name="ExecutionImpl" table="JBPM_EXECUTION">
+ <id name="dbid" column="DBID_">
+ <generator class="native" />
+ </id>
+ <version name="dbversion" column="DBVERSION_" />
+
+ <many-to-one name="activity"
+ class="org.jbpm.pvm.internal.model.ActivityImpl"
+ column="ACT_"
+ lazy="false"
+ foreign-key="FK_EXEC_ACT"
+ index="IDX_EXEC_ACT" />
+
+ <property name="hasVariables" column="HASVARS_" />
+ <map name="variables"
+ cascade="all-delete-orphan"
+ table="JBPM_VARIABLE">
+ <key foreign-key="FK_VAR_EXECUTION">
+ <column name="EXECUTION_" index="IDX_VAR_EXECUTION"/>
+ </key>
+ <map-key type="string" column="KEY_" />
+ <one-to-many class="org.jbpm.pvm.internal.type.Variable" />
+ </map>
+
+ <property name="hasTimers" column="HASTIMERS_" />
+ <set name="timers"
+ cascade="all-delete-orphan">
+ <key foreign-key="FK_TMR_EXECUTION">
+ <column name="EXECUTION_" />
+ </key>
+ <one-to-many class="org.jbpm.pvm.internal.job.TimerImpl" />
+ </set>
+
+ <property name="name" column="NAME_" />
+ <property name="key" column="KEY_" />
+ <property name="id" column="ID_" unique="true" />
+
+ <property name="state" column="STATE_" />
+
+ <property name="priority" column="PRIORITY_" />
+ <property name="historyActivityInstanceDbid" column="HISACTINST_" />
+
+ <many-to-one name="processDefinition"
+ class="org.jbpm.pvm.internal.model.ProcessDefinitionImpl"
+ column="PROCESS_"
+ foreign-key="FK_EXEC_PROCESS"
+ index="IDX_EXEC_PROCESS" />
+
+ <many-to-one name="transition" column="TRANSITION_" class="TransitionImpl" />
+
+ <many-to-one name="transitionOrigin"
+ class="org.jbpm.pvm.internal.model.ActivityImpl"
+ column="TRANSORIG_"
+ foreign-key="FK_EXEC_TRANSORIG"
+ index="IDX_EXEC_TRANSORIG" />
+
+ <list name="executions"
+ cascade="all-delete-orphan"
+ inverse="false">
+ <key column="PARENT_" foreign-key="FK_EXEC_PARENT" />
+ <list-index column="PARENT_IDX_" />
+ <one-to-many class="ExecutionImpl" />
+ </list>
+
+ <many-to-one name="parent"
+ column="PARENT_"
+ class="ExecutionImpl"
+ foreign-key="FK_EXEC_PARENT"
+ index="IDX_EXEC_PARENT" />
+
+ <many-to-one name="processInstance"
+ class="ExecutionImpl"
+ column="INSTANCE_"
+ foreign-key="FK_EXEC_INSTANCE"
+ index="IDX_EXEC_INSTANCE" />
+
+ <many-to-one name="superProcessExecution"
+ column="SUPEREXEC_"
+ class="ExecutionImpl"
+ foreign-key="FK_EXEC_SUPEREXEC"
+ index="IDX_EXEC_SUPEREXEC" />
+ </class>
+
+ <!-- ### COMMENTS ####################################################### -->
+ <class name="CommentImpl" table="JBPM_COMMENT">
+ <id name="dbid" column="DBID_">
+ <generator class="native" />
+ </id>
+ <discriminator column="CLASS_" />
+ <version name="dbversion" column="DBVERSION_" />
+
+ <property name="userId" column="USERID_" />
+ <property name="time" column="TIME_" />
+ <property name="message" column="MESSAGE_" />
+
+ <list name="comments"
+ cascade="all-delete-orphan"
+ inverse="false">
+ <key column="PARENT_" foreign-key="none" />
+ <list-index column="PARENT_IDX_" />
+ <one-to-many class="CommentImpl" />
+ </list>
+ </class>
+
+ <!-- ### VARIABLE ####################################################### -->
+ <class name="org.jbpm.pvm.internal.type.Variable" abstract="true" discriminator-value=" " table="JBPM_VARIABLE">
+ <!-- discriminator values:
+ date : org.jbpm.pvm.internal.type.variable.DateVariable
+ double : org.jbpm.pvm.internal.type.variable.DoubleVariable
+ hibl : org.jbpm.pvm.internal.type.variable.HibernateLongVariable
+ long : org.jbpm.pvm.internal.type.variable.LongVariable
+ hibs : org.jbpm.pvm.internal.type.variable.HibernateStringVariable
+ string : org.jbpm.pvm.internal.type.variable.StringVariable
+ null : org.jbpm.pvm.internal.type.variable.NullVariable
+ blob : org.jbpm.pvm.internal.type.variable.BlobVariable
+ clob : org.jbpm.pvm.internal.type.variable.ClobVariable
+ -->
+
+ <id name="dbid" column="DBID_">
+ <generator class="native" />
+ </id>
+ <discriminator column="CLASS_"/>
+ <version name="dbversion" column="DBVERSION_" />
+
+ <property name="key" column="KEY_"/>
+ <property name="queryText" column="QUERYTEXT_" />
+ <property name="converter" type="converter" column="CONVERTER_" />
+ <many-to-one name="processInstance"
+ column="PROCINST_"
+ class="org.jbpm.pvm.internal.model.ExecutionImpl"
+ foreign-key="FK_VAR_PROCINST"
+ index="IDX_VAR_PROCINST"/>
+ </class>
+
+ <subclass name="org.jbpm.pvm.internal.type.variable.DateVariable" extends="org.jbpm.pvm.internal.type.Variable" discriminator-value="T">
+ <property name="date" column="DATE_VALUE_" type="timestamp"/>
+ </subclass>
+
+ <subclass name="org.jbpm.pvm.internal.type.variable.DoubleVariable" extends="org.jbpm.pvm.internal.type.Variable" discriminator-value="D">
+ <property name="d" column="DOUBLE_VALUE_" type="double"/>
+ </subclass>
+
+ <subclass name="org.jbpm.pvm.internal.type.variable.HibernateLongVariable" extends="org.jbpm.pvm.internal.type.Variable" discriminator-value="l">
+ <property name="hibernatable" column="LONG_VALUE_" type="long"/>
+ </subclass>
+
+ <subclass name="org.jbpm.pvm.internal.type.variable.LongVariable" extends="org.jbpm.pvm.internal.type.Variable" discriminator-value="L">
+ <property name="l" column="LONG_VALUE_" type="long"/>
+ </subclass>
+
+ <subclass name="org.jbpm.pvm.internal.type.variable.HibernateStringVariable" extends="org.jbpm.pvm.internal.type.Variable" discriminator-value="s">
+ <property name="hibernatable" column="STRING_VALUE_" type="string"/>
+ </subclass>
+
+ <subclass name="org.jbpm.pvm.internal.type.variable.StringVariable" extends="org.jbpm.pvm.internal.type.Variable" discriminator-value="S">
+ <property name="string" column="STRING_VALUE_" type="string"/>
+ </subclass>
+
+ <subclass name="org.jbpm.pvm.internal.type.variable.NullVariable" extends="org.jbpm.pvm.internal.type.Variable" discriminator-value="N">
+ </subclass>
+
+ <subclass name="org.jbpm.pvm.internal.type.variable.BlobVariable" extends="org.jbpm.pvm.internal.type.Variable" discriminator-value="B">
+ <many-to-one name="lob"
+ column="LOB_"
+ cascade="all"
+ class="org.jbpm.pvm.internal.lob.Lob"
+ foreign-key="FK_VAR_LOB"
+ index="IDX_VAR_LOB" />
+ </subclass>
+
+ <subclass name="org.jbpm.pvm.internal.type.variable.ClobVariable" extends="org.jbpm.pvm.internal.type.Variable" discriminator-value="C">
+ <many-to-one name="lob"
+ column="LOB_"
+ cascade="all"
+ class="org.jbpm.pvm.internal.lob.Lob"
+ foreign-key="none"/>
+ </subclass>
+
+ <!-- ### LOB ############################################################ -->
+ <class name="org.jbpm.pvm.internal.lob.Lob" table="JBPM_LOB">
+ <id name="dbid" column="DBID_">
+ <generator class="native" />
+ </id>
+ <version name="dbversion" column="DBVERSION_" />
+ <property name="blob" type="blob" column="BLOB_VALUE_" />
+ <property name="bytes" type="binary" column="BINARY_VALUE_"/>
+ <property name="clob" type="clob" column="CLOB_VALUE_" />
+ <property name="text" type="text" column="TEXT_VALUE_"/>
+ </class>
+
+ <class name="org.jbpm.pvm.internal.job.JobImpl" table="JBPM_JOB" discriminator-value="Job">
+ <id name="dbid" column="DBID_">
+ <generator class="native" />
+ </id>
+ <discriminator column="CLASS_" />
+ <version name="dbversion" column="DBVERSION_" />
+
+ <property name="dueDate" column="DUEDATE_" type="timestamp" index="IDX_JOBDUEDATE" />
+ <property name="isSuspended" column="ISSUSPENDED_" />
+ <property name="isExclusive" column="ISEXCLUSIVE_" />
+ <property name="lockOwner" column="LOCKOWNER_" />
+ <property name="lockExpirationTime" column="LOCKEXPTIME_" index="IDX_JOBLOCKEXP" />
+ <property name="info" column="INFO_" />
+ <property name="exception" column="EXCEPTION_" type="text" />
+ <property name="retries" column="RETRIES_" index="IDX_JOBRETRIES" />
+
+ <many-to-one name="processInstance"
+ class="org.jbpm.pvm.internal.model.ExecutionImpl"
+ column="PROCESSINSTANCE_"
+ cascade="none"
+ foreign-key="FK_JOB_PRINST"
+ index="IDX_JOB_PRINST"/>
+ <many-to-one name="execution"
+ class="org.jbpm.pvm.internal.model.ExecutionImpl"
+ column="EXECUTION_"
+ cascade="none"
+ foreign-key="FK_JOB_EXE"
+ index="IDX_JOB_EXE"/>
+ <many-to-one name="commandDescriptor"
+ column="CMDDESCR_"
+ class="org.jbpm.pvm.internal.wire.descriptor.AbstractDescriptor"
+ cascade="all"
+ foreign-key="FK_JOB_CMDDESCR"
+ index="IDX_JOB_CMDDESCR"/>
+
+ <subclass name="org.jbpm.pvm.internal.job.MessageImpl" discriminator-value="Msg">
+ <subclass name="org.jbpm.pvm.internal.model.op.ExecuteActivityMessage" discriminator-value="ExeActivityMsg" />
+ <subclass name="org.jbpm.pvm.internal.model.op.SignalMessage" discriminator-value="SignalMsg">
+ <property name="signalName" column="SIGNAL_" />
+ <many-to-one name="activity"
+ column="NODE_"
+ cascade="none"
+ foreign-key="FK_JOB_NODE"/>
+ </subclass>
+ <subclass name="org.jbpm.pvm.internal.model.op.TakeTransitionMessage" discriminator-value="TakeTrMsg" />
+ <subclass name="org.jbpm.pvm.internal.model.op.ProceedToDestinationMessage" discriminator-value="ProceedDestMsg" />
+ <subclass name="org.jbpm.pvm.internal.job.CommandMessage" discriminator-value="CmdMsg" />
+ </subclass>
+
+ <subclass name="org.jbpm.pvm.internal.job.TimerImpl" discriminator-value="Timer">
+ <property name="signalName" column="SIGNAL_" />
+ <property name="eventName" column="EVENT_" />
+ <property name="repeat" column="REPEAT_" />
+ </subclass>
+
+ </class>
+
+ <!-- ### HibernatePvmDbSession QUERIES ################################## -->
+
+ <query name="findTimers">
+ <![CDATA[
+ select t
+ from org.jbpm.pvm.internal.job.TimerImpl as t
+ order by dueDate asc
+ ]]>
+ </query>
+
+ <query name="findMessages">
+ <![CDATA[
+ select m
+ from org.jbpm.pvm.internal.job.MessageImpl as m
+ ]]>
+ </query>
+
+ <query name="findJobsWithException">
+ <![CDATA[
+ select job
+ from org.jbpm.pvm.internal.job.JobImpl as job
+ where job.retries = 0
+ order by dueDate asc
+ ]]>
+ </query>
+
+ <!-- ### HibernateJobDbSession QUERIES ################################## -->
+ <query name="findFirstAcquirableJob">
+ <![CDATA[
+ select job
+ from org.jbpm.pvm.internal.job.JobImpl as job
+ where ( ( (job.lockExpirationTime is null)
+ or (job.lockExpirationTime <= :now)
+ )
+ and
+ ( (job.dueDate is null)
+ or (job.dueDate <= :now)
+ )
+ and
+ ( job.retries > 0 )
+ )
+ order by job.dueDate asc
+ ]]>
+ </query>
+
+ <query name="findExclusiveJobs">
+ <![CDATA[
+ select job
+ from org.jbpm.pvm.internal.job.JobImpl as job
+ where job.lockOwner is null
+ and job.processInstance = :processInstance
+ and job.isExclusive = true
+ and job.retries > 0
+ and ( (job.dueDate is null)
+ or (job.dueDate <= :now)
+ )
+ order by job.dueDate asc
+ ]]>
+ </query>
+
+ <query name="findFirstDueJob">
+ <![CDATA[
+ select job
+ from org.jbpm.pvm.internal.job.JobImpl as job
+ where job.lockOwner is null
+ and job.retries > 0
+ order by job.dueDate asc
+ ]]>
+ </query>
+
+ <!-- ### HibernatePvmDbSession QUERIES ############################################# -->
+ <query name="findExecutionById">
+ <![CDATA[
+ select execution
+ from org.jbpm.pvm.internal.model.ExecutionImpl as execution
+ where execution.id = :id
+ ]]>
+ </query>
+
+ <query name="findProcessInstanceById">
+ <![CDATA[
+ select processInstance
+ from org.jbpm.pvm.internal.model.ExecutionImpl as processInstance
+ where processInstance.id = :processInstanceId
+ and processInstance.parent is null
+ ]]>
+ </query>
+
+ <query name="findExecutionByKey">
+ <![CDATA[
+ select execution
+ from org.jbpm.pvm.internal.model.ExecutionImpl as execution
+ where execution.key = :executionKey
+ and execution.processDefinition.name = :processDefinitionName
+ ]]>
+ </query>
+
+ <query name="findProcessInstanceIds">
+ <![CDATA[
+ select processInstance.id
+ from org.jbpm.pvm.internal.model.ExecutionImpl as processInstance
+ where processInstance.processDefinition.id = :processDefinitionId
+ and processInstance.parent is null
+ ]]>
+ </query>
+
+</hibernate-mapping>
\ No newline at end of file
Property changes on: jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.execution.hbm.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.hibernate.cfg.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.hibernate.cfg.xml (rev 0)
+++ jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.hibernate.cfg.xml 2009-03-04 16:56:46 UTC (rev 4139)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!DOCTYPE hibernate-configuration PUBLIC
+ "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
+
+<hibernate-configuration>
+ <session-factory>
+ <property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
+ <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
+ <property name="hibernate.connection.url">jdbc:hsqldb:mem:.</property>
+ <property name="hibernate.connection.username">sa</property>
+ <property name="hibernate.connection.password"></property>
+ <property name="hibernate.hbm2ddl.auto">create-drop</property>
+ <property name="hibernate.format_sql">true</property>
+ <property name="hibernate.cache.use_second_level_cache">true</property>
+ <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
+ <mapping resource="jbpm.definition.hbm.xml" />
+ <mapping resource="jbpm.execution.hbm.xml" />
+ <mapping resource="jbpm.history.hbm.xml" />
+ <mapping resource="jbpm.task.hbm.xml" />
+ <mapping resource="jbpm.jpdl.hbm.xml" />
+ </session-factory>
+</hibernate-configuration>
Property changes on: jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.hibernate.cfg.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Added: jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.history.hbm.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.history.hbm.xml (rev 0)
+++ jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.history.hbm.xml 2009-03-04 16:56:46 UTC (rev 4139)
@@ -0,0 +1,73 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping package="org.jbpm.pvm.internal.history.model" default-access="field">
+
+ <!-- ### HISTORY PROCESS INSTANCE ####################################### -->
+ <class name="HistoryProcessInstanceImpl" table="JBPM_HIST_PROCINST">
+ <id name="processInstanceId" column="ID_">
+ <generator class="assigned" />
+ </id>
+ <version name="dbversion" column="DBVERSION_" />
+
+ <property name="processDefinitionId" column="PROCDEFID_" />
+ <property name="key" column="KEY_" />
+ <property name="startTime" column="START_" type="timestamp" />
+ <property name="endTime" column="END_" type="timestamp" />
+ <property name="duration" column="DURATION_" />
+ <property name="state" column="STATE_" />
+ <property name="endActivityName" column="ENDACTIVITY_" />
+
+ <many-to-one name="processDefinition"
+ class="org.jbpm.pvm.internal.model.ProcessDefinitionImpl"
+ column="PROCDEF_"
+ foreign-key="FK_HISTPI_PROCDEF"
+ index="IDX_HISTPI_PROCDEF" />
+
+ <set name="historyActivityInstances"
+ cascade="all">
+ <key>
+ <column name="HPI_" />
+ </key>
+ <one-to-many class="HistoryActivityInstanceImpl" />
+ </set>
+
+ </class>
+
+ <!-- ### HISTORY PROCESS INSTANCE ####################################### -->
+ <class name="HistoryActivityInstanceImpl" table="JBPM_HIST_ACTINST" discriminator-value="ACT">
+ <id name="dbid" column="DBID_">
+ <generator class="native" />
+ </id>
+ <discriminator column="CLASS_" />
+ <version name="dbversion" column="DBVERSION_" />
+
+ <many-to-one name="historyProcessInstance"
+ class="HistoryProcessInstanceImpl"
+ column="HPI_"
+ foreign-key="FK_HAI_HPI"
+ index="IDX_HAI_HPI" />
+
+ <many-to-one name="activity"
+ class="org.jbpm.pvm.internal.model.ActivityImpl"
+ column="ACTIVITY_"
+ foreign-key="FK_HISTAI_ACT"
+ index="IDX_HISTAI_ACT" />
+
+ <property name="executionId" column="EXECUTION_" />
+ <property name="activityName" column="ACTIVITY_NAME_" />
+ <property name="startTime" column="START_" type="timestamp" />
+ <property name="endTime" column="END_" type="timestamp" />
+ <property name="duration" column="DURATION_" />
+ <property name="transitionName" column="TRANSITION_" />
+
+ <subclass name="HistoryAutomaticInstanceImpl" discriminator-value="AUT">
+ <subclass name="HistoryExclusiveInstanceImpl" discriminator-value="EXCL" />
+ </subclass>
+
+ <subclass name="HistoryTaskInstanceImpl" discriminator-value="TASK">
+ <property name="assignee" column="ASSIGNEE_" />
+ </subclass>
+ </class>
+
+</hibernate-mapping>
\ No newline at end of file
Property changes on: jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.history.hbm.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.identity.cfg.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.identity.cfg.xml (rev 0)
+++ jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.identity.cfg.xml 2009-03-04 16:56:46 UTC (rev 4139)
@@ -0,0 +1,312 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jboss-identity xmlns="urn:jboss:identity:idm:config:v1_0_alpha"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:identity:idm:config:v1_0_alpha identity-config.xsd">
+ <realms>
+ <realm>
+ <id>realm://jbpm-identity</id>
+ <repository-id-ref>jBPM Identity DB</repository-id-ref>
+ <identity-type-mappings>
+ <identity-mapping>IDENTITY</identity-mapping>
+ </identity-type-mappings>
+ </realm>
+ </realms>
+
+ <repositories>
+ <repository>
+ <id>jBPM Identity DB</id>
+ <class>org.jboss.identity.idm.impl.repository.WrapperIdentityStoreRepository</class>
+ <external-config/>
+ <default-identity-store-id>Hibernate Identity Store</default-identity-store-id>
+ <default-attribute-store-id>Hibernate Identity Store</default-attribute-store-id>
+ <options>
+ <option>
+ <name>allowNotDefinedAttributes</name>
+ <value>true</value>
+ </option>
+ </options>
+ </repository>
+ </repositories>
+
+ <stores>
+ <attribute-stores/>
+ <identity-stores>
+ <identity-store>
+ <id>Hibernate Identity Store</id>
+ <class>org.jboss.identity.idm.impl.store.hibernate.HibernateIdentityStoreImpl</class>
+ <external-config/>
+ <supported-relationship-types>
+ <relationship-type>JBOSS_IDENTITY_MEMBERSHIP</relationship-type>
+ <relationship-type>JBOSS_IDENTITY_ROLE</relationship-type>
+ </supported-relationship-types>
+ <supported-identity-object-types>
+ <identity-object-type>
+ <name>IDENTITY</name>
+ <relationships>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
+ <identity-object-type-ref>COMMUNITY</identity-object-type-ref>
+ </relationship>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
+ <identity-object-type-ref>OFFICE</identity-object-type-ref>
+ </relationship>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
+ <identity-object-type-ref>SECURITY</identity-object-type-ref>
+ </relationship>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
+ <identity-object-type-ref>ORGANIZATION_UNIT</identity-object-type-ref>
+ </relationship>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
+ <identity-object-type-ref>PROJECT</identity-object-type-ref>
+ </relationship>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
+ <identity-object-type-ref>PEOPLE</identity-object-type-ref>
+ </relationship>
+ </relationships>
+ <credentials>
+ <credential-type>PASSWORD</credential-type>
+ </credentials>
+ <attributes>
+ <attribute>
+ <name>picture</name>
+ <mapping>user.picture</mapping>
+ <type>binary</type>
+ <isRequired>false</isRequired>
+ <isMultivalued>false</isMultivalued>
+ <isReadOnly>false</isReadOnly>
+ </attribute>
+ </attributes>
+ <options/>
+ </identity-object-type>
+ <identity-object-type>
+ <name>ORGANIZATION</name>
+ <relationships>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>IDENTITY</identity-object-type-ref>
+ </relationship>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>ORGANIZATION_UNIT</identity-object-type-ref>
+ </relationship>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>ORGANIZATION</identity-object-type-ref>
+ </relationship>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>DIVISION</identity-object-type-ref>
+ </relationship>
+ </relationships>
+ <credentials/>
+ <attributes/>
+ <options/>
+ </identity-object-type>
+ <identity-object-type>
+ <name>ORGANIZATION_UNIT</name>
+ <relationships>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>IDENTITY</identity-object-type-ref>
+ </relationship>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>ORGANIZATION_UNIT</identity-object-type-ref>
+ </relationship>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>DIVISION</identity-object-type-ref>
+ </relationship>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>DEPARTMENT</identity-object-type-ref>
+ </relationship>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>OFFICE</identity-object-type-ref>
+ </relationship>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>PEOPLE</identity-object-type-ref>
+ </relationship>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>PROJECT</identity-object-type-ref>
+ </relationship>
+ </relationships>
+ <credentials/>
+ <attributes/>
+ <options/>
+ </identity-object-type>
+ <identity-object-type>
+ <name>DIVISION</name>
+ <relationships>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>IDENTITY</identity-object-type-ref>
+ </relationship>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>ORGANIZATION_UNIT</identity-object-type-ref>
+ </relationship>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>DEPARTMENT</identity-object-type-ref>
+ </relationship>
+ </relationships>
+ <credentials/>
+ <attributes/>
+ <options/>
+ </identity-object-type>
+ <identity-object-type>
+ <name>DEPARTMENT</name>
+ <relationships>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>IDENTITY</identity-object-type-ref>
+ </relationship>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>DEPARTMENT</identity-object-type-ref>
+ </relationship>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>ORGANIZATION_UNIT</identity-object-type-ref>
+ </relationship>
+ </relationships>
+ <credentials/>
+ <attributes/>
+ <options/>
+ </identity-object-type>
+ <identity-object-type>
+ <name>PROJECT</name>
+ <relationships>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>IDENTITY</identity-object-type-ref>
+ </relationship>
+ </relationships>
+ <credentials/>
+ <attributes/>
+ <options/>
+ </identity-object-type>
+ <identity-object-type>
+ <name>PEOPLE</name>
+ <relationships>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>IDENTITY</identity-object-type-ref>
+ </relationship>
+ </relationships>
+ <credentials/>
+ <attributes/>
+ <options/>
+ </identity-object-type>
+ <identity-object-type>
+ <name>ADMINISTRATION</name>
+ <relationships>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>IDENTITY</identity-object-type-ref>
+ </relationship>
+ </relationships>
+ <credentials/>
+ <attributes/>
+ <options/>
+ </identity-object-type>
+ <identity-object-type>
+ <name>COMMUNITY</name>
+ <relationships>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>IDENTITY</identity-object-type-ref>
+ </relationship>
+ </relationships>
+ <credentials/>
+ <attributes/>
+ <options/>
+ </identity-object-type>
+ <identity-object-type>
+ <name>OFFICE</name>
+ <relationships>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>IDENTITY</identity-object-type-ref>
+ </relationship>
+ </relationships>
+ <credentials/>
+ <attributes/>
+ <options/>
+ </identity-object-type>
+ <identity-object-type>
+ <name>SECURITY</name>
+ <relationships>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>IDENTITY</identity-object-type-ref>
+ </relationship>
+ </relationships>
+ <credentials/>
+ <attributes/>
+ <options/>
+ </identity-object-type>
+ <identity-object-type>
+ <name>SYSTEM</name>
+ <relationships>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>IDENTITY</identity-object-type-ref>
+ </relationship>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>SECURITY</identity-object-type-ref>
+ </relationship>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>COMMUNITY</identity-object-type-ref>
+ </relationship>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>ORGANIZATION</identity-object-type-ref>
+ </relationship>
+ </relationships>
+ <credentials/>
+ <attributes/>
+ <options/>
+ </identity-object-type>
+ </supported-identity-object-types>
+ <options>
+ <option>
+ <name>persistenceUnit</name>
+ <value>jboss-identity-jbpm</value>
+ </option>
+ <option>
+ <name>populateRelationshipTypes</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>populateIdentityObjectTypes</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>allowNotDefinedAttributes</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>isRealmAware</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>allowNotDefinedAttributes</name>
+ <value>true</value>
+ </option>
+ </options>
+ </identity-store>
+ </identity-stores>
+ </stores>
+</jboss-identity>
\ No newline at end of file
Property changes on: jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.identity.cfg.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.jpdl.activities.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.jpdl.activities.xml (rev 0)
+++ jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.jpdl.activities.xml 2009-03-04 16:56:46 UTC (rev 4139)
@@ -0,0 +1,17 @@
+<activities>
+ <schema resource="jpdl.xsd" />
+ <activity binding="org.jbpm.jpdl.internal.activity.StartBinding" />
+ <activity binding="org.jbpm.jpdl.internal.activity.StateBinding" />
+ <activity binding="org.jbpm.jpdl.internal.activity.ExclusiveBinding" />
+ <activity binding="org.jbpm.jpdl.internal.activity.EndBinding" />
+ <activity binding="org.jbpm.jpdl.internal.activity.EndCancelBinding" />
+ <activity binding="org.jbpm.jpdl.internal.activity.EndErrorBinding" />
+ <activity binding="org.jbpm.jpdl.internal.activity.ForkBinding" />
+ <activity binding="org.jbpm.jpdl.internal.activity.JoinBinding" />
+ <activity binding="org.jbpm.jpdl.internal.activity.HqlBinding" />
+ <activity binding="org.jbpm.jpdl.internal.activity.SqlBinding" />
+ <activity binding="org.jbpm.jpdl.internal.activity.JavaBinding" />
+ <activity binding="org.jbpm.jpdl.internal.activity.ScriptBinding" />
+ <activity binding="org.jbpm.jpdl.internal.activity.EsbBinding" />
+ <activity binding="org.jbpm.jpdl.internal.activity.TaskBinding" />
+</activities>
Property changes on: jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.jpdl.activities.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.jpdl.hbm.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.jpdl.hbm.xml (rev 0)
+++ jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.jpdl.hbm.xml 2009-03-04 16:56:46 UTC (rev 4139)
@@ -0,0 +1,90 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping default-access="field">
+
+ <joined-subclass name="org.jbpm.jpdl.internal.model.JpdlProcessDefinition" table="JBPM_JPDL_PROCDEF" extends="org.jbpm.pvm.internal.model.ProcessDefinitionImpl">
+ <key column="DBID_"/>
+ </joined-subclass>
+
+ <joined-subclass name="org.jbpm.jpdl.internal.model.JpdlExecution" table="JBPM_JPDL_EXECUTION" extends="org.jbpm.pvm.internal.model.ExecutionImpl">
+ <key column="DBID_"/>
+ </joined-subclass>
+
+ <class name="org.jbpm.jpdl.internal.activity.JpdlActivity" table="JBPM_JPDL_ACTIVITY" abstract="true" discriminator-value="X">
+ <id name="dbid" column="DBID_">
+ <generator class="native" />
+ </id>
+ <discriminator column="CLASS_" />
+ <subclass name="org.jbpm.jpdl.internal.activity.StartActivity" discriminator-value="start" />
+ <subclass name="org.jbpm.jpdl.internal.activity.ExclusiveConditionActivity" discriminator-value="excl-cond" />
+ <subclass name="org.jbpm.jpdl.internal.activity.ExclusiveExpressionActivity" discriminator-value="excl-expr">
+ <property name="expr" column="TEXT_" />
+ <property name="lang" column="TEXT2_" />
+ </subclass>
+ <subclass name="org.jbpm.jpdl.internal.activity.ExclusiveHandlerActivity" discriminator-value="excl-handler">
+ <property name="exclusiveHandlerName" column="TEXT_" />
+ <many-to-one name="exclusiveHandlerDescriptor"
+ column="EXCLDESCR_"
+ cascade="all"
+ class="org.jbpm.pvm.internal.wire.descriptor.AbstractDescriptor"
+ foreign-key="FK_ACT_EXCLDESCR"
+ index="IDX_ACT_EXCLDESCR" />
+ </subclass>
+ <subclass name="org.jbpm.jpdl.internal.activity.StateActivity" discriminator-value="state" />
+ <subclass name="org.jbpm.jpdl.internal.activity.EndActivity" discriminator-value="end">
+ <property name="endProcessInstance" column="ENDPI_" />
+ <property name="state" column="TEXT_" />
+ </subclass>
+ <subclass name="org.jbpm.jpdl.internal.activity.ForkActivity" discriminator-value="fork" />
+ <subclass name="org.jbpm.jpdl.internal.activity.JoinActivity" discriminator-value="join" />
+ <subclass name="org.jbpm.jpdl.internal.activity.HqlActivity" discriminator-value="hql">
+ <property name="query" column="TEXT_" />
+ <property name="resultVariableName" column="TEXT2_" />
+ <property name="isResultUnique" column="ISUNIQ_" />
+ <many-to-one name="parametersDescriptor"
+ column="PARAMDESCR_"
+ cascade="all"
+ class="org.jbpm.pvm.internal.wire.descriptor.ListDescriptor"
+ foreign-key="FK_ACT_PARAMDESCR"
+ index="IDX_ACT_PARAMDESCR" />
+
+ <subclass name="org.jbpm.jpdl.internal.activity.SqlActivity" discriminator-value="sql" />
+ </subclass>
+ <subclass name="org.jbpm.jpdl.internal.activity.JavaActivity" discriminator-value="java">
+ <property name="methodName" column="TEXT_" />
+ <property name="variableName" column="TEXT2_" />
+ <many-to-one name="descriptor"
+ column="JAVADESCR_"
+ cascade="all"
+ class="org.jbpm.pvm.internal.wire.descriptor.AbstractDescriptor"
+ foreign-key="FK_ACT_JAVADESCR"
+ index="IDX_ACT_JAVADESCR" />
+ <many-to-one name="invokeOperation"
+ column="INVOPER_"
+ cascade="all"
+ class="org.jbpm.pvm.internal.wire.operation.InvokeOperation"
+ foreign-key="FK_ACT_INVKOPER"
+ index="IDX_ACT_INVKOPER" />
+ </subclass>
+ <subclass name="org.jbpm.jpdl.internal.activity.ScriptActivity" discriminator-value="script">
+ <property name="script" column="TEXT_" />
+ <property name="language" column="TEXT2_" />
+ <property name="variableName" column="TEXT3_" />
+ </subclass>
+ <subclass name="org.jbpm.jpdl.internal.activity.EsbActivity" discriminator-value="esb">
+ <property name="service" column="TEXT_" />
+ <property name="category" column="TEXT2_" />
+ <many-to-one name="partsListDescriptor"
+ column="PARTSDESCR_"
+ cascade="all"
+ class="org.jbpm.pvm.internal.wire.descriptor.ListDescriptor"
+ foreign-key="FK_ACT_PARTSDESCR"
+ index="IDX_ACT_PARTSDESCR" />
+ </subclass>
+ <subclass name="org.jbpm.jpdl.internal.activity.TaskActivity" discriminator-value="task">
+ <property name="assignee" column="TEXT_" />
+ </subclass>
+ </class>
+
+</hibernate-mapping>
\ No newline at end of file
Property changes on: jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.jpdl.hbm.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.task.hbm.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.task.hbm.xml (rev 0)
+++ jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.task.hbm.xml 2009-03-04 16:56:46 UTC (rev 4139)
@@ -0,0 +1,174 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping auto-import="false" package="org.jbpm.pvm.internal.task" default-access="field">
+
+ <!-- ### TASK DEFINITION ################################################ -->
+ <class name="TaskDefinitionImpl" discriminator-value="T">
+ <id name="dbid" column="DBID_">
+ <generator class="native" />
+ </id>
+ <discriminator type="char" column="CLASS_"/>
+ <version name="dbversion" column="DBVERSION_" />
+
+ <property name="name" column="NAME_"/>
+ <property name="description" column="DESCR_"/>
+
+ <property name="priority" column="PRIORITY_"/>
+ <property name="dueDateDuration" column="DUEDATE_"/>
+ <property name="isBlocking" column="BLOCK_"/>
+ <property name="isSignalling" column="SIGNAL_"/>
+ <property name="assigneeExpression" column="ASSIGNEE_EXPR_"/>
+ <property name="candidatesExpression" column="CANDIDATES_EXPR_"/>
+
+ <many-to-one name="assignerDescriptor"
+ column="ASSIGNER_DESCR_"
+ cascade="all"
+ class="org.jbpm.pvm.internal.wire.descriptor.AbstractDescriptor"
+ foreign-key="FK_TSK_ASIG_DESCR"
+ index="IDX_TSK_ASIG_DESCR" />
+
+ <many-to-one name="swimlaneDefinition"
+ column="SWIMLANE_DEF_"
+ cascade="all"
+ class="SwimlaneDefinitionImpl"
+ foreign-key="FK_TSK_SWIML_DEF"
+ index="IDX_TSK_SWIML_DEF" />
+
+ <list name="subTaskDefinitions" cascade="all-delete-orphan">
+ <key column="TASKDEF_" />
+ <list-index column="TASKDEF_IDX_" />
+ <one-to-many class="TaskDefinitionImpl" />
+ </list>
+ </class>
+
+ <!-- ### TASK ########################################################### -->
+ <class name="TaskImpl"
+ discriminator-value="T">
+ <id name="dbid" column="DBID_">
+ <generator class="native" />
+ </id>
+ <discriminator type="char" column="CLASS_"/>
+ <version name="dbversion" column="DBVERSION_" />
+
+ <property name="id" column="ID_" unique="true" />
+ <property name="name" column="NAME_"/>
+ <property name="description" column="DESCR_"/>
+ <property name="assignee" column="ASSIGNEE_"/>
+
+ <set name="participants" cascade="all-delete-orphan">
+ <key column="TASK_" />
+ <one-to-many class="ParticipantImpl" />
+ </set>
+
+ <property name="priority" column="PRIORITY_"/>
+ <property name="create" column="CREATE_"/>
+ <property name="dueDate" column="DUEDATE_"/>
+ <property name="progress" column="PROGRESS_"/>
+
+ <!--
+ <many-to-one name="variableMap"
+ class="org.jbpm.pvm.impl.VariableMap"
+ column="VARMAP_"
+ foreign-key="FK_TASK_VARMAP"
+ cascade="all" />
+ -->
+
+ <many-to-one name="superTask"
+ class="TaskImpl"
+ column="SUPERTASK_"
+ foreign-key="FK_TASK_SUPERTASK"
+ index="IDX_TASK_SUPERTASK" />
+
+ <many-to-one name="execution"
+ class="org.jbpm.pvm.internal.model.ExecutionImpl"
+ column="EXECUTION_"
+ foreign-key="FK_TASK_EXEC" />
+
+ <many-to-one name="swimlane"
+ class="SwimlaneImpl"
+ column="SWIMLANE_"
+ foreign-key="FK_TASK_SWIML" />
+
+ <list name="comments" cascade="all-delete-orphan">
+ <key column="TASK_" />
+ <list-index column="TASK_IDX_" />
+ <one-to-many class="org.jbpm.pvm.internal.model.CommentImpl" />
+ </list>
+
+ <set name="subTasks" cascade="all-delete-orphan">
+ <key column="SUPERTASK_" />
+ <one-to-many class="TaskImpl" />
+ </set>
+
+ </class>
+
+ <!-- ### PARTICIPANT #################################################### -->
+ <class name="ParticipantImpl">
+ <id name="dbid" column="DBID_">
+ <generator class="native" />
+ </id>
+ <version name="dbversion" column="DBVERSION_" />
+
+ <property name="identityType" column="IDENTITYTYPE_"/>
+ <property name="identityId" column="IDENTITYID_"/>
+ <property name="participation" column="PARTICIPATION_" />
+
+ <many-to-one name="task"
+ class="TaskImpl"
+ column="TASK_"
+ index="IDX_PART_TASK"
+ foreign-key="FK_PART_TASK" />
+
+ <many-to-one name="swimlane"
+ class="SwimlaneImpl"
+ column="SWIMLANE_"
+ foreign-key="FK_PART_SWIMLANE" />
+
+ </class>
+
+ <!-- ### SWIMLANE DEFINITION ############################################ -->
+ <class name="SwimlaneDefinitionImpl">
+ <id name="dbid" column="DBID_">
+ <generator class="native" />
+ </id>
+ <version name="dbversion" column="DBVERSION_" />
+
+ <property name="name" column="NAME_"/>
+ </class>
+
+
+ <!-- ### SWIMLANE ####################################################### -->
+ <class name="SwimlaneImpl">
+ <id name="dbid" column="DBID_">
+ <generator class="native" />
+ </id>
+ <version name="dbversion" column="DBVERSION_" />
+
+ <property name="name" column="NAME_"/>
+ <property name="assignee" column="ASSIGNEE_"/>
+
+ <many-to-one name="swimlaneDefinition"
+ class="SwimlaneDefinitionImpl"
+ column="SWIMLANEDEF_"
+ foreign-key="FK_SWIMLANE_DEF" />
+
+ <set name="participants" cascade="all-delete-orphan">
+ <key column="SWIMLANE_" />
+ <one-to-many class="ParticipantImpl" />
+ </set>
+
+ </class>
+
+
+ <!-- ### QUERIES ######################################################## -->
+
+ <query name="findTasks">
+ <![CDATA[
+ select task
+ from org.jbpm.pvm.internal.task.TaskImpl as task
+ ]]>
+ </query>
+
+</hibernate-mapping>
Property changes on: jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.task.hbm.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.task.lifecycle.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.task.lifecycle.xml (rev 0)
+++ jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.task.lifecycle.xml 2009-03-04 16:56:46 UTC (rev 4139)
@@ -0,0 +1,13 @@
+<task-lifecycle initial="open">
+ <state name="open">
+ <transition name="complete" to="completed" />
+ <transition name="suspend" to="suspended" />
+ <transition name="cancel" to="cancelled" />
+ </state>
+ <state name="suspended">
+ <transition name="resume" to="open" />
+ <transition name="cancel" to="cancelled" />
+ </state>
+ <state name="cancelled" />
+ <state name="completed" />
+</task-lifecycle>
Property changes on: jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.task.lifecycle.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.variable.types.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.variable.types.xml (rev 0)
+++ jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.variable.types.xml 2009-03-04 16:56:46 UTC (rev 4139)
@@ -0,0 +1,34 @@
+<types>
+
+ <!-- types stored in a native column -->
+ <type name="string" class="java.lang.String" variable-class="org.jbpm.pvm.internal.type.variable.StringVariable" />
+ <type name="long" class="java.lang.Long" variable-class="org.jbpm.pvm.internal.type.variable.LongVariable" />
+ <type name="double" class="java.lang.Double" variable-class="org.jbpm.pvm.internal.type.variable.DoubleVariable" />
+
+ <!-- types converted to a string -->
+ <type name="date" class="java.util.Date" converter="org.jbpm.pvm.internal.type.converter.DateToStringConverter" variable-class="org.jbpm.pvm.internal.type.variable.StringVariable" />
+ <type name="boolean" class="java.lang.Boolean" converter="org.jbpm.pvm.internal.type.converter.BooleanToStringConverter" variable-class="org.jbpm.pvm.internal.type.variable.StringVariable" />
+ <type name="char" class="java.lang.Character" converter="org.jbpm.pvm.internal.type.converter.CharacterToStringConverter" variable-class="org.jbpm.pvm.internal.type.variable.StringVariable" />
+
+ <!-- types converted to a long -->
+ <type name="byte" class="java.lang.Byte" converter="org.jbpm.pvm.internal.type.converter.ByteToLongConverter" variable-class="org.jbpm.pvm.internal.type.variable.LongVariable" />
+ <type name="short" class="java.lang.Short" converter="org.jbpm.pvm.internal.type.converter.ShortToLongConverter" variable-class="org.jbpm.pvm.internal.type.variable.LongVariable" />
+ <type name="integer" class="java.lang.Integer" converter="org.jbpm.pvm.internal.type.converter.IntegerToLongConverter" variable-class="org.jbpm.pvm.internal.type.variable.LongVariable" />
+
+ <!-- types converted to a double -->
+ <type name="float" class="java.lang.Float" converter="org.jbpm.pvm.internal.type.converter.FloatToDoubleConverter" variable-class="org.jbpm.pvm.internal.type.variable.DoubleVariable" />
+
+ <!-- byte[] and char[] -->
+ <type name="byte[]" class="[B" variable-class="org.jbpm.pvm.internal.type.variable.BlobVariable" />
+ <type name="char[]" class="[C" variable-class="org.jbpm.pvm.internal.type.variable.ClobVariable" />
+
+ <type name="hibernate-long-id" class="hibernate" id-type="long" variable-class="org.jbpm.pvm.internal.type.variable.HibernateLongVariable" />
+ <type name="hibernate-string-id" class="hibernate" id-type="string" variable-class="org.jbpm.pvm.internal.type.variable.HibernateStringVariable" />
+
+ <type name="serializable" class="serializable" converter="org.jbpm.pvm.internal.type.converter.SerializableToBytesConverter" variable-class="org.jbpm.pvm.internal.type.variable.BlobVariable" />
+
+ <!-- TODO: add ejb3 entity bean support -->
+ <!-- TODO: add JCR activity support -->
+ <!-- TODO: add collection support -->
+
+</types>
Property changes on: jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.variable.types.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.wire.bindings.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.wire.bindings.xml (rev 0)
+++ jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.wire.bindings.xml 2009-03-04 16:56:46 UTC (rev 4139)
@@ -0,0 +1,92 @@
+<wire-bindings>
+
+ <!-- ########################### -->
+ <!-- ### Descriptor bindings ### -->
+ <!-- ########################### -->
+ <!-- basic types -->
+ <binding class="org.jbpm.pvm.internal.wire.binding.TrueBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.FalseBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.CharBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.DoubleBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.FloatBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.IntBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.ShortBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.ByteBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.LongBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.StringBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.NullBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.ClassBinding" />
+ <!-- object and ref -->
+ <binding class="org.jbpm.pvm.internal.wire.binding.ObjectBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.RefBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.JndiBinding" />
+ <!-- collections -->
+ <binding class="org.jbpm.pvm.internal.wire.binding.ListBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.SetBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.MapBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.PropertiesBinding" />
+ <!-- environment refs -->
+ <binding class="org.jbpm.pvm.internal.wire.binding.EnvironmentFactoryRefBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.EnvRefBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.EnvBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.ContextRefBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.TransactionRefBinding" />
+ <!-- various specials -->
+ <binding class="org.jbpm.pvm.internal.wire.binding.TransactionBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.JobExecutorBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.JobTestHelperBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.ScriptManagerBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.BusinessCalendarBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.IdGeneratorBinding" />
+ <!-- hibernate bindings -->
+ <binding class="org.jbpm.pvm.internal.wire.binding.HibernateConfigurationBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.SeamHibernateSessionBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.HibernateSessionBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.HibernateSessionFactoryBinding" />
+ <!-- sessions -->
+ <binding class="org.jbpm.pvm.internal.wire.binding.MessageSessionBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.TimerSessionBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.HistorySessionBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.IdentitySessionBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.IdentitySessionFactoryBinding" />
+ <!-- db sessions -->
+ <binding class="org.jbpm.pvm.internal.wire.binding.PvmDbSessionBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.JobDbSessionBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.TaskDbSessionBinding" />
+
+ <!-- dynamic type mapping configuration -->
+ <binding class="org.jbpm.pvm.internal.wire.binding.TypesBinding" />
+ <!-- services -->
+ <binding class="org.jbpm.pvm.internal.wire.binding.StandardCommandServiceBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.AsyncCommandServiceBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.ProcessServiceBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.ExecutionServiceBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.ManagementServiceBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.IdentityServiceBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.HistoryServiceBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.TaskServiceBinding" />
+
+ <!-- deployers -->
+ <binding class="org.jbpm.pvm.internal.wire.binding.DeployerManagerBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.AssignFileTypesBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.CheckProcessBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.CheckProblemsBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.SaveBinding" />
+
+ <!-- interceptors -->
+ <binding class="org.jbpm.pvm.internal.wire.binding.EnvironmentInterceptorBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.AuthorizationInterceptorBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.RetryInterceptorBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.StandardTransactionInterceptorBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.EnlistBinding" />
+
+ <!-- operation -->
+ <binding class="org.jbpm.pvm.internal.wire.binding.PropertyBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.FieldBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.InvokeBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.SubscribeBinding" />
+
+ <!-- jpdl bindings -->
+ <binding class="org.jbpm.jpdl.internal.xml.ParseJpdlBinding" />
+
+</wire-bindings>
Property changes on: jbpm4/branches/tbaeyens/modules/examples/src/test/resources/jbpm.wire.bindings.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbpm4/branches/tbaeyens/modules/examples/src/test/resources/logging.properties
===================================================================
--- jbpm4/branches/tbaeyens/modules/examples/src/test/resources/logging.properties 2009-03-04 15:24:38 UTC (rev 4138)
+++ jbpm4/branches/tbaeyens/modules/examples/src/test/resources/logging.properties 2009-03-04 16:56:46 UTC (rev 4139)
@@ -1,28 +1,18 @@
handlers= java.util.logging.ConsoleHandler
-# to add the error triggered file handler
-# handlers= java.util.logging.ConsoleHandler org.jbpm.util.ErrorTriggeredFileHandler
-
redirect.commons.logging = enabled
-java.util.logging.ConsoleHandler.level = FINEST
+java.util.logging.ConsoleHandler.level = FINE
java.util.logging.ConsoleHandler.formatter = org.jbpm.internal.log.LogFormatter
-# org.jbpm.util.ErrorTriggeredFileHandler.size = 500
-# org.jbpm.util.ErrorTriggeredFileHandler.push = OFF
-# org.jbpm.util.ErrorTriggeredFileHandler.pattern = %h/jbpm%u.log
+org.jbpm.level=FINE
+# org.jbpm.pvm.internal.tx.level=FINE
+# org.jbpm.pvm.internal.wire.level=FINE
+# org.jbpm.pvm.internal.util.level=FINE
-# For example, set the com.xyz.foo logger to only log SEVERE messages:
-# com.xyz.foo.level = SEVERE
-
-org.jbpm.level=INFO
-org.jbpm.pvm.internal.tx.level=FINE
-org.jbpm.pvm.internal.wire.level=FINE
-org.jbpm.pvm.internal.util.level=FINE
-
org.hibernate.level=INFO
-org.hibernate.cfg.HbmBinder.level=SEVERE
org.hibernate.cfg.SettingsFactory.level=SEVERE
+org.hibernate.cfg.HbmBinder.level=SEVERE
# org.hibernate.SQL.level=FINEST
# org.hibernate.type.level=FINEST
# org.hibernate.tool.hbm2ddl.SchemaExport.level=FINEST
-# org.hibernate.transaction.level=FINEST
+# org.hibernate.transaction.level=FINEST
\ No newline at end of file
Deleted: jbpm4/branches/tbaeyens/modules/jpdl/src/main/config/build.properties
===================================================================
--- jbpm4/branches/tbaeyens/modules/jpdl/src/main/config/build.properties 2009-03-04 15:24:38 UTC (rev 4138)
+++ jbpm4/branches/tbaeyens/modules/jpdl/src/main/config/build.properties 2009-03-04 16:56:46 UTC (rev 4139)
@@ -1,8 +0,0 @@
-jbpm.config.dest.dir=target/configfiles
-jbpm.config.tmp.dir=target/filtered
-jbpm.config.hibernate.cache=hashtable
-jbpm.config.hibernate.connection.type=jdbc
-jbpm.config.hibernate.database=hsqldb.inmemory
-jbpm.config.hibernate.format.sql=include
-jbpm.config.hibernate.jpdl=include
-jbpm.config.identity=include
Modified: jbpm4/branches/tbaeyens/modules/jpdl/src/test/resources/logging.properties
===================================================================
--- jbpm4/branches/tbaeyens/modules/jpdl/src/test/resources/logging.properties 2009-03-04 15:24:38 UTC (rev 4138)
+++ jbpm4/branches/tbaeyens/modules/jpdl/src/test/resources/logging.properties 2009-03-04 16:56:46 UTC (rev 4139)
@@ -1,19 +1,9 @@
handlers= java.util.logging.ConsoleHandler
-# to add the error triggered file handler
-# handlers= java.util.logging.ConsoleHandler org.jbpm.util.ErrorTriggeredFileHandler
-
redirect.commons.logging = enabled
java.util.logging.ConsoleHandler.level = FINE
java.util.logging.ConsoleHandler.formatter = org.jbpm.internal.log.LogFormatter
-# org.jbpm.util.ErrorTriggeredFileHandler.size = 500
-# org.jbpm.util.ErrorTriggeredFileHandler.push = OFF
-# org.jbpm.util.ErrorTriggeredFileHandler.pattern = %h/jbpm%u.log
-
-# For example, set the com.xyz.foo logger to only log SEVERE messages:
-# com.xyz.foo.level = SEVERE
-
org.jbpm.level=FINE
# org.jbpm.pvm.internal.tx.level=FINE
# org.jbpm.pvm.internal.wire.level=FINE
@@ -25,4 +15,4 @@
# org.hibernate.SQL.level=FINEST
# org.hibernate.type.level=FINEST
# org.hibernate.tool.hbm2ddl.SchemaExport.level=FINEST
-# org.hibernate.transaction.level=FINEST
+# org.hibernate.transaction.level=FINEST
\ No newline at end of file
Modified: jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/task/TaskImpl.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/task/TaskImpl.java 2009-03-04 15:24:38 UTC (rev 4138)
+++ jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/task/TaskImpl.java 2009-03-04 16:56:46 UTC (rev 4139)
@@ -276,7 +276,7 @@
public String getLifeCycleResource() {
// the default lifecycle can be overridden in subclasses
- return "jbpm.task.default.lifecycle.xml";
+ return "jbpm.task.lifecycle.xml";
}
// modified getters and setters /////////////////////////////////////////////
Modified: jbpm4/branches/tbaeyens/modules/test-db/.classpath
===================================================================
--- jbpm4/branches/tbaeyens/modules/test-db/.classpath 2009-03-04 15:24:38 UTC (rev 4138)
+++ jbpm4/branches/tbaeyens/modules/test-db/.classpath 2009-03-04 16:56:46 UTC (rev 4139)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" output="target/classes" path="src/main/java"/>
- <classpathentry kind="src" output="target/classes" path="src/main/resources"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/resources"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry kind="output" path="target/classes"/>
Modified: jbpm4/branches/tbaeyens/modules/test-db/pom.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/test-db/pom.xml 2009-03-04 15:24:38 UTC (rev 4138)
+++ jbpm4/branches/tbaeyens/modules/test-db/pom.xml 2009-03-04 16:56:46 UTC (rev 4139)
@@ -85,26 +85,6 @@
</execution>
</executions>
</plugin>
-
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>install.hibernate.database.properties</id>
- <phase>generate-test-resources</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <tasks>
- <copy file="target/jpdl-config/hibernate.cfg.${database}.xml"
- tofile="target/classes/testDb-hibernate.cfg.xml"
- overwrite="true" />
- </tasks>
- </configuration>
- </execution>
- </executions>
- </plugin>
</plugins>
</build>
Deleted: jbpm4/branches/tbaeyens/modules/test-db/src/main/resources/jbpm.cfg.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/test-db/src/main/resources/jbpm.cfg.xml 2009-03-04 15:24:38 UTC (rev 4138)
+++ jbpm4/branches/tbaeyens/modules/test-db/src/main/resources/jbpm.cfg.xml 2009-03-04 16:56:46 UTC (rev 4139)
@@ -1,72 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<jbpm-configuration xmlns="http://jbpm.org/xsd/cfg">
-
- <process-engine-context>
-
- <deployer-manager>
- <assign-file-type>
- <file extension=".jpdl.xml" type="jpdl" />
- </assign-file-type>
- <parse-jpdl />
- <check-process />
- <check-problems />
- <save />
- </deployer-manager>
-
- <process-service />
- <execution-service />
- <history-service />
- <management-service />
- <identity-service />
- <task-service />
-
- <command-service>
- <retry-interceptor />
- <environment-interceptor />
- <standard-transaction-interceptor />
- </command-service>
-
- <hibernate-configuration resource="testDb-hibernate.cfg.xml">
- <cache-configuration resource="jbpm.pvm.cache.xml"
- usage="nonstrict-read-write" />
- </hibernate-configuration>
-
- <hibernate-session-factory />
-
- <script-manager default-expression-language="juel"
- default-script-language="juel"
- read-contexts="execution, environment, process-engine"
- write-context="">
- <script-language name="juel" factory="com.sun.script.juel.JuelScriptEngineFactory" />
- </script-manager>
-
- <job-executor auto-start="false" />
- <job-test-helper />
-
- <id-generator />
- <types resource="jbpm.pvm.types.xml" />
-
- <business-calendar>
- <monday hours="9:00-12:00 and 12:30-17:00"/>
- <tuesday hours="9:00-12:00 and 12:30-17:00"/>
- <wednesday hours="9:00-12:00 and 12:30-17:00"/>
- <thursday hours="9:00-12:00 and 12:30-17:00"/>
- <friday hours="9:00-12:00 and 12:30-17:00"/>
- <holiday period="01/07/2008 - 31/08/2008"/>
- </business-calendar>
-
- </process-engine-context>
-
- <transaction-context>
- <hibernate-session />
- <transaction />
- <pvm-db-session />
- <job-db-session />
- <task-db-session />
- <message-session />
- <timer-session />
- <history-session />
- </transaction-context>
-
-</jbpm-configuration>
Deleted: jbpm4/branches/tbaeyens/modules/test-db/src/main/resources/logging.properties
===================================================================
--- jbpm4/branches/tbaeyens/modules/test-db/src/main/resources/logging.properties 2009-03-04 15:24:38 UTC (rev 4138)
+++ jbpm4/branches/tbaeyens/modules/test-db/src/main/resources/logging.properties 2009-03-04 16:56:46 UTC (rev 4139)
@@ -1,32 +0,0 @@
-handlers= java.util.logging.MemoryHandler
-
-redirect.commons.logging = enabled
-
-java.util.logging.ConsoleHandler.level = INFO
-java.util.logging.ConsoleHandler.formatter = org.jbpm.internal.log.LogFormatter
-
-java.util.logging.MemoryHandler.level=FINEST
-#java.util.logging.MemoryHandler.filter=
-java.util.logging.MemoryHandler.size=500
-java.util.logging.MemoryHandler.push=SEVERE
-java.util.logging.MemoryHandler.target=org.jbpm.internal.log.ConsoleHandler
-
-org.jbpm.internal.log.ConsoleHandler.level = FINEST
-org.jbpm.internal.log.ConsoleHandler.formatter = org.jbpm.internal.log.LogFormatter
-
-# For example, set the com.xyz.foo logger to only log SEVERE messages:
-# com.xyz.foo.level = SEVERE
-
-org.jbpm.level=FINEST
-# org.jbpm.pvm.internal.tx.level=FINE
-# org.jbpm.pvm.internal.wire.level=FINE
-# org.jbpm.pvm.internal.util.level=FINE
-
-org.hibernate.level=FINE
-org.hibernate.cfg.HbmBinder.level=SEVERE
-org.hibernate.cfg.SettingsFactory.level=SEVERE
-org.hibernate.SQL.level=FINEST
-# org.hibernate.type.level=FINEST
-# org.hibernate.tool.hbm2ddl.SchemaExport.level=FINEST
-# org.hibernate.transaction.level=FINEST
-
Added: jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/META-INF/persistence.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/META-INF/persistence.xml (rev 0)
+++ jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/META-INF/persistence.xml 2009-03-04 16:56:46 UTC (rev 4139)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<persistence xmlns="http://java.sun.com/xml/ns/persistence"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
+ http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
+ version="1.0">
+
+ <persistence-unit name="jboss-identity-jbpm" transaction-type="RESOURCE_LOCAL">
+
+ <provider>org.hibernate.ejb.HibernatePersistence</provider>
+
+ <class>org.jboss.identity.idm.impl.model.hibernate.HibernateRealm</class>
+ <class>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObject</class>
+ <class>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectCredential</class>
+ <class>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectCredentialType</class>
+ <class>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectAttribute</class>
+ <class>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectType</class>
+ <class>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationship</class>
+ <class>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipType</class>
+ <class>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipName</class>
+
+ <exclude-unlisted-classes>true</exclude-unlisted-classes>
+
+ <properties>
+ <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect" />
+ <property name="hibernate.connection.driver_class" value="org.hsqldb.jdbcDriver" />
+ <property name="hibernate.connection.url" value="jdbc:hsqldb:mem:." />
+ <property name="hibernate.connection.username" value="sa" />
+ <property name="hibernate.connection.password" value="" />
+ <property name="hibernate.hbm2ddl.auto" value="create-drop" />
+ </properties>
+
+ </persistence-unit>
+
+</persistence>
\ No newline at end of file
Property changes on: jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/META-INF/persistence.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.cache.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.cache.xml (rev 0)
+++ jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.cache.xml 2009-03-04 16:56:46 UTC (rev 4139)
@@ -0,0 +1,39 @@
+<hibernate-cache>
+
+ <class-cache class="org.jbpm.pvm.internal.model.ProcessDefinitionImpl" />
+ <class-cache class="org.jbpm.pvm.internal.model.ActivityImpl" />
+ <class-cache class="org.jbpm.pvm.internal.model.TransitionImpl" />
+ <class-cache class="org.jbpm.pvm.internal.model.EventImpl" />
+ <class-cache class="org.jbpm.pvm.internal.model.ExceptionHandlerImpl" />
+ <class-cache class="org.jbpm.pvm.internal.model.ObjectReference" />
+ <class-cache class="org.jbpm.pvm.internal.model.VariableDefinitionImpl" />
+ <class-cache class="org.jbpm.pvm.internal.model.TimerDefinitionImpl" />
+ <class-cache class="org.jbpm.pvm.internal.wire.descriptor.AbstractDescriptor" />
+
+ <collection-cache collection="org.jbpm.pvm.internal.model.ProcessDefinitionImpl.exceptionHandlers" />
+ <collection-cache collection="org.jbpm.pvm.internal.model.ProcessDefinitionImpl.events" />
+ <collection-cache collection="org.jbpm.pvm.internal.model.ProcessDefinitionImpl.activities" />
+ <collection-cache collection="org.jbpm.pvm.internal.model.ProcessDefinitionImpl.variableDefinitions" />
+ <collection-cache collection="org.jbpm.pvm.internal.model.ProcessDefinitionImpl.timerDefinitions" />
+ <collection-cache collection="org.jbpm.pvm.internal.model.ProcessDefinitionImpl.attachments" />
+
+ <collection-cache collection="org.jbpm.pvm.internal.model.ActivityImpl.exceptionHandlers" />
+ <collection-cache collection="org.jbpm.pvm.internal.model.ActivityImpl.events" />
+ <collection-cache collection="org.jbpm.pvm.internal.model.ActivityImpl.activities" />
+ <collection-cache collection="org.jbpm.pvm.internal.model.ActivityImpl.variableDefinitions" />
+ <collection-cache collection="org.jbpm.pvm.internal.model.ActivityImpl.timerDefinitions" />
+ <collection-cache collection="org.jbpm.pvm.internal.model.ActivityImpl.incomingTransitions" />
+ <collection-cache collection="org.jbpm.pvm.internal.model.ActivityImpl.outgoingTransitions" />
+
+ <collection-cache collection="org.jbpm.pvm.internal.model.TransitionImpl.exceptionHandlers" />
+ <collection-cache collection="org.jbpm.pvm.internal.model.TransitionImpl.events" />
+
+ <collection-cache collection="org.jbpm.pvm.internal.model.EventImpl.exceptionHandlers" />
+ <collection-cache collection="org.jbpm.pvm.internal.model.EventImpl.listenerReferences" />
+
+ <collection-cache collection="org.jbpm.pvm.internal.model.ExceptionHandlerImpl.eventListenerReferences" />
+
+ <collection-cache collection="org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor.argDescriptors" />
+ <collection-cache collection="org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor.operations" />
+
+</hibernate-cache>
Property changes on: jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.cache.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.cfg.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.cfg.xml (rev 0)
+++ jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.cfg.xml 2009-03-04 16:56:46 UTC (rev 4139)
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jbpm-configuration xmlns="http://jbpm.org/xsd/cfg">
+
+ <process-engine-context>
+
+ <process-service />
+ <execution-service />
+ <history-service />
+ <management-service />
+ <task-service />
+ <identity-service />
+
+ <command-service>
+ <retry-interceptor />
+ <environment-interceptor />
+ <standard-transaction-interceptor />
+ </command-service>
+
+ <hibernate-configuration>
+ <cfg resource="jbpm.hibernate.cfg.xml" />
+ <cache-configuration resource="jbpm.cache.xml"
+ usage="nonstrict-read-write" />
+ </hibernate-configuration>
+
+ <hibernate-session-factory />
+
+ <identity-session-factory resource="jbpm.identity.cfg.xml" />
+
+ <deployer-manager>
+ <assign-file-type>
+ <file extension=".jpdl.xml" type="jpdl" />
+ </assign-file-type>
+ <parse-jpdl />
+ <check-process />
+ <check-problems />
+ <save />
+ </deployer-manager>
+
+ <script-manager default-expression-language="juel"
+ default-script-language="juel"
+ read-contexts="execution, environment, process-engine"
+ write-context="">
+ <script-language name="juel" factory="com.sun.script.juel.JuelScriptEngineFactory" />
+ </script-manager>
+
+ <job-executor auto-start="false" />
+
+ <id-generator />
+ <types resource="jbpm.variable.types.xml" />
+
+ <business-calendar>
+ <monday hours="9:00-12:00 and 12:30-17:00"/>
+ <tuesday hours="9:00-12:00 and 12:30-17:00"/>
+ <wednesday hours="9:00-12:00 and 12:30-17:00"/>
+ <thursday hours="9:00-12:00 and 12:30-17:00"/>
+ <friday hours="9:00-12:00 and 12:30-17:00"/>
+ <holiday period="01/07/2008 - 31/08/2008"/>
+ </business-calendar>
+
+ </process-engine-context>
+
+ <transaction-context>
+ <hibernate-session />
+ <transaction />
+ <pvm-db-session />
+ <job-db-session />
+ <task-db-session />
+ <message-session />
+ <timer-session />
+ <history-session />
+ <identity-session realm="realm://jbpm-identity" />
+ </transaction-context>
+
+</jbpm-configuration>
Property changes on: jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.cfg.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.definition.hbm.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.definition.hbm.xml (rev 0)
+++ jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.definition.hbm.xml 2009-03-04 16:56:46 UTC (rev 4139)
@@ -0,0 +1,641 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping package="org.jbpm.pvm.internal.model" default-access="field">
+
+ <!-- ### PROCESS DEFINITION ############################################# -->
+ <class name="ProcessDefinitionImpl" table="JBPM_PROCESS">
+ <!-- ProcessElementImpl part ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <id name="dbid" column="DBID_">
+ <generator class="native" />
+ </id>
+ <version name="dbversion" column="DBVERSION_" />
+ <many-to-one name="properties"
+ class="WireProperties"
+ column="PROPS_"
+ foreign-key="FK_PROCDEF_PROPS"
+ index="IDX_PROCDEF_PROPS"
+ cascade="all" />
+ <list name="exceptionHandlers" cascade="all">
+ <key foreign-key="FK_EXHDLR_PROCESS">
+ <column name="PROCESS_" index="IDX_EXHDLR_PROCESS"/>
+ </key>
+ <index column="PROCESS_IDX_" />
+ <one-to-many class="ExceptionHandlerImpl"/>
+ </list>
+
+ <!-- ObservableElementImpl part ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <property name="name" column="NAME_" />
+ <property name="description" column="DESCR_" />
+ <map name="events" cascade="all-delete-orphan">
+ <key foreign-key="FK_EVENT_PROCESS">
+ <column name="PROCESS_" index="IDX_EVENT_PROCESS" />
+ </key>
+ <map-key type="string" column="NAME_" />
+ <one-to-many class="org.jbpm.pvm.internal.model.EventImpl"/>
+ </map>
+
+ <!-- CompositeElementImpl part ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <list name="activities" cascade="all" inverse="false">
+ <key foreign-key="FK_ACTS_PROCESS">
+ <column name="ACTSPROCESS_" index="IDX_ACTS_PROCESS"/>
+ </key>
+ <list-index column="ACTSPROCESS_IDX_" />
+ <one-to-many class="ActivityImpl" />
+ </list>
+ <property name="hasVariableDefinitions" column="HAS_VAR_DEF_" />
+ <list name="variableDefinitions" cascade="all">
+ <key foreign-key="FK_VARDEF_PROCESS">
+ <column name="PROCESS_" index="IDX_VARDEF_PROCESS"/>
+ </key>
+ <index column="PROCESS_IDX_" />
+ <one-to-many class="VariableDefinitionImpl" />
+ </list>
+ <property name="hasTimerDefinitions" column="HAS_TIMER_DEF_" />
+ <set name="timerDefinitions" cascade="all">
+ <key foreign-key="FK_TMRDEF_PROCESS">
+ <column name="PROCESS_" index="IDX_TMRDEF_PROCESS"/>
+ </key>
+ <one-to-many class="TimerDefinitionImpl" />
+ </set>
+
+ <!-- ProcessDefinitionImpl part ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <property name="key" column="KEY_" />
+ <property name="id" column="ID_" unique="true" />
+
+ <property name="packageName" column="PACKAGE_" />
+ <property name="version" column="VERSION_" />
+ <property name="deploymentTime" column="DEPLOYED_" />
+ <many-to-one name="initial"
+ column="INITIAL_"
+ class="ActivityImpl"
+ cascade="all"
+ foreign-key="FK_PROCDEF_INITIAL"
+ index="IDX_PROCDEF_INIT"
+ fetch="select" />
+
+ <map name="attachments" cascade="all-delete-orphan">
+ <key foreign-key="FK_LOB_PROCESS">
+ <column name="PROCESS_" index="IDX_LOB_PROCESS" />
+ </key>
+ <map-key type="string" column="NAME_" />
+ <one-to-many class="org.jbpm.pvm.internal.lob.Lob"/>
+ </map>
+ </class>
+
+ <!-- ### Activity ############################################################## -->
+ <class name="ActivityImpl" table="JBPM_ACTIVITY">
+ <!-- ProcessElementImpl part ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <id name="dbid" column="DBID_">
+ <generator class="native" />
+ </id>
+ <version name="dbversion" column="DBVERSION_" />
+ <many-to-one name="processDefinition"
+ class="ProcessDefinitionImpl"
+ column="PROCESS_"
+ foreign-key="FK_ACT_PROCESS"
+ index="IDX_ACT_PROCESS" />
+ <many-to-one name="properties"
+ class="WireProperties"
+ column="PROPS_"
+ foreign-key="FK_ACT_PROPS"
+ index="IDX_ACT_PROPS"
+ cascade="all" />
+ <list name="exceptionHandlers" cascade="all">
+ <key foreign-key="FK_EXHDLR_ACT">
+ <column name="ACT_" index="IDX_EXHDLR_ACT"/>
+ </key>
+ <index column="ACT_IDX_" />
+ <one-to-many class="ExceptionHandlerImpl" />
+ </list>
+
+ <!-- ObservableElementImpl part ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <property name="name" column="NAME_"/>
+ <property name="description" column="DESCR_"/>
+ <map name="events" cascade="all-delete-orphan">
+ <key foreign-key="FK_EVENT_ACT">
+ <column name="ACT_" index="IDX_EVENT_ACT" />
+ </key>
+ <map-key type="string" column="NAME_" />
+ <one-to-many class="org.jbpm.pvm.internal.model.EventImpl" />
+ </map>
+
+ <!-- CompositeElementImpl part ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <list name="activities" cascade="all" inverse="false">
+ <key column="PARENT_" foreign-key="none" />
+ <list-index column="PARENT_IDX_" />
+ <one-to-many class="ActivityImpl" />
+ </list>
+ <property name="hasVariableDefinitions" column="HAS_VAR_DEF_" />
+ <list name="variableDefinitions" cascade="all">
+ <key foreign-key="FK_VARDEF_ACT">
+ <column name="ACT_" index="IDX_VARDEF_ACT"/>
+ </key>
+ <index column="ACT_IDX_" />
+ <one-to-many class="VariableDefinitionImpl" />
+ </list>
+ <property name="hasTimerDefinitions" column="HAS_TIMER_DEF_" />
+ <set name="timerDefinitions" cascade="all">
+ <key foreign-key="FK_TMRDEF_ACT">
+ <column name="ACT_" index="IDX_TMRDEF_ACT"/>
+ </key>
+ <one-to-many class="TimerDefinitionImpl" />
+ </set>
+
+ <!-- ActivityImpl part ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <property name="isLocalScope" column="LOCAL_SCOPE_" />
+ <property name="isExecutionAsync" column="EXEC_ASYNC_" />
+ <property name="isSignalAsync" column="SIGNAL_ASYNC_" />
+ <property name="isPreviousNeeded" column="PREV_NEEDED_" />
+
+ <many-to-one name="parentActivity"
+ column="PARENT_"
+ class="ActivityImpl"
+ cascade="all"
+ foreign-key="FK_ACT_PARENT"
+ index="IDX_ACT_PARENT" />
+
+ <many-to-one name="defaultTransition"
+ column="DEFTRANS_"
+ class="TransitionImpl"
+ fetch="select"
+ foreign-key="FK_ACT_DEFTRANS"
+ index="IDX_ACT_DEFTRANS" />
+
+ <list name="incomingTransitions" inverse="false">
+ <key column="DESTINATION_" />
+ <index column="IN_IDX_" />
+ <one-to-many class="TransitionImpl" />
+ </list>
+
+ <list name="outgoingTransitions" inverse="false" cascade="all">
+ <key column="SOURCE_" />
+ <index column="OUT_IDX_" />
+ <one-to-many class="TransitionImpl" />
+ </list>
+
+ <component name="behaviourReference" class="ObjectReference">
+ <many-to-one name="descriptor"
+ column="BEHAV_DESCR_"
+ cascade="all"
+ class="org.jbpm.pvm.internal.wire.descriptor.AbstractDescriptor"
+ foreign-key="FK_NODE_BEHAV_DESCR"
+ index="IDX_NODE_BEHAV_DESCR" />
+ <any name="object" id-type="long" cascade="all">
+ <!-- TODO: Specify names for classes -->
+ <!-- <meta-value value="bpel::activity" class="org.jbpm.pvm.bpel.BpelActivity"/> -->
+ <column name="BEHAV_CLASS_" />
+ <column name="BEHAV_ID_" />
+ </any>
+ </component>
+ </class>
+
+ <!-- ### TRANSITION ##################################################### -->
+ <class name="TransitionImpl" table="JBPM_TRANSITION">
+ <!-- ProcessElementImpl part ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <id name="dbid" column="DBID_">
+ <generator class="native" />
+ </id>
+ <version name="dbversion" column="DBVERSION_" />
+ <many-to-one name="processDefinition"
+ class="ProcessDefinitionImpl"
+ column="PROCESS_"
+ foreign-key="FK_TRANS_PROCDEF"
+ index="IDX_TRANS_PROCDEF" />
+ <many-to-one name="properties"
+ class="WireProperties"
+ column="PROPS_"
+ foreign-key="FK_TRANS_PROPS"
+ index="IDX_TRANS_PROPS"
+ cascade="all" />
+ <list name="exceptionHandlers" cascade="all">
+ <key foreign-key="FK_EXHDLR_TRANS">
+ <column name="TRANSITION_" index="IDX_EXHDLR_TRANS" />
+ </key>
+ <index column="TRANSITION_IDX_" />
+ <one-to-many class="ExceptionHandlerImpl" />
+ </list>
+
+ <!-- ObservableElementImpl part ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <property name="name" column="NAME_" />
+ <property name="description" column="DESCR_" />
+ <map name="events" cascade="all-delete-orphan">
+ <key foreign-key="FK_EVENT_TRANS">
+ <column name="TRANSITION_" index="IDX_EVENT_TRANS" />
+ </key>
+ <map-key type="string" column="NAME_" />
+ <one-to-many class="org.jbpm.pvm.internal.model.EventImpl" />
+ </map>
+
+ <!-- TransitionImpl part ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <many-to-one name="source"
+ column="SRC_"
+ class="ActivityImpl"
+ fetch="select"
+ foreign-key="FK_TRANS_SRC"
+ index="IDX_TRANS_SRC" />
+
+ <many-to-one name="destination"
+ column="DEST_"
+ class="ActivityImpl"
+ fetch="select"
+ cascade="all"
+ foreign-key="FK_TRANS_DST"
+ index="IDX_TRANS_DST" />
+
+ <many-to-one name="conditionDescriptor"
+ column="COND_DESCR_"
+ class="org.jbpm.pvm.internal.wire.descriptor.AbstractDescriptor"
+ cascade="all"
+ foreign-key="FK_TRANS_COND"
+ index="IDX_TRANS_COND" />
+
+ <!--
+ <many-to-one name="waitConditionDescriptor"
+ column="WAIT_DESCR_"
+ class="org.jbpm.pvm.internal.wire.descriptor.AbstractDescriptor"
+ cascade="all"
+ foreign-key="FK_TRANS_WAIT_DESCR"
+ index="IDX_TRANS_WAIT_DESCR" />
+ -->
+
+ <property name="isTakeAsync" column="TAKEASYNC_" />
+ </class>
+
+ <!-- ### EVENT ########################################################## -->
+ <class name="EventImpl" table="JBPM_EVENT">
+ <!-- ProcessElementImpl part ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <id name="dbid" column="DBID_">
+ <generator class="native" />
+ </id>
+ <version name="dbversion" column="DBVERSION_" />
+ <many-to-one name="processDefinition"
+ class="ProcessDefinitionImpl"
+ column="PROCESSDEF_"
+ foreign-key="FK_EVENT_PROCDEF"
+ index="IDX_EVENT_PROCDEF" />
+ <many-to-one name="properties"
+ class="WireProperties"
+ column="PROPS_"
+ foreign-key="FK_EVENT_PROPS"
+ index="IDX_EVENT_PROPS"
+ cascade="all" />
+ <list name="exceptionHandlers" cascade="all">
+ <key foreign-key="FK_EXHDLR_EVENT">
+ <column name="EVENT_" index="IDX_EXHDLR_EVENT"/>
+ </key>
+ <index column="EVENT_IDX_" />
+ <one-to-many class="ExceptionHandlerImpl" />
+ </list>
+
+ <!-- EventImpl part ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <property name="name" column="NAME_" />
+ <list name="listenerReferences" table="JBPM_OBJECTREFERENCES" cascade="all-delete-orphan">
+ <key foreign-key="FK_OBJECTREF_EVENT">
+ <column name="EVENT_" index="IDX_OBJREF_EVENT"/>
+ </key>
+ <list-index column="EVENT_IDX_" />
+ <one-to-many class="EventListenerReference" />
+ </list>
+ </class>
+
+ <!-- ### EXCEPTION HANDLER ############################################## -->
+ <class name="ExceptionHandlerImpl" table="JBPM_EXCEPTHNDLR">
+ <id name="dbid" column="DBID_">
+ <generator class="native" />
+ </id>
+ <version name="dbversion" column="DBVERSION_" />
+ <property name="exceptionClassName" column="EXCEPT_CLASS_" />
+ <property name="isTransactional" column="TRANSACT_" />
+ <property name="isRethrowMasked" column="RETHROW_MASKED_"/>
+ <property name="transitionName" column="TRANSITIONNAME_" />
+ <property name="activityName" column="NODENAME_" />
+ <list name="eventListenerReferences"
+ inverse="false"
+ cascade="all-delete-orphan"
+ table="JBPM_OBJECTREFERENCES">
+ <key foreign-key="FK_OBJREF_EXHNDLR" not-null="false">
+ <column name="EXHNDLR_" index="IDX_OBJREF_EXHNDLR" />
+ </key>
+ <list-index column="EXHNDLR_IDX_" />
+ <one-to-many class="ObjectReference" />
+ </list>
+ </class>
+
+ <!-- ### OBJECT REFERENCE ############################################### -->
+ <class name="ObjectReference" discriminator-value="objref" table="JBPM_OBJECTREF">
+ <id name="dbid" column="DBID_">
+ <generator class="native" />
+ </id>
+ <discriminator column="CLASS_" />
+ <version name="dbversion" column="DBVERSION_" />
+ <many-to-one name="descriptor"
+ column="OBJ_DESCR_"
+ class="org.jbpm.pvm.internal.wire.descriptor.AbstractDescriptor"
+ cascade="all"
+ foreign-key="FK_OBJREF_EVENT"
+ index="IDX_OBJREF_EVENT"/>
+ <any name="object" id-type="long" cascade="all">
+ <!-- TODO: Specify names for classes -->
+ <column name="OBJ_CLASS_" />
+ <column name="OBJ_ID_" />
+ </any>
+ <property name="expression" column="OBJ_EXPRESSION_"/>
+ <property name="expressionLanguage" column="OBJ_EXPRLANG_"/>
+
+ <subclass name="EventListenerReference" discriminator-value="evtlis">
+ <property name="isPropagationEnabled" column="PROPAGATE_" />
+ </subclass>
+
+ </class>
+
+ <!-- ### VARIABLE DEFINITION ############################################ -->
+ <class name="VariableDefinitionImpl" table="JBPM_VARIABLEDEF">
+ <id name="dbid" column="DBID_">
+ <generator class="native" />
+ </id>
+ <version name="dbversion" column="DBVERSION_" />
+ <property name="name" column="NAME_"/>
+ <property name="typeName" column="TYPE_"/>
+
+ <property name="inVariableName" column="INVAR_" />
+ <property name="inExpression" column="INEXPR_" />
+ <many-to-one name="inDescriptor"
+ column="INDESCR_"
+ class="org.jbpm.pvm.internal.wire.descriptor.AbstractDescriptor"
+ cascade="all"
+ foreign-key="FK_VARDEF_INDES"
+ index="IDX_VARDEF_INDES"/>
+ <property name="outVariableName" column="OUTVAR_" />
+ <property name="outExpression" column="OUTEXPR_" />
+ </class>
+
+ <!-- ### TIMER DEFINITION ############################################### -->
+ <class name="TimerDefinitionImpl" table="JBPM_TIMERDEF">
+ <id name="dbid" column="DBID_">
+ <generator class="native" />
+ </id>
+ <version name="dbversion" column="DBVERSION_" />
+ <property name="dueDateDescription" column="DUEDATEDESCR_"/>
+ <property name="repeat" column="REPEAT_"/>
+ <property name="isExclusive" column="ISEXCL_"/>
+ <property name="retries" column="RETRIES_"/>
+ <property name="eventName" column="EVENT_"/>
+ <property name="signalName" column="SIGNAL_"/>
+ <property name="dueDate" column="DUEDATE_" type="timestamp"/>
+ </class>
+
+ <!-- ### DESCRIPTORS #################################################### -->
+ <class name="org.jbpm.pvm.internal.wire.descriptor.AbstractDescriptor" table="JBPM_DESCRIPTOR" abstract="true"
+ discriminator-value="abstract">
+ <!--
+ byte : ByteDescriptor
+ string : StringDescriptor
+ char : CharacterDescriptor
+ class : ClassDescriptor
+ double : DoubleDescriptor
+ expr : ExpressionDescriptor
+ float : FloatDescriptor
+ long : LongDescriptor
+ int : IntegerDescriptor
+ short : ShortDescriptor
+ coll : CollectionDescriptor
+ map : MapDescriptor
+ list : ListDescriptor
+ set : SetDescriptor
+ object : ObjectDescriptor
+ ref : ReferenceDescriptor
+ null : NullDescriptor
+ true : TrueDescriptor
+ false : FalseDescriptor
+ provided : ProvidedObjectDescriptor
+ -->
+ <id name="dbid" column="DBID_">
+ <generator class="native" />
+ </id>
+ <discriminator column="CLASS_" />
+ <version name="dbversion" column="DBVERSION_" />
+
+ <property name="name" column="NAME_" />
+ <property name="init" column="INIT_" />
+
+ <subclass name="org.jbpm.pvm.internal.wire.descriptor.NullDescriptor" discriminator-value="null_" />
+ <subclass name="org.jbpm.pvm.internal.wire.descriptor.TrueDescriptor" discriminator-value="true" />
+ <subclass name="org.jbpm.pvm.internal.wire.descriptor.FalseDescriptor" discriminator-value="false" />
+
+ <subclass name="org.jbpm.pvm.internal.wire.descriptor.StringDescriptor" discriminator-value="string">
+ <property name="text" column="TEXT_" />
+ </subclass>
+
+ <subclass name="org.jbpm.pvm.internal.wire.descriptor.CharacterDescriptor" discriminator-value="char">
+ <property name="text" column="TEXT_" />
+ </subclass>
+ <subclass name="org.jbpm.pvm.internal.wire.descriptor.ClassDescriptor" discriminator-value="class">
+ <property name="text" column="TEXT_" />
+ </subclass>
+ <subclass name="org.jbpm.pvm.internal.wire.descriptor.ReferenceDescriptor" discriminator-value="ref">
+ <property name="text" column="TEXT_" />
+ </subclass>
+
+ <subclass name="org.jbpm.pvm.internal.wire.descriptor.DoubleDescriptor" discriminator-value="double">
+ <property name="doubleVal" column="DOUBLEVAL_" />
+ </subclass>
+ <subclass name="org.jbpm.pvm.internal.wire.descriptor.FloatDescriptor" discriminator-value="float">
+ <property name="doubleVal" column="DOUBLEVAL_" />
+ </subclass>
+
+ <subclass name="org.jbpm.pvm.internal.wire.descriptor.LongDescriptor" discriminator-value="long">
+ <property name="longVal" column="LONGVAL_" />
+ </subclass>
+ <subclass name="org.jbpm.pvm.internal.wire.descriptor.IntegerDescriptor" discriminator-value="int">
+ <property name="longVal" column="LONGVAL_" />
+ </subclass>
+ <subclass name="org.jbpm.pvm.internal.wire.descriptor.ShortDescriptor" discriminator-value="short">
+ <property name="longVal" column="LONGVAL_" />
+ </subclass>
+ <subclass name="org.jbpm.pvm.internal.wire.descriptor.ByteDescriptor" discriminator-value="byte">
+ <property name="longVal" column="LONGVAL_" />
+ </subclass>
+
+ <subclass name="org.jbpm.pvm.internal.wire.descriptor.CollectionDescriptor" discriminator-value="coll">
+ <property name="className" column="CLASSNAME_" />
+ <list name="valueDescriptors" cascade="all-delete-orphan">
+ <key foreign-key="FK_DESCR_VALDESCR">
+ <column name="VALUEDESCR_" index="IDX_DESCR_VALDESCR" />
+ </key>
+ <list-index column="VALUEDESCR_IDX_" />
+ <one-to-many class="org.jbpm.pvm.internal.wire.descriptor.AbstractDescriptor" />
+ </list>
+
+ <subclass name="org.jbpm.pvm.internal.wire.descriptor.MapDescriptor" discriminator-value="map">
+ <list name="keyDescriptors" cascade="all-delete-orphan">
+ <key column="KEYDESCR_" foreign-key="FK_DESCR_KEYDESCR" />
+ <list-index column="KEYDESCR_IDX_" />
+ <one-to-many class="org.jbpm.pvm.internal.wire.descriptor.AbstractDescriptor" />
+ </list>
+ </subclass>
+
+ <subclass name="org.jbpm.pvm.internal.wire.descriptor.ListDescriptor" discriminator-value="list" />
+ <subclass name="org.jbpm.pvm.internal.wire.descriptor.SetDescriptor" discriminator-value="set" />
+ </subclass>
+
+
+ <subclass name="org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor" discriminator-value="object">
+ <property name="className" column="TEXT_" />
+ <property name="methodName" column="METHOD_" />
+ <property name="isAutoWireEnabled" column="BOOLVAL_" />
+ <property name="factoryObjectName" column="FACTORYNAME_" />
+
+ <many-to-one name="factoryDescriptor" class="org.jbpm.pvm.internal.wire.descriptor.AbstractDescriptor" column="FACTORYDESCR_"
+ foreign-key="FK_DESCR_ARG_REF" index="IDX_DESCR_ARG_REF" cascade="all" />
+
+ <list name="argDescriptors" cascade="all-delete-orphan">
+ <key foreign-key="FK_OBJARG_DESCR">
+ <column name="OBJARG_DESCR_" index="IDX_OBJARG_DESCR" />
+ </key>
+ <list-index column="OBJARG_DESCR_IDX_" />
+ <one-to-many class="org.jbpm.pvm.internal.wire.descriptor.ArgDescriptor" />
+ </list>
+
+ <list name="operations" cascade="all-delete-orphan">
+ <key foreign-key="FK_OBJOPER_DESCR">
+ <column name="OBJOPER_DESCR_" index="IDX_OBJOPER_DESCR" />
+ </key>
+ <list-index column="OBJOPER_DESCR_IDX_" />
+ <one-to-many class="org.jbpm.pvm.internal.wire.operation.AbstractOperation" />
+ </list>
+ </subclass>
+
+ <subclass name="org.jbpm.pvm.internal.wire.descriptor.ExpressionDescriptor" discriminator-value="expr">
+ <property name="expr" column="TEXT_" />
+ <property name="lang" column="METHOD_" />
+ </subclass>
+
+ <subclass name="org.jbpm.pvm.internal.wire.descriptor.ProvidedObjectDescriptor" discriminator-value="provided">
+ <any name="providedObject" id-type="long" cascade="all">
+ <column name="TEXT_" />
+ <column name="LONGVAL_" />
+ </any>
+ <property name="exposeType" column="BOOLVAL_" />
+ </subclass>
+
+ <subclass name="org.jbpm.pvm.internal.wire.descriptor.EnvDescriptor" discriminator-value="env">
+ <property name="objectName" column="TEXT_" />
+ <property name="typeName" column="CLASSNAME_" />
+ </subclass>
+
+ </class>
+
+ <!-- ### OPERATIONS ##################################################### -->
+ <class name="org.jbpm.pvm.internal.wire.operation.AbstractOperation" abstract="true"
+ table="JBPM_OPERATION" discriminator-value="oper">
+ <id name="dbid" column="DBID_">
+ <generator class="native" />
+ </id>
+ <discriminator column="CLASS_" />
+ <version name="dbversion" column="DBVERSION_" />
+
+ <subclass name="org.jbpm.pvm.internal.wire.operation.FieldOperation"
+ discriminator-value="field">
+ <property name="fieldName" column="TEXT_" />
+ <many-to-one name="descriptor" column="DESCR_" cascade="all"
+ class="org.jbpm.pvm.internal.wire.descriptor.AbstractDescriptor"
+ foreign-key="FK_OPER_DESC" index="IDX_OPER_DESC" />
+ </subclass>
+
+ <subclass name="org.jbpm.pvm.internal.wire.operation.PropertyOperation"
+ discriminator-value="prop">
+ <property name="setterName" column="TEXT_" />
+ <many-to-one name="descriptor" column="DESCR_" cascade="all"
+ class="org.jbpm.pvm.internal.wire.descriptor.AbstractDescriptor" />
+ </subclass>
+
+ <subclass name="org.jbpm.pvm.internal.wire.operation.InvokeOperation"
+ discriminator-value="invoke">
+ <property name="methodName" column="TEXT_" />
+ <list name="argDescriptors" cascade="all-delete-orphan">
+ <key foreign-key="FK_ARGDSCR_OPER">
+ <column name="OPER_" index="IDX_ARGDSCR_OPER" />
+ </key>
+ <list-index column="OPER_IDX_" />
+ <one-to-many class="org.jbpm.pvm.internal.wire.descriptor.ArgDescriptor" />
+ </list>
+ </subclass>
+ </class>
+
+ <!-- ### ARG DESCRIPTOR ################################################# -->
+ <class name="org.jbpm.pvm.internal.wire.descriptor.ArgDescriptor" table="JBPM_ARGDESCRIPTOR">
+ <id name="dbid" column="DBID_">
+ <generator class="native" />
+ </id>
+ <version name="dbversion" column="DBVERSION_" />
+ <property name="typeName" column="TYPENAME_" />
+ <many-to-one name="descriptor" column="DESCRIPTOR_"
+ class="org.jbpm.pvm.internal.wire.descriptor.AbstractDescriptor"
+ foreign-key="FK_ARGDESCR_DESCR" index="IDX_ARGDESCR_DESCR" cascade="all" />
+ </class>
+
+ <!-- ### PROPERTIES ##################################################### -->
+ <class name="org.jbpm.pvm.internal.model.WireProperties" table="JBPM_WIREPROPS">
+ <id name="dbid" column="DBID_">
+ <generator class="native" />
+ </id>
+ <version name="dbversion" column="DBVERSION_" />
+ <component name="wireContext" class="org.jbpm.pvm.internal.wire.WireContext">
+ <component name="wireDefinition" class="org.jbpm.pvm.internal.wire.WireDefinition">
+ <map name="descriptors" cascade="all-delete-orphan" lazy="false">
+ <key foreign-key="FK_DESCR_PROPS">
+ <column name="PROPS_" index="IDX_DESCR_PROPS" />
+ </key>
+ <map-key type="string" column="NAME_" />
+ <one-to-many class="org.jbpm.pvm.internal.wire.descriptor.AbstractDescriptor" />
+ </map>
+ </component>
+ </component>
+ </class>
+
+
+ <!-- ### QUERIES ######################################################## -->
+
+ <query name="findProcessDefinitionKeys">
+ <![CDATA[
+ select distinct process.key
+ from org.jbpm.pvm.internal.model.ProcessDefinitionImpl as process
+ order by process.key asc
+ ]]>
+ </query>
+
+ <query name="findProcessDefinitionsByKey">
+ <![CDATA[
+ select process
+ from org.jbpm.pvm.internal.model.ProcessDefinitionImpl as process
+ where process.key = :key
+ order by process.version desc
+ ]]>
+ </query>
+
+ <query name="findProcessDefinitionById">
+ <![CDATA[
+ select process
+ from org.jbpm.pvm.internal.model.ProcessDefinitionImpl as process
+ where process.id = :id
+ ]]>
+ </query>
+
+ <query name="findProcessDefinitionKeysByName">
+ <![CDATA[
+ select process.key
+ from org.jbpm.pvm.internal.model.ProcessDefinitionImpl as process
+ where process.name = :name
+ ]]>
+ </query>
+
+ <query name="findProcessDefinitionNamesByKey">
+ <![CDATA[
+ select process.name
+ from org.jbpm.pvm.internal.model.ProcessDefinitionImpl as process
+ where process.key = :key
+ ]]>
+ </query>
+
+</hibernate-mapping>
\ No newline at end of file
Property changes on: jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.definition.hbm.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.execution.hbm.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.execution.hbm.xml (rev 0)
+++ jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.execution.hbm.xml 2009-03-04 16:56:46 UTC (rev 4139)
@@ -0,0 +1,375 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping package="org.jbpm.pvm.internal.model" default-access="field">
+
+ <!-- ### TYPEDEFS ####################################################### -->
+ <typedef name="converter" class="org.jbpm.pvm.internal.hibernate.ConverterType">
+ <param name="org.jbpm.pvm.internal.type.converter.BooleanToStringConverter" >bool-str</param>
+ <param name="org.jbpm.pvm.internal.type.converter.ByteToLongConverter" >byte-long</param>
+ <param name="org.jbpm.pvm.internal.type.converter.CharacterToStringConverter" >char-str</param>
+ <param name="org.jbpm.pvm.internal.type.converter.DateToLongConverter" >date-long</param>
+ <param name="org.jbpm.pvm.internal.type.converter.DateToStringConverter" >date-str</param>
+ <param name="org.jbpm.pvm.internal.type.converter.DoubleToStringConverter" >double-str</param>
+ <param name="org.jbpm.pvm.internal.type.converter.FloatToDoubleConverter" >float-double</param>
+ <param name="org.jbpm.pvm.internal.type.converter.FloatToStringConverter" >float-str</param>
+ <param name="org.jbpm.pvm.internal.type.converter.IntegerToLongConverter" >int-long</param>
+ <param name="org.jbpm.pvm.internal.type.converter.SerializableToBytesConverter">ser-bytes</param>
+ <param name="org.jbpm.pvm.internal.type.converter.ShortToLongConverter" >short-long</param>
+ </typedef>
+
+ <!-- ### PROCESS DEFINITION ############################################# -->
+ <class name="ExecutionImpl" table="JBPM_EXECUTION">
+ <id name="dbid" column="DBID_">
+ <generator class="native" />
+ </id>
+ <version name="dbversion" column="DBVERSION_" />
+
+ <many-to-one name="activity"
+ class="org.jbpm.pvm.internal.model.ActivityImpl"
+ column="ACT_"
+ lazy="false"
+ foreign-key="FK_EXEC_ACT"
+ index="IDX_EXEC_ACT" />
+
+ <property name="hasVariables" column="HASVARS_" />
+ <map name="variables"
+ cascade="all-delete-orphan"
+ table="JBPM_VARIABLE">
+ <key foreign-key="FK_VAR_EXECUTION">
+ <column name="EXECUTION_" index="IDX_VAR_EXECUTION"/>
+ </key>
+ <map-key type="string" column="KEY_" />
+ <one-to-many class="org.jbpm.pvm.internal.type.Variable" />
+ </map>
+
+ <property name="hasTimers" column="HASTIMERS_" />
+ <set name="timers"
+ cascade="all-delete-orphan">
+ <key foreign-key="FK_TMR_EXECUTION">
+ <column name="EXECUTION_" />
+ </key>
+ <one-to-many class="org.jbpm.pvm.internal.job.TimerImpl" />
+ </set>
+
+ <property name="name" column="NAME_" />
+ <property name="key" column="KEY_" />
+ <property name="id" column="ID_" unique="true" />
+
+ <property name="state" column="STATE_" />
+
+ <property name="priority" column="PRIORITY_" />
+ <property name="historyActivityInstanceDbid" column="HISACTINST_" />
+
+ <many-to-one name="processDefinition"
+ class="org.jbpm.pvm.internal.model.ProcessDefinitionImpl"
+ column="PROCESS_"
+ foreign-key="FK_EXEC_PROCESS"
+ index="IDX_EXEC_PROCESS" />
+
+ <many-to-one name="transition" column="TRANSITION_" class="TransitionImpl" />
+
+ <many-to-one name="transitionOrigin"
+ class="org.jbpm.pvm.internal.model.ActivityImpl"
+ column="TRANSORIG_"
+ foreign-key="FK_EXEC_TRANSORIG"
+ index="IDX_EXEC_TRANSORIG" />
+
+ <list name="executions"
+ cascade="all-delete-orphan"
+ inverse="false">
+ <key column="PARENT_" foreign-key="FK_EXEC_PARENT" />
+ <list-index column="PARENT_IDX_" />
+ <one-to-many class="ExecutionImpl" />
+ </list>
+
+ <many-to-one name="parent"
+ column="PARENT_"
+ class="ExecutionImpl"
+ foreign-key="FK_EXEC_PARENT"
+ index="IDX_EXEC_PARENT" />
+
+ <many-to-one name="processInstance"
+ class="ExecutionImpl"
+ column="INSTANCE_"
+ foreign-key="FK_EXEC_INSTANCE"
+ index="IDX_EXEC_INSTANCE" />
+
+ <many-to-one name="superProcessExecution"
+ column="SUPEREXEC_"
+ class="ExecutionImpl"
+ foreign-key="FK_EXEC_SUPEREXEC"
+ index="IDX_EXEC_SUPEREXEC" />
+ </class>
+
+ <!-- ### COMMENTS ####################################################### -->
+ <class name="CommentImpl" table="JBPM_COMMENT">
+ <id name="dbid" column="DBID_">
+ <generator class="native" />
+ </id>
+ <discriminator column="CLASS_" />
+ <version name="dbversion" column="DBVERSION_" />
+
+ <property name="userId" column="USERID_" />
+ <property name="time" column="TIME_" />
+ <property name="message" column="MESSAGE_" />
+
+ <list name="comments"
+ cascade="all-delete-orphan"
+ inverse="false">
+ <key column="PARENT_" foreign-key="none" />
+ <list-index column="PARENT_IDX_" />
+ <one-to-many class="CommentImpl" />
+ </list>
+ </class>
+
+ <!-- ### VARIABLE ####################################################### -->
+ <class name="org.jbpm.pvm.internal.type.Variable" abstract="true" discriminator-value=" " table="JBPM_VARIABLE">
+ <!-- discriminator values:
+ date : org.jbpm.pvm.internal.type.variable.DateVariable
+ double : org.jbpm.pvm.internal.type.variable.DoubleVariable
+ hibl : org.jbpm.pvm.internal.type.variable.HibernateLongVariable
+ long : org.jbpm.pvm.internal.type.variable.LongVariable
+ hibs : org.jbpm.pvm.internal.type.variable.HibernateStringVariable
+ string : org.jbpm.pvm.internal.type.variable.StringVariable
+ null : org.jbpm.pvm.internal.type.variable.NullVariable
+ blob : org.jbpm.pvm.internal.type.variable.BlobVariable
+ clob : org.jbpm.pvm.internal.type.variable.ClobVariable
+ -->
+
+ <id name="dbid" column="DBID_">
+ <generator class="native" />
+ </id>
+ <discriminator column="CLASS_"/>
+ <version name="dbversion" column="DBVERSION_" />
+
+ <property name="key" column="KEY_"/>
+ <property name="queryText" column="QUERYTEXT_" />
+ <property name="converter" type="converter" column="CONVERTER_" />
+ <many-to-one name="processInstance"
+ column="PROCINST_"
+ class="org.jbpm.pvm.internal.model.ExecutionImpl"
+ foreign-key="FK_VAR_PROCINST"
+ index="IDX_VAR_PROCINST"/>
+ </class>
+
+ <subclass name="org.jbpm.pvm.internal.type.variable.DateVariable" extends="org.jbpm.pvm.internal.type.Variable" discriminator-value="T">
+ <property name="date" column="DATE_VALUE_" type="timestamp"/>
+ </subclass>
+
+ <subclass name="org.jbpm.pvm.internal.type.variable.DoubleVariable" extends="org.jbpm.pvm.internal.type.Variable" discriminator-value="D">
+ <property name="d" column="DOUBLE_VALUE_" type="double"/>
+ </subclass>
+
+ <subclass name="org.jbpm.pvm.internal.type.variable.HibernateLongVariable" extends="org.jbpm.pvm.internal.type.Variable" discriminator-value="l">
+ <property name="hibernatable" column="LONG_VALUE_" type="long"/>
+ </subclass>
+
+ <subclass name="org.jbpm.pvm.internal.type.variable.LongVariable" extends="org.jbpm.pvm.internal.type.Variable" discriminator-value="L">
+ <property name="l" column="LONG_VALUE_" type="long"/>
+ </subclass>
+
+ <subclass name="org.jbpm.pvm.internal.type.variable.HibernateStringVariable" extends="org.jbpm.pvm.internal.type.Variable" discriminator-value="s">
+ <property name="hibernatable" column="STRING_VALUE_" type="string"/>
+ </subclass>
+
+ <subclass name="org.jbpm.pvm.internal.type.variable.StringVariable" extends="org.jbpm.pvm.internal.type.Variable" discriminator-value="S">
+ <property name="string" column="STRING_VALUE_" type="string"/>
+ </subclass>
+
+ <subclass name="org.jbpm.pvm.internal.type.variable.NullVariable" extends="org.jbpm.pvm.internal.type.Variable" discriminator-value="N">
+ </subclass>
+
+ <subclass name="org.jbpm.pvm.internal.type.variable.BlobVariable" extends="org.jbpm.pvm.internal.type.Variable" discriminator-value="B">
+ <many-to-one name="lob"
+ column="LOB_"
+ cascade="all"
+ class="org.jbpm.pvm.internal.lob.Lob"
+ foreign-key="FK_VAR_LOB"
+ index="IDX_VAR_LOB" />
+ </subclass>
+
+ <subclass name="org.jbpm.pvm.internal.type.variable.ClobVariable" extends="org.jbpm.pvm.internal.type.Variable" discriminator-value="C">
+ <many-to-one name="lob"
+ column="LOB_"
+ cascade="all"
+ class="org.jbpm.pvm.internal.lob.Lob"
+ foreign-key="none"/>
+ </subclass>
+
+ <!-- ### LOB ############################################################ -->
+ <class name="org.jbpm.pvm.internal.lob.Lob" table="JBPM_LOB">
+ <id name="dbid" column="DBID_">
+ <generator class="native" />
+ </id>
+ <version name="dbversion" column="DBVERSION_" />
+ <property name="blob" type="blob" column="BLOB_VALUE_" />
+ <property name="bytes" type="binary" column="BINARY_VALUE_"/>
+ <property name="clob" type="clob" column="CLOB_VALUE_" />
+ <property name="text" type="text" column="TEXT_VALUE_"/>
+ </class>
+
+ <class name="org.jbpm.pvm.internal.job.JobImpl" table="JBPM_JOB" discriminator-value="Job">
+ <id name="dbid" column="DBID_">
+ <generator class="native" />
+ </id>
+ <discriminator column="CLASS_" />
+ <version name="dbversion" column="DBVERSION_" />
+
+ <property name="dueDate" column="DUEDATE_" type="timestamp" index="IDX_JOBDUEDATE" />
+ <property name="isSuspended" column="ISSUSPENDED_" />
+ <property name="isExclusive" column="ISEXCLUSIVE_" />
+ <property name="lockOwner" column="LOCKOWNER_" />
+ <property name="lockExpirationTime" column="LOCKEXPTIME_" index="IDX_JOBLOCKEXP" />
+ <property name="info" column="INFO_" />
+ <property name="exception" column="EXCEPTION_" type="text" />
+ <property name="retries" column="RETRIES_" index="IDX_JOBRETRIES" />
+
+ <many-to-one name="processInstance"
+ class="org.jbpm.pvm.internal.model.ExecutionImpl"
+ column="PROCESSINSTANCE_"
+ cascade="none"
+ foreign-key="FK_JOB_PRINST"
+ index="IDX_JOB_PRINST"/>
+ <many-to-one name="execution"
+ class="org.jbpm.pvm.internal.model.ExecutionImpl"
+ column="EXECUTION_"
+ cascade="none"
+ foreign-key="FK_JOB_EXE"
+ index="IDX_JOB_EXE"/>
+ <many-to-one name="commandDescriptor"
+ column="CMDDESCR_"
+ class="org.jbpm.pvm.internal.wire.descriptor.AbstractDescriptor"
+ cascade="all"
+ foreign-key="FK_JOB_CMDDESCR"
+ index="IDX_JOB_CMDDESCR"/>
+
+ <subclass name="org.jbpm.pvm.internal.job.MessageImpl" discriminator-value="Msg">
+ <subclass name="org.jbpm.pvm.internal.model.op.ExecuteActivityMessage" discriminator-value="ExeActivityMsg" />
+ <subclass name="org.jbpm.pvm.internal.model.op.SignalMessage" discriminator-value="SignalMsg">
+ <property name="signalName" column="SIGNAL_" />
+ <many-to-one name="activity"
+ column="NODE_"
+ cascade="none"
+ foreign-key="FK_JOB_NODE"/>
+ </subclass>
+ <subclass name="org.jbpm.pvm.internal.model.op.TakeTransitionMessage" discriminator-value="TakeTrMsg" />
+ <subclass name="org.jbpm.pvm.internal.model.op.ProceedToDestinationMessage" discriminator-value="ProceedDestMsg" />
+ <subclass name="org.jbpm.pvm.internal.job.CommandMessage" discriminator-value="CmdMsg" />
+ </subclass>
+
+ <subclass name="org.jbpm.pvm.internal.job.TimerImpl" discriminator-value="Timer">
+ <property name="signalName" column="SIGNAL_" />
+ <property name="eventName" column="EVENT_" />
+ <property name="repeat" column="REPEAT_" />
+ </subclass>
+
+ </class>
+
+ <!-- ### HibernatePvmDbSession QUERIES ################################## -->
+
+ <query name="findTimers">
+ <![CDATA[
+ select t
+ from org.jbpm.pvm.internal.job.TimerImpl as t
+ order by dueDate asc
+ ]]>
+ </query>
+
+ <query name="findMessages">
+ <![CDATA[
+ select m
+ from org.jbpm.pvm.internal.job.MessageImpl as m
+ ]]>
+ </query>
+
+ <query name="findJobsWithException">
+ <![CDATA[
+ select job
+ from org.jbpm.pvm.internal.job.JobImpl as job
+ where job.retries = 0
+ order by dueDate asc
+ ]]>
+ </query>
+
+ <!-- ### HibernateJobDbSession QUERIES ################################## -->
+ <query name="findFirstAcquirableJob">
+ <![CDATA[
+ select job
+ from org.jbpm.pvm.internal.job.JobImpl as job
+ where ( ( (job.lockExpirationTime is null)
+ or (job.lockExpirationTime <= :now)
+ )
+ and
+ ( (job.dueDate is null)
+ or (job.dueDate <= :now)
+ )
+ and
+ ( job.retries > 0 )
+ )
+ order by job.dueDate asc
+ ]]>
+ </query>
+
+ <query name="findExclusiveJobs">
+ <![CDATA[
+ select job
+ from org.jbpm.pvm.internal.job.JobImpl as job
+ where job.lockOwner is null
+ and job.processInstance = :processInstance
+ and job.isExclusive = true
+ and job.retries > 0
+ and ( (job.dueDate is null)
+ or (job.dueDate <= :now)
+ )
+ order by job.dueDate asc
+ ]]>
+ </query>
+
+ <query name="findFirstDueJob">
+ <![CDATA[
+ select job
+ from org.jbpm.pvm.internal.job.JobImpl as job
+ where job.lockOwner is null
+ and job.retries > 0
+ order by job.dueDate asc
+ ]]>
+ </query>
+
+ <!-- ### HibernatePvmDbSession QUERIES ############################################# -->
+ <query name="findExecutionById">
+ <![CDATA[
+ select execution
+ from org.jbpm.pvm.internal.model.ExecutionImpl as execution
+ where execution.id = :id
+ ]]>
+ </query>
+
+ <query name="findProcessInstanceById">
+ <![CDATA[
+ select processInstance
+ from org.jbpm.pvm.internal.model.ExecutionImpl as processInstance
+ where processInstance.id = :processInstanceId
+ and processInstance.parent is null
+ ]]>
+ </query>
+
+ <query name="findExecutionByKey">
+ <![CDATA[
+ select execution
+ from org.jbpm.pvm.internal.model.ExecutionImpl as execution
+ where execution.key = :executionKey
+ and execution.processDefinition.name = :processDefinitionName
+ ]]>
+ </query>
+
+ <query name="findProcessInstanceIds">
+ <![CDATA[
+ select processInstance.id
+ from org.jbpm.pvm.internal.model.ExecutionImpl as processInstance
+ where processInstance.processDefinition.id = :processDefinitionId
+ and processInstance.parent is null
+ ]]>
+ </query>
+
+</hibernate-mapping>
\ No newline at end of file
Property changes on: jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.execution.hbm.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.hibernate.cfg.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.hibernate.cfg.xml (rev 0)
+++ jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.hibernate.cfg.xml 2009-03-04 16:56:46 UTC (rev 4139)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!DOCTYPE hibernate-configuration PUBLIC
+ "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
+
+<hibernate-configuration>
+ <session-factory>
+ <property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
+ <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
+ <property name="hibernate.connection.url">jdbc:hsqldb:mem:.</property>
+ <property name="hibernate.connection.username">sa</property>
+ <property name="hibernate.connection.password"></property>
+ <property name="hibernate.hbm2ddl.auto">create-drop</property>
+ <property name="hibernate.format_sql">true</property>
+ <property name="hibernate.cache.use_second_level_cache">true</property>
+ <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
+ <mapping resource="jbpm.definition.hbm.xml" />
+ <mapping resource="jbpm.execution.hbm.xml" />
+ <mapping resource="jbpm.history.hbm.xml" />
+ <mapping resource="jbpm.task.hbm.xml" />
+ <mapping resource="jbpm.jpdl.hbm.xml" />
+ </session-factory>
+</hibernate-configuration>
Property changes on: jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.hibernate.cfg.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Added: jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.history.hbm.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.history.hbm.xml (rev 0)
+++ jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.history.hbm.xml 2009-03-04 16:56:46 UTC (rev 4139)
@@ -0,0 +1,73 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping package="org.jbpm.pvm.internal.history.model" default-access="field">
+
+ <!-- ### HISTORY PROCESS INSTANCE ####################################### -->
+ <class name="HistoryProcessInstanceImpl" table="JBPM_HIST_PROCINST">
+ <id name="processInstanceId" column="ID_">
+ <generator class="assigned" />
+ </id>
+ <version name="dbversion" column="DBVERSION_" />
+
+ <property name="processDefinitionId" column="PROCDEFID_" />
+ <property name="key" column="KEY_" />
+ <property name="startTime" column="START_" type="timestamp" />
+ <property name="endTime" column="END_" type="timestamp" />
+ <property name="duration" column="DURATION_" />
+ <property name="state" column="STATE_" />
+ <property name="endActivityName" column="ENDACTIVITY_" />
+
+ <many-to-one name="processDefinition"
+ class="org.jbpm.pvm.internal.model.ProcessDefinitionImpl"
+ column="PROCDEF_"
+ foreign-key="FK_HISTPI_PROCDEF"
+ index="IDX_HISTPI_PROCDEF" />
+
+ <set name="historyActivityInstances"
+ cascade="all">
+ <key>
+ <column name="HPI_" />
+ </key>
+ <one-to-many class="HistoryActivityInstanceImpl" />
+ </set>
+
+ </class>
+
+ <!-- ### HISTORY PROCESS INSTANCE ####################################### -->
+ <class name="HistoryActivityInstanceImpl" table="JBPM_HIST_ACTINST" discriminator-value="ACT">
+ <id name="dbid" column="DBID_">
+ <generator class="native" />
+ </id>
+ <discriminator column="CLASS_" />
+ <version name="dbversion" column="DBVERSION_" />
+
+ <many-to-one name="historyProcessInstance"
+ class="HistoryProcessInstanceImpl"
+ column="HPI_"
+ foreign-key="FK_HAI_HPI"
+ index="IDX_HAI_HPI" />
+
+ <many-to-one name="activity"
+ class="org.jbpm.pvm.internal.model.ActivityImpl"
+ column="ACTIVITY_"
+ foreign-key="FK_HISTAI_ACT"
+ index="IDX_HISTAI_ACT" />
+
+ <property name="executionId" column="EXECUTION_" />
+ <property name="activityName" column="ACTIVITY_NAME_" />
+ <property name="startTime" column="START_" type="timestamp" />
+ <property name="endTime" column="END_" type="timestamp" />
+ <property name="duration" column="DURATION_" />
+ <property name="transitionName" column="TRANSITION_" />
+
+ <subclass name="HistoryAutomaticInstanceImpl" discriminator-value="AUT">
+ <subclass name="HistoryExclusiveInstanceImpl" discriminator-value="EXCL" />
+ </subclass>
+
+ <subclass name="HistoryTaskInstanceImpl" discriminator-value="TASK">
+ <property name="assignee" column="ASSIGNEE_" />
+ </subclass>
+ </class>
+
+</hibernate-mapping>
\ No newline at end of file
Property changes on: jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.history.hbm.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.identity.cfg.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.identity.cfg.xml (rev 0)
+++ jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.identity.cfg.xml 2009-03-04 16:56:46 UTC (rev 4139)
@@ -0,0 +1,312 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jboss-identity xmlns="urn:jboss:identity:idm:config:v1_0_alpha"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:identity:idm:config:v1_0_alpha identity-config.xsd">
+ <realms>
+ <realm>
+ <id>realm://jbpm-identity</id>
+ <repository-id-ref>jBPM Identity DB</repository-id-ref>
+ <identity-type-mappings>
+ <identity-mapping>IDENTITY</identity-mapping>
+ </identity-type-mappings>
+ </realm>
+ </realms>
+
+ <repositories>
+ <repository>
+ <id>jBPM Identity DB</id>
+ <class>org.jboss.identity.idm.impl.repository.WrapperIdentityStoreRepository</class>
+ <external-config/>
+ <default-identity-store-id>Hibernate Identity Store</default-identity-store-id>
+ <default-attribute-store-id>Hibernate Identity Store</default-attribute-store-id>
+ <options>
+ <option>
+ <name>allowNotDefinedAttributes</name>
+ <value>true</value>
+ </option>
+ </options>
+ </repository>
+ </repositories>
+
+ <stores>
+ <attribute-stores/>
+ <identity-stores>
+ <identity-store>
+ <id>Hibernate Identity Store</id>
+ <class>org.jboss.identity.idm.impl.store.hibernate.HibernateIdentityStoreImpl</class>
+ <external-config/>
+ <supported-relationship-types>
+ <relationship-type>JBOSS_IDENTITY_MEMBERSHIP</relationship-type>
+ <relationship-type>JBOSS_IDENTITY_ROLE</relationship-type>
+ </supported-relationship-types>
+ <supported-identity-object-types>
+ <identity-object-type>
+ <name>IDENTITY</name>
+ <relationships>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
+ <identity-object-type-ref>COMMUNITY</identity-object-type-ref>
+ </relationship>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
+ <identity-object-type-ref>OFFICE</identity-object-type-ref>
+ </relationship>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
+ <identity-object-type-ref>SECURITY</identity-object-type-ref>
+ </relationship>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
+ <identity-object-type-ref>ORGANIZATION_UNIT</identity-object-type-ref>
+ </relationship>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
+ <identity-object-type-ref>PROJECT</identity-object-type-ref>
+ </relationship>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
+ <identity-object-type-ref>PEOPLE</identity-object-type-ref>
+ </relationship>
+ </relationships>
+ <credentials>
+ <credential-type>PASSWORD</credential-type>
+ </credentials>
+ <attributes>
+ <attribute>
+ <name>picture</name>
+ <mapping>user.picture</mapping>
+ <type>binary</type>
+ <isRequired>false</isRequired>
+ <isMultivalued>false</isMultivalued>
+ <isReadOnly>false</isReadOnly>
+ </attribute>
+ </attributes>
+ <options/>
+ </identity-object-type>
+ <identity-object-type>
+ <name>ORGANIZATION</name>
+ <relationships>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>IDENTITY</identity-object-type-ref>
+ </relationship>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>ORGANIZATION_UNIT</identity-object-type-ref>
+ </relationship>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>ORGANIZATION</identity-object-type-ref>
+ </relationship>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>DIVISION</identity-object-type-ref>
+ </relationship>
+ </relationships>
+ <credentials/>
+ <attributes/>
+ <options/>
+ </identity-object-type>
+ <identity-object-type>
+ <name>ORGANIZATION_UNIT</name>
+ <relationships>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>IDENTITY</identity-object-type-ref>
+ </relationship>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>ORGANIZATION_UNIT</identity-object-type-ref>
+ </relationship>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>DIVISION</identity-object-type-ref>
+ </relationship>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>DEPARTMENT</identity-object-type-ref>
+ </relationship>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>OFFICE</identity-object-type-ref>
+ </relationship>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>PEOPLE</identity-object-type-ref>
+ </relationship>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>PROJECT</identity-object-type-ref>
+ </relationship>
+ </relationships>
+ <credentials/>
+ <attributes/>
+ <options/>
+ </identity-object-type>
+ <identity-object-type>
+ <name>DIVISION</name>
+ <relationships>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>IDENTITY</identity-object-type-ref>
+ </relationship>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>ORGANIZATION_UNIT</identity-object-type-ref>
+ </relationship>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>DEPARTMENT</identity-object-type-ref>
+ </relationship>
+ </relationships>
+ <credentials/>
+ <attributes/>
+ <options/>
+ </identity-object-type>
+ <identity-object-type>
+ <name>DEPARTMENT</name>
+ <relationships>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>IDENTITY</identity-object-type-ref>
+ </relationship>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>DEPARTMENT</identity-object-type-ref>
+ </relationship>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>ORGANIZATION_UNIT</identity-object-type-ref>
+ </relationship>
+ </relationships>
+ <credentials/>
+ <attributes/>
+ <options/>
+ </identity-object-type>
+ <identity-object-type>
+ <name>PROJECT</name>
+ <relationships>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>IDENTITY</identity-object-type-ref>
+ </relationship>
+ </relationships>
+ <credentials/>
+ <attributes/>
+ <options/>
+ </identity-object-type>
+ <identity-object-type>
+ <name>PEOPLE</name>
+ <relationships>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>IDENTITY</identity-object-type-ref>
+ </relationship>
+ </relationships>
+ <credentials/>
+ <attributes/>
+ <options/>
+ </identity-object-type>
+ <identity-object-type>
+ <name>ADMINISTRATION</name>
+ <relationships>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>IDENTITY</identity-object-type-ref>
+ </relationship>
+ </relationships>
+ <credentials/>
+ <attributes/>
+ <options/>
+ </identity-object-type>
+ <identity-object-type>
+ <name>COMMUNITY</name>
+ <relationships>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>IDENTITY</identity-object-type-ref>
+ </relationship>
+ </relationships>
+ <credentials/>
+ <attributes/>
+ <options/>
+ </identity-object-type>
+ <identity-object-type>
+ <name>OFFICE</name>
+ <relationships>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>IDENTITY</identity-object-type-ref>
+ </relationship>
+ </relationships>
+ <credentials/>
+ <attributes/>
+ <options/>
+ </identity-object-type>
+ <identity-object-type>
+ <name>SECURITY</name>
+ <relationships>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>IDENTITY</identity-object-type-ref>
+ </relationship>
+ </relationships>
+ <credentials/>
+ <attributes/>
+ <options/>
+ </identity-object-type>
+ <identity-object-type>
+ <name>SYSTEM</name>
+ <relationships>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>IDENTITY</identity-object-type-ref>
+ </relationship>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>SECURITY</identity-object-type-ref>
+ </relationship>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>COMMUNITY</identity-object-type-ref>
+ </relationship>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>ORGANIZATION</identity-object-type-ref>
+ </relationship>
+ </relationships>
+ <credentials/>
+ <attributes/>
+ <options/>
+ </identity-object-type>
+ </supported-identity-object-types>
+ <options>
+ <option>
+ <name>persistenceUnit</name>
+ <value>jboss-identity-jbpm</value>
+ </option>
+ <option>
+ <name>populateRelationshipTypes</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>populateIdentityObjectTypes</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>allowNotDefinedAttributes</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>isRealmAware</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>allowNotDefinedAttributes</name>
+ <value>true</value>
+ </option>
+ </options>
+ </identity-store>
+ </identity-stores>
+ </stores>
+</jboss-identity>
\ No newline at end of file
Property changes on: jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.identity.cfg.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.jpdl.activities.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.jpdl.activities.xml (rev 0)
+++ jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.jpdl.activities.xml 2009-03-04 16:56:46 UTC (rev 4139)
@@ -0,0 +1,17 @@
+<activities>
+ <schema resource="jpdl.xsd" />
+ <activity binding="org.jbpm.jpdl.internal.activity.StartBinding" />
+ <activity binding="org.jbpm.jpdl.internal.activity.StateBinding" />
+ <activity binding="org.jbpm.jpdl.internal.activity.ExclusiveBinding" />
+ <activity binding="org.jbpm.jpdl.internal.activity.EndBinding" />
+ <activity binding="org.jbpm.jpdl.internal.activity.EndCancelBinding" />
+ <activity binding="org.jbpm.jpdl.internal.activity.EndErrorBinding" />
+ <activity binding="org.jbpm.jpdl.internal.activity.ForkBinding" />
+ <activity binding="org.jbpm.jpdl.internal.activity.JoinBinding" />
+ <activity binding="org.jbpm.jpdl.internal.activity.HqlBinding" />
+ <activity binding="org.jbpm.jpdl.internal.activity.SqlBinding" />
+ <activity binding="org.jbpm.jpdl.internal.activity.JavaBinding" />
+ <activity binding="org.jbpm.jpdl.internal.activity.ScriptBinding" />
+ <activity binding="org.jbpm.jpdl.internal.activity.EsbBinding" />
+ <activity binding="org.jbpm.jpdl.internal.activity.TaskBinding" />
+</activities>
Property changes on: jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.jpdl.activities.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.jpdl.hbm.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.jpdl.hbm.xml (rev 0)
+++ jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.jpdl.hbm.xml 2009-03-04 16:56:46 UTC (rev 4139)
@@ -0,0 +1,90 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping default-access="field">
+
+ <joined-subclass name="org.jbpm.jpdl.internal.model.JpdlProcessDefinition" table="JBPM_JPDL_PROCDEF" extends="org.jbpm.pvm.internal.model.ProcessDefinitionImpl">
+ <key column="DBID_"/>
+ </joined-subclass>
+
+ <joined-subclass name="org.jbpm.jpdl.internal.model.JpdlExecution" table="JBPM_JPDL_EXECUTION" extends="org.jbpm.pvm.internal.model.ExecutionImpl">
+ <key column="DBID_"/>
+ </joined-subclass>
+
+ <class name="org.jbpm.jpdl.internal.activity.JpdlActivity" table="JBPM_JPDL_ACTIVITY" abstract="true" discriminator-value="X">
+ <id name="dbid" column="DBID_">
+ <generator class="native" />
+ </id>
+ <discriminator column="CLASS_" />
+ <subclass name="org.jbpm.jpdl.internal.activity.StartActivity" discriminator-value="start" />
+ <subclass name="org.jbpm.jpdl.internal.activity.ExclusiveConditionActivity" discriminator-value="excl-cond" />
+ <subclass name="org.jbpm.jpdl.internal.activity.ExclusiveExpressionActivity" discriminator-value="excl-expr">
+ <property name="expr" column="TEXT_" />
+ <property name="lang" column="TEXT2_" />
+ </subclass>
+ <subclass name="org.jbpm.jpdl.internal.activity.ExclusiveHandlerActivity" discriminator-value="excl-handler">
+ <property name="exclusiveHandlerName" column="TEXT_" />
+ <many-to-one name="exclusiveHandlerDescriptor"
+ column="EXCLDESCR_"
+ cascade="all"
+ class="org.jbpm.pvm.internal.wire.descriptor.AbstractDescriptor"
+ foreign-key="FK_ACT_EXCLDESCR"
+ index="IDX_ACT_EXCLDESCR" />
+ </subclass>
+ <subclass name="org.jbpm.jpdl.internal.activity.StateActivity" discriminator-value="state" />
+ <subclass name="org.jbpm.jpdl.internal.activity.EndActivity" discriminator-value="end">
+ <property name="endProcessInstance" column="ENDPI_" />
+ <property name="state" column="TEXT_" />
+ </subclass>
+ <subclass name="org.jbpm.jpdl.internal.activity.ForkActivity" discriminator-value="fork" />
+ <subclass name="org.jbpm.jpdl.internal.activity.JoinActivity" discriminator-value="join" />
+ <subclass name="org.jbpm.jpdl.internal.activity.HqlActivity" discriminator-value="hql">
+ <property name="query" column="TEXT_" />
+ <property name="resultVariableName" column="TEXT2_" />
+ <property name="isResultUnique" column="ISUNIQ_" />
+ <many-to-one name="parametersDescriptor"
+ column="PARAMDESCR_"
+ cascade="all"
+ class="org.jbpm.pvm.internal.wire.descriptor.ListDescriptor"
+ foreign-key="FK_ACT_PARAMDESCR"
+ index="IDX_ACT_PARAMDESCR" />
+
+ <subclass name="org.jbpm.jpdl.internal.activity.SqlActivity" discriminator-value="sql" />
+ </subclass>
+ <subclass name="org.jbpm.jpdl.internal.activity.JavaActivity" discriminator-value="java">
+ <property name="methodName" column="TEXT_" />
+ <property name="variableName" column="TEXT2_" />
+ <many-to-one name="descriptor"
+ column="JAVADESCR_"
+ cascade="all"
+ class="org.jbpm.pvm.internal.wire.descriptor.AbstractDescriptor"
+ foreign-key="FK_ACT_JAVADESCR"
+ index="IDX_ACT_JAVADESCR" />
+ <many-to-one name="invokeOperation"
+ column="INVOPER_"
+ cascade="all"
+ class="org.jbpm.pvm.internal.wire.operation.InvokeOperation"
+ foreign-key="FK_ACT_INVKOPER"
+ index="IDX_ACT_INVKOPER" />
+ </subclass>
+ <subclass name="org.jbpm.jpdl.internal.activity.ScriptActivity" discriminator-value="script">
+ <property name="script" column="TEXT_" />
+ <property name="language" column="TEXT2_" />
+ <property name="variableName" column="TEXT3_" />
+ </subclass>
+ <subclass name="org.jbpm.jpdl.internal.activity.EsbActivity" discriminator-value="esb">
+ <property name="service" column="TEXT_" />
+ <property name="category" column="TEXT2_" />
+ <many-to-one name="partsListDescriptor"
+ column="PARTSDESCR_"
+ cascade="all"
+ class="org.jbpm.pvm.internal.wire.descriptor.ListDescriptor"
+ foreign-key="FK_ACT_PARTSDESCR"
+ index="IDX_ACT_PARTSDESCR" />
+ </subclass>
+ <subclass name="org.jbpm.jpdl.internal.activity.TaskActivity" discriminator-value="task">
+ <property name="assignee" column="TEXT_" />
+ </subclass>
+ </class>
+
+</hibernate-mapping>
\ No newline at end of file
Property changes on: jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.jpdl.hbm.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.task.hbm.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.task.hbm.xml (rev 0)
+++ jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.task.hbm.xml 2009-03-04 16:56:46 UTC (rev 4139)
@@ -0,0 +1,174 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping auto-import="false" package="org.jbpm.pvm.internal.task" default-access="field">
+
+ <!-- ### TASK DEFINITION ################################################ -->
+ <class name="TaskDefinitionImpl" discriminator-value="T">
+ <id name="dbid" column="DBID_">
+ <generator class="native" />
+ </id>
+ <discriminator type="char" column="CLASS_"/>
+ <version name="dbversion" column="DBVERSION_" />
+
+ <property name="name" column="NAME_"/>
+ <property name="description" column="DESCR_"/>
+
+ <property name="priority" column="PRIORITY_"/>
+ <property name="dueDateDuration" column="DUEDATE_"/>
+ <property name="isBlocking" column="BLOCK_"/>
+ <property name="isSignalling" column="SIGNAL_"/>
+ <property name="assigneeExpression" column="ASSIGNEE_EXPR_"/>
+ <property name="candidatesExpression" column="CANDIDATES_EXPR_"/>
+
+ <many-to-one name="assignerDescriptor"
+ column="ASSIGNER_DESCR_"
+ cascade="all"
+ class="org.jbpm.pvm.internal.wire.descriptor.AbstractDescriptor"
+ foreign-key="FK_TSK_ASIG_DESCR"
+ index="IDX_TSK_ASIG_DESCR" />
+
+ <many-to-one name="swimlaneDefinition"
+ column="SWIMLANE_DEF_"
+ cascade="all"
+ class="SwimlaneDefinitionImpl"
+ foreign-key="FK_TSK_SWIML_DEF"
+ index="IDX_TSK_SWIML_DEF" />
+
+ <list name="subTaskDefinitions" cascade="all-delete-orphan">
+ <key column="TASKDEF_" />
+ <list-index column="TASKDEF_IDX_" />
+ <one-to-many class="TaskDefinitionImpl" />
+ </list>
+ </class>
+
+ <!-- ### TASK ########################################################### -->
+ <class name="TaskImpl"
+ discriminator-value="T">
+ <id name="dbid" column="DBID_">
+ <generator class="native" />
+ </id>
+ <discriminator type="char" column="CLASS_"/>
+ <version name="dbversion" column="DBVERSION_" />
+
+ <property name="id" column="ID_" unique="true" />
+ <property name="name" column="NAME_"/>
+ <property name="description" column="DESCR_"/>
+ <property name="assignee" column="ASSIGNEE_"/>
+
+ <set name="participants" cascade="all-delete-orphan">
+ <key column="TASK_" />
+ <one-to-many class="ParticipantImpl" />
+ </set>
+
+ <property name="priority" column="PRIORITY_"/>
+ <property name="create" column="CREATE_"/>
+ <property name="dueDate" column="DUEDATE_"/>
+ <property name="progress" column="PROGRESS_"/>
+
+ <!--
+ <many-to-one name="variableMap"
+ class="org.jbpm.pvm.impl.VariableMap"
+ column="VARMAP_"
+ foreign-key="FK_TASK_VARMAP"
+ cascade="all" />
+ -->
+
+ <many-to-one name="superTask"
+ class="TaskImpl"
+ column="SUPERTASK_"
+ foreign-key="FK_TASK_SUPERTASK"
+ index="IDX_TASK_SUPERTASK" />
+
+ <many-to-one name="execution"
+ class="org.jbpm.pvm.internal.model.ExecutionImpl"
+ column="EXECUTION_"
+ foreign-key="FK_TASK_EXEC" />
+
+ <many-to-one name="swimlane"
+ class="SwimlaneImpl"
+ column="SWIMLANE_"
+ foreign-key="FK_TASK_SWIML" />
+
+ <list name="comments" cascade="all-delete-orphan">
+ <key column="TASK_" />
+ <list-index column="TASK_IDX_" />
+ <one-to-many class="org.jbpm.pvm.internal.model.CommentImpl" />
+ </list>
+
+ <set name="subTasks" cascade="all-delete-orphan">
+ <key column="SUPERTASK_" />
+ <one-to-many class="TaskImpl" />
+ </set>
+
+ </class>
+
+ <!-- ### PARTICIPANT #################################################### -->
+ <class name="ParticipantImpl">
+ <id name="dbid" column="DBID_">
+ <generator class="native" />
+ </id>
+ <version name="dbversion" column="DBVERSION_" />
+
+ <property name="identityType" column="IDENTITYTYPE_"/>
+ <property name="identityId" column="IDENTITYID_"/>
+ <property name="participation" column="PARTICIPATION_" />
+
+ <many-to-one name="task"
+ class="TaskImpl"
+ column="TASK_"
+ index="IDX_PART_TASK"
+ foreign-key="FK_PART_TASK" />
+
+ <many-to-one name="swimlane"
+ class="SwimlaneImpl"
+ column="SWIMLANE_"
+ foreign-key="FK_PART_SWIMLANE" />
+
+ </class>
+
+ <!-- ### SWIMLANE DEFINITION ############################################ -->
+ <class name="SwimlaneDefinitionImpl">
+ <id name="dbid" column="DBID_">
+ <generator class="native" />
+ </id>
+ <version name="dbversion" column="DBVERSION_" />
+
+ <property name="name" column="NAME_"/>
+ </class>
+
+
+ <!-- ### SWIMLANE ####################################################### -->
+ <class name="SwimlaneImpl">
+ <id name="dbid" column="DBID_">
+ <generator class="native" />
+ </id>
+ <version name="dbversion" column="DBVERSION_" />
+
+ <property name="name" column="NAME_"/>
+ <property name="assignee" column="ASSIGNEE_"/>
+
+ <many-to-one name="swimlaneDefinition"
+ class="SwimlaneDefinitionImpl"
+ column="SWIMLANEDEF_"
+ foreign-key="FK_SWIMLANE_DEF" />
+
+ <set name="participants" cascade="all-delete-orphan">
+ <key column="SWIMLANE_" />
+ <one-to-many class="ParticipantImpl" />
+ </set>
+
+ </class>
+
+
+ <!-- ### QUERIES ######################################################## -->
+
+ <query name="findTasks">
+ <![CDATA[
+ select task
+ from org.jbpm.pvm.internal.task.TaskImpl as task
+ ]]>
+ </query>
+
+</hibernate-mapping>
Property changes on: jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.task.hbm.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.task.lifecycle.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.task.lifecycle.xml (rev 0)
+++ jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.task.lifecycle.xml 2009-03-04 16:56:46 UTC (rev 4139)
@@ -0,0 +1,13 @@
+<task-lifecycle initial="open">
+ <state name="open">
+ <transition name="complete" to="completed" />
+ <transition name="suspend" to="suspended" />
+ <transition name="cancel" to="cancelled" />
+ </state>
+ <state name="suspended">
+ <transition name="resume" to="open" />
+ <transition name="cancel" to="cancelled" />
+ </state>
+ <state name="cancelled" />
+ <state name="completed" />
+</task-lifecycle>
Property changes on: jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.task.lifecycle.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.variable.types.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.variable.types.xml (rev 0)
+++ jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.variable.types.xml 2009-03-04 16:56:46 UTC (rev 4139)
@@ -0,0 +1,34 @@
+<types>
+
+ <!-- types stored in a native column -->
+ <type name="string" class="java.lang.String" variable-class="org.jbpm.pvm.internal.type.variable.StringVariable" />
+ <type name="long" class="java.lang.Long" variable-class="org.jbpm.pvm.internal.type.variable.LongVariable" />
+ <type name="double" class="java.lang.Double" variable-class="org.jbpm.pvm.internal.type.variable.DoubleVariable" />
+
+ <!-- types converted to a string -->
+ <type name="date" class="java.util.Date" converter="org.jbpm.pvm.internal.type.converter.DateToStringConverter" variable-class="org.jbpm.pvm.internal.type.variable.StringVariable" />
+ <type name="boolean" class="java.lang.Boolean" converter="org.jbpm.pvm.internal.type.converter.BooleanToStringConverter" variable-class="org.jbpm.pvm.internal.type.variable.StringVariable" />
+ <type name="char" class="java.lang.Character" converter="org.jbpm.pvm.internal.type.converter.CharacterToStringConverter" variable-class="org.jbpm.pvm.internal.type.variable.StringVariable" />
+
+ <!-- types converted to a long -->
+ <type name="byte" class="java.lang.Byte" converter="org.jbpm.pvm.internal.type.converter.ByteToLongConverter" variable-class="org.jbpm.pvm.internal.type.variable.LongVariable" />
+ <type name="short" class="java.lang.Short" converter="org.jbpm.pvm.internal.type.converter.ShortToLongConverter" variable-class="org.jbpm.pvm.internal.type.variable.LongVariable" />
+ <type name="integer" class="java.lang.Integer" converter="org.jbpm.pvm.internal.type.converter.IntegerToLongConverter" variable-class="org.jbpm.pvm.internal.type.variable.LongVariable" />
+
+ <!-- types converted to a double -->
+ <type name="float" class="java.lang.Float" converter="org.jbpm.pvm.internal.type.converter.FloatToDoubleConverter" variable-class="org.jbpm.pvm.internal.type.variable.DoubleVariable" />
+
+ <!-- byte[] and char[] -->
+ <type name="byte[]" class="[B" variable-class="org.jbpm.pvm.internal.type.variable.BlobVariable" />
+ <type name="char[]" class="[C" variable-class="org.jbpm.pvm.internal.type.variable.ClobVariable" />
+
+ <type name="hibernate-long-id" class="hibernate" id-type="long" variable-class="org.jbpm.pvm.internal.type.variable.HibernateLongVariable" />
+ <type name="hibernate-string-id" class="hibernate" id-type="string" variable-class="org.jbpm.pvm.internal.type.variable.HibernateStringVariable" />
+
+ <type name="serializable" class="serializable" converter="org.jbpm.pvm.internal.type.converter.SerializableToBytesConverter" variable-class="org.jbpm.pvm.internal.type.variable.BlobVariable" />
+
+ <!-- TODO: add ejb3 entity bean support -->
+ <!-- TODO: add JCR activity support -->
+ <!-- TODO: add collection support -->
+
+</types>
Property changes on: jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.variable.types.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.wire.bindings.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.wire.bindings.xml (rev 0)
+++ jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.wire.bindings.xml 2009-03-04 16:56:46 UTC (rev 4139)
@@ -0,0 +1,92 @@
+<wire-bindings>
+
+ <!-- ########################### -->
+ <!-- ### Descriptor bindings ### -->
+ <!-- ########################### -->
+ <!-- basic types -->
+ <binding class="org.jbpm.pvm.internal.wire.binding.TrueBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.FalseBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.CharBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.DoubleBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.FloatBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.IntBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.ShortBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.ByteBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.LongBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.StringBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.NullBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.ClassBinding" />
+ <!-- object and ref -->
+ <binding class="org.jbpm.pvm.internal.wire.binding.ObjectBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.RefBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.JndiBinding" />
+ <!-- collections -->
+ <binding class="org.jbpm.pvm.internal.wire.binding.ListBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.SetBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.MapBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.PropertiesBinding" />
+ <!-- environment refs -->
+ <binding class="org.jbpm.pvm.internal.wire.binding.EnvironmentFactoryRefBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.EnvRefBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.EnvBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.ContextRefBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.TransactionRefBinding" />
+ <!-- various specials -->
+ <binding class="org.jbpm.pvm.internal.wire.binding.TransactionBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.JobExecutorBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.JobTestHelperBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.ScriptManagerBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.BusinessCalendarBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.IdGeneratorBinding" />
+ <!-- hibernate bindings -->
+ <binding class="org.jbpm.pvm.internal.wire.binding.HibernateConfigurationBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.SeamHibernateSessionBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.HibernateSessionBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.HibernateSessionFactoryBinding" />
+ <!-- sessions -->
+ <binding class="org.jbpm.pvm.internal.wire.binding.MessageSessionBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.TimerSessionBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.HistorySessionBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.IdentitySessionBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.IdentitySessionFactoryBinding" />
+ <!-- db sessions -->
+ <binding class="org.jbpm.pvm.internal.wire.binding.PvmDbSessionBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.JobDbSessionBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.TaskDbSessionBinding" />
+
+ <!-- dynamic type mapping configuration -->
+ <binding class="org.jbpm.pvm.internal.wire.binding.TypesBinding" />
+ <!-- services -->
+ <binding class="org.jbpm.pvm.internal.wire.binding.StandardCommandServiceBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.AsyncCommandServiceBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.ProcessServiceBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.ExecutionServiceBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.ManagementServiceBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.IdentityServiceBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.HistoryServiceBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.TaskServiceBinding" />
+
+ <!-- deployers -->
+ <binding class="org.jbpm.pvm.internal.wire.binding.DeployerManagerBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.AssignFileTypesBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.CheckProcessBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.CheckProblemsBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.SaveBinding" />
+
+ <!-- interceptors -->
+ <binding class="org.jbpm.pvm.internal.wire.binding.EnvironmentInterceptorBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.AuthorizationInterceptorBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.RetryInterceptorBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.StandardTransactionInterceptorBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.EnlistBinding" />
+
+ <!-- operation -->
+ <binding class="org.jbpm.pvm.internal.wire.binding.PropertyBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.FieldBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.InvokeBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.SubscribeBinding" />
+
+ <!-- jpdl bindings -->
+ <binding class="org.jbpm.jpdl.internal.xml.ParseJpdlBinding" />
+
+</wire-bindings>
Property changes on: jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/jbpm.wire.bindings.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/logging.properties
===================================================================
--- jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/logging.properties (rev 0)
+++ jbpm4/branches/tbaeyens/modules/test-db/src/test/resources/logging.properties 2009-03-04 16:56:46 UTC (rev 4139)
@@ -0,0 +1,18 @@
+handlers= java.util.logging.ConsoleHandler
+redirect.commons.logging = enabled
+
+java.util.logging.ConsoleHandler.level = FINE
+java.util.logging.ConsoleHandler.formatter = org.jbpm.internal.log.LogFormatter
+
+org.jbpm.level=FINE
+# org.jbpm.pvm.internal.tx.level=FINE
+# org.jbpm.pvm.internal.wire.level=FINE
+# org.jbpm.pvm.internal.util.level=FINE
+
+org.hibernate.level=INFO
+org.hibernate.cfg.SettingsFactory.level=SEVERE
+org.hibernate.cfg.HbmBinder.level=SEVERE
+# org.hibernate.SQL.level=FINEST
+# org.hibernate.type.level=FINEST
+# org.hibernate.tool.hbm2ddl.SchemaExport.level=FINEST
+# org.hibernate.transaction.level=FINEST
\ No newline at end of file
Modified: jbpm4/branches/tbaeyens/modules/test-pojo/src/main/resources/logging.properties
===================================================================
--- jbpm4/branches/tbaeyens/modules/test-pojo/src/main/resources/logging.properties 2009-03-04 15:24:38 UTC (rev 4138)
+++ jbpm4/branches/tbaeyens/modules/test-pojo/src/main/resources/logging.properties 2009-03-04 16:56:46 UTC (rev 4139)
@@ -1,28 +1,18 @@
handlers= java.util.logging.ConsoleHandler
-# to add the error triggered file handler
-# handlers= java.util.logging.ConsoleHandler org.jbpm.util.ErrorTriggeredFileHandler
-
redirect.commons.logging = enabled
-java.util.logging.ConsoleHandler.level = FINEST
+java.util.logging.ConsoleHandler.level = FINE
java.util.logging.ConsoleHandler.formatter = org.jbpm.internal.log.LogFormatter
-# org.jbpm.util.ErrorTriggeredFileHandler.size = 500
-# org.jbpm.util.ErrorTriggeredFileHandler.push = OFF
-# org.jbpm.util.ErrorTriggeredFileHandler.pattern = %h/jbpm%u.log
-
-# For example, set the com.xyz.foo logger to only log SEVERE messages:
-# com.xyz.foo.level = SEVERE
-
-org.jbpm.level=INFO
+org.jbpm.level=FINE
# org.jbpm.pvm.internal.tx.level=FINE
# org.jbpm.pvm.internal.wire.level=FINE
# org.jbpm.pvm.internal.util.level=FINE
org.hibernate.level=INFO
-org.hibernate.cfg.HbmBinder.level=SEVERE
org.hibernate.cfg.SettingsFactory.level=SEVERE
+org.hibernate.cfg.HbmBinder.level=SEVERE
# org.hibernate.SQL.level=FINEST
# org.hibernate.type.level=FINEST
# org.hibernate.tool.hbm2ddl.SchemaExport.level=FINEST
-# org.hibernate.transaction.level=FINEST
+# org.hibernate.transaction.level=FINEST
\ No newline at end of file
Modified: jbpm4/branches/tbaeyens/modules/userguide/.settings/attachedFile.properties
===================================================================
--- jbpm4/branches/tbaeyens/modules/userguide/.settings/attachedFile.properties 2009-03-04 15:24:38 UTC (rev 4138)
+++ jbpm4/branches/tbaeyens/modules/userguide/.settings/attachedFile.properties 2009-03-04 16:56:46 UTC (rev 4139)
@@ -1,2 +1,2 @@
## index of importer -> set(imports)
-#Wed Mar 04 15:20:40 CET 2009
+#Wed Mar 04 17:03:33 CET 2009
Modified: jbpm4/branches/tbaeyens/pom.xml
===================================================================
--- jbpm4/branches/tbaeyens/pom.xml 2009-03-04 15:24:38 UTC (rev 4138)
+++ jbpm4/branches/tbaeyens/pom.xml 2009-03-04 16:56:46 UTC (rev 4139)
@@ -32,14 +32,14 @@
<modules>
<module>modules/log</module>
<module>modules/api</module>
+ <module>modules/test-base</module>
<module>modules/pvm</module>
<module>modules/jpdl</module>
<module>modules/examples</module>
+ <module>modules/test-db</module>
+ <module>modules/test-pojo</module>
<!--
<module>modules/enterprise</module>
- <module>modules/test-base</module>
- <module>modules/test-db</module>
- <module>modules/test-pojo</module>
<module>modules/db</module>
-->
</modules>
17 years, 2 months