[jbpm-commits] JBoss JBPM SVN: r3355 - in jbpm3/trunk/modules: integration/src/main/java/org/jbpm/integration/spec/model and 1 other directory.
do-not-reply at jboss.org
do-not-reply at jboss.org
Fri Dec 12 06:15:48 EST 2008
Author: thomas.diesler at jboss.com
Date: 2008-12-12 06:15:48 -0500 (Fri, 12 Dec 2008)
New Revision: 3355
Modified:
jbpm3/trunk/modules/core/src/main/java/org/jbpm/graph/exe/ProcessInstance.java
jbpm3/trunk/modules/integration/src/main/java/org/jbpm/integration/spec/model/ProcessInstanceImpl.java
Log:
Support ProcessState.Ready
Modified: jbpm3/trunk/modules/core/src/main/java/org/jbpm/graph/exe/ProcessInstance.java
===================================================================
--- jbpm3/trunk/modules/core/src/main/java/org/jbpm/graph/exe/ProcessInstance.java 2008-12-12 09:36:19 UTC (rev 3354)
+++ jbpm3/trunk/modules/core/src/main/java/org/jbpm/graph/exe/ProcessInstance.java 2008-12-12 11:15:48 UTC (rev 3355)
@@ -127,7 +127,6 @@
// initialize the members
this.processDefinition = processDefinition;
this.rootToken = new Token(this);
- this.start = Clock.getCurrentTime();
this.key = key;
// if this process instance is created in the context of a persistent operation
@@ -179,6 +178,8 @@
public void fireStartEvent(Node initialNode)
{
+ this.start = Clock.getCurrentTime();
+
// fire the process start event
if (initialNode != null)
{
Modified: jbpm3/trunk/modules/integration/src/main/java/org/jbpm/integration/spec/model/ProcessInstanceImpl.java
===================================================================
--- jbpm3/trunk/modules/integration/src/main/java/org/jbpm/integration/spec/model/ProcessInstanceImpl.java 2008-12-12 09:36:19 UTC (rev 3354)
+++ jbpm3/trunk/modules/integration/src/main/java/org/jbpm/integration/spec/model/ProcessInstanceImpl.java 2008-12-12 11:15:48 UTC (rev 3355)
@@ -108,7 +108,8 @@
org.jbpm.graph.exe.ProcessInstance oldProcInst = getDelegate();
- ProcessStatus status = ProcessStatus.None;
+ long procID = oldProcInst.getId();
+ ProcessStatus status = procID > 0 ? ProcessStatus.Ready : ProcessStatus.None;
if (oldProcInst.getStart() != null)
status = ProcessStatus.Active;
@@ -183,7 +184,7 @@
ExecutionContext bpmContext = ctxService.getExecutionContext(true);
try
{
- // Register the Process
+ // Register the Process implicitly
ProcessInstanceService procService = getProcessEngine().getService(ProcessInstanceService.class);
if (procService.getInstance(getKey()) == null)
procService.registerInstance(this);
More information about the jbpm-commits
mailing list