JBoss JBPM SVN: r2003 - in jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src: main/java/org/jbpm/command and 14 other directories.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2008-08-25 21:11:36 -0400 (Mon, 25 Aug 2008)
New Revision: 2003
Added:
jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/test/java/org/jbpm/job/executor/NoJobExecutorDbTest.java
jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/test/java/org/jbpm/job/executor/TimerOnTimerDbTest.java
jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/test/java/org/jbpm/job/executor/timerOnTimer.jpdl.xml
Modified:
jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/JbpmContext.java
jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/command/AbstractCancelCommand.java
jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/db/JobSession.java
jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/db/hibernate.queries.hbm.xml
jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/graph/def/Event.java
jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/graph/def/GraphElement.java
jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/graph/def/Node.java
jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/graph/def/Transition.java
jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/graph/exe/ProcessInstance.java
jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/graph/node/Decision.java
jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/graph/node/ProcessFactory.java
jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/graph/node/TaskNode.java
jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/instantiation/BeanInstantiator.java
jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/job/ExecuteActionJob.java
jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/job/ExecuteNodeJob.java
jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/job/Timer.java
jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/job/executor/JobExecutorThread.java
jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/msg/db/DbMessageService.java
jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/scheduler/db/DbSchedulerService.java
jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/scheduler/def/CreateTimerAction.java
jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/svc/Services.java
jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/taskmgmt/exe/TaskInstance.java
jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/taskmgmt/exe/TaskMgmtInstance.java
jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/test/java/org/jbpm/AllDbTests.java
Log:
[JBPM-1704] merged revisions 1475, 1477, 1483, 1484, 1558, 1829, 1938 and 1947 from https://svn.jboss.org/repos/jbpm/jbpm3/trunk/
Modified: jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/JbpmContext.java
===================================================================
--- jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/JbpmContext.java 2008-08-26 01:03:36 UTC (rev 2002)
+++ jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/JbpmContext.java 2008-08-26 01:11:36 UTC (rev 2003)
@@ -543,15 +543,13 @@
*/
public ContextSession getContextSession() {
PersistenceService persistenceService = getPersistenceService();
- if (persistenceService==null) return null;
- return persistenceService.getContextSession();
+ return persistenceService!=null ? persistenceService.getContextSession() : null;
}
/**
* more logging related database access.
*/
public LoggingSession getLoggingSession() {
PersistenceService persistenceService = getPersistenceService();
- if (persistenceService==null) return null;
return (persistenceService!=null ? persistenceService.getLoggingSession() : null);
}
/**
@@ -559,7 +557,6 @@
*/
public JobSession getJobSession() {
PersistenceService persistenceService = getPersistenceService();
- if (persistenceService==null) return null;
return (persistenceService!=null ? persistenceService.getJobSession() : null);
}
/**
@@ -567,7 +564,6 @@
*/
public GraphSession getGraphSession() {
PersistenceService persistenceService = getPersistenceService();
- if (persistenceService==null) return null;
return (persistenceService!=null ? persistenceService.getGraphSession() : null);
}
/**
@@ -575,7 +571,6 @@
*/
public TaskMgmtSession getTaskMgmtSession() {
PersistenceService persistenceService = getPersistenceService();
- if (persistenceService==null) return null;
return (persistenceService!=null ? persistenceService.getTaskMgmtSession() : null);
}
@@ -593,8 +588,7 @@
*/
public void setActorId(String actorId) {
DefaultAuthenticationService authenticationService = (DefaultAuthenticationService) services.getAuthenticationService();
- DefaultAuthenticationService defaultAuthenticationService = (DefaultAuthenticationService) authenticationService;
- defaultAuthenticationService.setActorId(actorId);
+ authenticationService.setActorId(actorId);
}
// private methods //////////////////////////////////////////////////////////
Modified: jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/command/AbstractCancelCommand.java
===================================================================
--- jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/command/AbstractCancelCommand.java 2008-08-26 01:03:36 UTC (rev 2002)
+++ jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/command/AbstractCancelCommand.java 2008-08-26 01:11:36 UTC (rev 2003)
@@ -21,8 +21,8 @@
protected static final Log log = LogFactory.getLog(AbstractCancelCommand.class);
protected void cancelTokens(Collection tokens) {
- log.info("cancel " + tokens.size() + " tokens");
if (tokens != null && tokens.size() > 0) {
+ log.info("cancel " + tokens.size() + " tokens");
for (Iterator itr = tokens.iterator(); itr.hasNext();) {
cancelToken((Token) itr.next());
}
@@ -49,8 +49,8 @@
}
protected void cancelTasks(List tasks) {
- log.info("cancel " + tasks.size() + " tasks");
if (tasks != null && tasks.size() > 0) {
+ log.info("cancel " + tasks.size() + " tasks");
for (Iterator it = tasks.iterator(); it.hasNext();) {
TaskInstance ti = (TaskInstance) it.next();
Modified: jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/db/JobSession.java
===================================================================
--- jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/db/JobSession.java 2008-08-26 01:03:36 UTC (rev 2002)
+++ jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/db/JobSession.java 2008-08-26 01:11:36 UTC (rev 2003)
@@ -1,25 +1,23 @@
package org.jbpm.db;
-import java.io.Serializable;
import java.util.Collection;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
-import javax.transaction.Synchronization;
-
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.LockMode;
import org.hibernate.Query;
import org.hibernate.Session;
-import org.hibernate.Transaction;
+import org.jbpm.JbpmContext;
import org.jbpm.JbpmException;
import org.jbpm.graph.def.Action;
import org.jbpm.graph.exe.ProcessInstance;
import org.jbpm.graph.exe.Token;
import org.jbpm.job.Job;
import org.jbpm.job.Timer;
+import org.jbpm.svc.save.SaveOperation;
public class JobSession {
@@ -155,60 +153,54 @@
public void cancelTimersByName(String name, Token token) {
try {
- // the bulk delete was replaced with a query and session.deletes on
- // the retrieved elements to prevent stale object exceptions.
- // With a bulk delete, the hibernate session is not aware and gives a problem
- // if a later session.delete doesn't return 1.
- Query query = session.getNamedQuery("JobSession.getTimersByName");
+ log.debug("canceling timers by name " + name + " for " + token);
+ Query query = session.getNamedQuery("JobSession.deleteTimersByName");
query.setString("name", name);
query.setParameter("token", token);
- List results = query.list();
- if (results!=null) {
- Iterator iter = results.iterator();
- while (iter.hasNext()) {
- Timer timer = (Timer) iter.next();
- log.debug("deleting timer "+timer+" by name "+name);
- session.delete(timer);
- }
- }
-
+ int entityCount = query.executeUpdate();
+ log.debug(entityCount+" timers by name " + name + " for " + token + " were deleted");
} catch (Exception e) {
log.error(e);
- throw new JbpmException("couldn't cancel timers '"+name+"' for '"+token+"'", e);
+ throw new JbpmException("couldn't cancel timers by name '"+name+"' for '"+token+"'", e);
}
}
- private class DeleteJobsSynchronization implements Synchronization, Serializable {
+ private static class DeleteJobsOperation implements SaveOperation {
+
+ private ProcessInstance targetProcessInstance;
+
private static final long serialVersionUID = 1L;
- ProcessInstance processInstance;
- public DeleteJobsSynchronization(ProcessInstance processInstance) {
- this.processInstance = processInstance;
+
+ DeleteJobsOperation(ProcessInstance processInstance) {
+ targetProcessInstance = processInstance;
}
- public void beforeCompletion() {
- log.debug("deleting timers for process instance "+processInstance);
+
+ public void save(ProcessInstance processInstance, JbpmContext jbpmContext) {
+ // avoid deleting jobs for process instances that did not request job deletion
+ if (!targetProcessInstance.equals(processInstance)) {
+ log.debug("forgiving " + processInstance + ", it is not the target of this operation");
+ return;
+ }
+
+ log.debug("deleting timers for "+processInstance);
+ Session session = jbpmContext.getSession();
Query query = session.getNamedQuery("JobSession.deleteTimersForProcessInstance");
query.setParameter("processInstance", processInstance);
- int result = query.executeUpdate();
- log.debug(Integer.toString(result)+" remaining timers for '"+processInstance+"' are deleted");
-
- log.debug("deleting execute-node-jobs for process instance "+processInstance);
+ int entityCount = query.executeUpdate();
+ log.debug(entityCount+" remaining timers for "+processInstance+" were deleted");
+
+ log.debug("deleting execute-node-jobs for "+processInstance);
query = session.getNamedQuery("JobSession.deleteExecuteNodeJobsForProcessInstance");
query.setParameter("processInstance", processInstance);
- result = query.executeUpdate();
- log.debug(Integer.toString(result)+" remaining execute-node-jobs for '"+processInstance+"' are deleted");
+ entityCount = query.executeUpdate();
+ log.debug(entityCount+" remaining execute-node-jobs for "+processInstance+" were deleted");
}
- public void afterCompletion(int arg0) {
- }
+
}
public void deleteJobsForProcessInstance(ProcessInstance processInstance) {
- try {
- Transaction transaction = session.getTransaction();
- transaction.registerSynchronization(new DeleteJobsSynchronization(processInstance));
- } catch (Exception e) {
- log.error(e);
- throw new JbpmException("couldn't delete jobs for '"+processInstance+"'", e);
- }
+ SaveOperation operation = new DeleteJobsOperation(processInstance);
+ JbpmContext.getCurrentJbpmContext().getServices().addSaveOperation(operation);
}
Modified: jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/db/hibernate.queries.hbm.xml
===================================================================
--- jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/db/hibernate.queries.hbm.xml 2008-08-26 01:03:36 UTC (rev 2002)
+++ jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/db/hibernate.queries.hbm.xml 2008-08-26 01:11:36 UTC (rev 2003)
@@ -304,13 +304,14 @@
where job.token = :token
]]>
</query>
-
- <query name="JobSession.getTimersByName">
+
+ <query name="JobSession.deleteTimersByName">
<![CDATA[
- select timer
- from org.jbpm.job.Timer timer
+ delete from org.jbpm.job.Timer timer
where timer.token = :token
and timer.name = :name
+ and (timer.lockOwner is null
+ or timer.repeat is not null)
]]>
</query>
@@ -318,13 +319,16 @@
<![CDATA[
delete from org.jbpm.job.Timer timer
where timer.processInstance = :processInstance
+ and (timer.lockOwner is null
+ or timer.repeat is not null)
]]>
</query>
<query name="JobSession.deleteExecuteNodeJobsForProcessInstance">
<![CDATA[
- delete from org.jbpm.job.ExecuteNodeJob executeNodeJob
- where executeNodeJob.processInstance = :processInstance
+ delete from org.jbpm.job.ExecuteNodeJob job
+ where job.processInstance = :processInstance
+ and job.lockOwner is null
]]>
</query>
Modified: jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/graph/def/Event.java
===================================================================
--- jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/graph/def/Event.java 2008-08-26 01:03:36 UTC (rev 2002)
+++ jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/graph/def/Event.java 2008-08-26 01:11:36 UTC (rev 2003)
@@ -46,6 +46,7 @@
public static final String EVENTTYPE_TASK_ASSIGN = "task-assign";
public static final String EVENTTYPE_TASK_START = "task-start";
public static final String EVENTTYPE_TASK_END = "task-end";
+ public static final String EVENTTYPE_TIMER_CREATE = "timer-create";
public static final String EVENTTYPE_TIMER = "timer";
long id = 0;
Modified: jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/graph/def/GraphElement.java
===================================================================
--- jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/graph/def/GraphElement.java 2008-08-26 01:03:36 UTC (rev 2002)
+++ jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/graph/def/GraphElement.java 2008-08-26 01:11:36 UTC (rev 2003)
@@ -160,10 +160,7 @@
// event handling ///////////////////////////////////////////////////////////
public void fireEvent(String eventType, ExecutionContext executionContext) {
- Token token = executionContext.getToken();
-
- log.debug( "event '"+eventType+"' on '"+this+"' for '"+token+"'" );
-
+ log.debug( "event '"+eventType+"' on '"+this+"' for '"+executionContext.getToken()+"'" );
try {
executionContext.setEventSource(this);
fireAndPropagateEvent(eventType, executionContext);
Modified: jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/graph/def/Node.java
===================================================================
--- jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/graph/def/Node.java 2008-08-26 01:03:36 UTC (rev 2002)
+++ jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/graph/def/Node.java 2008-08-26 01:11:36 UTC (rev 2003)
@@ -182,14 +182,10 @@
*/
public String generateNextLeavingTransitionName() {
String name = null;
- if (leavingTransitions!=null) {
- if (!containsName(leavingTransitions, null)) {
- name = null;
- } else {
- int n = 1;
- while (containsName(leavingTransitions, Integer.toString(n))) n++;
- name = Integer.toString(n);
- }
+ if (leavingTransitions!=null && containsName(leavingTransitions, null)) {
+ int n = 1;
+ while (containsName(leavingTransitions, Integer.toString(n))) n++;
+ name = Integer.toString(n);
}
return name;
}
Modified: jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/graph/def/Transition.java
===================================================================
--- jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/graph/def/Transition.java 2008-08-26 01:03:36 UTC (rev 2002)
+++ jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/graph/def/Transition.java 2008-08-26 01:11:36 UTC (rev 2003)
@@ -154,8 +154,9 @@
Node fireSuperStateEnterEvents(ExecutionContext executionContext) {
// calculate the actual destinationNode node
Node destination = to;
- while (destination.isSuperStateNode()) {
- destination = (Node) destination.getNodes().get(0);
+ while (destination != null && destination.isSuperStateNode()) {
+ List nodes = destination.getNodes();
+ destination = nodes != null && !nodes.isEmpty() ? (Node) nodes.get(0) : null;
}
if (destination==null) {
Modified: jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/graph/exe/ProcessInstance.java
===================================================================
--- jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/graph/exe/ProcessInstance.java 2008-08-26 01:03:36 UTC (rev 2002)
+++ jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/graph/exe/ProcessInstance.java 2008-08-26 01:11:36 UTC (rev 2003)
@@ -448,6 +448,10 @@
return EqualsUtil.equals(this, o);
}
+ public String toString() {
+ return "ProcessInstance" + (key != null ? '(' + key + ')' : "@" + Integer.toHexString(hashCode()));
+ }
+
// getters and setters //////////////////////////////////////////////////////
public long getId() {
Modified: jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/graph/node/Decision.java
===================================================================
--- jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/graph/node/Decision.java 2008-08-26 01:03:36 UTC (rev 2002)
+++ jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/graph/node/Decision.java 2008-08-26 01:11:36 UTC (rev 2003)
@@ -109,11 +109,11 @@
DecisionCondition decisionCondition = (DecisionCondition) iter.next();
Object result = JbpmExpressionEvaluator.evaluate(decisionCondition.getExpression(), executionContext);
if (Boolean.TRUE.equals(result)) {
+ String transitionName = decisionCondition.getTransitionName();
+ transition = getLeavingTransition(transitionName);
if (transition!=null) {
transition.removeConditionEnforcement();
}
- String transitionName = decisionCondition.getTransitionName();
- transition = getLeavingTransition(transitionName);
}
}
Modified: jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/graph/node/ProcessFactory.java
===================================================================
--- jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/graph/node/ProcessFactory.java 2008-08-26 01:03:36 UTC (rev 2002)
+++ jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/graph/node/ProcessFactory.java 2008-08-26 01:11:36 UTC (rev 2003)
@@ -62,8 +62,8 @@
Node node = null;
- String typeName = null;
- String name = null;
+ String typeName;
+ String name;
text = text.trim();
int spaceIndex = text.indexOf(' ');
Modified: jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/graph/node/TaskNode.java
===================================================================
--- jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/graph/node/TaskNode.java 2008-08-26 01:03:36 UTC (rev 2002)
+++ jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/graph/node/TaskNode.java 2008-08-26 01:11:36 UTC (rev 2003)
@@ -41,11 +41,11 @@
private static final long serialVersionUID = 1L;
/**
- * execution always continues, regardless wether tasks are created or still unfinished.
+ * execution always continues, regardless whether tasks are created or still unfinished.
*/
public static final int SIGNAL_UNSYNCHRONIZED = 0;
/**
- * execution never continues, regardless wether tasks are created or still unfinished.
+ * execution never continues, regardless whether tasks are created or still unfinished.
*/
public static final int SIGNAL_NEVER = 1;
/**
@@ -55,12 +55,12 @@
public static final int SIGNAL_FIRST = 2;
/**
* proceeds execution when the first task instance is completed.
- * when no tasks are created on entrance of this node, execution is continued.
+ * when no tasks are created on entrance of this node, execution waits in the task node till tasks are created.
*/
public static final int SIGNAL_FIRST_WAIT = 3;
/**
* proceeds execution when the last task instance is completed.
- * when no tasks are created on entrance of this node, execution waits in the task node till tasks are created.
+ * when no tasks are created on entrance of this node, execution is continued.
*/
public static final int SIGNAL_LAST = 4;
/**
@@ -171,19 +171,17 @@
}
// check if we should continue execution
- boolean continueExecution = false;
+ boolean continueExecution;
switch (signal) {
case SIGNAL_UNSYNCHRONIZED:
continueExecution = true;
break;
- case SIGNAL_FIRST_WAIT:
- case SIGNAL_LAST_WAIT:
- case SIGNAL_NEVER:
- continueExecution = false;
- break;
case SIGNAL_FIRST:
case SIGNAL_LAST:
continueExecution = tmi.getSignallingTasks(executionContext).isEmpty();
+ break;
+ default:
+ continueExecution = false;
}
if (continueExecution) {
@@ -213,14 +211,18 @@
/////////////////////////////////////////////////////////////////////////////
public boolean completionTriggersSignal(TaskInstance taskInstance) {
- boolean completionTriggersSignal = false;
- if ( (signal==SIGNAL_FIRST)
- || (signal==SIGNAL_FIRST_WAIT) ) {
+ boolean completionTriggersSignal;
+ switch (signal) {
+ case SIGNAL_FIRST:
+ case SIGNAL_FIRST_WAIT:
completionTriggersSignal = true;
- } else if ( ( (signal==SIGNAL_LAST)
- || (signal==SIGNAL_LAST_WAIT) )
- && (isLastToComplete(taskInstance) ) ){
- completionTriggersSignal = true;
+ break;
+ case SIGNAL_LAST:
+ case SIGNAL_LAST_WAIT:
+ completionTriggersSignal = isLastToComplete(taskInstance);
+ break;
+ default:
+ completionTriggersSignal = false;
}
return completionTriggersSignal;
}
Modified: jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/instantiation/BeanInstantiator.java
===================================================================
--- jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/instantiation/BeanInstantiator.java 2008-08-26 01:03:36 UTC (rev 2002)
+++ jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/instantiation/BeanInstantiator.java 2008-08-26 01:11:36 UTC (rev 2003)
@@ -36,13 +36,13 @@
// find the setter method
Method method = findSetter(clazz, setterMethodName);
- Class propertyType = method.getParameterTypes()[0];
// if the setter method was found
if (method!=null) {
// make it accessible
method.setAccessible(true);
// invoke it
+ Class propertyType = method.getParameterTypes()[0];
method.invoke(newInstance, new Object[]{ getValue(propertyType, propertyElement) });
} else {
log.error( "couldn't set property '"+propertyName+"' to value '"+propertyElement.asXML()+"'" );
Modified: jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/job/ExecuteActionJob.java
===================================================================
--- jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/job/ExecuteActionJob.java 2008-08-26 01:03:36 UTC (rev 2002)
+++ jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/job/ExecuteActionJob.java 2008-08-26 01:11:36 UTC (rev 2003)
@@ -34,7 +34,7 @@
action.execute(executionContext);
}
- jbpmContext.save(token);
+ jbpmContext.save(processInstance);
return true;
}
Modified: jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/job/ExecuteNodeJob.java
===================================================================
--- jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/job/ExecuteNodeJob.java 2008-08-26 01:03:36 UTC (rev 2002)
+++ jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/job/ExecuteNodeJob.java 2008-08-26 01:11:36 UTC (rev 2003)
@@ -25,7 +25,7 @@
token.unlock(this.toString());
ExecutionContext executionContext = new ExecutionContext(token);
node.execute(executionContext);
- jbpmContext.save(token);
+ jbpmContext.save(processInstance);
return true;
}
Modified: jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/job/Timer.java
===================================================================
--- jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/job/Timer.java 2008-08-26 01:03:36 UTC (rev 2002)
+++ jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/job/Timer.java 2008-08-26 01:11:36 UTC (rev 2003)
@@ -1,7 +1,7 @@
package org.jbpm.job;
-import java.text.DateFormat;
import java.text.SimpleDateFormat;
+import java.util.Date;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -18,6 +18,7 @@
private static final long serialVersionUID = 1L;
+ private final static String dateFormat = "yyyy-MM-dd HH:mm:ss,SSS";
static BusinessCalendar businessCalendar = new BusinessCalendar();
String name;
@@ -34,8 +35,6 @@
}
public boolean execute(JbpmContext jbpmContext) throws Exception {
- boolean deleteThisJob = true;
-
ExecutionContext executionContext = new ExecutionContext(token);
executionContext.setTimer(this);
@@ -51,7 +50,7 @@
// then execute the action if there is one
if (action!=null) {
try {
- log.debug("executing timer '"+this+"'");
+ log.debug("executing '"+this+"'");
if (graphElement!=null) {
graphElement.executeAction(action, executionContext);
} else {
@@ -60,28 +59,19 @@
} catch (Exception actionException) {
// NOTE that Error's are not caught because that might halt the JVM and mask the original Error.
log.warn("timer action threw exception", actionException);
-
- // we put the exception in t
- Exception t = actionException;
- try {
- // if there is a graphElement connected to this timer...
- if (graphElement != null) {
+ // if there is a graphElement connected to this timer...
+ if (graphElement != null) {
+ try {
// we give that graphElement a chance to catch the exception
graphElement.raiseException(actionException, executionContext);
log.debug("timer exception got handled by '"+graphElement+"'");
- t = null;
+ } catch (Exception handlerException) {
+ // if the exception handler rethrows or the original exception results in a DelegationException...
+ throw handlerException;
}
- } catch (Exception rethrowOrDelegationException) {
- // NOTE that Error's are not caught because that might halt the JVM and mask the original Error.
- // if the exception handler rethrows or the original exception results in a DelegationException...
- t = rethrowOrDelegationException;
+ } else {
+ throw actionException;
}
-
- if (t!=null) {
- // This is either the original exception wrapped as a delegation exception
- // or an exception that was throws from an exception handler
- throw t;
- }
}
}
@@ -99,23 +89,19 @@
// if repeat is specified, reschedule the job
if (repeat!=null) {
- deleteThisJob = false;
-
// suppose that it took the timer runner thread a
// very long time to execute the timers.
// then the repeat action dueDate could already have passed.
while (dueDate.getTime()<=System.currentTimeMillis()) {
- dueDate = businessCalendar
- .add(dueDate,
- new Duration(repeat));
+ dueDate = businessCalendar.add(dueDate, new Duration(repeat));
}
- log.debug("updated timer for repetition '"+this+"' in '"+(dueDate.getTime()-System.currentTimeMillis())+"' millis");
- }
+ log.debug("updated '"+this+"' for repetition on '"+formatDueDate(dueDate)+"'");
+ return false;
+ }
- return deleteThisJob;
+ return true;
}
- static DateFormat dateFormat = new SimpleDateFormat("yy-MM-dd HH:mm:ss,SSS");
public String toString() {
StringBuffer buffer = new StringBuffer();
buffer.append("timer");
@@ -126,20 +112,23 @@
buffer.append(name).append(",");
}
if (dueDate!=null) {
- buffer.append(dateFormat.format(dueDate)).append(",");
+ buffer.append(formatDueDate(dueDate)).append(",");
}
if (taskInstance!=null)
- buffer.append("TaskInstance: ").append(taskInstance.getId()).append(",");
+ buffer.append(taskInstance).append(",");
if (token!=null)
- buffer.append("Token: ").append(token.getId());
+ buffer.append(token);
else if (processInstance!=null)
- buffer.append("ProcessInstance: ").append(processInstance.getId());
+ buffer.append(processInstance);
buffer.append(")");
}
return buffer.toString();
}
+ public static String formatDueDate(Date date) {
+ return new SimpleDateFormat(dateFormat).format(date);
+ }
public String getRepeat() {
return repeat;
Modified: jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/job/executor/JobExecutorThread.java
===================================================================
--- jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/job/executor/JobExecutorThread.java 2008-08-26 01:03:36 UTC (rev 2002)
+++ jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/job/executor/JobExecutorThread.java 2008-08-26 01:11:36 UTC (rev 2003)
@@ -2,7 +2,6 @@
import java.io.PrintWriter;
import java.io.StringWriter;
-import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Date;
@@ -19,6 +18,7 @@
import org.jbpm.job.Timer;
import org.jbpm.persistence.JbpmPersistenceException;
import org.jbpm.persistence.db.StaleObjectLogConfigurer;
+import org.jbpm.svc.Services;
public class JobExecutorThread extends Thread {
@@ -36,77 +36,71 @@
this.idleInterval = idleInterval;
this.maxIdleInterval = maxIdleInterval;
this.maxLockTime = maxLockTime;
- this.maxHistory = maxHistory;
}
- JobExecutor jobExecutor;
- JbpmConfiguration jbpmConfiguration;
- int idleInterval;
- int maxIdleInterval;
- long maxLockTime;
- int maxHistory;
+ final JobExecutor jobExecutor;
+ final JbpmConfiguration jbpmConfiguration;
+ final int idleInterval;
+ final int maxIdleInterval;
+ final long maxLockTime;
- Collection history = new ArrayList();
int currentIdleInterval;
volatile boolean isActive = true;
public void run() {
- try {
- currentIdleInterval = idleInterval;
- while (isActive) {
- try {
- Collection acquiredJobs = acquireJobs();
+ currentIdleInterval = idleInterval;
+ while (isActive) {
+ try {
+ Collection acquiredJobs = acquireJobs();
- if (! acquiredJobs.isEmpty()) {
- Iterator iter = acquiredJobs.iterator();
- while (iter.hasNext() && isActive) {
- Job job = (Job) iter.next();
- executeJob(job);
- }
+ if (! acquiredJobs.isEmpty()) {
+ Iterator iter = acquiredJobs.iterator();
+ while (iter.hasNext() && isActive) {
+ Job job = (Job) iter.next();
+ executeJob(job);
+ }
- } else { // no jobs acquired
- if (isActive) {
- long waitPeriod = getWaitPeriod();
- if (waitPeriod>0) {
- synchronized(jobExecutor) {
- jobExecutor.wait(waitPeriod);
- }
+ } else { // no jobs acquired
+ if (isActive) {
+ long waitPeriod = getWaitPeriod();
+ if (waitPeriod>0) {
+ synchronized(jobExecutor) {
+ jobExecutor.wait(waitPeriod);
}
}
}
-
- // no exception so resetting the currentIdleInterval
- currentIdleInterval = idleInterval;
+ }
+
+ // no exception so resetting the currentIdleInterval
+ currentIdleInterval = idleInterval;
- } catch (InterruptedException e) {
- log.info((isActive? "active" : "inactive")+" job executor thread '"+getName()+"' got interrupted");
- } catch (Exception e) {
- log.error("exception in job executor thread. waiting "+currentIdleInterval+" milliseconds", e);
- try {
- synchronized(jobExecutor) {
- jobExecutor.wait(currentIdleInterval);
- }
- } catch (InterruptedException e2) {
- log.debug("delay after exception got interrupted", e2);
+ } catch (InterruptedException e) {
+ log.info((isActive? "active" : "inactive")+" job executor thread '"+getName()+"' got interrupted");
+ } catch (Exception e) {
+ log.error("exception in job executor thread. waiting "+currentIdleInterval+" milliseconds", e);
+ try {
+ synchronized(jobExecutor) {
+ jobExecutor.wait(currentIdleInterval);
}
- // after an exception, the current idle interval is doubled to prevent
- // continuous exception generation when e.g. the db is unreachable
- currentIdleInterval = currentIdleInterval*2;
+ } catch (InterruptedException e2) {
+ log.debug("delay after exception got interrupted", e2);
}
+ // after an exception, the current idle interval is doubled to prevent
+ // continuous exception generation when e.g. the db is unreachable
+ currentIdleInterval <<= 1;
+ if (currentIdleInterval > maxIdleInterval || currentIdleInterval < 0) {
+ currentIdleInterval = maxIdleInterval;
+ }
}
- } catch (Exception e) {
- // NOTE that Error's are not caught because that might halt the JVM and mask the original Error.
- log.error("exception in job executor thread", e);
- } finally {
- log.info(getName()+" leaves cyberspace");
}
+ log.info(getName()+" leaves cyberspace");
}
protected Collection acquireJobs() {
Collection acquiredJobs;
synchronized (jobExecutor) {
- Collection jobsToLock = new ArrayList();
log.debug("acquiring jobs for execution...");
+ Collection jobsToLock = Collections.EMPTY_LIST;
JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
try {
JobSession jobSession = jbpmContext.getJobSession();
@@ -116,11 +110,11 @@
if (job.isExclusive()) {
log.debug("exclusive acquirable job found ("+job+"). querying for other exclusive jobs to lock them all in one tx...");
List otherExclusiveJobs = jobSession.findExclusiveJobs(getName(), job.getProcessInstance());
- jobsToLock.addAll(otherExclusiveJobs);
+ jobsToLock = otherExclusiveJobs;
log.debug("trying to obtain a process-instance exclusive locks for '"+otherExclusiveJobs+"'");
} else {
log.debug("trying to obtain a lock for '"+job+"'");
- jobsToLock.add(job);
+ jobsToLock = Collections.singletonList(job);
}
Iterator iter = jobsToLock.iterator();
@@ -145,17 +139,13 @@
log.debug("obtained lock on jobs: "+acquiredJobs);
}
catch (JbpmPersistenceException e) {
- // if this is a stale object exception, the jbpm configuration has control over the logging
- if ("org.hibernate.StaleObjectStateException".equals(e.getCause().getClass().getName())) {
- log.info("problem committing job acquisition transaction: optimistic locking failed");
- StaleObjectLogConfigurer.staleObjectExceptionsLog.error("problem committing job acquisition transaction: optimistic locking failed", e);
+ // if this is a stale object exception, keep it quiet
+ if (Services.isCausedByStaleState(e)) {
+ log.debug("optimistic locking failed, couldn't obtain lock on jobs: "+jobsToLock);
+ acquiredJobs = Collections.EMPTY_LIST;
} else {
- // TODO run() will log this exception, log it here too?
- log.error("problem committing job acquisition transaction", e);
throw e;
}
- acquiredJobs = Collections.EMPTY_LIST;
- log.debug("couldn't obtain lock on jobs: "+jobsToLock);
}
}
}
@@ -173,7 +163,6 @@
if (job.execute(jbpmContext)) {
jobSession.deleteJob(job);
}
-
} catch (Exception e) {
log.debug("exception while executing '"+job+"'", e);
StringWriter sw = new StringWriter();
@@ -187,7 +176,6 @@
if (totalLockTimeInMillis>maxLockTime) {
jbpmContext.setRollbackOnly();
}
-
} finally {
try {
jbpmContext.close();
Modified: jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/msg/db/DbMessageService.java
===================================================================
--- jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/msg/db/DbMessageService.java 2008-08-26 01:03:36 UTC (rev 2002)
+++ jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/msg/db/DbMessageService.java 2008-08-26 01:11:36 UTC (rev 2003)
@@ -37,9 +37,8 @@
private static final long serialVersionUID = 1L;
- JbpmConfiguration jbpmConfiguration;
JobSession jobSession = null;
- Collection destinations = null;
+ JobExecutor jobExecutor = null;
boolean hasProducedJobs = false;
public DbMessageService() {
@@ -47,8 +46,8 @@
if (jbpmContext==null) {
throw new JbpmException("instantiation of the DbMessageService requires a current JbpmContext");
}
- this.jbpmConfiguration = jbpmContext.getJbpmConfiguration();
- this.jobSession = jbpmContext.getJobSession();
+ jobSession = jbpmContext.getJobSession();
+ jobExecutor = jbpmContext.getJbpmConfiguration().getJobExecutor();
}
public void send(Job job) {
@@ -58,11 +57,10 @@
}
public void close() {
- JobExecutor jobExecutor = jbpmConfiguration.getJobExecutor();
if ( (hasProducedJobs)
&& (jobExecutor!=null)
) {
- log.debug("messages were produced the jobExecutor will be signalled");
+ log.debug("messages were produced, job executor will be signalled");
synchronized(jobExecutor) {
jobExecutor.notify();
}
Modified: jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/scheduler/db/DbSchedulerService.java
===================================================================
--- jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/scheduler/db/DbSchedulerService.java 2008-08-26 01:03:36 UTC (rev 2002)
+++ jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/scheduler/db/DbSchedulerService.java 2008-08-26 01:11:36 UTC (rev 2003)
@@ -21,26 +21,39 @@
*/
package org.jbpm.scheduler.db;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.jbpm.JbpmContext;
import org.jbpm.JbpmException;
import org.jbpm.db.JobSession;
import org.jbpm.graph.exe.ProcessInstance;
import org.jbpm.graph.exe.Token;
import org.jbpm.job.Timer;
+import org.jbpm.job.executor.JobExecutor;
import org.jbpm.scheduler.SchedulerService;
public class DbSchedulerService implements SchedulerService {
private static final long serialVersionUID = 1L;
+
+ private static final Log log = LogFactory.getLog(DbSchedulerService.class);
JobSession jobSession = null;
-
+ JobExecutor jobExecutor = null;
+ boolean hasProducedJobs = false;
+
public DbSchedulerService() {
- this.jobSession = JbpmContext.getCurrentJbpmContext().getJobSession();
+ JbpmContext jbpmContext = JbpmContext.getCurrentJbpmContext();
+ if (jbpmContext==null) {
+ throw new JbpmException("instantiation of the DbSchedulerService requires a current JbpmContext");
+ }
+ this.jobSession = jbpmContext.getJobSession();
+ this.jobExecutor = jbpmContext.getJbpmConfiguration().getJobExecutor();
}
public void createTimer(Timer timerJob) {
jobSession.saveJob(timerJob);
+ hasProducedJobs = true;
}
public void deleteTimersByName(String timerName, Token token) {
@@ -55,5 +68,11 @@
}
public void close() {
+ if (hasProducedJobs && jobExecutor != null) {
+ log.debug("timers were produced, job executor will be signalled");
+ synchronized (jobExecutor) {
+ jobExecutor.notify();
+ }
+ }
}
}
Modified: jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/scheduler/def/CreateTimerAction.java
===================================================================
--- jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/scheduler/def/CreateTimerAction.java 2008-08-26 01:03:36 UTC (rev 2002)
+++ jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/scheduler/def/CreateTimerAction.java 2008-08-26 01:11:36 UTC (rev 2003)
@@ -29,6 +29,7 @@
import org.jbpm.calendar.BusinessCalendar;
import org.jbpm.calendar.Duration;
import org.jbpm.graph.def.Action;
+import org.jbpm.graph.def.Event;
import org.jbpm.graph.def.GraphElement;
import org.jbpm.graph.exe.ExecutionContext;
import org.jbpm.job.Timer;
@@ -133,7 +134,7 @@
try {
executionContext.setTimer(timer);
// fire the create timer event on the same graph element
- graphElement.fireEvent("timer-create", executionContext);
+ graphElement.fireEvent(Event.EVENTTYPE_TIMER_CREATE, executionContext);
} finally {
executionContext.setTimer(null);
}
Modified: jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/svc/Services.java
===================================================================
--- jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/svc/Services.java 2008-08-26 01:03:36 UTC (rev 2002)
+++ jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/svc/Services.java 2008-08-26 01:11:36 UTC (rev 2003)
@@ -23,6 +23,7 @@
import java.io.Serializable;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
@@ -30,6 +31,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.hibernate.StaleStateException;
import org.jbpm.JbpmContext;
import org.jbpm.JbpmException;
import org.jbpm.graph.exe.ProcessInstance;
@@ -62,16 +64,18 @@
public static final String SERVICENAME_JCR = "jcr";
public static final String SERVICENAME_ADDRESSRESOLVER = "addressresolver";
- static final List defaultSaveOperations = new ArrayList();
+ static final List defaultSaveOperations = createDefaultSaveOperations();
- static {
- defaultSaveOperations.add(new CheckUnpersistableVariablesOperation());
+ private static List createDefaultSaveOperations() {
+ SaveOperation[] operations = new SaveOperation[4];
+ operations[0] = new CheckUnpersistableVariablesOperation();
// first we save the runtime data (process instance)
- defaultSaveOperations.add(new HibernateSaveOperation());
+ operations[1] = new HibernateSaveOperation();
// then we insert the logs cause the logs can have references
// to the runtime data
- defaultSaveOperations.add(new SaveLogsOperation());
- defaultSaveOperations.add(new CascadeSaveOperation());
+ operations[2] = new SaveLogsOperation();
+ operations[3] = new CascadeSaveOperation();
+ return Arrays.asList(operations);
}
Map serviceFactories = null;
@@ -80,7 +84,7 @@
List saveOperations = null;
public static Service getCurrentService(String name) {
- return getCurrentService(name, true);
+ return getCurrentService(name, true);
}
public static Service getCurrentService(String name, boolean isRequired) {
@@ -102,17 +106,26 @@
public Services(Map serviceFactories, List serviceNames, List saveOperations) {
this.serviceFactories = serviceFactories;
this.serviceNames = serviceNames;
- if (saveOperations!=null) {
- this.saveOperations = saveOperations;
- } else {
- this.saveOperations = defaultSaveOperations;
- }
+ this.saveOperations = saveOperations != null ? saveOperations : defaultSaveOperations;
}
public void setSaveOperations(List saveOperations) {
+ if (saveOperations == null) {
+ throw new IllegalArgumentException("saveOperations cannot be null");
+ }
this.saveOperations = saveOperations;
}
+ public void addSaveOperation(SaveOperation saveOperation) {
+ if (saveOperation == null) {
+ throw new IllegalArgumentException("saveOperation cannot be null");
+ }
+ if (saveOperations == defaultSaveOperations) {
+ saveOperations = new ArrayList(defaultSaveOperations);
+ }
+ saveOperations.add(saveOperation);
+ }
+
public Map getServiceFactories() {
if (serviceFactories==null) {
serviceFactories = new HashMap();
@@ -222,8 +235,8 @@
log.debug("closing service '"+serviceName+"': "+service);
service.close();
} catch (JbpmPersistenceException e) {
- // if this is a stale object exception, the jbpm configuration has control over the logging
- if ("org.hibernate.StaleObjectStateException".equals(e.getCause().getClass().getName())) {
+ // if this is a stale state exception, the jbpm configuration has control over the logging
+ if (isCausedByStaleState(e)) {
log.info("problem closing service '"+serviceName+"': optimistic locking failed");
StaleObjectLogConfigurer.staleObjectExceptionsLog.error("problem closing service '"+serviceName+"': optimistic locking failed", e);
} else {
@@ -251,6 +264,14 @@
}
}
+ public static boolean isCausedByStaleState(JbpmPersistenceException persistenceException) {
+ for (Throwable cause = persistenceException.getCause(); cause != null; cause = cause.getCause()) {
+ if (cause instanceof StaleStateException)
+ return true;
+ }
+ return false;
+ }
+
public static void assignId(Object object) {
JbpmContext jbpmContext = JbpmContext.getCurrentJbpmContext();
if (jbpmContext!=null) {
Modified: jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/taskmgmt/exe/TaskInstance.java
===================================================================
--- jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/taskmgmt/exe/TaskInstance.java 2008-08-26 01:03:36 UTC (rev 2002)
+++ jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/taskmgmt/exe/TaskInstance.java 2008-08-26 01:11:36 UTC (rev 2003)
@@ -41,7 +41,6 @@
import org.jbpm.graph.exe.ExecutionContext;
import org.jbpm.graph.exe.ProcessInstance;
import org.jbpm.graph.exe.Token;
-import org.jbpm.graph.node.TaskNode;
import org.jbpm.security.SecurityHelper;
import org.jbpm.taskmgmt.def.Swimlane;
import org.jbpm.taskmgmt.def.Task;
@@ -103,14 +102,7 @@
this.task = task;
this.isBlocking = task.isBlocking();
this.priority = task.getPriority();
- if (task.getTaskNode()!=null) {
- int signal = task.getTaskNode().getSignal();
- this.isSignalling = ( (signal==TaskNode.SIGNAL_FIRST )
- || (signal==TaskNode.SIGNAL_LAST )
- || (signal==TaskNode.SIGNAL_FIRST_WAIT )
- || (signal==TaskNode.SIGNAL_LAST_WAIT )
- );
- }
+ this.isSignalling = task.isSignalling();
}
void submitVariables() {
@@ -562,7 +554,7 @@
}
public String toString() {
- return "TaskInstance"+(name!=null ? "["+name+"]" : Integer.toHexString(System.identityHashCode(this)));
+ return "TaskInstance"+(name!=null ? "("+name+")" : "@"+Integer.toHexString(hashCode()));
}
// private //////////////////////////////////////////////////////////////////
@@ -577,7 +569,7 @@
pooledActor.addTaskInstance(this);
}
} else {
- pooledActors = null;
+ this.pooledActors = null;
}
}
Modified: jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/taskmgmt/exe/TaskMgmtInstance.java
===================================================================
--- jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/taskmgmt/exe/TaskMgmtInstance.java 2008-08-26 01:03:36 UTC (rev 2002)
+++ jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/main/java/org/jbpm/taskmgmt/exe/TaskMgmtInstance.java 2008-08-26 01:11:36 UTC (rev 2003)
@@ -109,8 +109,6 @@
// bind the task instance to the TaskMgmtInstance
addTaskInstance(taskInstance);
- // ... add a reference to the process instance
- taskInstance.setProcessInstance(executionContext.getProcessInstance());
// initialize the task instance
if (task!=null) taskInstance.setTask(task);
@@ -119,6 +117,7 @@
Services.assignId(taskInstance);
// copy the task properties
+ /* XXX property initialization was already done in taskInstance.setTask(task)
String description = null;
if (task!=null) {
description = task.getDescription();
@@ -126,50 +125,50 @@
taskInstance.setBlocking(task.isBlocking());
taskInstance.setSignalling(task.isSignalling());
}
+ */
if (executionContext!=null) {
Token token = executionContext.getToken();
taskInstance.setToken(token);
+ taskInstance.setProcessInstance(token.getProcessInstance());
taskInstance.initializeVariables();
if (task != null && task.getDueDate()!=null) {
- Date baseDate = null;
- Date dueDateDate = null;
- String dueDate = task.getDueDate();
+ Date baseDate;
+ String dueDateString = task.getDueDate();
String durationString = null;
- String durationSeparator = null;
- if (dueDate.startsWith("#")) {
- String baseDateEL = dueDate.substring(0,dueDate.indexOf("}")+1);
- Object o = JbpmExpressionEvaluator.evaluate(baseDateEL, executionContext);
- if (o instanceof Date) {
- baseDate = (Date) o;
+ if (dueDateString.startsWith("#")) {
+ String baseDateEL = dueDateString.substring(0,dueDateString.indexOf("}")+1);
+ Object result = JbpmExpressionEvaluator.evaluate(baseDateEL, executionContext);
+ if (result instanceof Date) {
+ baseDate = (Date) result;
+ } else if (result instanceof Calendar) {
+ baseDate = ((Calendar) result).getTime();
} else {
- if (o instanceof Calendar) {
- baseDate = ((Calendar) o).getTime();
- } else {
- throw new JbpmException("Invalid basedate type: " + baseDateEL + " is of type " + o.getClass().getName() +". Only Date and Calendar are supported");
- }
+ throw new JbpmException("Invalid basedate type: " + baseDateEL + " is of type " + result.getClass().getName() +". Only Date and Calendar are supported");
}
- int endOfELIndex = dueDate.indexOf("}");
- if (endOfELIndex < (dueDate.length() -1) ) {
- durationSeparator = dueDate.substring(endOfELIndex+1).trim().substring(0,1);
- if ( !(durationSeparator.equals("+") || durationSeparator.equals("-") ) ){
+ int endOfELIndex = dueDateString.indexOf("}");
+ if (endOfELIndex < (dueDateString.length() -1) ) {
+ char durationSeparator = dueDateString.substring(endOfELIndex+1).trim().charAt(0);
+ if (durationSeparator != '+' && durationSeparator != '-'){
throw new JbpmException("Invalid duedate, + or - missing after EL");
}
- durationString = dueDate.substring(endOfELIndex+1).trim();
+ durationString = dueDateString.substring(endOfELIndex+1).trim();
}
} else {
- durationString = dueDate;
+ baseDate = Clock.getCurrentTime();
+ durationString = dueDateString;
}
- if (baseDate != null && (durationString == null || "".equals(durationString))) {
- dueDateDate = baseDate;
+ Date dueDate;
+ if (durationString == null || durationString.length() == 0) {
+ dueDate = baseDate;
} else {
BusinessCalendar businessCalendar = new BusinessCalendar();
- dueDateDate = businessCalendar.add( (baseDate != null) ? baseDate : Clock.getCurrentTime(), new Duration(durationString) );
+ dueDate = businessCalendar.add(baseDate, new Duration(durationString) );
}
- taskInstance.setDueDate(dueDateDate);
+ taskInstance.setDueDate(dueDate);
}
@@ -180,12 +179,15 @@
executionContext.setEventSource(task);
// evaluate the description
- if ( (description!=null)
- && (description.indexOf("#{")!=-1)
- ) {
- Object result = JbpmExpressionEvaluator.evaluate(description, executionContext);
- if (result!=null) {
- taskInstance.setDescription(result.toString());
+ if (task != null) {
+ String description = task.getDescription();
+ if ( (description!=null)
+ && (description.indexOf("#{")!=-1)
+ ) {
+ Object result = JbpmExpressionEvaluator.evaluate(description, executionContext);
+ if (result!=null) {
+ taskInstance.setDescription(result.toString());
+ }
}
}
Modified: jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/test/java/org/jbpm/AllDbTests.java
===================================================================
--- jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/test/java/org/jbpm/AllDbTests.java 2008-08-26 01:03:36 UTC (rev 2002)
+++ jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/test/java/org/jbpm/AllDbTests.java 2008-08-26 01:11:36 UTC (rev 2003)
@@ -34,6 +34,7 @@
import org.jbpm.graph.exe.GraphExeDbTests;
import org.jbpm.graph.log.GraphLogDbTests;
import org.jbpm.graph.node.GraphNodeDbTests;
+import org.jbpm.job.executor.JobExecutorDbTests;
import org.jbpm.jpdl.el.JpdlElDbTests;
import org.jbpm.jpdl.exe.JpdlExeDbTests;
import org.jbpm.jpdl.par.JpdlParDbTests;
@@ -62,6 +63,7 @@
suite.addTest(GraphExeDbTests.suite());
suite.addTest(GraphLogDbTests.suite());
suite.addTest(GraphNodeDbTests.suite());
+ suite.addTest(JobExecutorDbTests.suite());
suite.addTest(JpdlElDbTests.suite());
suite.addTest(JpdlExeDbTests.suite());
suite.addTest(JpdlParDbTests.suite());
Added: jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/test/java/org/jbpm/job/executor/NoJobExecutorDbTest.java
===================================================================
--- jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/test/java/org/jbpm/job/executor/NoJobExecutorDbTest.java (rev 0)
+++ jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/test/java/org/jbpm/job/executor/NoJobExecutorDbTest.java 2008-08-26 01:11:36 UTC (rev 2003)
@@ -0,0 +1,62 @@
+/*
+ * 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.job.executor;
+
+import junit.framework.TestCase;
+
+import org.jbpm.JbpmConfiguration;
+import org.jbpm.JbpmContext;
+import org.jbpm.graph.def.ProcessDefinition;
+import org.jbpm.graph.exe.ProcessInstance;
+
+/**
+ * Test case or JBPM-1452
+ * @author Alejandro Guizar
+ */
+public class NoJobExecutorDbTest extends TestCase {
+
+ private JbpmContext jbpmContext;
+
+ private static JbpmConfiguration jbpmConfiguration = JbpmConfiguration.parseXmlString(
+ "<jbpm-configuration>" +
+ " <null name='jbpm.job.executor' />" +
+ "</jbpm-configuration>");
+
+ protected void setUp() throws Exception {
+ jbpmConfiguration.createSchema();
+ jbpmContext = jbpmConfiguration.createJbpmContext();
+ }
+
+ protected void tearDown() throws Exception {
+ jbpmContext.close();
+ jbpmConfiguration.dropSchema();
+ }
+
+ public void testJobExecutorDoesNotExist() {
+ // check the job executor is properly nullified
+ assertNull(jbpmContext.getObjectFactory().createObject("jbpm.job.executor"));
+ // start and end a process instance, confirm no exception gets thrown
+ jbpmContext.deployProcessDefinition(new ProcessDefinition("Audit"));
+ ProcessInstance processInstance = jbpmContext.newProcessInstanceForUpdate("Audit");
+ processInstance.end();
+ }
+}
Added: jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/test/java/org/jbpm/job/executor/TimerOnTimerDbTest.java
===================================================================
--- jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/test/java/org/jbpm/job/executor/TimerOnTimerDbTest.java (rev 0)
+++ jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/test/java/org/jbpm/job/executor/TimerOnTimerDbTest.java 2008-08-26 01:11:36 UTC (rev 2003)
@@ -0,0 +1,144 @@
+/*
+ * 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.job.executor;
+
+import java.io.Serializable;
+
+import javax.transaction.Status;
+import javax.transaction.Synchronization;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.jbpm.db.AbstractDbTestCase;
+import org.jbpm.graph.def.Event;
+import org.jbpm.graph.def.ProcessDefinition;
+import org.jbpm.graph.exe.ProcessInstance;
+
+/**
+ * Test case for JBPM-1135
+ * @author Alejandro Guizar
+ */
+public class TimerOnTimerDbTest extends AbstractDbTestCase {
+
+ public void testTimerOnTimer() {
+ ProcessDefinition processDefinition = ProcessDefinition.parseXmlResource("org/jbpm/job/executor/timerOnTimer.jpdl.xml");
+ jbpmContext.deployProcessDefinition(processDefinition);
+
+ ProcessInstance processInstance = jbpmContext.newProcessInstanceForUpdate("timerTest");
+ processInstance.getContextInstance().setVariable("testCallback", new TestCallback());
+ processInstance.signal();
+ assertEquals("firstNode", processInstance.getRootToken().getNode().getName());
+ commitAndCloseSession();
+
+ startJobExecutor();
+ try {
+ TestCallback.waitForEvent(Event.EVENTTYPE_NODE_ENTER);
+ beginSessionTransaction();
+ long processInstanceId = processInstance.getId();
+ assertEquals("secondNode", jbpmContext.loadProcessInstance(processInstanceId)
+ .getRootToken()
+ .getNode()
+ .getName());
+ commitAndCloseSession();
+
+ TestCallback.waitForEvent(Event.EVENTTYPE_PROCESS_END);
+ beginSessionTransaction();
+ assertTrue(jbpmContext.loadProcessInstance(processInstanceId).hasEnded());
+ }
+ finally {
+ stopJobExecutor();
+ }
+ }
+
+ public static class TestCallback implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+ private static final Log log = LogFactory.getLog(TestCallback.class);
+
+ public void processStart() {
+ registerNotification(Event.EVENTTYPE_PROCESS_START);
+ }
+
+ public void processEnd() {
+ registerNotification(Event.EVENTTYPE_PROCESS_END);
+ }
+
+ public void nodeEnter() {
+ registerNotification(Event.EVENTTYPE_NODE_ENTER);
+ }
+
+ public void nodeLeave() {
+ registerNotification(Event.EVENTTYPE_NODE_LEAVE);
+ }
+
+ public void taskCreate() {
+ registerNotification(Event.EVENTTYPE_TASK_CREATE);
+ }
+
+ public void taskEnd() {
+ registerNotification(Event.EVENTTYPE_TASK_END);
+ }
+
+ public void timerCreate() {
+ registerNotification(Event.EVENTTYPE_TIMER_CREATE);
+ }
+
+ public void timer() {
+ registerNotification(Event.EVENTTYPE_TIMER);
+ }
+
+ private static void registerNotification(final String event) {
+ Synchronization notification = new Synchronization() {
+
+ public void beforeCompletion() {
+ // nothing to do here
+ }
+
+ public void afterCompletion(int status) {
+ if (status == Status.STATUS_COMMITTED) {
+ log.info("delivering " + event + " notification");
+ synchronized (event) {
+ event.notify();
+ }
+ }
+ }
+
+ };
+ jbpmConfiguration.getCurrentJbpmContext()
+ .getSession()
+ .getTransaction()
+ .registerSynchronization(notification);
+ }
+
+ public static void waitForEvent(String event) {
+ synchronized (event) {
+ try {
+ event.wait(60000);
+ }
+ catch (InterruptedException e) {
+ // reassert interruption
+ Thread.currentThread().interrupt();
+ }
+ }
+ }
+ }
+}
Added: jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/test/java/org/jbpm/job/executor/timerOnTimer.jpdl.xml
===================================================================
--- jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/test/java/org/jbpm/job/executor/timerOnTimer.jpdl.xml (rev 0)
+++ jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/src/test/java/org/jbpm/job/executor/timerOnTimer.jpdl.xml 2008-08-26 01:11:36 UTC (rev 2003)
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<process-definition name="timerTest" xmlns="urn:jbpm.org:jpdl-3.2"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jbpm.org:jpdl-3.2 http://jbpm.org/xsd/jpdl-3.2.xsd">
+
+ <event type="process-start">
+ <action expression="#{testCallback.processStart}"/>
+ </event>
+ <event type="process-end">
+ <action expression="#{testCallback.processEnd}"/>
+ </event>
+ <event type="node-enter">
+ <action expression="#{testCallback.nodeEnter}" />
+ </event>
+ <event type="node-leave">
+ <action expression="#{testCallback.nodeLeave}" />
+ </event>
+ <event type="task-create">
+ <action expression="#{testCallback.taskCreate}" />
+ </event>
+ <event type="task-end">
+ <action expression="#{testCallback.taskEnd}" />
+ </event>
+ <event type="timer-create">
+ <action expression="#{testCallback.timerCreate}" />
+ </event>
+ <event type="timer">
+ <action expression="#{testCallback.timer}"/>
+ </event>
+
+ <start-state name="start">
+ <transition name="doneStart" to="firstNode" />
+ </start-state>
+
+ <task-node name="firstNode" end-tasks="yes">
+ <task name="firstTask">
+ <assignment actor-id="admin" />
+ <timer duedate="1 second" transition="doneFirst" />
+ </task>
+ <transition name="doneFirst" to="secondNode" />
+ </task-node>
+
+ <task-node name="secondNode" end-tasks="yes">
+ <task name="secondTask">
+ <assignment actor-id="admin" />
+ <timer duedate="1 second" transition="doneSecond" />
+ </task>
+ <transition name="doneSecond" to="end" />
+ </task-node>
+
+ <end-state name="end" />
+
+</process-definition>
\ No newline at end of file
17 years, 8 months
JBoss JBPM SVN: r2002 - jbpm3/trunk/modules/jpdl/core/src/test/resources.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2008-08-25 21:03:36 -0400 (Mon, 25 Aug 2008)
New Revision: 2002
Modified:
jbpm3/trunk/modules/jpdl/core/src/test/resources/log4j.xml
Log:
added org.hibernate.type category to aid debugging
Modified: jbpm3/trunk/modules/jpdl/core/src/test/resources/log4j.xml
===================================================================
--- jbpm3/trunk/modules/jpdl/core/src/test/resources/log4j.xml 2008-08-25 18:39:24 UTC (rev 2001)
+++ jbpm3/trunk/modules/jpdl/core/src/test/resources/log4j.xml 2008-08-26 01:03:36 UTC (rev 2002)
@@ -56,6 +56,12 @@
<priority value="DEBUG" />
</category>
+ <!-- show JDBC parameters
+ <category name="org.hibernate.type">
+ <priority value="TRACE" />
+ </category>
+ -->
+
<!-- ======================= -->
<!-- Setup the Root category -->
<!-- ======================= -->
17 years, 8 months
JBoss JBPM SVN: r2001 - in jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704: identity and 2 other directories.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2008-08-25 14:39:24 -0400 (Mon, 25 Aug 2008)
New Revision: 2001
Modified:
jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/enterprise/
jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/identity/
jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/dist/
jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar/
Log:
excluded target directories from version control
Property changes on: jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/enterprise
___________________________________________________________________
Name: svn:ignore
+ target
Property changes on: jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/identity
___________________________________________________________________
Name: svn:ignore
+ target
Property changes on: jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/dist
___________________________________________________________________
Name: svn:ignore
+ target
Property changes on: jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/jpdl/jar
___________________________________________________________________
Name: svn:ignore
+ target
17 years, 8 months
JBoss JBPM SVN: r2000 - jbpm3/branches.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2008-08-25 14:16:15 -0400 (Mon, 25 Aug 2008)
New Revision: 2000
Added:
jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704/
Log:
Support patch: JBPM-1704
Copied: jbpm3/branches/jpdl-3.2.3.GA_JBPM-1704 (from rev 1962, jbpm3/tags/jpdl-3.2.3.GA)
17 years, 8 months
JBoss JBPM SVN: r1999 - in jbpm3/trunk/modules: jpdl and 1 other directory.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-08-25 11:48:21 -0400 (Mon, 25 Aug 2008)
New Revision: 1999
Removed:
jbpm3/trunk/modules/jpdl/examples/
jbpm3/trunk/modules/jpdl/ws/
Modified:
jbpm3/trunk/modules/enterprise/pom.xml
jbpm3/trunk/modules/jpdl/pom.xml
Log:
Remove modules ws, examples
Modified: jbpm3/trunk/modules/enterprise/pom.xml
===================================================================
--- jbpm3/trunk/modules/enterprise/pom.xml 2008-08-25 15:09:43 UTC (rev 1998)
+++ jbpm3/trunk/modules/enterprise/pom.xml 2008-08-25 15:48:21 UTC (rev 1999)
@@ -94,7 +94,7 @@
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <!-- [JBPM-1268] ant test produces errors in 3.2.3.GA -->
+ <!-- [JBPM-1287] ant test produces errors in 3.2.3.GA -->
<skipTests>true</skipTests>
</configuration>
</plugin>
Modified: jbpm3/trunk/modules/jpdl/pom.xml
===================================================================
--- jbpm3/trunk/modules/jpdl/pom.xml 2008-08-25 15:09:43 UTC (rev 1998)
+++ jbpm3/trunk/modules/jpdl/pom.xml 2008-08-25 15:48:21 UTC (rev 1999)
@@ -32,7 +32,6 @@
<modules>
<module>core</module>
<module>db</module>
- <module>examples</module>
<module>identity</module>
<module>simulation</module>
<module>userguide</module>
17 years, 8 months
JBoss JBPM SVN: r1998 - in jbpm3/trunk: hudson and 4 other directories.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-08-25 11:09:43 -0400 (Mon, 25 Aug 2008)
New Revision: 1998
Added:
jbpm3/trunk/hudson/hudson-home/jobs/jBPM-Matrix/
jbpm3/trunk/hudson/hudson-home/jobs/jBPM-Matrix/config.xml
jbpm3/trunk/modules/jpdl/.classpath
jbpm3/trunk/modules/jpdl/.project
Modified:
jbpm3/trunk/.classpath
jbpm3/trunk/hudson/ant.properties.example
jbpm3/trunk/hudson/build.xml
jbpm3/trunk/hudson/hudson-home/config.xml
Log:
Add a Hudson Matrix Project
Modified: jbpm3/trunk/.classpath
===================================================================
--- jbpm3/trunk/.classpath 2008-08-25 14:11:51 UTC (rev 1997)
+++ jbpm3/trunk/.classpath 2008-08-25 15:09:43 UTC (rev 1998)
@@ -1,9 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="modules/jpdl/core/src/main/java"/>
- <classpathentry kind="src" path="modules/jpdl/integration/src/main/java"/>
- <classpathentry kind="src" path="modules/jpdl/core/src/test/java"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <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/eclipse-classes"/>
+ <classpathentry kind="output" path="target/classes"/>
</classpath>
Modified: jbpm3/trunk/hudson/ant.properties.example
===================================================================
--- jbpm3/trunk/hudson/ant.properties.example 2008-08-25 14:11:51 UTC (rev 1997)
+++ jbpm3/trunk/hudson/ant.properties.example 2008-08-25 15:09:43 UTC (rev 1998)
@@ -8,10 +8,11 @@
# The JBoss settings
jboss.server.instance=default
-jboss.bind.address=localhost
+jboss.bind.address=127.0.0.1
# JDK settings
-java.home.jdk16=/usr/java/jdk1.6
+java.home.jdk15=/usr/java/jdk1.5.0_15
+java.home.jdk16=/usr/java/jdk1.6.0_06
# Hudson QA Environment
hudson.username=changeme
Modified: jbpm3/trunk/hudson/build.xml
===================================================================
--- jbpm3/trunk/hudson/build.xml 2008-08-25 14:11:51 UTC (rev 1997)
+++ jbpm3/trunk/hudson/build.xml 2008-08-25 15:09:43 UTC (rev 1998)
@@ -65,7 +65,7 @@
<target name="hudson-tomcat-setup" depends="init-hudson" unless="hudson.tomcat.available">
<get src="${jboss.repository}/apache-tomcat/${apache-tomcat}/lib/apache-tomcat.zip" dest="${thirdparty.dir}/apache-tomcat.zip" usetimestamp="true" verbose="true"/>
- <get src="${jboss.repository}/sun-hudson/${sun-hudson}/lib/hudson.war" dest="${thirdparty.dir}/hudson.war" usetimestamp="true" verbose="true"/>
+ <get src="https://hudson.dev.java.net/files/documents/${sun-hudson}/hudson.war" dest="${thirdparty.dir}/hudson.war" usetimestamp="true" verbose="true"/>
<mkdir dir="${hudson.root}"/>
<unzip src="${thirdparty.dir}/apache-tomcat.zip" dest="${hudson.root}"/>
@@ -117,8 +117,7 @@
<!-- Configure Hudson -->
<copy todir="${hudson.home}" overwrite="true">
<fileset dir="${hudson.dir}/hudson-home">
- <include name="jobs/*/config.xml"/>
- <include name="users/*/config.xml"/>
+ <include name="jobs/jBPM-Matrix/config.xml"/>
<include name="*.xml"/>
</fileset>
<filterset>
Modified: jbpm3/trunk/hudson/hudson-home/config.xml
===================================================================
--- jbpm3/trunk/hudson/hudson-home/config.xml 2008-08-25 14:11:51 UTC (rev 1997)
+++ jbpm3/trunk/hudson/hudson-home/config.xml 2008-08-25 15:09:43 UTC (rev 1998)
@@ -1,52 +1,22 @@
<?xml version='1.0' encoding='UTF-8'?>
<hudson>
- <numExecutors>1</numExecutors>
+ <numExecutors>2</numExecutors>
<useSecurity>true</useSecurity>
<systemMessage>
<![CDATA[
<h2>jBPM-(a)version.id@ QA Environment</h2>
-
- <table>
- <tr><th align=left>jBPM:</th><td>@hudson.jbpm.url@</td></tr>
- </table>
]]>
</systemMessage>
- <jdks/>
+ <jdks>
+ <jdk>
+ <name>jdk1.5</name>
+ <javaHome>@java.home.jdk15@</javaHome>
+ </jdk>
+ <jdk>
+ <name>jdk1.6</name>
+ <javaHome>@java.home.jdk16@</javaHome>
+ </jdk>
+ </jdks>
<slaves/>
<quietPeriod>5</quietPeriod>
- <views>
- <!-- Release QA -->
- <view>
- <owner reference="../../.."/>
- <jobNames class="tree-set">
- <no-comparator/>
- <string>Release-Matrix-Step1</string>
- <string>Release-Matrix-Step2</string>
- </jobNames>
- <name>Release QA</name>
- <description>
- <![CDATA[
-A collection of jobs that cover the jBPM release matrix.
-<p/>
-]]>
- </description>
- </view>
-
- <!-- Target Container -->
- <view>
- <owner reference="../../.."/>
- <jobNames class="tree-set">
- <no-comparator/>
- <string>AS-4.2.1</string>
- <string>AS-4.2.2</string>
- <string>AS-5.0.0</string>
- <string>AS-5.0.1</string>
- </jobNames>
- <name>Target Container</name>
- <description> <![CDATA[
-Build the supported target container. A successful build is a prerequisite for any testrun that targets the container.
-]]>
- </description>
- </view>
- </views>
</hudson>
\ No newline at end of file
Added: jbpm3/trunk/hudson/hudson-home/jobs/jBPM-Matrix/config.xml
===================================================================
--- jbpm3/trunk/hudson/hudson-home/jobs/jBPM-Matrix/config.xml (rev 0)
+++ jbpm3/trunk/hudson/hudson-home/jobs/jBPM-Matrix/config.xml 2008-08-25 15:09:43 UTC (rev 1998)
@@ -0,0 +1,151 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<matrix-project>
+ <actions class="java.util.concurrent.CopyOnWriteArrayList"/>
+ <description></description>
+ <keepDependencies>false</keepDependencies>
+ <properties>
+ <hudson.security.AuthorizationMatrixProperty/>
+ </properties>
+ <scm class="hudson.scm.SubversionSCM">
+ <locations>
+ <hudson.scm.SubversionSCM_-ModuleLocation>
+ <remote>https://svn.jboss.org/repos/jbpm/jbpm3/trunk</remote>
+ <local>jbpm</local>
+ </hudson.scm.SubversionSCM_-ModuleLocation>
+ </locations>
+ <useUpdate>true</useUpdate>
+ <browser class="hudson.scm.browsers.FishEyeSVN">
+ <url>http://fisheye.jboss.com/browse/JbpmSvn/</url>
+ <rootModule></rootModule>
+ </browser>
+ </scm>
+ <canRoam>true</canRoam>
+ <disabled>false</disabled>
+ <triggers class="vector"/>
+ <axes>
+ <axis>
+ <name>container</name>
+ <values>
+ <string>jboss421</string>
+ <string>jboss422</string>
+ </values>
+ </axis>
+ <axis>
+ <name>database</name>
+ <values>
+ <string>hypersonic</string>
+ <string>mysql</string>
+ <string>postgress</string>
+ </values>
+ </axis>
+ <axis>
+ <name>jdk</name>
+ <values>
+ <string>jdk1.6</string>
+ <string>jdk1.5</string>
+ </values>
+ </axis>
+ </axes>
+ <builders>
+ <hudson.tasks.Shell>
+ <command>
+WORKSPACE=`pwd`
+CONTAINER=$container
+DATABASE=$database
+JBPMDIR=$WORKSPACE/jbpm
+JBOSSDIR=$WORKSPACE/jboss
+DISTRODIR=$JBPMDIR/modules/distribution/target
+JBOSS_BINDADDR=(a)jboss.bind.address@
+
+case "$CONTAINER" in
+ jboss421*)
+ JBOSS_BUILD=(a)hudson.jboss421.build@
+ JBOSS_SVN=(a)hudson.jboss421.url@
+ JBOSS_REV=(a)hudson.jboss421.rev@
+ ;;
+
+ jboss422*)
+ JBOSS_BUILD=(a)hudson.jboss422.build@
+ JBOSS_SVN=(a)hudson.jboss422.url@
+ JBOSS_REV=(a)hudson.jboss422.rev@
+ ;;
+esac
+
+JBOSS_INSTANCE=$JBOSSDIR/build/output/$JBOSS_REV
+ENVIRONMENT="-Djboss.bind.address=$JBOSS_BINDADDR -Djboss.home=$JBOSS_INSTANCE"
+
+#
+# checkout with an explicit version
+#
+if [ -d "$JBOSSDIR" ]; then
+ cd $JBOSSDIR
+ svn up .
+else
+ cd $WORKSPACE
+ svn co -r$JBOSS_REV $JBOSS_SVN jboss
+fi
+
+#
+# build jboss
+#
+cd $JBOSSDIR
+rm -rf thirdparty/*
+./build/build.sh clean main
+
+#
+# Verify build
+#
+if [ ! -d ./build/output/$JBOSS_REV ]; then
+ echo "Cannot find expected build: $JBOSS_REV"
+ exit 1
+fi
+
+#
+# Build distro
+#
+cd $JBPMDIR
+cp profiles.xml.example profiles.xml
+mvn -U -Pdistro clean package
+
+#
+# Deploy distro
+#
+java -jar $DISTRODIR/jbpm-distribution-@version.id(a)-install.jar $DISTRODIR/resources/auto-install-$CONTAINER.xml
+
+#
+# start jbossas
+#
+$JBPMDIR/hudson/jboss/bin/jboss.sh $JBOSS_INSTANCE start $JBOSS_BINDADDR
+
+# Was it successfully started?
+$JBPMDIR/hudson/jboss/bin/http-spider.sh $JBOSS_BINDADDR:8080 $WORKSPACE
+if [ -e $WORKSPACE/spider.failed ]; then
+ tail -n 100 $JBOSS_INSTANCE/server/@jboss.server.instance(a)/log/server.log
+ $JBPMDIR/hudson/jboss/bin/jboss.sh $JBOSS_INSTANCE stop $JBOSS_BINDADDR
+ exit 1
+fi
+
+#
+# log dependency tree
+#
+mvn dependency:tree | tee $WORKSPACE/dependency-tree.txt
+
+#
+# execute tests
+#
+mvn test 2>&1 | tee $WORKSPACE/tests.log
+# cat $WORKSPACE/tests.log | egrep FIXME\|FAILED | sort -u | tee $WORKSPACE/fixme.txt
+# cat $WORKSPACE/fixme.txt | egrep "\[\S*]" > $WORKSPACE/errata-$JBOSS_TARGET.txt
+
+#
+# stop jbossas
+#
+$JBPMDIR/hudson/jboss/bin/jboss.sh $JBOSS_INSTANCE stop
+cp $JBOSS_INSTANCE/server/@jboss.server.instance(a)/log/boot.log $WORKSPACE/jboss-boot.log
+cp $JBOSS_INSTANCE/server/@jboss.server.instance(a)/log/server.log $WORKSPACE/jboss-server.log
+ </command>
+ </hudson.tasks.Shell>
+ </builders>
+ <publishers/>
+ <buildWrappers/>
+</matrix-project>
Property changes on: jbpm3/trunk/hudson/hudson-home/jobs/jBPM-Matrix/config.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm3/trunk/modules/jpdl/.classpath
===================================================================
--- jbpm3/trunk/modules/jpdl/.classpath (rev 0)
+++ jbpm3/trunk/modules/jpdl/.classpath 2008-08-25 15:09:43 UTC (rev 1998)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <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"/>
+</classpath>
Added: jbpm3/trunk/modules/jpdl/.project
===================================================================
--- jbpm3/trunk/modules/jpdl/.project (rev 0)
+++ jbpm3/trunk/modules/jpdl/.project 2008-08-25 15:09:43 UTC (rev 1998)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>jbpm-jpdl</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ </natures>
+</projectDescription>
17 years, 8 months
JBoss JBPM SVN: r1997 - in jbpm4/pvm/trunk/modules/core/src: main/java/org/jbpm/pvm/activity and 25 other directories.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2008-08-25 10:11:51 -0400 (Mon, 25 Aug 2008)
New Revision: 1997
Added:
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/ProcessDefinition.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/cmd/StartExecutionInLatestCmd.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/deploy/CreateKey.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/CreateKeyBinding.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/model/ExecutionKeyGenerator.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/model/OpenProcessDefinition.java
Removed:
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/model/ProcessDefinition.java
Modified:
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/Deployment.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/ExecutionService.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/ProcessService.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/activity/ActivityExecution.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/client/ClientProcessDefinition.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/cmd/DeployCmd.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/cmd/FindExecutionCmd.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/cmd/FindLatestProcessDefinitionCmd.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/cmd/FindProcessDefinitionCmd.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/cmd/FindProcessDefinitionsCmd.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/cmd/SignalCmd.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/cmd/StartExecutionCmd.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/deploy/CreateProcess.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/deploy/SaveProcess.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/deploy/VerifyVersion.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/hibernate/HibernatePvmDbSession.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/ExceptionHandlerImpl.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/ProcessDefinitionImpl.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/ProcessElementImpl.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/svc/CommandExecutionService.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/svc/CommandProcessService.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/model/CompositeElement.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/model/Node.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/model/ObservableElement.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/model/OpenExecution.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/model/Transition.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/session/PvmDbSession.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/test/base/EnvironmentDbTestCase.java
jbpm4/pvm/trunk/modules/core/src/main/resources/org/jbpm/pvm/hibernate.definition.hbm.xml
jbpm4/pvm/trunk/modules/core/src/main/resources/org/jbpm/pvm/hibernate.execution.hbm.xml
jbpm4/pvm/trunk/modules/core/src/main/resources/org/jbpm/pvm/pvm.wire.bindings.xml
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/basicfeatures/AutomaticDecisionDbTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/basicfeatures/BasicExecutionFlowDbTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/continuation/ContinuationTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/svc/ExecutionServiceTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/svc/ProcessServiceTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/timer/TimerIntegrationTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/enterprise/EnterpriseTimerSessionTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/enterprise/TimerTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/langext/LanguageExtensionsDbTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/ProcessCacheDbTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/ProcessDefinitionDbTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/ProcessExecutionDbTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/WireDbTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex02/BasicProcessPersistenceTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex04/ExternalDecisionTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex05/InternalDecisionTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex07/EventListenerTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex11/AsynchronousContinuationsTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex12/TimerTest.java
jbpm4/pvm/trunk/modules/core/src/test/resources/environment.cfg.xml
Log:
introduction of the process definition keys
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/Deployment.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/Deployment.java 2008-08-25 13:05:01 UTC (rev 1996)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/Deployment.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -41,7 +41,6 @@
import org.jbpm.pvm.internal.stream.UrlStreamSource;
import org.jbpm.pvm.internal.util.IoUtil;
import org.jbpm.pvm.internal.xml.Parser;
-import org.jbpm.pvm.model.ProcessDefinition;
import org.w3c.dom.Document;
@@ -64,6 +63,9 @@
protected Map<String, Document> documents;
protected ProcessDefinition processDefinition;
+ /** user provided short reference for the process definition
+ * that can be used by the KeyGenerator */
+ protected String processDefinitionRef;
public Deployment() {
}
@@ -243,4 +245,10 @@
public void setName(String name) {
this.name = name;
}
+ public String getProcessDefinitionRef() {
+ return processDefinitionRef;
+ }
+ public void setProcessDefinitionRef(String processDefinitionRef) {
+ this.processDefinitionRef = processDefinitionRef;
+ }
}
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/ExecutionService.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/ExecutionService.java 2008-08-25 13:05:01 UTC (rev 1996)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/ExecutionService.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -32,44 +32,48 @@
public interface ExecutionService {
/** starts a new execution for the ProcessDefinition with the given processDefinitionDbid.
- * @param processDefinitionDbid the DB id (primary key) of the process definition. */
- Execution startExecution(long processDefinitionDbid);
+ * @param processDefinitionKey the {@link ProcessDefinition#getKey() unique key} of the process definition. */
+ Execution startExecution(String processDefinitionKey);
/** starts a new execution for the ProcessDefinition with the given processDefinitionDbid.
- * @param processDefinitionDbid the DB id (primary key) of the process definition.
- * @param executionKey is a user provided ID for the new execution that must be unique over all process versions with the same name. */
- Execution startExecution(long processDefinitionDbid, String executionKey);
+ * @param processDefinitionKey the {@link ProcessDefinition#getKey() unique key} of the process definition.
+ * @param executionRef is a user provided reference for the new execution that must be unique over all
+ * process versions with the same name. */
+ Execution startExecution(String processDefinitionKey, String executionRef);
/** starts a new execution for the ProcessDefinition with the given processDefinitionDbid.
- * @param processDefinitionDbid the DB id (primary key) of the process definition.
+ * @param processDefinitionKey the {@link ProcessDefinition#getKey() unique key} of the process definition.
* @param variables are the initial values of the process variables that will be set before the execution starts. */
- Execution startExecution(long processDefinitionDbid, Map<String, Object> variables);
+ Execution startExecution(String processDefinitionKey, Map<String, Object> variables);
/** starts a new execution for the ProcessDefinition with the given processDefinitionDbid.
- * @param processDefinitionDbid the DB id (primary key) of the process definition.
+ * @param processDefinitionKey the {@link ProcessDefinition#getKey() unique key} of the process definition.
* @param variables are the initial values of the process variables that will be set before the execution starts.
- * @param executionKey is a user provided ID for the new execution that must be unique over all process versions with the same name. */
- Execution startExecution(long processDefinitionDbid, Map<String, Object> variables, String executionKey);
+ * @param executionRef is a user provided reference for the new execution that must be unique over all
+ * process versions with the same name. */
+ Execution startExecution(String processDefinitionKey, Map<String, Object> variables, String executionRef);
/** starts a new execution in the latest version of the given process definition.
* @param processDefinitionName is the name of the process definition for which the latest version will be taken. */
- Execution startExecution(String processDefinitionName);
+ Execution startExecutionInLatest(String processDefinitionName);
/** starts a new execution in the latest version of the given processDefinitionName.
* @param processDefinitionName is the name of the process definition for which the latest version will be taken.
- * @param executionKey is a user provided ID for the new execution that must be unique over all process versions with the same name. */
- Execution startExecution(String processDefinitionName, String executionKey);
+ * @param executionRef is a user provided reference for the new execution that must be unique over all
+ * process versions with the same name. */
+ Execution startExecutionInLatest(String processDefinitionName, String executionRef);
/** starts a new execution in the latest version of the given processDefinitionName.
* @param processDefinitionName is the name of the process definition for which the latest version will be taken.
* @param variables are the initial values of the process variables that will be set before the execution starts. */
- Execution startExecution(String processDefinitionName, Map<String, Object> variables);
+ Execution startExecutionInLatest(String processDefinitionName, Map<String, Object> variables);
/** starts a new execution in the latest version of the given processDefinitionName.
* @param processDefinitionName is the name of the process definition for which the latest version will be taken.
* @param variables are the initial values of the process variables that will be set before the execution starts.
- * @param executionKey is a user provided ID for the new execution that must be unique over all process versions with the same name. */
- Execution startExecution(String processDefinitionName, Map<String, Object> variables, String executionKey);
+ * @param executionRef is a user provided reference for the new execution that must be unique over all
+ * process versions with the same name. */
+ Execution startExecutionInLatest(String processDefinitionName, Map<String, Object> variables, String executionRef);
/** the execution with the given database primary key */
Execution findExecution(long executionDbid);
Added: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/ProcessDefinition.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/ProcessDefinition.java (rev 0)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/ProcessDefinition.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -0,0 +1,57 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.pvm;
+
+import java.io.Serializable;
+
+import org.jbpm.pvm.model.ObservableElement;
+
+
+/** a graphical process which is deployed in the {@ ProcessService}.
+ *
+ * @author Tom Baeyens
+ */
+public interface ProcessDefinition extends Serializable {
+
+ /** the unique key for this process definition. */
+ String getKey();
+
+ /** the short display name given to this process definition.
+ * Multiple process definitions can have the same as long
+ * as they are given a different {@link #version}. */
+ String getName();
+
+ /** the description name given to this process definition.
+ * Multiple process definitions can have the same */
+ String getDescription();
+
+ /** the package name of this process. This can be used to create
+ * hierarchy of process categories for easy lookup. This is a
+ * similar way of grouping and creating a structure as in Java.
+ * We recommend the same conventions as with Java package names. */
+ String getPackageName();
+
+ /** automatically assigned during deployment of a process that
+ * represents the sequence number for process definitions with
+ * the same {@link ObservableElement#getName() name}. */
+ int getVersion();
+}
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/ProcessService.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/ProcessService.java 2008-08-25 13:05:01 UTC (rev 1996)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/ProcessService.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -23,9 +23,7 @@
import java.util.List;
-import org.jbpm.pvm.model.ProcessDefinition;
-
/** a process definition repository.
*
* @author Tom Baeyens
@@ -35,9 +33,6 @@
/** deploy a new process definition into the process repository. */
ProcessDefinition deploy(Deployment deployment);
- /** deploy a new process definition into the process repository. */
- ProcessDefinition deploy(ProcessDefinition processDefinition);
-
/** all deployed process names. */
List<String> findProcessDefinitionNames();
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/activity/ActivityExecution.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/activity/ActivityExecution.java 2008-08-25 13:05:01 UTC (rev 1996)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/activity/ActivityExecution.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -29,7 +29,7 @@
import org.jbpm.pvm.model.Node;
import org.jbpm.pvm.model.ObservableElement;
import org.jbpm.pvm.model.OpenExecution;
-import org.jbpm.pvm.model.ProcessDefinition;
+import org.jbpm.pvm.model.OpenProcessDefinition;
import org.jbpm.pvm.model.Transition;
import org.jbpm.pvm.processlog.ProcessLog;
import org.jbpm.pvm.session.PvmDbSession;
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/client/ClientProcessDefinition.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/client/ClientProcessDefinition.java 2008-08-25 13:05:01 UTC (rev 1996)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/client/ClientProcessDefinition.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -21,13 +21,13 @@
*/
package org.jbpm.pvm.client;
-import org.jbpm.pvm.model.ProcessDefinition;
+import org.jbpm.pvm.model.OpenProcessDefinition;
/**
* @author Tom Baeyens
*/
-public interface ClientProcessDefinition extends ProcessDefinition {
+public interface ClientProcessDefinition extends OpenProcessDefinition {
ClientProcessInstance createProcessInstance();
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/cmd/DeployCmd.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/cmd/DeployCmd.java 2008-08-25 13:05:01 UTC (rev 1996)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/cmd/DeployCmd.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -22,10 +22,10 @@
package org.jbpm.pvm.internal.cmd;
import org.jbpm.pvm.Deployment;
+import org.jbpm.pvm.ProcessDefinition;
import org.jbpm.pvm.PvmException;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.internal.deploy.DeployerManager;
-import org.jbpm.pvm.model.ProcessDefinition;
/**
* @author Tom Baeyens
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/cmd/FindExecutionCmd.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/cmd/FindExecutionCmd.java 2008-08-25 13:05:01 UTC (rev 1996)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/cmd/FindExecutionCmd.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -50,7 +50,7 @@
public Execution execute(Environment environment) throws Exception {
PvmDbSession pvmDbSession = environment.get(PvmDbSession.class);
if (processDefinitionName!=null) {
- return pvmDbSession.findExecution(processDefinitionName, key);
+ return pvmDbSession.findExecutionByKey(key);
}
return pvmDbSession.get(ExecutionImpl.class, executionDbid);
}
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/cmd/FindLatestProcessDefinitionCmd.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/cmd/FindLatestProcessDefinitionCmd.java 2008-08-25 13:05:01 UTC (rev 1996)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/cmd/FindLatestProcessDefinitionCmd.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -22,14 +22,14 @@
package org.jbpm.pvm.internal.cmd;
import org.jbpm.pvm.env.Environment;
-import org.jbpm.pvm.model.ProcessDefinition;
+import org.jbpm.pvm.model.OpenProcessDefinition;
import org.jbpm.pvm.session.PvmDbSession;
/**
* @author Tom Baeyens
*/
-public class FindLatestProcessDefinitionCmd implements Command<ProcessDefinition> {
+public class FindLatestProcessDefinitionCmd implements Command<OpenProcessDefinition> {
private static final long serialVersionUID = 1L;
@@ -39,8 +39,8 @@
this.processDefinitionName = processDefinitionName;
}
- public ProcessDefinition execute(Environment environment) throws Exception {
- return environment.get(PvmDbSession.class).findProcessDefinition(processDefinitionName);
+ public OpenProcessDefinition execute(Environment environment) throws Exception {
+ return environment.get(PvmDbSession.class).findLatestProcessDefinitionByName(processDefinitionName);
}
}
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/cmd/FindProcessDefinitionCmd.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/cmd/FindProcessDefinitionCmd.java 2008-08-25 13:05:01 UTC (rev 1996)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/cmd/FindProcessDefinitionCmd.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -23,14 +23,14 @@
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.internal.model.ProcessDefinitionImpl;
-import org.jbpm.pvm.model.ProcessDefinition;
+import org.jbpm.pvm.model.OpenProcessDefinition;
import org.jbpm.pvm.session.PvmDbSession;
/**
* @author Tom Baeyens
*/
-public class FindProcessDefinitionCmd implements Command<ProcessDefinition> {
+public class FindProcessDefinitionCmd implements Command<OpenProcessDefinition> {
private static final long serialVersionUID = 1L;
@@ -47,10 +47,10 @@
this.processDefinitionDbid = processDefinitionDbid;
}
- public ProcessDefinition execute(Environment environment) throws Exception {
+ public OpenProcessDefinition execute(Environment environment) throws Exception {
PvmDbSession pvmDbSession = environment.get(PvmDbSession.class);
if (processDefinitionName!=null) {
- return pvmDbSession.findProcessDefinition(processDefinitionName, processDefinitionVersion);
+ return pvmDbSession.findProcessDefinitionByName(processDefinitionName, processDefinitionVersion);
} else {
return pvmDbSession.get(ProcessDefinitionImpl.class, processDefinitionDbid);
}
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/cmd/FindProcessDefinitionsCmd.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/cmd/FindProcessDefinitionsCmd.java 2008-08-25 13:05:01 UTC (rev 1996)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/cmd/FindProcessDefinitionsCmd.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -42,7 +42,7 @@
}
public List<ClientProcessDefinition> execute(Environment environment) throws Exception {
- return environment.get(PvmDbSession.class).findProcessDefinitions(processDefinitionName);
+ return environment.get(PvmDbSession.class).findProcessDefinitionsByName(processDefinitionName);
}
}
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/cmd/SignalCmd.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/cmd/SignalCmd.java 2008-08-25 13:05:01 UTC (rev 1996)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/cmd/SignalCmd.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -56,7 +56,6 @@
if (executionKey==null) {
throw new PvmException("executionKey is null");
}
- this.processDefinitionName = processDefinitionName;
this.executionKey = executionKey;
this.signalName = signalName;
this.parameters = parameters;
@@ -65,13 +64,14 @@
public Execution execute(Environment environment) throws Exception {
ClientExecution execution = null;
+ PvmDbSession pvmDbSession = environment.get(PvmDbSession.class);
if (executionDbid!=null) {
- execution = environment.get(PvmDbSession.class).get(ExecutionImpl.class, executionDbid);
+ execution = pvmDbSession.get(ExecutionImpl.class, executionDbid);
if (execution==null) {
throw new PvmException("execution "+executionDbid+" does not exist");
}
} else {
- execution = environment.get(PvmDbSession.class).findExecution(processDefinitionName, executionKey);
+ execution = pvmDbSession.findExecutionByKey(executionKey);
if (execution==null) {
throw new PvmException("execution for process "+processDefinitionName+" with executionKey "+executionKey+" does not exist");
}
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/cmd/StartExecutionCmd.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/cmd/StartExecutionCmd.java 2008-08-25 13:05:01 UTC (rev 1996)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/cmd/StartExecutionCmd.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -38,37 +38,23 @@
private static final long serialVersionUID = 1L;
- protected long processDefinitionDbid;
- protected String processDefinitionName;
+ protected String processDefinitionKey;
protected String executionKey;
- public StartExecutionCmd(String processDefinitionName, Map<String, Object> variables, String executionKey) {
- this.processDefinitionName = processDefinitionName;
+ public StartExecutionCmd(String processDefinitionKey, Map<String, Object> variables, String executionKey) {
+ this.processDefinitionKey = processDefinitionKey;
this.variables = variables;
this.executionKey = executionKey;
}
-
- public StartExecutionCmd(long processDefinitionDbid, Map<String, Object> variables, String executionKey) {
- this.processDefinitionDbid = processDefinitionDbid;
- this.variables = variables;
- this.executionKey = executionKey;
- }
public Execution execute(Environment environment) throws Exception {
PvmDbSession pvmDbSession = environment.get(PvmDbSession.class);
ClientProcessDefinition processDefinition = null;
- if (processDefinitionName!=null) {
- processDefinition = pvmDbSession.findProcessDefinition(processDefinitionName);
- if (processDefinition==null) {
- throw new PvmException("no process definition with name '"+processDefinitionName+"'");
- }
- } else {
- processDefinition = pvmDbSession.get(ProcessDefinitionImpl.class, processDefinitionDbid);
- if (processDefinition==null) {
- throw new PvmException("no process definition with dbid '"+processDefinitionDbid+"'");
- }
+ processDefinition = pvmDbSession.findProcessDefinitionByKey(processDefinitionKey);
+ if (processDefinition==null) {
+ throw new PvmException("no process definition with key '"+processDefinitionKey+"'");
}
ClientProcessInstance processInstance = processDefinition.createProcessInstance(executionKey);
@@ -79,11 +65,11 @@
return processInstance;
}
- public String getProcessDefinitionName() {
- return processDefinitionName;
+ public String getProcessDefinitionKey() {
+ return processDefinitionKey;
}
- public void setProcessDefinitionName(String processName) {
- this.processDefinitionName = processName;
+ public void setProcessDefinitionKey(String processDefinitionKey) {
+ this.processDefinitionKey = processDefinitionKey;
}
public String getExecutionKey() {
return executionKey;
Added: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/cmd/StartExecutionInLatestCmd.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/cmd/StartExecutionInLatestCmd.java (rev 0)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/cmd/StartExecutionInLatestCmd.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -0,0 +1,80 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.pvm.internal.cmd;
+
+import java.util.Map;
+
+import org.jbpm.pvm.Execution;
+import org.jbpm.pvm.PvmException;
+import org.jbpm.pvm.client.ClientProcessDefinition;
+import org.jbpm.pvm.client.ClientProcessInstance;
+import org.jbpm.pvm.env.Environment;
+import org.jbpm.pvm.session.PvmDbSession;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class StartExecutionInLatestCmd extends VariablesCmd<Execution> {
+
+ private static final long serialVersionUID = 1L;
+
+ protected String processDefinitionName;
+ protected String executionKey;
+
+ public StartExecutionInLatestCmd(String processDefinitionName, Map<String, Object> variables, String executionKey) {
+ this.processDefinitionName = processDefinitionName;
+ this.variables = variables;
+ this.executionKey = executionKey;
+ }
+
+ public Execution execute(Environment environment) throws Exception {
+ PvmDbSession pvmDbSession = environment.get(PvmDbSession.class);
+
+ ClientProcessDefinition processDefinition = null;
+
+ processDefinition = pvmDbSession.findLatestProcessDefinitionByName(processDefinitionName);
+ if (processDefinition==null) {
+ throw new PvmException("no process definition with name '"+processDefinitionName+"'");
+ }
+
+ ClientProcessInstance processInstance = processDefinition.createProcessInstance(executionKey);
+ processInstance.setVariables(variables);
+ processInstance.begin();
+
+ pvmDbSession.save(processInstance);
+ return processInstance;
+ }
+
+ public String getProcessDefinitionName() {
+ return processDefinitionName;
+ }
+ public void setProcessDefinitionName(String processName) {
+ this.processDefinitionName = processName;
+ }
+ public String getExecutionKey() {
+ return executionKey;
+ }
+ public void setExecutionKey(String executionKey) {
+ this.executionKey = executionKey;
+ }
+}
Added: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/deploy/CreateKey.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/deploy/CreateKey.java (rev 0)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/deploy/CreateKey.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.pvm.internal.deploy;
+
+import org.jbpm.pvm.Deployment;
+import org.jbpm.pvm.internal.model.ProcessDefinitionImpl;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class CreateKey implements Deployer {
+
+ public void deploy(Deployment deployment) {
+ ProcessDefinitionImpl processDefinition = (ProcessDefinitionImpl) deployment.getProcessDefinition();
+
+ String ref = deployment.getProcessDefinitionRef();
+ if (ref==null) {
+ ref = processDefinition.getName();
+ }
+
+ String key = ref+"-"+processDefinition.getVersion();
+
+ processDefinition.setKey(key);
+ }
+}
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/deploy/CreateProcess.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/deploy/CreateProcess.java 2008-08-25 13:05:01 UTC (rev 1996)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/deploy/CreateProcess.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -23,9 +23,9 @@
import org.jbpm.pvm.Deployment;
+import org.jbpm.pvm.ProcessDefinition;
import org.jbpm.pvm.PvmException;
import org.jbpm.pvm.internal.log.Log;
-import org.jbpm.pvm.model.ProcessDefinition;
/**
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/deploy/SaveProcess.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/deploy/SaveProcess.java 2008-08-25 13:05:01 UTC (rev 1996)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/deploy/SaveProcess.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -22,9 +22,9 @@
package org.jbpm.pvm.internal.deploy;
import org.jbpm.pvm.Deployment;
+import org.jbpm.pvm.ProcessDefinition;
import org.jbpm.pvm.PvmException;
import org.jbpm.pvm.env.Environment;
-import org.jbpm.pvm.model.ProcessDefinition;
import org.jbpm.pvm.session.PvmDbSession;
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/deploy/VerifyVersion.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/deploy/VerifyVersion.java 2008-08-25 13:05:01 UTC (rev 1996)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/deploy/VerifyVersion.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -22,9 +22,9 @@
package org.jbpm.pvm.internal.deploy;
import org.jbpm.pvm.Deployment;
+import org.jbpm.pvm.ProcessDefinition;
import org.jbpm.pvm.PvmException;
import org.jbpm.pvm.env.Environment;
-import org.jbpm.pvm.model.ProcessDefinition;
import org.jbpm.pvm.session.PvmDbSession;
@@ -53,7 +53,7 @@
throw new PvmException(PvmDbSession.class.getName()+" is required in the environment by "+getClass().getName());
}
- if (pvmDbSession.findProcessDefinition(name, version) != null) {
+ if (pvmDbSession.findProcessDefinitionByName(name, version) != null) {
throw new PvmException("process [" + name + "|" + version + "] already exists");
}
}
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/hibernate/HibernatePvmDbSession.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/hibernate/HibernatePvmDbSession.java 2008-08-25 13:05:01 UTC (rev 1996)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/hibernate/HibernatePvmDbSession.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -24,6 +24,7 @@
import java.util.List;
import org.hibernate.Query;
+import org.jbpm.pvm.Execution;
import org.jbpm.pvm.client.ClientExecution;
import org.jbpm.pvm.client.ClientProcessDefinition;
import org.jbpm.pvm.job.Job;
@@ -44,14 +45,14 @@
return session.getNamedQuery("findProcessDefinitionNames").list();
}
- public List<ClientProcessDefinition> findProcessDefinitions(String name) {
+ public List<ClientProcessDefinition> findProcessDefinitionsByName(String name) {
// query definition can be found at the bottom of resource org/jbpm/pvm/hibernate.definition.hbm.xml
Query query = session.getNamedQuery("findProcessDefinitionsByName");
query.setString("name", name);
return query.list();
}
- public ClientProcessDefinition findProcessDefinition(String name, int version) {
+ public ClientProcessDefinition findProcessDefinitionByName(String name, int version) {
// query definition can be found at the bottom of resource org/jbpm/pvm/hibernate.definition.hbm.xml
Query query = session.getNamedQuery("findProcessDefinitionByNameAndVersion");
query.setString("name", name);
@@ -60,7 +61,7 @@
return processDefinition;
}
- public ClientProcessDefinition findProcessDefinition(String name) {
+ public ClientProcessDefinition findLatestProcessDefinitionByName(String name) {
// query definition can be found at the bottom of resource org/jbpm/pvm/hibernate.definition.hbm.xml
Query query = session.getNamedQuery("findProcessDefinitionsByName");
query.setString("name", name);
@@ -69,11 +70,19 @@
return processDefinition;
}
- public ClientExecution findExecution(String processDefinitionName, String key) {
+ public ClientProcessDefinition findProcessDefinitionByKey(String processDefinitionKey) {
+ // query definition can be found at the bottom of resource org/jbpm/pvm/hibernate.definition.hbm.xml
+ Query query = session.getNamedQuery("findProcessDefinitionsByKey");
+ query.setString("key", processDefinitionKey);
+ query.setMaxResults(1);
+ ClientProcessDefinition processDefinition = (ClientProcessDefinition) query.uniqueResult();
+ return processDefinition;
+ }
+
+ public ClientExecution findExecutionByKey(String executionKey) {
// query definition can be found at the bottom of resource org/jbpm/pvm/hibernate.execution.hbm.xml
- Query query = session.getNamedQuery("findExecutionByProcessDefinitionNameAndKey");
- query.setString("name", processDefinitionName);
- query.setString("key", key);
+ Query query = session.getNamedQuery("findExecutionByKey");
+ query.setString("key", executionKey);
query.setMaxResults(1);
return (ClientExecution) query.uniqueResult();
}
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/ExceptionHandlerImpl.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/ExceptionHandlerImpl.java 2008-08-25 13:05:01 UTC (rev 1996)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/ExceptionHandlerImpl.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -34,7 +34,7 @@
import org.jbpm.pvm.internal.model.op.MoveToChildNode;
import org.jbpm.pvm.internal.wire.Descriptor;
import org.jbpm.pvm.listener.EventListener;
-import org.jbpm.pvm.model.ProcessDefinition;
+import org.jbpm.pvm.model.OpenProcessDefinition;
/**
* @author Tom Baeyens
@@ -180,7 +180,7 @@
TransitionImpl transition = execution.getTransition();
log.trace("no current node. searching for transition from parent of "+transition);
if (transition!=null) {
- ProcessDefinition processDefinition = transition.getProcessDefinition();
+ OpenProcessDefinition processDefinition = transition.getProcessDefinition();
ObservableElementImpl transitionParent = transition.getParent();
if ( (transitionParent!=null)
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/ProcessDefinitionImpl.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/ProcessDefinitionImpl.java 2008-08-25 13:05:01 UTC (rev 1996)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/ProcessDefinitionImpl.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -28,26 +28,39 @@
import java.util.Map;
import org.jbpm.pvm.Execution;
-import org.jbpm.pvm.client.ClientExecution;
import org.jbpm.pvm.client.ClientProcessDefinition;
import org.jbpm.pvm.client.ClientProcessInstance;
import org.jbpm.pvm.internal.lob.Blob;
import org.jbpm.pvm.internal.log.Log;
import org.jbpm.pvm.internal.util.IoUtil;
-import org.jbpm.pvm.model.ProcessDefinition;
+import org.jbpm.pvm.model.OpenProcessDefinition;
/**
* @author Tom Baeyens
*/
-public class ProcessDefinitionImpl extends CompositeElementImpl implements ProcessDefinition, ClientProcessDefinition {
+public class ProcessDefinitionImpl extends CompositeElementImpl implements OpenProcessDefinition, ClientProcessDefinition {
private static final long serialVersionUID = 1L;
private static final Log log = Log.getLog(ProcessDefinitionImpl.class.getName());
+ /** the version number of the process definitions with the same name.*/
+ protected int version;
+
+ /** the unique key (e.g. combination of name and versionnumber) for this
+ * process definition that is exposed to the users. */
+ protected String key;
+
+ /** optional package name similar to the Java package name. */
protected String packageName;
- protected int version;
+
+ /** time this process was deployed */
protected Date deploymentTime;
+
+ /** the node which is executed when the process starts */
protected NodeImpl initial;
+
+ /** the attachments
+ * TODO move the attachments to a separate DeploymentUnit type */
Map<String, Blob> attachments;
public ProcessDefinitionImpl() {
@@ -160,4 +173,10 @@
public void setPackageName(String packageName) {
this.packageName = packageName;
}
+ public String getKey() {
+ return key;
+ }
+ public void setKey(String key) {
+ this.key = key;
+ }
}
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/ProcessElementImpl.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/ProcessElementImpl.java 2008-08-25 13:05:01 UTC (rev 1996)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/ProcessElementImpl.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -29,7 +29,7 @@
import org.jbpm.pvm.internal.log.Log;
import org.jbpm.pvm.internal.wire.Descriptor;
-import org.jbpm.pvm.model.ProcessDefinition;
+import org.jbpm.pvm.model.OpenProcessDefinition;
/**
* superclass for {@link NodeImpl}, {@link TransitionImpl} and {@link ProcessDefinitionImpl}.
@@ -92,7 +92,7 @@
public long getDbid() {
return dbid;
}
- public ProcessDefinition getProcessDefinition() {
+ public OpenProcessDefinition getProcessDefinition() {
return processDefinition;
}
public void setProcessDefinition(ProcessDefinitionImpl processDefinition) {
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/svc/CommandExecutionService.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/svc/CommandExecutionService.java 2008-08-25 13:05:01 UTC (rev 1996)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/svc/CommandExecutionService.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -35,6 +35,7 @@
import org.jbpm.pvm.internal.cmd.SetVariablesCmd;
import org.jbpm.pvm.internal.cmd.SignalCmd;
import org.jbpm.pvm.internal.cmd.StartExecutionCmd;
+import org.jbpm.pvm.internal.cmd.StartExecutionInLatestCmd;
/**
@@ -44,36 +45,36 @@
protected CommandService commandService;
- public Execution startExecution(long processDefinitionDbid){
- return commandService.execute(new StartExecutionCmd(processDefinitionDbid, null, null));
+ public Execution startExecution(String processDefinitionKey){
+ return commandService.execute(new StartExecutionCmd(processDefinitionKey, null, null));
}
- public Execution startExecution(long processDefinitionDbid, String executionKey) {
- return commandService.execute(new StartExecutionCmd(processDefinitionDbid, null, executionKey));
+ public Execution startExecution(String processDefinitionKey, String executionKey) {
+ return commandService.execute(new StartExecutionCmd(processDefinitionKey, null, executionKey));
}
- public Execution startExecution(long processDefinitionDbid, Map<String, Object> variables){
- return commandService.execute(new StartExecutionCmd(processDefinitionDbid, variables, null));
+ public Execution startExecution(String processDefinitionKey, Map<String, Object> variables){
+ return commandService.execute(new StartExecutionCmd(processDefinitionKey, variables, null));
}
- public Execution startExecution(long processDefinitionDbid, Map<String, Object> variables, String executionKey){
- return commandService.execute(new StartExecutionCmd(processDefinitionDbid, variables, executionKey));
+ public Execution startExecution(String processDefinitionKey, Map<String, Object> variables, String executionKey){
+ return commandService.execute(new StartExecutionCmd(processDefinitionKey, variables, executionKey));
}
- public Execution startExecution(String processDefinitionName) {
- return commandService.execute(new StartExecutionCmd(processDefinitionName, null, null));
+ public Execution startExecutionInLatest(String processDefinitionName) {
+ return commandService.execute(new StartExecutionInLatestCmd(processDefinitionName, null, null));
}
- public Execution startExecution(String processDefinitionName, Map<String, Object> variables){
- return commandService.execute(new StartExecutionCmd(processDefinitionName, variables, null));
+ public Execution startExecutionInLatest(String processDefinitionName, Map<String, Object> variables){
+ return commandService.execute(new StartExecutionInLatestCmd(processDefinitionName, variables, null));
}
- public Execution startExecution(String processDefinitionName, String executionKey) {
- return commandService.execute(new StartExecutionCmd(processDefinitionName, null, executionKey));
+ public Execution startExecutionInLatest(String processDefinitionName, String executionKey) {
+ return commandService.execute(new StartExecutionInLatestCmd(processDefinitionName, null, executionKey));
}
- public Execution startExecution(String processDefinitionName, Map<String, Object> variables, String executionKey){
- return commandService.execute(new StartExecutionCmd(processDefinitionName, variables, executionKey));
+ public Execution startExecutionInLatest(String processDefinitionName, Map<String, Object> variables, String executionKey){
+ return commandService.execute(new StartExecutionInLatestCmd(processDefinitionName, variables, executionKey));
}
public Execution signalExecution(long executionDbid) {
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/svc/CommandProcessService.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/svc/CommandProcessService.java 2008-08-25 13:05:01 UTC (rev 1996)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/svc/CommandProcessService.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -24,6 +24,7 @@
import java.util.List;
import org.jbpm.pvm.Deployment;
+import org.jbpm.pvm.ProcessDefinition;
import org.jbpm.pvm.ProcessService;
import org.jbpm.pvm.internal.cmd.CommandService;
import org.jbpm.pvm.internal.cmd.DeployCmd;
@@ -31,7 +32,7 @@
import org.jbpm.pvm.internal.cmd.FindProcessDefinitionCmd;
import org.jbpm.pvm.internal.cmd.FindProcessDefinitionNamesCmd;
import org.jbpm.pvm.internal.cmd.FindProcessDefinitionsCmd;
-import org.jbpm.pvm.model.ProcessDefinition;
+import org.jbpm.pvm.model.OpenProcessDefinition;
/** {@link ProcessService} implementation that delegates execution of the
* methods to a {@link CommandService}.
@@ -42,7 +43,7 @@
protected CommandService commandService;
- public ProcessDefinition deploy(ProcessDefinition processDefinition) {
+ public ProcessDefinition deploy(OpenProcessDefinition processDefinition) {
Deployment deployment = new Deployment(processDefinition);
return commandService.execute(new DeployCmd(deployment));
}
Added: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/CreateKeyBinding.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/CreateKeyBinding.java (rev 0)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/CreateKeyBinding.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.pvm.internal.wire.binding;
+
+import org.jbpm.pvm.internal.deploy.CreateKey;
+import org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor;
+import org.jbpm.pvm.internal.xml.Parse;
+import org.jbpm.pvm.internal.xml.Parser;
+import org.w3c.dom.Element;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class CreateKeyBinding extends WireDescriptorBinding {
+
+ public CreateKeyBinding() {
+ super("create-key");
+ }
+
+ public Object parse(Element element, Parse parse, Parser parser) {
+ return new ObjectDescriptor(CreateKey.class);
+ }
+
+}
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/model/CompositeElement.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/model/CompositeElement.java 2008-08-25 13:05:01 UTC (rev 1996)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/model/CompositeElement.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -26,7 +26,7 @@
-/** node container base class for {@link ProcessDefinition} and {@link Node}.
+/** node container base class for {@link OpenProcessDefinition} and {@link Node}.
*
* @author Tom Baeyens
*/
Added: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/model/ExecutionKeyGenerator.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/model/ExecutionKeyGenerator.java (rev 0)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/model/ExecutionKeyGenerator.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -0,0 +1,34 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.pvm.model;
+
+import org.jbpm.pvm.Execution;
+import org.jbpm.pvm.ProcessDefinition;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public interface ExecutionKeyGenerator {
+
+ String createKey(ProcessDefinition processDefinition, Execution execution, String executionRef);
+}
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/model/Node.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/model/Node.java 2008-08-25 13:05:01 UTC (rev 1996)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/model/Node.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -28,7 +28,7 @@
/**
- * a node in a {@link ProcessDefinition} graph.
+ * a node in a {@link OpenProcessDefinition} graph.
*
* <p>The node supports both graph based process models as well as
* block structured (tree based) process models. First we describe
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/model/ObservableElement.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/model/ObservableElement.java 2008-08-25 13:05:01 UTC (rev 1996)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/model/ObservableElement.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -37,7 +37,7 @@
String getName();
/** the process definition to which this process element belongs */
- ProcessDefinition getProcessDefinition();
+ OpenProcessDefinition getProcessDefinition();
/** the property value for the given key or null if no such
* configuration key is present.
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/model/OpenExecution.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/model/OpenExecution.java 2008-08-25 13:05:01 UTC (rev 1996)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/model/OpenExecution.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -48,7 +48,7 @@
public interface OpenExecution extends Execution, Discussable {
/** the process definition for this execution.*/
- ProcessDefinition getProcessDefinition();
+ OpenProcessDefinition getProcessDefinition();
/** the current node */
Node getNode();
Copied: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/model/OpenProcessDefinition.java (from rev 1992, jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/model/ProcessDefinition.java)
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/model/OpenProcessDefinition.java (rev 0)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/model/OpenProcessDefinition.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -0,0 +1,59 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.pvm.model;
+
+import org.jbpm.pvm.ProcessDefinition;
+
+
+
+/**
+ * a graph (or tree) structure that can be executed.
+ *
+ * <h2>Purpose</h2>
+ * <p>ProcessDefinition is a base implementation that can be leveraged to build
+ * graph based execution languages. While the ProcessDefinition class is concrete and
+ * can be used as-is (e.g. by aggregation), most likely processDefinition languages
+ * will inherit from this ProcessDefinition and create more specialized implementations.
+ * </p>
+ *
+ * <p>The specialized processDefinition language classes can extend this ProcessDefinition
+ * with new datastructures relevant for that perticular processDefinition language.
+ * </p>
+ *
+ * <h2>Structure</h2>
+ * <p>A processDefinition contains a set of nodes. Nodes can be connected with
+ * transitions or nodes can have nested nodes. But the transitions and
+ * nested nodes can be combined.
+ * </p>
+ *
+ * <h2>Execution</h2>
+ * <p>To create a new execution for a given processDefinition, see {@link #startExecution()}.
+ * </p>
+ *
+ * @author Tom Baeyens
+ */
+public interface OpenProcessDefinition extends ProcessDefinition, CompositeElement {
+
+ /** the initial node of this process definition */
+ Node getInitial();
+
+}
\ No newline at end of file
Property changes on: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/model/OpenProcessDefinition.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Deleted: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/model/ProcessDefinition.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/model/ProcessDefinition.java 2008-08-25 13:05:01 UTC (rev 1996)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/model/ProcessDefinition.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -1,67 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.pvm.model;
-
-
-
-/**
- * a graph (or tree) structure that can be executed.
- *
- * <h2>Purpose</h2>
- * <p>ProcessDefinition is a base implementation that can be leveraged to build
- * graph based execution languages. While the ProcessDefinition class is concrete and
- * can be used as-is (e.g. by aggregation), most likely processDefinition languages
- * will inherit from this ProcessDefinition and create more specialized implementations.
- * </p>
- *
- * <p>The specialized processDefinition language classes can extend this ProcessDefinition
- * with new datastructures relevant for that perticular processDefinition language.
- * </p>
- *
- * <h2>Structure</h2>
- * <p>A processDefinition contains a set of nodes. Nodes can be connected with
- * transitions or nodes can have nested nodes. But the transitions and
- * nested nodes can be combined.
- * </p>
- *
- * <h2>Execution</h2>
- * <p>To create a new execution for a given processDefinition, see {@link #startExecution()}.
- * </p>
- *
- * @author Tom Baeyens
- */
-public interface ProcessDefinition extends CompositeElement {
-
- /** the package name of this process. This is a similar way of
- * grouping and creating a structure as in Java. We recommend
- * the same conventions as with Java package names. */
- String getPackageName();
-
- /** automatically assigned during deployment of a process that
- * represents the sequence number for process definitions with
- * the same {@link ObservableElement#getName() name}. */
- int getVersion();
-
- /** the initial node of this process definition */
- Node getInitial();
-
-}
\ No newline at end of file
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/model/Transition.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/model/Transition.java 2008-08-25 13:05:01 UTC (rev 1996)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/model/Transition.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -25,7 +25,7 @@
/**
- * a transition in a {@link ProcessDefinition} graph.
+ * a transition in a {@link OpenProcessDefinition} graph.
*
* <h3 id="guardconditions">Guard conditions</h3>
* <p>TODO</p>
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/session/PvmDbSession.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/session/PvmDbSession.java 2008-08-25 13:05:01 UTC (rev 1996)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/session/PvmDbSession.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -38,16 +38,19 @@
List<String> findProcessDefinitionNames();
/** all versions of the given process. */
- List<ClientProcessDefinition> findProcessDefinitions(String name);
+ List<ClientProcessDefinition> findProcessDefinitionsByName(String name);
+ /** specific version of a named processDefinition. */
+ ClientProcessDefinition findProcessDefinitionByName(String name, int version);
+
/** latest version of the processDefinition with the given name. */
- ClientProcessDefinition findProcessDefinition(String name);
+ ClientProcessDefinition findLatestProcessDefinitionByName(String name);
- /** specific version of a named processDefinition. */
- ClientProcessDefinition findProcessDefinition(String name, int version);
+ /** the process definition uniquely identified by the given processDefinitionKey. */
+ ClientProcessDefinition findProcessDefinitionByKey(String processDefinitionKey);
- /** an execution identified by process definition and business key */
- ClientExecution findExecution(String processDefinitionName, String key);
+ /** the execution uniquely identified by the given executionKey. */
+ ClientExecution findExecutionByKey(String executionKey);
/** timers */
List<Timer> findTimers();
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/test/base/EnvironmentDbTestCase.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/test/base/EnvironmentDbTestCase.java 2008-08-25 13:05:01 UTC (rev 1996)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/test/base/EnvironmentDbTestCase.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -30,7 +30,7 @@
import org.jbpm.pvm.internal.model.ExecutionImpl;
import org.jbpm.pvm.internal.model.ProcessDefinitionImpl;
import org.jbpm.pvm.internal.util.ReflectUtil;
-import org.jbpm.pvm.model.ProcessDefinition;
+import org.jbpm.pvm.model.OpenProcessDefinition;
import org.jbpm.pvm.session.DbSession;
import org.jbpm.pvm.session.PvmDbSession;
@@ -123,7 +123,7 @@
}
}
- public ProcessDefinitionImpl reload(ProcessDefinition processDefinition) {
+ public ProcessDefinitionImpl reload(OpenProcessDefinition processDefinition) {
environment.get(PvmDbSession.class).save(processDefinition);
newTransaction();
return environment.get(PvmDbSession.class).get(ProcessDefinitionImpl.class, processDefinition.getDbid());
Modified: jbpm4/pvm/trunk/modules/core/src/main/resources/org/jbpm/pvm/hibernate.definition.hbm.xml
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/resources/org/jbpm/pvm/hibernate.definition.hbm.xml 2008-08-25 13:05:01 UTC (rev 1996)
+++ jbpm4/pvm/trunk/modules/core/src/main/resources/org/jbpm/pvm/hibernate.definition.hbm.xml 2008-08-25 14:11:51 UTC (rev 1997)
@@ -60,6 +60,8 @@
</set>
<!-- ProcessDefinitionImpl part ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <property name="key" column="KEY_" unique="true" />
+
<property name="packageName" column="PACKAGE_" />
<property name="version" column="VERSION_" />
<property name="deploymentTime" column="DEPLOYED_" />
@@ -406,4 +408,14 @@
]]>
</query>
+ <query name="findProcessDefinitionsByKey">
+ <![CDATA[
+ select process
+ from org.jbpm.pvm.internal.model.ProcessDefinitionImpl as process
+ where process.key = :key
+ ]]>
+ </query>
+
+
+
</hibernate-mapping>
\ No newline at end of file
Modified: jbpm4/pvm/trunk/modules/core/src/main/resources/org/jbpm/pvm/hibernate.execution.hbm.xml
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/resources/org/jbpm/pvm/hibernate.execution.hbm.xml 2008-08-25 13:05:01 UTC (rev 1996)
+++ jbpm4/pvm/trunk/modules/core/src/main/resources/org/jbpm/pvm/hibernate.execution.hbm.xml 2008-08-25 14:11:51 UTC (rev 1997)
@@ -114,12 +114,11 @@
<!-- ### QUERIES ######################################################## -->
- <query name="findExecutionByProcessDefinitionNameAndKey">
+ <query name="findExecutionByKey">
<![CDATA[
select execution
from org.jbpm.pvm.internal.model.ExecutionImpl as execution
- where execution.processDefinition.name = :name
- and execution.key = :key
+ where execution.key = :key
]]>
</query>
Modified: jbpm4/pvm/trunk/modules/core/src/main/resources/org/jbpm/pvm/pvm.wire.bindings.xml
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/resources/org/jbpm/pvm/pvm.wire.bindings.xml 2008-08-25 13:05:01 UTC (rev 1996)
+++ jbpm4/pvm/trunk/modules/core/src/main/resources/org/jbpm/pvm/pvm.wire.bindings.xml 2008-08-25 14:11:51 UTC (rev 1997)
@@ -60,6 +60,7 @@
<binding class="org.jbpm.pvm.internal.wire.binding.CreateProcessBinding" />
<binding class="org.jbpm.pvm.internal.wire.binding.VerifyVersionBinding" />
<binding class="org.jbpm.pvm.internal.wire.binding.SaveProcessBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.CreateKeyBinding" />
<!-- ############################ -->
<!-- ### Interceptor bindings ### -->
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/basicfeatures/AutomaticDecisionDbTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/basicfeatures/AutomaticDecisionDbTest.java 2008-08-25 13:05:01 UTC (rev 1996)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/basicfeatures/AutomaticDecisionDbTest.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -16,19 +16,19 @@
import java.util.HashMap;
import java.util.Map;
+import org.jbpm.pvm.Deployment;
import org.jbpm.pvm.Execution;
import org.jbpm.pvm.activity.Activity;
import org.jbpm.pvm.activity.ActivityExecution;
import org.jbpm.pvm.activity.ExternalActivity;
import org.jbpm.pvm.client.ClientProcessDefinition;
-import org.jbpm.pvm.model.ProcessDefinition;
import org.jbpm.pvm.model.ProcessFactory;
import org.jbpm.pvm.test.base.DbTestCase;
/**
+ * @author Tom Baeyens
* @author Guillaume Porcher
- *
*/
public class AutomaticDecisionDbTest extends DbTestCase {
@@ -72,35 +72,38 @@
}
public void testGoodRating() {
- ProcessDefinition processDefinition = processService.deploy(createCreditProcess());
+ Deployment deployment = new Deployment(createCreditProcess());
+ processService.deploy(deployment);
Map<String, Object> variables = new HashMap<String, Object>();
variables.put("creditRate", 7);
- Execution execution = executionService.startExecution(processDefinition.getDbid(), variables);
+ Execution execution = executionService.startExecutionInLatest("creditProcess", variables);
assertEquals("priority delivery", execution.getNodeName());
}
public void testAverageRating() {
- ProcessDefinition processDefinition = processService.deploy(createCreditProcess());
+ Deployment deployment = new Deployment(createCreditProcess());
+ processService.deploy(deployment);
Map<String, Object> variables = new HashMap<String, Object>();
variables.put("creditRate", 2);
- Execution execution = executionService.startExecution(processDefinition.getDbid(), variables);
+ Execution execution = executionService.startExecutionInLatest("creditProcess", variables);
assertEquals("bulk delivery", execution.getNodeName());
}
public void testBadRating() {
- ProcessDefinition processDefinition = processService.deploy(createCreditProcess());
+ Deployment deployment = new Deployment(createCreditProcess());
+ processService.deploy(deployment);
Map<String, Object> variables = new HashMap<String, Object>();
variables.put("creditRate", -7);
- Execution execution = executionService.startExecution(processDefinition.getDbid(), variables);
+ Execution execution = executionService.startExecutionInLatest("creditProcess", variables);
assertEquals("payment upfront", execution.getNodeName());
}
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/basicfeatures/BasicExecutionFlowDbTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/basicfeatures/BasicExecutionFlowDbTest.java 2008-08-25 13:05:01 UTC (rev 1996)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/basicfeatures/BasicExecutionFlowDbTest.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -17,6 +17,7 @@
import java.util.List;
import java.util.Map;
+import org.jbpm.pvm.Deployment;
import org.jbpm.pvm.Execution;
import org.jbpm.pvm.activity.Activity;
import org.jbpm.pvm.activity.ActivityExecution;
@@ -74,9 +75,10 @@
.node("f").behaviour(AutomaticActivity.class)
.done();
- processService.deploy(processDefinition);
+ Deployment deployment = new Deployment(processDefinition);
+ processService.deploy(deployment);
- Execution processInstance = executionService.startExecution(processDefinition.getDbid());
+ Execution processInstance = executionService.startExecution("myProcess");
List<String> expectedEvents = new ArrayList<String>();
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/continuation/ContinuationTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/continuation/ContinuationTest.java 2008-08-25 13:05:01 UTC (rev 1996)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/continuation/ContinuationTest.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -37,7 +37,7 @@
import org.jbpm.pvm.internal.job.JobImpl;
import org.jbpm.pvm.internal.jobexecutor.JobExecutor;
import org.jbpm.pvm.internal.log.Log;
-import org.jbpm.pvm.model.ProcessDefinition;
+import org.jbpm.pvm.model.OpenProcessDefinition;
import org.jbpm.pvm.model.ProcessFactory;
import org.jbpm.pvm.session.DbSession;
import org.jbpm.pvm.session.PvmDbSession;
@@ -88,7 +88,7 @@
commandService.execute(new Command<Object>() {
public Object execute(Environment environment) throws Exception {
log.debug("building process 'continuations'");
- ProcessDefinition processDefinition = ProcessFactory.build("continuations")
+ OpenProcessDefinition processDefinition = ProcessFactory.build("continuations")
.node("start").initial().behaviour(AutomaticActivity.class)
.asyncExecute()
.transition().to("a")
@@ -116,7 +116,7 @@
commandService.execute(new Command<Object>() {
public Object execute(Environment environment) throws Exception {
PvmDbSession pvmDbSession = environment.get(PvmDbSession.class);
- ClientProcessDefinition processDefinition = pvmDbSession.findProcessDefinition("continuations");
+ ClientProcessDefinition processDefinition = pvmDbSession.findLatestProcessDefinitionByName("continuations");
ClientProcessInstance execution = processDefinition.beginProcessInstance();
pvmDbSession.save(execution);
return null;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/svc/ExecutionServiceTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/svc/ExecutionServiceTest.java 2008-08-25 13:05:01 UTC (rev 1996)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/svc/ExecutionServiceTest.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -29,9 +29,9 @@
import org.jbpm.pvm.Deployment;
import org.jbpm.pvm.Execution;
import org.jbpm.pvm.ExecutionService;
+import org.jbpm.pvm.ProcessDefinition;
import org.jbpm.pvm.ProcessService;
import org.jbpm.pvm.internal.model.ProcessDefinitionImpl;
-import org.jbpm.pvm.model.ProcessDefinition;
import org.jbpm.pvm.test.base.DbTestCase;
@@ -70,7 +70,7 @@
ExecutionService executionService = getEnvironmentFactory().get(ExecutionService.class);
- Execution execution = executionService.startExecution("nuclear fusion");
+ Execution execution = executionService.startExecutionInLatest("nuclear fusion");
assertNotNull(execution);
// TODO fix after refactoring
@@ -78,19 +78,22 @@
// assertEquals(3, execution.getProcessDefinition().getVersion());
}
- public void testStartExecutionByDbid() {
+ public void testStartExecutionByKey() {
ProcessService processService = getEnvironmentFactory().get(ProcessService.class);
ProcessDefinitionImpl processDefinition = new ProcessDefinitionImpl();
processDefinition.setName("nuclear fusion");
processDefinition.setVersion(1);
- processService.deploy(new Deployment(processDefinition));
+ Deployment deployment = new Deployment(processDefinition);
+ deployment.setProcessDefinitionRef("NCLFU");
+ processService.deploy(deployment);
ProcessDefinition deployed = processService.findProcessDefinition("nuclear fusion", 1);
-
+ String processDefinitionKey = deployed.getKey();
+
ExecutionService executionService = getEnvironmentFactory().get(ExecutionService.class);
- Execution execution = executionService.startExecution(deployed.getDbid());
+ Execution execution = executionService.startExecution(processDefinitionKey);
assertNotNull(execution);
// TODO fix after refactoring
@@ -112,7 +115,7 @@
ExecutionService executionService = getEnvironmentFactory().get(ExecutionService.class);
- Execution execution = executionService.startExecution("nuclear fusion", variables);
+ Execution execution = executionService.startExecutionInLatest("nuclear fusion", variables);
long executionDbid = execution.getDbid();
assertEquals(new Integer(1), executionService.getVariable(executionDbid, "a"));
@@ -128,7 +131,7 @@
processService.deploy(new Deployment(processDefinition));
ProcessDefinition deployed = processService.findProcessDefinition("nuclear fusion", 1);
- long processDefinitionDbid = deployed.getDbid();
+ String processDefinitionKey = deployed.getKey();
Map<String, Object> variables = new HashMap<String, Object>();
variables.put("a", new Integer(1));
@@ -136,7 +139,7 @@
ExecutionService executionService = getEnvironmentFactory().get(ExecutionService.class);
- Execution execution = executionService.startExecution(processDefinitionDbid, variables);
+ Execution execution = executionService.startExecution(processDefinitionKey, variables);
long executionDbid = execution.getDbid();
assertEquals(new Integer(1), executionService.getVariable(executionDbid, "a"));
@@ -153,7 +156,7 @@
ExecutionService executionService = getEnvironmentFactory().get(ExecutionService.class);
- executionService.startExecution("nuclear fusion", null, "the first time");
+ executionService.startExecutionInLatest("nuclear fusion", null, "the first time");
assertNotNull(executionService.findExecution("nuclear fusion", "the first time"));
}
@@ -164,14 +167,15 @@
ProcessDefinitionImpl processDefinition = new ProcessDefinitionImpl();
processDefinition.setName("nuclear fusion");
processDefinition.setVersion(1);
- processService.deploy(new Deployment(processDefinition));
+ Deployment deployment = new Deployment(processDefinition);
+ processService.deploy(deployment);
ProcessDefinition deployed = processService.findProcessDefinition("nuclear fusion", 1);
- long processDefinitionDbid = deployed.getDbid();
+ String processDefinitionKey = deployed.getKey();
ExecutionService executionService = getEnvironmentFactory().get(ExecutionService.class);
- executionService.startExecution(processDefinitionDbid, null, "the first time");
+ executionService.startExecution(processDefinitionKey, null, "the first time");
assertNotNull(executionService.findExecution("nuclear fusion", "the first time"));
}
@@ -186,7 +190,7 @@
ExecutionService executionService = getEnvironmentFactory().get(ExecutionService.class);
- Execution execution = executionService.startExecution("nuclear fusion");
+ Execution execution = executionService.startExecutionInLatest("nuclear fusion");
execution = executionService.findExecution(execution.getDbid());
@@ -203,7 +207,7 @@
ExecutionService executionService = getEnvironmentFactory().get(ExecutionService.class);
- Execution execution = executionService.startExecution("nuclear fusion");
+ Execution execution = executionService.startExecutionInLatest("nuclear fusion");
executionService.setVariable(execution.getDbid(), "a", "text");
assertEquals("text", executionService.getVariable(execution.getDbid(), "a") );
@@ -219,7 +223,7 @@
ExecutionService executionService = getEnvironmentFactory().get(ExecutionService.class);
- Execution execution = executionService.startExecution("nuclear fusion");
+ Execution execution = executionService.startExecutionInLatest("nuclear fusion");
Map<String, Object> variables = new HashMap<String, Object>();
variables.put("a", new Integer(1));
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/svc/ProcessServiceTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/svc/ProcessServiceTest.java 2008-08-25 13:05:01 UTC (rev 1996)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/svc/ProcessServiceTest.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -25,10 +25,10 @@
import java.util.List;
import org.jbpm.pvm.Deployment;
+import org.jbpm.pvm.ProcessDefinition;
import org.jbpm.pvm.ProcessService;
import org.jbpm.pvm.PvmException;
import org.jbpm.pvm.internal.model.ProcessDefinitionImpl;
-import org.jbpm.pvm.model.ProcessDefinition;
import org.jbpm.pvm.test.base.DbTestCase;
/**
@@ -221,6 +221,4 @@
assertEquals("nuclear fusion", retrieved.getName());
assertEquals(3, retrieved.getVersion());
}
-
-
}
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/timer/TimerIntegrationTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/timer/TimerIntegrationTest.java 2008-08-25 13:05:01 UTC (rev 1996)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/timer/TimerIntegrationTest.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -18,6 +18,7 @@
import java.util.Map;
import java.util.Set;
+import org.jbpm.pvm.Deployment;
import org.jbpm.pvm.Execution;
import org.jbpm.pvm.ExecutionService;
import org.jbpm.pvm.ProcessService;
@@ -30,7 +31,7 @@
import org.jbpm.pvm.job.JobTestHelper;
import org.jbpm.pvm.job.Timer;
import org.jbpm.pvm.model.OpenExecution;
-import org.jbpm.pvm.model.ProcessDefinition;
+import org.jbpm.pvm.model.OpenProcessDefinition;
import org.jbpm.pvm.model.ProcessFactory;
import org.jbpm.pvm.samples.activities.AutomaticActivity;
import org.jbpm.pvm.session.DbSession;
@@ -68,17 +69,18 @@
return Environment.getCurrent().get(ExecutionService.class);
}
- private static ExecutionImpl deployAndInstanciateProcess(ProcessDefinition definition) {
+ private static ExecutionImpl deployAndInstanciateProcess(OpenProcessDefinition definition) {
ProcessService processService = Environment.getCurrent().get(ProcessService.class);
- processService.deploy(definition);
+ Deployment deployment = new Deployment(definition);
+ processService.deploy(deployment);
- Execution processInstance = getExecutionService().startExecution(definition.getName());
+ Execution processInstance = getExecutionService().startExecutionInLatest(definition.getName());
return (ExecutionImpl) processInstance;
}
public void testTimerDefinition() {
- ProcessDefinition processDefinition = ProcessFactory.build("timerDefinition")
+ OpenProcessDefinition processDefinition = ProcessFactory.build("timerDefinition")
.node("request").initial().behaviour(WaitState.class)
.transition().to("decide")
.node("decide").behaviour(WaitState.class)
@@ -122,7 +124,7 @@
}
public void testTimerExecution() {
- ProcessDefinition processDefinition = ProcessFactory.build("timerExecution")
+ OpenProcessDefinition processDefinition = ProcessFactory.build("timerExecution")
.node("decide").initial().behaviour(WaitState.class)
.timer(getDueDate(twoDaysDuration), "timeout")
.transition("decision made").to("response") // first defined transition is the default one
@@ -159,7 +161,7 @@
}
public void testCanceledTimer() {
- ProcessDefinition processDefinition = ProcessFactory.build("timerCanceled")
+ OpenProcessDefinition processDefinition = ProcessFactory.build("timerCanceled")
.node("decide").initial().behaviour(WaitState.class)
.timer(getDueDate(twoDaysDuration), "timeout")
.transition("decision made").to("response") // first defined transition is the default one
@@ -196,7 +198,7 @@
Date now = new Date();
long twoDaysFromNow = now.getTime() + twoDaysDuration;
- ProcessDefinition processDefinition = ProcessFactory.build("fixedDateTimer")
+ OpenProcessDefinition processDefinition = ProcessFactory.build("fixedDateTimer")
.node("decide").initial().behaviour(WaitState.class)
.timer(getDueDate(twoDaysDuration), "timeout")
.transition("decision made").to("response") // first defined transition is the default one
@@ -222,7 +224,7 @@
Date now = new Date();
long twoDaysFromNow = now.getTime() + twoDaysDuration;
- ProcessDefinition processDefinition = ProcessFactory.build("dueDateDescriptionTimer")
+ OpenProcessDefinition processDefinition = ProcessFactory.build("dueDateDescriptionTimer")
.node("decide").initial().behaviour(WaitState.class)
.timer("2 days", "timeout")
.transition("decision made").to("response") // first defined transition is the default one
@@ -248,7 +250,7 @@
Date now = Clock.getCurrentTime();
long twoDaysFromNow = now.getTime() + twoDaysDuration;
- ProcessDefinition processDefinition = ProcessFactory.build("reschedulingTimer")
+ OpenProcessDefinition processDefinition = ProcessFactory.build("reschedulingTimer")
.node("decide").initial().behaviour(IncrementCounterWaitState.class)
.variable(IncrementCounterWaitState.COUNTER, "0")
.timer("2 days", "increment", "2 days")
@@ -302,7 +304,7 @@
}
public void testTimerEndingProcessExecution() {
- ProcessDefinition processDefinition = ProcessFactory.build("timerEndingProcess")
+ OpenProcessDefinition processDefinition = ProcessFactory.build("timerEndingProcess")
.node("decide").initial().behaviour(WaitState.class)
.timer("2 business days", "timeout")
.transition("decision made").to("response") // first defined transition is the default one
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/enterprise/EnterpriseTimerSessionTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/enterprise/EnterpriseTimerSessionTest.java 2008-08-25 13:05:01 UTC (rev 1996)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/enterprise/EnterpriseTimerSessionTest.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -40,7 +40,7 @@
import org.jbpm.pvm.internal.ejb.LocalCommandExecutorHome;
import org.jbpm.pvm.internal.job.TimerImpl;
import org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor;
-import org.jbpm.pvm.model.ProcessDefinition;
+import org.jbpm.pvm.model.OpenProcessDefinition;
import org.jbpm.pvm.model.ProcessFactory;
import org.jbpm.pvm.session.DbSession;
import org.jbpm.pvm.session.TimerSession;
@@ -72,7 +72,7 @@
// create local bean
commandExecutor = commandExecutorHome.create();
// deploy process
- ProcessDefinition processDefinition = ProcessFactory.build(getName())
+ OpenProcessDefinition processDefinition = ProcessFactory.build(getName())
.timer(TIMEOUT + " milliseconds", null)
.event("timeout")
.listener(new ObjectDescriptor(HappyActivity.class))
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/enterprise/TimerTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/enterprise/TimerTest.java 2008-08-25 13:05:01 UTC (rev 1996)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/enterprise/TimerTest.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -45,7 +45,7 @@
import org.jbpm.pvm.internal.log.Log;
import org.jbpm.pvm.internal.model.ExecutionImpl;
import org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor;
-import org.jbpm.pvm.model.ProcessDefinition;
+import org.jbpm.pvm.model.OpenProcessDefinition;
import org.jbpm.pvm.model.ProcessFactory;
import org.jbpm.pvm.session.DbSession;
@@ -57,7 +57,7 @@
*/
public class TimerTest extends ServletTestCase {
- private ProcessDefinition processDefinition;
+ private OpenProcessDefinition processDefinition;
private ObjectDescriptor activityDescriptor = new ObjectDescriptor();
private LocalCommandExecutor commandExecutor;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/langext/LanguageExtensionsDbTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/langext/LanguageExtensionsDbTest.java 2008-08-25 13:05:01 UTC (rev 1996)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/langext/LanguageExtensionsDbTest.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -26,7 +26,7 @@
import org.jbpm.pvm.test.base.EnvironmentDbTestCase;
import org.jbpm.pvm.Execution;
-import org.jbpm.pvm.model.ProcessDefinition;
+import org.jbpm.pvm.model.OpenProcessDefinition;
import org.jbpm.pvm.model.ProcessFactory;
import org.jbpm.pvm.session.DbSession;
import org.jbpm.pvm.session.PvmDbSession;
@@ -51,7 +51,7 @@
DbSession persistenceSession = (DbSession) environment.get(DbSession.class);
assertNotNull(persistenceSession);
- ProcessDefinition processDefinition = ProcessFactory.build("addresses")
+ OpenProcessDefinition processDefinition = ProcessFactory.build("addresses")
.node().initial().behaviour(new AddressActivity("Sesamestreet", 15))
.transition().to("a")
.node("a").behaviour(new AddressActivity("Broadway", 151))
@@ -66,7 +66,7 @@
newTransaction();
PvmDbSession pvmDbSession = environment.get(PvmDbSession.class);
- Execution execution = pvmDbSession.findProcessDefinition("addresses").beginProcessInstance();
+ Execution execution = pvmDbSession.findLatestProcessDefinitionByName("addresses").beginProcessInstance();
assertTrue(execution.isEnded());
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/ProcessCacheDbTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/ProcessCacheDbTest.java 2008-08-25 13:05:01 UTC (rev 1996)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/ProcessCacheDbTest.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -21,7 +21,7 @@
import org.jbpm.pvm.internal.model.NodeImpl;
import org.jbpm.pvm.internal.model.ProcessDefinitionImpl;
import org.jbpm.pvm.model.Node;
-import org.jbpm.pvm.model.ProcessDefinition;
+import org.jbpm.pvm.model.OpenProcessDefinition;
import org.jbpm.pvm.model.ProcessFactory;
import org.jbpm.pvm.model.Transition;
import org.jbpm.pvm.session.DbSession;
@@ -39,7 +39,7 @@
* persists it.
*/
public void testCacheProcessDefinitionNodes(){
- ProcessDefinition processDefinition = ProcessFactory.build()
+ OpenProcessDefinition processDefinition = ProcessFactory.build()
.node("a").initial()
.node("b")
.node("c")
@@ -107,7 +107,7 @@
* persists it.
*/
public void testCacheProcessDefinitionNodeOrder(){
- ProcessDefinition processDefinition = ProcessFactory.build()
+ OpenProcessDefinition processDefinition = ProcessFactory.build()
.node("a").initial()
.node("b")
.node("c")
@@ -258,7 +258,7 @@
DbSession persistenceSession = (DbSession) environment.get(DbSession.class);
assertNotNull(persistenceSession);
- ProcessDefinition processDefinition = ProcessFactory.build()
+ OpenProcessDefinition processDefinition = ProcessFactory.build()
.compositeNode().initial()
.node("a")
.node("b")
@@ -273,7 +273,7 @@
persistenceSession = (DbSession) environment.get(DbSession.class);
- ProcessDefinition p = (ProcessDefinition) persistenceSession.get(ProcessDefinitionImpl.class, processDefinition.getDbid());
+ OpenProcessDefinition p = (OpenProcessDefinition) persistenceSession.get(ProcessDefinitionImpl.class, processDefinition.getDbid());
assertNotNull(p);
assertNotSame(processDefinition, p);
@@ -288,7 +288,7 @@
persistenceSession = (DbSession) environment.get(DbSession.class);
- p = (ProcessDefinition) persistenceSession.get(ProcessDefinitionImpl.class, processDefinition.getDbid());
+ p = (OpenProcessDefinition) persistenceSession.get(ProcessDefinitionImpl.class, processDefinition.getDbid());
assertNotNull(p);
assertNotSame(processDefinition, p);
@@ -309,7 +309,7 @@
DbSession persistenceSession = (DbSession) environment.get(DbSession.class);
assertNotNull(persistenceSession);
- ProcessDefinition processDefinition = ProcessFactory.build()
+ OpenProcessDefinition processDefinition = ProcessFactory.build()
.compositeNode().initial()
.compositeNode("a")
.node("aa")
@@ -412,7 +412,7 @@
public void testCacheDefaultTransition() {
DbSession persistenceSession = (DbSession) environment.get(DbSession.class);
assertNotNull(persistenceSession);
- ProcessDefinition processDefinition = ProcessFactory.build()
+ OpenProcessDefinition processDefinition = ProcessFactory.build()
.node().initial()
.transition().to("a")
.node("a")
@@ -428,7 +428,7 @@
DbSession testSession = (DbSession) environment.get(DbSession.class);
- ProcessDefinition p = (ProcessDefinition) testSession.get(ProcessDefinitionImpl.class, processDefinition.getDbid());
+ OpenProcessDefinition p = (OpenProcessDefinition) testSession.get(ProcessDefinitionImpl.class, processDefinition.getDbid());
assertNotNull(p);
assertNotSame(processDefinition, p);
@@ -458,7 +458,7 @@
testSession = (DbSession) environment.get(DbSession.class);
- p = (ProcessDefinition) testSession.get(ProcessDefinitionImpl.class, processDefinition.getDbid());
+ p = (OpenProcessDefinition) testSession.get(ProcessDefinitionImpl.class, processDefinition.getDbid());
assertNotNull(p);
assertNotSame(processDefinition, p);
@@ -493,7 +493,7 @@
public void testCacheTwoTransitions() {
DbSession persistenceSession = (DbSession) environment.get(DbSession.class);
assertNotNull(persistenceSession);
- ProcessDefinition processDefinition = ProcessFactory.build()
+ OpenProcessDefinition processDefinition = ProcessFactory.build()
.node().initial()
.transition().to("a")
.transition().to("b")
@@ -507,7 +507,7 @@
DbSession testSession = (DbSession) environment.get(DbSession.class);
- ProcessDefinition p = (ProcessDefinition) testSession.get(ProcessDefinitionImpl.class, processDefinition.getDbid());
+ OpenProcessDefinition p = (OpenProcessDefinition) testSession.get(ProcessDefinitionImpl.class, processDefinition.getDbid());
assertNotNull(p);
assertNotSame(processDefinition, p);
@@ -544,7 +544,7 @@
testSession = (DbSession) environment.get(DbSession.class);
beginCacheTest(); /////////
- p = (ProcessDefinition) testSession.get(ProcessDefinitionImpl.class, processDefinition.getDbid());
+ p = (OpenProcessDefinition) testSession.get(ProcessDefinitionImpl.class, processDefinition.getDbid());
assertNotNull(p);
assertNotSame(processDefinition, p);
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/ProcessDefinitionDbTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/ProcessDefinitionDbTest.java 2008-08-25 13:05:01 UTC (rev 1996)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/ProcessDefinitionDbTest.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -23,7 +23,7 @@
import org.jbpm.pvm.internal.model.ProcessDefinitionImpl;
import org.jbpm.pvm.model.Event;
import org.jbpm.pvm.model.Node;
-import org.jbpm.pvm.model.ProcessDefinition;
+import org.jbpm.pvm.model.OpenProcessDefinition;
import org.jbpm.pvm.model.ProcessFactory;
import org.jbpm.pvm.model.Transition;
import org.jbpm.pvm.session.DbSession;
@@ -54,7 +54,7 @@
}
public void testProcessDefinitionNodes(){
- ProcessDefinition processDefinition = ProcessFactory.build()
+ OpenProcessDefinition processDefinition = ProcessFactory.build()
.node("a").initial()
.node("b")
.node("c")
@@ -82,7 +82,7 @@
}
public void testInitialNode(){
- ProcessDefinition processDefinition = ProcessFactory.build()
+ OpenProcessDefinition processDefinition = ProcessFactory.build()
.node("a").initial()
.node("b")
.node("c")
@@ -103,7 +103,7 @@
DbSession persistenceSession = (DbSession) environment.get(DbSession.class);
assertNotNull(persistenceSession);
- ProcessDefinition processDefinition = ProcessFactory.build()
+ OpenProcessDefinition processDefinition = ProcessFactory.build()
.compositeNode("top").initial()
.node("a")
.compositeNode("b")
@@ -155,7 +155,7 @@
public void testDefaultTransition() {
DbSession persistenceSession = (DbSession) environment.get(DbSession.class);
assertNotNull(persistenceSession);
- ProcessDefinition processDefinition = ProcessFactory.build()
+ OpenProcessDefinition processDefinition = ProcessFactory.build()
.node("a").initial()
.transition().to("a")
.transition("tob").to("b")
@@ -180,7 +180,7 @@
public void testTwoTransitionsWithoutAName() {
DbSession persistenceSession = (DbSession) environment.get(DbSession.class);
assertNotNull(persistenceSession);
- ProcessDefinition processDefinition = ProcessFactory.build()
+ OpenProcessDefinition processDefinition = ProcessFactory.build()
.node().initial()
.transition().to("a")
.transition().to("b")
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/ProcessExecutionDbTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/ProcessExecutionDbTest.java 2008-08-25 13:05:01 UTC (rev 1996)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/ProcessExecutionDbTest.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -16,7 +16,7 @@
import org.jbpm.pvm.test.base.EnvironmentDbTestCase;
import org.jbpm.pvm.internal.model.ExecutionImpl;
import org.jbpm.pvm.internal.model.ProcessDefinitionImpl;
-import org.jbpm.pvm.model.ProcessDefinition;
+import org.jbpm.pvm.model.OpenProcessDefinition;
/**
* @author Guillaume Porcher
@@ -25,7 +25,7 @@
public class ProcessExecutionDbTest extends EnvironmentDbTestCase {
public void testExecutionProperties() {
- ProcessDefinition processDefinition = new ProcessDefinitionImpl();
+ OpenProcessDefinition processDefinition = new ProcessDefinitionImpl();
processDefinition = reload(processDefinition); // new transaction /////////
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/WireDbTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/WireDbTest.java 2008-08-25 13:05:01 UTC (rev 1996)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/WireDbTest.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -49,7 +49,7 @@
import org.jbpm.pvm.internal.wire.descriptor.TrueDescriptor;
import org.jbpm.pvm.internal.wire.operation.FieldOperation;
import org.jbpm.pvm.internal.wire.operation.PropertyOperation;
-import org.jbpm.pvm.model.ProcessDefinition;
+import org.jbpm.pvm.model.OpenProcessDefinition;
import org.jbpm.pvm.model.ProcessFactory;
import org.jbpm.pvm.session.DbSession;
@@ -306,7 +306,7 @@
listD.setValueDescriptors(listValues);
listD.setClassName(LinkedList.class.getName());
- ProcessDefinition processDefinition = ProcessFactory.build()
+ OpenProcessDefinition processDefinition = ProcessFactory.build()
.property(listD)
.node().initial()
.done();
@@ -317,7 +317,7 @@
dbSession = (DbSession) environment.get(DbSession.class);
- ProcessDefinition p = (ProcessDefinition) dbSession.get(ProcessDefinitionImpl.class, processDefinition.getDbid());
+ OpenProcessDefinition p = (OpenProcessDefinition) dbSession.get(ProcessDefinitionImpl.class, processDefinition.getDbid());
assertNotNull(p);
assertNotSame(processDefinition, p);
@@ -353,7 +353,7 @@
setD.setValueDescriptors(listValues);
setD.setClassName(TreeSet.class.getName());
- ProcessDefinition processDefinition = ProcessFactory.build()
+ OpenProcessDefinition processDefinition = ProcessFactory.build()
.property(setD)
.node().initial()
.done();
@@ -364,7 +364,7 @@
dbSession = (DbSession) environment.get(DbSession.class);
- ProcessDefinition p = (ProcessDefinition) dbSession.get(ProcessDefinitionImpl.class, processDefinition.getDbid());
+ OpenProcessDefinition p = (OpenProcessDefinition) dbSession.get(ProcessDefinitionImpl.class, processDefinition.getDbid());
assertNotNull(p);
assertNotSame(processDefinition, p);
@@ -411,7 +411,7 @@
mapD.setKeyDescriptors(mapKeys);
mapD.setClassName(TreeMap.class.getName());
- ProcessDefinition processDefinition = ProcessFactory.build()
+ OpenProcessDefinition processDefinition = ProcessFactory.build()
.property(mapD)
.node().initial()
.done();
@@ -422,7 +422,7 @@
dbSession = (DbSession) environment.get(DbSession.class);
- ProcessDefinition p = (ProcessDefinition) dbSession.get(ProcessDefinitionImpl.class, processDefinition.getDbid());
+ OpenProcessDefinition p = (OpenProcessDefinition) dbSession.get(ProcessDefinitionImpl.class, processDefinition.getDbid());
assertNotNull(p);
assertNotSame(processDefinition, p);
@@ -472,7 +472,7 @@
objStaticMethod.addArgDescriptor(argStaticMethod);
- ProcessDefinition processDefinition = ProcessFactory.build()
+ OpenProcessDefinition processDefinition = ProcessFactory.build()
.property(objDefault)
.property(objConstr)
.property(objStaticMethod)
@@ -485,7 +485,7 @@
dbSession = (DbSession) environment.get(DbSession.class);
- ProcessDefinition p = (ProcessDefinition) dbSession.get(ProcessDefinitionImpl.class, processDefinition.getDbid());
+ OpenProcessDefinition p = (OpenProcessDefinition) dbSession.get(ProcessDefinitionImpl.class, processDefinition.getDbid());
assertNotNull(p);
assertNotSame(processDefinition, p);
@@ -518,7 +518,7 @@
objDescr.addOperation(fieldOp);
- ProcessDefinition processDefinition = ProcessFactory.build()
+ OpenProcessDefinition processDefinition = ProcessFactory.build()
.property(objDescr)
.node().initial()
.done();
@@ -529,7 +529,7 @@
dbSession = (DbSession) environment.get(DbSession.class);
- ProcessDefinition p = (ProcessDefinition) dbSession.get(ProcessDefinitionImpl.class, processDefinition.getDbid());
+ OpenProcessDefinition p = (OpenProcessDefinition) dbSession.get(ProcessDefinitionImpl.class, processDefinition.getDbid());
assertNotNull(p);
assertNotSame(processDefinition, p);
@@ -561,7 +561,7 @@
objDescr.addOperation(propertyOp);
- ProcessDefinition processDefinition = ProcessFactory.build()
+ OpenProcessDefinition processDefinition = ProcessFactory.build()
.property(objDescr)
.node().initial()
.done();
@@ -572,7 +572,7 @@
dbSession = (DbSession) environment.get(DbSession.class);
- ProcessDefinition p = (ProcessDefinition) dbSession.get(ProcessDefinitionImpl.class, processDefinition.getDbid());
+ OpenProcessDefinition p = (OpenProcessDefinition) dbSession.get(ProcessDefinitionImpl.class, processDefinition.getDbid());
assertNotNull(p);
assertNotSame(processDefinition, p);
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex02/BasicProcessPersistenceTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex02/BasicProcessPersistenceTest.java 2008-08-25 13:05:01 UTC (rev 1996)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex02/BasicProcessPersistenceTest.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -23,6 +23,7 @@
import junit.framework.TestCase;
+import org.jbpm.pvm.Deployment;
import org.jbpm.pvm.Execution;
import org.jbpm.pvm.ExecutionService;
import org.jbpm.pvm.ProcessService;
@@ -53,12 +54,13 @@
ProcessService processService = ExamplesConfiguration.getProcessService();
- processService.deploy(processDefinition);
+ Deployment deployment = new Deployment(processDefinition);
+ processService.deploy(deployment);
ExecutionService executionService = ExamplesConfiguration.getExecutionService();
- Execution execution = executionService.startExecution("basic", "one");
+ Execution execution = executionService.startExecutionInLatest("basic", "one");
assertEquals("a", execution.getNodeName());
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex04/ExternalDecisionTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex04/ExternalDecisionTest.java 2008-08-25 13:05:01 UTC (rev 1996)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex04/ExternalDecisionTest.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -28,7 +28,7 @@
import org.jbpm.pvm.samples.activities.WaitState;
import org.jbpm.pvm.client.ClientProcessDefinition;
import org.jbpm.pvm.client.ClientProcessInstance;
-import org.jbpm.pvm.model.ProcessDefinition;
+import org.jbpm.pvm.model.OpenProcessDefinition;
import org.jbpm.pvm.model.ProcessFactory;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex05/InternalDecisionTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex05/InternalDecisionTest.java 2008-08-25 13:05:01 UTC (rev 1996)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex05/InternalDecisionTest.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -27,7 +27,7 @@
import org.jbpm.pvm.samples.activities.WaitState;
import org.jbpm.pvm.client.ClientProcessDefinition;
import org.jbpm.pvm.client.ClientProcessInstance;
-import org.jbpm.pvm.model.ProcessDefinition;
+import org.jbpm.pvm.model.OpenProcessDefinition;
import org.jbpm.pvm.model.ProcessFactory;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex07/EventListenerTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex07/EventListenerTest.java 2008-08-25 13:05:01 UTC (rev 1996)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex07/EventListenerTest.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -29,7 +29,7 @@
import org.jbpm.pvm.samples.activities.WaitState;
import org.jbpm.pvm.client.ClientProcessDefinition;
import org.jbpm.pvm.model.Event;
-import org.jbpm.pvm.model.ProcessDefinition;
+import org.jbpm.pvm.model.OpenProcessDefinition;
import org.jbpm.pvm.model.ProcessFactory;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex11/AsynchronousContinuationsTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex11/AsynchronousContinuationsTest.java 2008-08-25 13:05:01 UTC (rev 1996)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex11/AsynchronousContinuationsTest.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -23,6 +23,7 @@
import junit.framework.TestCase;
+import org.jbpm.pvm.Deployment;
import org.jbpm.pvm.Execution;
import org.jbpm.pvm.ExecutionService;
import org.jbpm.pvm.ProcessService;
@@ -53,11 +54,11 @@
ProcessService processService = ExamplesConfiguration.getProcessService();
- processService.deploy(processDefinition);
+ processService.deploy(new Deployment(processDefinition));
ExecutionService executionService = ExamplesConfiguration.getExecutionService();
- Execution execution = executionService.startExecution("async");
+ Execution execution = executionService.startExecutionInLatest("async");
assertTrue(execution.isLocked());
assertEquals("b", execution.getNodeName());
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex12/TimerTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex12/TimerTest.java 2008-08-25 13:05:01 UTC (rev 1996)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/samples/ex12/TimerTest.java 2008-08-25 14:11:51 UTC (rev 1997)
@@ -25,10 +25,11 @@
import junit.framework.TestCase;
+import org.jbpm.pvm.Deployment;
import org.jbpm.pvm.Execution;
import org.jbpm.pvm.ExecutionService;
import org.jbpm.pvm.ProcessService;
-import org.jbpm.pvm.model.ProcessDefinition;
+import org.jbpm.pvm.model.OpenProcessDefinition;
import org.jbpm.pvm.model.ProcessFactory;
import org.jbpm.pvm.samples.ExamplesConfiguration;
import org.jbpm.pvm.samples.activities.WaitState;
@@ -41,7 +42,7 @@
public void testTimer() {
- ProcessDefinition processDefinition = ProcessFactory.build("timed")
+ OpenProcessDefinition processDefinition = ProcessFactory.build("timed")
.node("get input").initial().behaviour(WaitState.class)
.timer("2 business days", "escalate")
.transition("escalate").to("manager decision")
@@ -52,14 +53,15 @@
ProcessService processService = ExamplesConfiguration.getProcessService();
- processService.deploy(processDefinition);
+ Deployment deployment = new Deployment(processDefinition);
+ processService.deploy(deployment);
Date now = new Date();
long fourtyEightHoursFromNow = now.getTime() + 48*60*60*1000;
ExecutionService executionService = ExamplesConfiguration.getExecutionService();
- Execution execution = executionService.startExecution("timed");
+ Execution execution = executionService.startExecutionInLatest("timed");
/* TODO Fix after refactoring
Node node = execution.getNode();
Modified: jbpm4/pvm/trunk/modules/core/src/test/resources/environment.cfg.xml
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/resources/environment.cfg.xml 2008-08-25 13:05:01 UTC (rev 1996)
+++ jbpm4/pvm/trunk/modules/core/src/test/resources/environment.cfg.xml 2008-08-25 14:11:51 UTC (rev 1997)
@@ -7,6 +7,7 @@
<deployer-manager resource="pvm.language.deployers.xml">
<language name="api">
<verify-version />
+ <create-key />
<save-process />
</language>
</deployer-manager>
17 years, 8 months
JBoss JBPM SVN: r1996 - in jbpm4/pvm/trunk/modules/core/src: test/java/org/jbpm/pvm and 4 other directories.
by do-not-reply@jboss.org
Author: porcherg
Date: 2008-08-25 09:05:01 -0400 (Mon, 25 Aug 2008)
New Revision: 1996
Added:
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/type/
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/type/VariableCustomTypeTest.java
jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/internal/db/type/
jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/internal/db/type/environmentCustomTypes.cfg.xml
Modified:
jbpm4/pvm/trunk/modules/core/src/main/resources/org/jbpm/pvm/hibernate.variable.hbm.xml
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/DbTests.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/NonDbTests.java
Log:
change DateVariable date field db mapping from date to timestamp
Modified: jbpm4/pvm/trunk/modules/core/src/main/resources/org/jbpm/pvm/hibernate.variable.hbm.xml
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/resources/org/jbpm/pvm/hibernate.variable.hbm.xml 2008-08-25 12:26:59 UTC (rev 1995)
+++ jbpm4/pvm/trunk/modules/core/src/main/resources/org/jbpm/pvm/hibernate.variable.hbm.xml 2008-08-25 13:05:01 UTC (rev 1996)
@@ -34,7 +34,7 @@
</class>
<subclass name="DateVariable" extends="org.jbpm.pvm.internal.type.Variable" discriminator-value="T">
- <property name="date" column="DATE_VALUE_" type="date"/>
+ <property name="date" column="DATE_VALUE_" type="timestamp"/>
</subclass>
<subclass name="DoubleVariable" extends="org.jbpm.pvm.internal.type.Variable" discriminator-value="D">
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/DbTests.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/DbTests.java 2008-08-25 12:26:59 UTC (rev 1995)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/DbTests.java 2008-08-25 13:05:01 UTC (rev 1996)
@@ -30,6 +30,7 @@
import org.jbpm.pvm.api.tx.TxTests;
import org.jbpm.pvm.internal.db.langext.DbLangExtTests;
import org.jbpm.pvm.internal.db.model.DbModelTests;
+import org.jbpm.pvm.internal.db.type.VariableCustomTypeTest;
import org.jbpm.pvm.internal.jobexecutor.JobExecutorTests;
import org.jbpm.pvm.test.base.EnvironmentFactoryTestSetup;
@@ -52,6 +53,10 @@
suite.addTest(new EnvironmentFactoryTestSetup(defaultConfigTests, "environment.cfg.xml"));
suite.addTest(new EnvironmentFactoryTestSetup(DbLangExtTests.suite(), "org/jbpm/pvm/internal/db/langext/environment.cfg.xml"));
+
+ TestSuite variableTypeTests = new TestSuite(VariableCustomTypeTest.class);
+ suite.addTest(new EnvironmentFactoryTestSetup(variableTypeTests, "org/jbpm/pvm/internal/db/type/environmentCustomTypes.cfg.xml"));
+
// Spring tests do not use EnvironmentFactoryTestCase
suite.addTest(SpringTests.suite());
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/NonDbTests.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/NonDbTests.java 2008-08-25 12:26:59 UTC (rev 1995)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/NonDbTests.java 2008-08-25 13:05:01 UTC (rev 1996)
@@ -26,6 +26,7 @@
import org.jbpm.pvm.api.basicfeatures.BasicFeaturesTests;
import org.jbpm.pvm.api.env.EnvironmentTests;
+import org.jbpm.pvm.internal.type.VariableAutoTypeResolutionTest;
import org.jbpm.pvm.internal.wire.WireTests;
@@ -40,6 +41,7 @@
suite.addTest(EnvironmentTests.suite());
suite.addTest(BasicFeaturesTests.suite());
suite.addTest(WireTests.suite());
+ suite.addTestSuite(VariableAutoTypeResolutionTest.class);
//$JUnit-END$
return suite;
}
Added: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/type/VariableCustomTypeTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/type/VariableCustomTypeTest.java (rev 0)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/type/VariableCustomTypeTest.java 2008-08-25 13:05:01 UTC (rev 1996)
@@ -0,0 +1,88 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.pvm.internal.db.type;
+
+import java.util.Calendar;
+import java.util.GregorianCalendar;
+import java.util.Map;
+
+import org.jbpm.pvm.activity.ActivityExecution;
+import org.jbpm.pvm.activity.ExternalActivity;
+import org.jbpm.pvm.client.ClientProcessDefinition;
+import org.jbpm.pvm.internal.model.ExecutionImpl;
+import org.jbpm.pvm.internal.type.Variable;
+import org.jbpm.pvm.internal.type.variable.DateVariable;
+import org.jbpm.pvm.model.ProcessFactory;
+import org.jbpm.pvm.test.base.EnvironmentDbTestCase;
+
+/**
+ * @author Guillaume Porcher
+ */
+public class VariableCustomTypeTest extends EnvironmentDbTestCase {
+
+ public VariableCustomTypeTest() {
+ super("org/jbpm/pvm/internal/db/type/environmentCustomTypes.cfg.xml");
+ }
+
+ public static class WaitState implements ExternalActivity {
+ private static final long serialVersionUID = 1L;
+ public void execute(ActivityExecution execution) {
+ execution.waitForSignal();
+ }
+ public void signal(ActivityExecution execution, String signalName, Map<String, Object> parameters) {
+ execution.take(signalName);
+ }
+ }
+
+
+
+ public void testDateVariable() {
+ ClientProcessDefinition clientProcessDefinition = ProcessFactory.build()
+ .node().initial().behaviour(WaitState.class)
+ .done();
+
+ getDbSession().save(clientProcessDefinition);
+
+ ExecutionImpl execution = (ExecutionImpl) clientProcessDefinition.beginProcessInstance();
+
+ execution = reload(execution);
+
+ Calendar calendar = new GregorianCalendar();
+ calendar.set(Calendar.YEAR, 2007);
+ calendar.set(Calendar.MONTH, 10); // (10 == november)
+ calendar.set(Calendar.DAY_OF_MONTH, 22);
+ calendar.set(Calendar.HOUR_OF_DAY, 15);
+ calendar.set(Calendar.MINUTE, 28);
+ calendar.set(Calendar.SECOND, 57);
+ calendar.set(Calendar.MILLISECOND, 374);
+
+ execution.setVariable("v", calendar.getTime());
+
+ execution = reload(execution);
+
+ Variable variable = execution.getVariableObject("v");
+ assertEquals(DateVariable.class, variable.getClass());
+
+ assertEquals(calendar.getTime(), execution.getVariable("v"));
+ }
+
+}
Property changes on: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/type/VariableCustomTypeTest.java
___________________________________________________________________
Name: svn:keywords
+ Id
Added: jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/internal/db/type/environmentCustomTypes.cfg.xml
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/internal/db/type/environmentCustomTypes.cfg.xml (rev 0)
+++ jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/internal/db/type/environmentCustomTypes.cfg.xml 2008-08-25 13:05:01 UTC (rev 1996)
@@ -0,0 +1,25 @@
+<contexts>
+
+ <environment-factory>
+
+ <hibernate-configuration>
+ <properties resource="hibernate.properties" />
+ <mappings resource="org/jbpm/pvm/pvm.hibernate.mappings.xml" />
+ <cache-configuration resource="org/jbpm/pvm/pvm.cache.xml" usage="nonstrict-read-write" />
+ </hibernate-configuration>
+
+ <hibernate-session-factory />
+ <variable-types>
+ <type name="date" class="java.util.Date" variable-class="org.jbpm.pvm.internal.type.variable.DateVariable" />
+ </variable-types>
+ </environment-factory>
+
+ <environment>
+
+ <transaction />
+ <hibernate-session />
+ <pvm-db-session />
+
+ </environment>
+
+</contexts>
Property changes on: jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/internal/db/type/environmentCustomTypes.cfg.xml
___________________________________________________________________
Name: svn:keywords
+ Id
17 years, 8 months
JBoss JBPM SVN: r1995 - in jbpm3/trunk/modules: enterprise and 7 other directories.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-08-25 08:26:59 -0400 (Mon, 25 Aug 2008)
New Revision: 1995
Modified:
jbpm3/trunk/modules/distribution/.classpath
jbpm3/trunk/modules/enterprise/.classpath
jbpm3/trunk/modules/jbpm4jsf/.classpath
jbpm3/trunk/modules/jpdl/core/.classpath
jbpm3/trunk/modules/jpdl/db/.classpath
jbpm3/trunk/modules/jpdl/examples/.classpath
jbpm3/trunk/modules/jpdl/identity/.classpath
jbpm3/trunk/modules/jpdl/simulation/.classpath
jbpm3/trunk/modules/jpdl/simulation/pom.xml
jbpm3/trunk/modules/jpdl/userguide/.classpath
Log:
Fix eclipse build
Modified: jbpm3/trunk/modules/distribution/.classpath
===================================================================
--- jbpm3/trunk/modules/distribution/.classpath 2008-08-25 11:44:37 UTC (rev 1994)
+++ jbpm3/trunk/modules/distribution/.classpath 2008-08-25 12:26:59 UTC (rev 1995)
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path=""/>
+ <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
Modified: jbpm3/trunk/modules/enterprise/.classpath
===================================================================
--- jbpm3/trunk/modules/enterprise/.classpath 2008-08-25 11:44:37 UTC (rev 1994)
+++ jbpm3/trunk/modules/enterprise/.classpath 2008-08-25 12:26:59 UTC (rev 1995)
@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path=""/>
+ <classpathentry kind="src" output="target/classes" path="src/main/java"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
+ <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
+ <classpathentry excluding="**" 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"/>
</classpath>
Modified: jbpm3/trunk/modules/jbpm4jsf/.classpath
===================================================================
--- jbpm3/trunk/modules/jbpm4jsf/.classpath 2008-08-25 11:44:37 UTC (rev 1994)
+++ jbpm3/trunk/modules/jbpm4jsf/.classpath 2008-08-25 12:26:59 UTC (rev 1995)
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path=""/>
+ <classpathentry kind="src" output="target/classes" path="src/main/java"/>
+ <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
Modified: jbpm3/trunk/modules/jpdl/core/.classpath
===================================================================
--- jbpm3/trunk/modules/jpdl/core/.classpath 2008-08-25 11:44:37 UTC (rev 1994)
+++ jbpm3/trunk/modules/jpdl/core/.classpath 2008-08-25 12:26:59 UTC (rev 1995)
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path=""/>
+ <classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
Modified: jbpm3/trunk/modules/jpdl/db/.classpath
===================================================================
--- jbpm3/trunk/modules/jpdl/db/.classpath 2008-08-25 11:44:37 UTC (rev 1994)
+++ jbpm3/trunk/modules/jpdl/db/.classpath 2008-08-25 12:26:59 UTC (rev 1995)
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path=""/>
+ <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
Modified: jbpm3/trunk/modules/jpdl/examples/.classpath
===================================================================
--- jbpm3/trunk/modules/jpdl/examples/.classpath 2008-08-25 11:44:37 UTC (rev 1994)
+++ jbpm3/trunk/modules/jpdl/examples/.classpath 2008-08-25 12:26:59 UTC (rev 1995)
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path=""/>
+ <classpathentry kind="src" path="src/test/java"/>
+ <classpathentry excluding="**" kind="src" 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"/>
</classpath>
Modified: jbpm3/trunk/modules/jpdl/identity/.classpath
===================================================================
--- jbpm3/trunk/modules/jpdl/identity/.classpath 2008-08-25 11:44:37 UTC (rev 1994)
+++ jbpm3/trunk/modules/jpdl/identity/.classpath 2008-08-25 12:26:59 UTC (rev 1995)
@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path=""/>
+ <classpathentry kind="src" output="target/classes" path="src/main/java"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
+ <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
+ <classpathentry excluding="**" 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"/>
</classpath>
Modified: jbpm3/trunk/modules/jpdl/simulation/.classpath
===================================================================
--- jbpm3/trunk/modules/jpdl/simulation/.classpath 2008-08-25 11:44:37 UTC (rev 1994)
+++ jbpm3/trunk/modules/jpdl/simulation/.classpath 2008-08-25 12:26:59 UTC (rev 1995)
@@ -1,6 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path=""/>
+ <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
+ <classpathentry excluding="**" kind="src" path="src/main/resources"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
Modified: jbpm3/trunk/modules/jpdl/simulation/pom.xml
===================================================================
--- jbpm3/trunk/modules/jpdl/simulation/pom.xml 2008-08-25 11:44:37 UTC (rev 1994)
+++ jbpm3/trunk/modules/jpdl/simulation/pom.xml 2008-08-25 12:26:59 UTC (rev 1995)
@@ -10,11 +10,8 @@
<!-- ====================================================================== -->
<!-- $Id$ -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
-
<name>JBoss jBPM - jPDL Simulation</name>
<groupId>org.jboss.jbpm</groupId>
<artifactId>jbpm-jpdl-simulation</artifactId>
@@ -42,6 +39,10 @@
<artifactId>desmoj</artifactId>
</dependency>
<dependency>
+ <groupId>dom4j</groupId>
+ <artifactId>dom4j</artifactId>
+ </dependency>
+ <dependency>
<groupId>jasperreports</groupId>
<artifactId>jasperreports</artifactId>
<exclusions>
@@ -52,18 +53,16 @@
</exclusions>
</dependency>
<dependency>
- <groupId>dom4j</groupId>
- <artifactId>dom4j</artifactId>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate</artifactId>
</dependency>
+
+ <!-- Test Dependencies -->
<dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate</artifactId>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
</dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
</dependencies>
<!-- Plugins -->
@@ -78,4 +77,4 @@
</plugin>
</plugins>
</build>
-</project>
+</project>
\ No newline at end of file
Modified: jbpm3/trunk/modules/jpdl/userguide/.classpath
===================================================================
--- jbpm3/trunk/modules/jpdl/userguide/.classpath 2008-08-25 11:44:37 UTC (rev 1994)
+++ jbpm3/trunk/modules/jpdl/userguide/.classpath 2008-08-25 12:26:59 UTC (rev 1995)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path=""/>
+ <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"/>
</classpath>
17 years, 8 months
JBoss JBPM SVN: r1994 - in jbpm3/trunk: modules and 11 other directories.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-08-25 07:44:37 -0400 (Mon, 25 Aug 2008)
New Revision: 1994
Removed:
jbpm3/trunk/modules/bamconsole/
Modified:
jbpm3/trunk/modules/console/.classpath
jbpm3/trunk/modules/distribution/.classpath
jbpm3/trunk/modules/distribution/pom.xml
jbpm3/trunk/modules/enterprise/.classpath
jbpm3/trunk/modules/jbpm4jsf/.classpath
jbpm3/trunk/modules/jpdl/core/.classpath
jbpm3/trunk/modules/jpdl/db/.classpath
jbpm3/trunk/modules/jpdl/examples/.classpath
jbpm3/trunk/modules/jpdl/identity/.classpath
jbpm3/trunk/modules/jpdl/identity/pom.xml
jbpm3/trunk/modules/jpdl/pom.xml
jbpm3/trunk/modules/jpdl/simulation/.classpath
jbpm3/trunk/modules/jpdl/simulation/pom.xml
jbpm3/trunk/modules/jpdl/userguide/.classpath
jbpm3/trunk/pom.xml
Log:
Fixing the build. Remove modules bamconsole, ws. [JBPM-1292] [JBPM-1401]
Modified: jbpm3/trunk/modules/console/.classpath
===================================================================
--- jbpm3/trunk/modules/console/.classpath 2008-08-25 10:45:32 UTC (rev 1993)
+++ jbpm3/trunk/modules/console/.classpath 2008-08-25 11:44:37 UTC (rev 1994)
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path=""/>
+ <classpathentry kind="src" output="target/classes" path="src/main/java"/>
+ <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
- <classpathentry kind="output" path="bin"/>
+ <classpathentry kind="output" path="target/classes"/>
</classpath>
Modified: jbpm3/trunk/modules/distribution/.classpath
===================================================================
--- jbpm3/trunk/modules/distribution/.classpath 2008-08-25 10:45:32 UTC (rev 1993)
+++ jbpm3/trunk/modules/distribution/.classpath 2008-08-25 11:44:37 UTC (rev 1994)
@@ -2,5 +2,5 @@
<classpath>
<classpathentry kind="src" path=""/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
- <classpathentry kind="output" path="bin"/>
+ <classpathentry kind="output" path="target/classes"/>
</classpath>
Modified: jbpm3/trunk/modules/distribution/pom.xml
===================================================================
--- jbpm3/trunk/modules/distribution/pom.xml 2008-08-25 10:45:32 UTC (rev 1993)
+++ jbpm3/trunk/modules/distribution/pom.xml 2008-08-25 11:44:37 UTC (rev 1994)
@@ -10,172 +10,162 @@
<!-- ====================================================================== -->
<!-- $Id$ -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <name>JBoss jBPM - Distribution</name>
+ <groupId>org.jboss.jbpm</groupId>
+ <artifactId>jbpm-distribution</artifactId>
+ <packaging>pom</packaging>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <name>JBoss jBPM - Distribution</name>
- <groupId>org.jboss.jbpm</groupId>
- <artifactId>jbpm-distribution</artifactId>
- <packaging>pom</packaging>
-
<!-- Parent -->
- <parent>
- <groupId>org.jboss.jbpm</groupId>
- <artifactId>jbpm</artifactId>
- <version>3.3.0-SNAPSHOT</version>
- </parent>
+ <parent>
+ <groupId>org.jboss.jbpm</groupId>
+ <artifactId>jbpm</artifactId>
+ <version>3.3.0-SNAPSHOT</version>
+ </parent>
<!-- Dependencies -->
- <dependencies>
- <dependency>
- <groupId>org.jboss.jbpm</groupId>
- <artifactId>jbpm-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.jbpm</groupId>
- <artifactId>jbpm-bam-console-ear</artifactId>
- <version>${version}</version>
- <type>ear</type>
- </dependency>
- <dependency>
- <groupId>org.jboss.jbpm</groupId>
- <artifactId>jbpm-jpdl-core</artifactId>
- <classifier>config</classifier>
- <version>${version}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.jbpm</groupId>
- <artifactId>jbpm-console</artifactId>
- <version>${version}</version>
- <type>war</type>
- </dependency>
- <dependency>
- <groupId>org.jboss.jbpm</groupId>
- <artifactId>jbpm-console</artifactId>
- <classifier>login</classifier>
- <version>${version}</version>
- <type>jar</type>
- </dependency>
- <dependency>
- <groupId>org.jboss.jbpm</groupId>
- <artifactId>jbpm-jpdl-identity</artifactId>
- <version>${version}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.jbpm</groupId>
- <artifactId>jbpm-jpdl-identity</artifactId>
- <classifier>config</classifier>
- <version>${version}</version>
- </dependency>
- <dependency>
- <groupId>izpack</groupId>
- <artifactId>standalone-compiler</artifactId>
- </dependency>
- </dependencies>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.bpm</groupId>
+ <artifactId>jboss-bpm-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.jbpm</groupId>
+ <artifactId>jbpm-jpdl-core</artifactId>
+ <classifier>config</classifier>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.jbpm</groupId>
+ <artifactId>jbpm-console</artifactId>
+ <version>${version}</version>
+ <type>war</type>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.jbpm</groupId>
+ <artifactId>jbpm-console</artifactId>
+ <classifier>login</classifier>
+ <version>${version}</version>
+ <type>jar</type>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.jbpm</groupId>
+ <artifactId>jbpm-jpdl-identity</artifactId>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.jbpm</groupId>
+ <artifactId>jbpm-jpdl-identity</artifactId>
+ <classifier>config</classifier>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
+ <groupId>izpack</groupId>
+ <artifactId>standalone-compiler</artifactId>
+ </dependency>
+ </dependencies>
<!-- Plugins -->
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <executions>
- <execution>
- <id>make-assembly</id>
- <phase>package</phase>
- <goals>
- <goal>directory-single</goal>
- </goals>
- <configuration>
- <finalName>deploy-artifacts</finalName>
- <ignoreDirFormatExtensions>true</ignoreDirFormatExtensions>
- <appendAssemblyId>false</appendAssemblyId>
- <descriptors>
- <descriptor>scripts/assembly-deploy-artifacts.xml</descriptor>
- </descriptors>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>jbpm config</id>
- <phase>package</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <tasks>
- <ant antfile="scripts/antrun-jbpm-config.xml"/>
- </tasks>
- </configuration>
- </execution>
- <execution>
- <id>installer</id>
- <phase>package</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <tasks>
- <property name="maven.runtime.classpath" refid="maven.runtime.classpath" />
- <property name="product.name" value="${project.name}" />
- <property name="product.short.name" value="${artifactId}" />
- <property name="product.version" value="${project.version}" />
- <property name="jboss421.home" value="${jboss421.home}" />
- <property name="jboss422.home" value="${jboss422.home}" />
- <property name="jboss500.home" value="${jboss500.home}" />
- <property name="jboss501.home" value="${jboss501.home}" />
- <ant antfile="scripts/antrun-installer.xml" target="installer" />
- </tasks>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>copy-dependencies</id>
- <phase>generate-resources</phase>
- <goals>
- <goal>unpack</goal>
- </goals>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>org.jboss.jbpm</groupId>
- <artifactId>jbpm-jpdl-core</artifactId>
- <version>${version}</version>
- <classifier>config</classifier>
- <type>jar</type>
- <outputDirectory>${project.build.directory}/resources/jbpm-jpdl-core</outputDirectory>
- </artifactItem>
- <artifactItem>
- <groupId>org.jboss.jbpm</groupId>
- <artifactId>jbpm-jpdl-identity</artifactId>
- <version>${version}</version>
- <classifier>config</classifier>
- <type>jar</type>
- <outputDirectory>${project.build.directory}/resources/jbpm-jpdl-identity</outputDirectory>
- </artifactItem>
- <artifactItem>
- <groupId>org.jboss.jbpm</groupId>
- <artifactId>jbpm-console</artifactId>
- <version>${version}</version>
- <classifier>login</classifier>
- <type>jar</type>
- <outputDirectory>${project.build.directory}/resources/jbpm-login</outputDirectory>
- </artifactItem>
- </artifactItems>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
-</project>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>make-assembly</id>
+ <phase>package</phase>
+ <goals>
+ <goal>directory-single</goal>
+ </goals>
+ <configuration>
+ <finalName>deploy-artifacts</finalName>
+ <ignoreDirFormatExtensions>true</ignoreDirFormatExtensions>
+ <appendAssemblyId>false</appendAssemblyId>
+ <descriptors>
+ <descriptor>scripts/assembly-deploy-artifacts.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>jbpm config</id>
+ <phase>package</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <ant antfile="scripts/antrun-jbpm-config.xml" />
+ </tasks>
+ </configuration>
+ </execution>
+ <execution>
+ <id>installer</id>
+ <phase>package</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <property name="maven.runtime.classpath" refid="maven.runtime.classpath" />
+ <property name="product.name" value="${project.name}" />
+ <property name="product.short.name" value="${artifactId}" />
+ <property name="product.version" value="${project.version}" />
+ <property name="jboss421.home" value="${jboss421.home}" />
+ <property name="jboss422.home" value="${jboss422.home}" />
+ <property name="jboss500.home" value="${jboss500.home}" />
+ <property name="jboss501.home" value="${jboss501.home}" />
+ <ant antfile="scripts/antrun-installer.xml" target="installer" />
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-dependencies</id>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>unpack</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.jboss.jbpm</groupId>
+ <artifactId>jbpm-jpdl-core</artifactId>
+ <version>${version}</version>
+ <classifier>config</classifier>
+ <type>jar</type>
+ <outputDirectory>${project.build.directory}/resources/jbpm-jpdl-core</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.jboss.jbpm</groupId>
+ <artifactId>jbpm-jpdl-identity</artifactId>
+ <version>${version}</version>
+ <classifier>config</classifier>
+ <type>jar</type>
+ <outputDirectory>${project.build.directory}/resources/jbpm-jpdl-identity</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.jboss.jbpm</groupId>
+ <artifactId>jbpm-console</artifactId>
+ <version>${version}</version>
+ <classifier>login</classifier>
+ <type>jar</type>
+ <outputDirectory>${project.build.directory}/resources/jbpm-login</outputDirectory>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Modified: jbpm3/trunk/modules/enterprise/.classpath
===================================================================
--- jbpm3/trunk/modules/enterprise/.classpath 2008-08-25 10:45:32 UTC (rev 1993)
+++ jbpm3/trunk/modules/enterprise/.classpath 2008-08-25 11:44:37 UTC (rev 1994)
@@ -2,5 +2,5 @@
<classpath>
<classpathentry kind="src" path=""/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
- <classpathentry kind="output" path="bin"/>
+ <classpathentry kind="output" path="target/classes"/>
</classpath>
Modified: jbpm3/trunk/modules/jbpm4jsf/.classpath
===================================================================
--- jbpm3/trunk/modules/jbpm4jsf/.classpath 2008-08-25 10:45:32 UTC (rev 1993)
+++ jbpm3/trunk/modules/jbpm4jsf/.classpath 2008-08-25 11:44:37 UTC (rev 1994)
@@ -2,5 +2,5 @@
<classpath>
<classpathentry kind="src" path=""/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
- <classpathentry kind="output" path="bin"/>
+ <classpathentry kind="output" path="target/classes"/>
</classpath>
Modified: jbpm3/trunk/modules/jpdl/core/.classpath
===================================================================
--- jbpm3/trunk/modules/jpdl/core/.classpath 2008-08-25 10:45:32 UTC (rev 1993)
+++ jbpm3/trunk/modules/jpdl/core/.classpath 2008-08-25 11:44:37 UTC (rev 1994)
@@ -2,5 +2,5 @@
<classpath>
<classpathentry kind="src" path=""/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
- <classpathentry kind="output" path="bin"/>
+ <classpathentry kind="output" path="target/classes"/>
</classpath>
Modified: jbpm3/trunk/modules/jpdl/db/.classpath
===================================================================
--- jbpm3/trunk/modules/jpdl/db/.classpath 2008-08-25 10:45:32 UTC (rev 1993)
+++ jbpm3/trunk/modules/jpdl/db/.classpath 2008-08-25 11:44:37 UTC (rev 1994)
@@ -2,5 +2,5 @@
<classpath>
<classpathentry kind="src" path=""/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
- <classpathentry kind="output" path="bin"/>
+ <classpathentry kind="output" path="target/classes"/>
</classpath>
Modified: jbpm3/trunk/modules/jpdl/examples/.classpath
===================================================================
--- jbpm3/trunk/modules/jpdl/examples/.classpath 2008-08-25 10:45:32 UTC (rev 1993)
+++ jbpm3/trunk/modules/jpdl/examples/.classpath 2008-08-25 11:44:37 UTC (rev 1994)
@@ -2,5 +2,5 @@
<classpath>
<classpathentry kind="src" path=""/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
- <classpathentry kind="output" path="bin"/>
+ <classpathentry kind="output" path="target/classes"/>
</classpath>
Modified: jbpm3/trunk/modules/jpdl/identity/.classpath
===================================================================
--- jbpm3/trunk/modules/jpdl/identity/.classpath 2008-08-25 10:45:32 UTC (rev 1993)
+++ jbpm3/trunk/modules/jpdl/identity/.classpath 2008-08-25 11:44:37 UTC (rev 1994)
@@ -2,5 +2,5 @@
<classpath>
<classpathentry kind="src" path=""/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
- <classpathentry kind="output" path="bin"/>
+ <classpathentry kind="output" path="target/classes"/>
</classpath>
Modified: jbpm3/trunk/modules/jpdl/identity/pom.xml
===================================================================
--- jbpm3/trunk/modules/jpdl/identity/pom.xml 2008-08-25 10:45:32 UTC (rev 1993)
+++ jbpm3/trunk/modules/jpdl/identity/pom.xml 2008-08-25 11:44:37 UTC (rev 1994)
@@ -35,7 +35,6 @@
<artifactId>jbpm-jpdl-core</artifactId>
<version>${version}</version>
</dependency>
-
<dependency>
<groupId>org.jboss.jbpm</groupId>
<artifactId>jbpm-jpdl-core</artifactId>
@@ -43,6 +42,13 @@
<version>${version}</version>
</dependency>
+ <!-- Provided Dependencies -->
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
<!-- Test Dependencies -->
<dependency>
<groupId>hsqldb</groupId>
@@ -152,4 +158,4 @@
</plugin>
</plugins>
</build>
-</project>
\ No newline at end of file
+</project>
Modified: jbpm3/trunk/modules/jpdl/pom.xml
===================================================================
--- jbpm3/trunk/modules/jpdl/pom.xml 2008-08-25 10:45:32 UTC (rev 1993)
+++ jbpm3/trunk/modules/jpdl/pom.xml 2008-08-25 11:44:37 UTC (rev 1994)
@@ -36,7 +36,6 @@
<module>identity</module>
<module>simulation</module>
<module>userguide</module>
- <module>ws</module>
</modules>
</project>
\ No newline at end of file
Modified: jbpm3/trunk/modules/jpdl/simulation/.classpath
===================================================================
--- jbpm3/trunk/modules/jpdl/simulation/.classpath 2008-08-25 10:45:32 UTC (rev 1993)
+++ jbpm3/trunk/modules/jpdl/simulation/.classpath 2008-08-25 11:44:37 UTC (rev 1994)
@@ -2,5 +2,5 @@
<classpath>
<classpathentry kind="src" path=""/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
- <classpathentry kind="output" path="bin"/>
+ <classpathentry kind="output" path="target/classes"/>
</classpath>
Modified: jbpm3/trunk/modules/jpdl/simulation/pom.xml
===================================================================
--- jbpm3/trunk/modules/jpdl/simulation/pom.xml 2008-08-25 10:45:32 UTC (rev 1993)
+++ jbpm3/trunk/modules/jpdl/simulation/pom.xml 2008-08-25 11:44:37 UTC (rev 1994)
@@ -44,6 +44,12 @@
<dependency>
<groupId>jasperreports</groupId>
<artifactId>jasperreports</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>jfree</groupId>
+ <artifactId>jfreechart</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>dom4j</groupId>
Modified: jbpm3/trunk/modules/jpdl/userguide/.classpath
===================================================================
--- jbpm3/trunk/modules/jpdl/userguide/.classpath 2008-08-25 10:45:32 UTC (rev 1993)
+++ jbpm3/trunk/modules/jpdl/userguide/.classpath 2008-08-25 11:44:37 UTC (rev 1994)
@@ -2,5 +2,5 @@
<classpath>
<classpathentry kind="src" path=""/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
- <classpathentry kind="output" path="bin"/>
+ <classpathentry kind="output" path="target/classes"/>
</classpath>
Modified: jbpm3/trunk/pom.xml
===================================================================
--- jbpm3/trunk/pom.xml 2008-08-25 10:45:32 UTC (rev 1993)
+++ jbpm3/trunk/pom.xml 2008-08-25 11:44:37 UTC (rev 1994)
@@ -31,12 +31,10 @@
<module>modules/console</module>
<module>modules/enterprise</module>
<module>modules/jbpm4jsf</module>
- <module>modules/bamconsole</module>
</modules>
<!-- Properties -->
<properties>
- <jboss.jbpm.api.version>1.0.0-SNAPSHOT</jboss.jbpm.api.version>
<apache.ant.version>1.7.0</apache.ant.version>
<apache.cactus.version>1.8.0</apache.cactus.version>
<apache.jackrabbit.version>1.4.5</apache.jackrabbit.version>
@@ -67,6 +65,7 @@
<javax.persistence.version>1.0</javax.persistence.version>
<javax.jaxb.version>2.1</javax.jaxb.version>
<jaxen.version>1.1.1</jaxen.version>
+ <jboss.bpm.api.version>1.0.0.Alpha1</jboss.bpm.api.version>
<jboss.gravel.version>1.0.0.GA</jboss.gravel.version>
<jboss.seam.version>2.0.2.GA</jboss.seam.version>
<junit.version>3.8.1</junit.version>
@@ -81,15 +80,15 @@
<dependencies>
<!-- jBPM Dependencies -->
<dependency>
- <groupId>org.jboss.jbpm</groupId>
- <artifactId>jbpm-api</artifactId>
- <version>${jboss.jbpm.api.version}</version>
+ <groupId>org.jboss.bpm</groupId>
+ <artifactId>jboss-bpm-api</artifactId>
+ <version>${jboss.bpm.api.version}</version>
</dependency>
<dependency>
- <groupId>org.jboss.jbpm</groupId>
- <artifactId>jbpm-api</artifactId>
+ <groupId>org.jboss.bpm</groupId>
+ <artifactId>jboss-bpm-api</artifactId>
<classifier>testsuite</classifier>
- <version>${jboss.jbpm.api.version}</version>
+ <version>${jboss.bpm.api.version}</version>
<type>zip</type>
</dependency>
@@ -103,7 +102,6 @@
<groupId>com.sun.facelets</groupId>
<artifactId>jsf-facelets</artifactId>
<version>${facelets.version}</version>
- <scope>runtime</scope>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
17 years, 8 months