Author: thomas.diesler(a)jboss.com
Date: 2008-07-11 10:17:34 -0400 (Fri, 11 Jul 2008)
New Revision: 1588
Modified:
jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/graph/def/Node.java
jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/model/EndEventImpl.java
jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/model/ProcessImpl.java
jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/model/StartEventImpl.java
jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/model/TaskImpl.java
Log:
Remove implObject from API
Modified: jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/graph/def/Node.java
===================================================================
--- jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/graph/def/Node.java 2008-07-11
14:17:25 UTC (rev 1587)
+++ jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/graph/def/Node.java 2008-07-11
14:17:34 UTC (rev 1588)
@@ -416,7 +416,7 @@
ProcessImpl proc =
(ProcessImpl)ctxInst.getTransientVariable(Process.class.getName());
if (proc != null)
{
- FlowObject fo = proc.findFlowObject(this);
+ FlowObject fo = proc.findFlowObject(getName());
if (fo == null)
throw new IllegalStateException("Cannot find flow object: " +
getName());
Modified:
jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/model/EndEventImpl.java
===================================================================
---
jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/model/EndEventImpl.java 2008-07-11
14:17:25 UTC (rev 1587)
+++
jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/model/EndEventImpl.java 2008-07-11
14:17:34 UTC (rev 1588)
@@ -25,7 +25,6 @@
import org.jboss.bpm.model.EndEvent;
import org.jboss.bpm.model.Process;
-import org.jbpm.graph.def.GraphElement;
import org.jbpm.graph.def.Node;
/**
@@ -36,20 +35,20 @@
*/
public class EndEventImpl extends EndEvent
{
+ private Node oldNode;
+
EndEventImpl(Process proc, Node oldNode)
{
- setImplObject(oldNode);
+ this.oldNode = oldNode;
}
public String getName()
{
- GraphElement oldEl = (GraphElement)getImplObject();
- return oldEl.getName();
+ return oldNode.getName();
}
public void setName(String name)
{
- GraphElement oldEl = (GraphElement)getImplObject();
- oldEl.setName(name);
+ oldNode.setName(name);
}
}
Modified:
jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/model/ProcessImpl.java
===================================================================
---
jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/model/ProcessImpl.java 2008-07-11
14:17:25 UTC (rev 1587)
+++
jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/model/ProcessImpl.java 2008-07-11
14:17:34 UTC (rev 1588)
@@ -26,7 +26,6 @@
import org.jboss.bpm.model.FlowObject;
import org.jboss.bpm.model.Process;
import org.jboss.bpm.runtime.Token;
-import org.jbpm.graph.def.GraphElement;
import org.jbpm.graph.def.ProcessDefinition;
import org.jbpm.graph.exe.Execution;
@@ -38,9 +37,11 @@
*/
public class ProcessImpl extends Process
{
+ private ProcessDefinition oldPD;
+
public ProcessImpl(ProcessDefinition oldPD)
{
- setImplObject(oldPD);
+ this.oldPD = oldPD;
init(oldPD.getName());
}
@@ -50,30 +51,14 @@
super.addFlowObject(flowObject);
}
- public FlowObject findFlowObject(GraphElement graphElement)
- {
- FlowObject fo = null;
- for (FlowObject aux : getFlowObjects())
- {
- if (((FlowObject)aux).getImplObject() == graphElement)
- {
- fo = aux;
- break;
- }
- }
- return fo;
- }
-
public String getName()
{
- GraphElement oldEl = (GraphElement)getImplObject();
- return oldEl.getName();
+ return oldPD.getName();
}
public void setName(String name)
{
- GraphElement oldEl = (GraphElement)getImplObject();
- oldEl.setName(name);
+ oldPD.setName(name);
}
public void executeOverwrite(Token token)
Modified:
jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/model/StartEventImpl.java
===================================================================
---
jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/model/StartEventImpl.java 2008-07-11
14:17:25 UTC (rev 1587)
+++
jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/model/StartEventImpl.java 2008-07-11
14:17:34 UTC (rev 1588)
@@ -27,7 +27,6 @@
import org.jboss.bpm.model.StartEvent;
import org.jboss.bpm.runtime.Token;
import org.jbpm.context.exe.ContextInstance;
-import org.jbpm.graph.def.GraphElement;
import org.jbpm.graph.def.Node;
import org.jbpm.graph.exe.Execution;
import org.jbpm.integration.runtime.ExecutionContextImpl;
@@ -40,11 +39,12 @@
*/
public class StartEventImpl extends StartEvent
{
+ private Node oldNode;
private Execution oldEx;
StartEventImpl(Process proc, Node oldNode)
{
- setImplObject(oldNode);
+ this.oldNode = oldNode;
}
@Override
@@ -58,8 +58,7 @@
protected void executeOverwrite(Token token)
{
// Create a new Execution and copy the attachments
- GraphElement oldEl = (GraphElement)getImplObject();
- oldEx = new Execution(oldEl.getProcessDefinition());
+ oldEx = new Execution(oldNode.getProcessDefinition());
ContextInstance ctxInst = oldEx.getContextInstance();
new ExecutionContextImpl(ctxInst).copyAttachments(token.getExecutionContext());
ctxInst.setTransientVariable(Process.class.getName(), getProcess());
Modified:
jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/model/TaskImpl.java
===================================================================
---
jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/model/TaskImpl.java 2008-07-11
14:17:25 UTC (rev 1587)
+++
jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/integration/model/TaskImpl.java 2008-07-11
14:17:34 UTC (rev 1588)
@@ -26,7 +26,6 @@
import org.jboss.bpm.model.Process;
import org.jboss.bpm.model.Task;
import org.jboss.bpm.runtime.Token;
-import org.jbpm.graph.def.GraphElement;
import org.jbpm.graph.def.Node;
/**
@@ -37,11 +36,12 @@
*/
public class TaskImpl extends Task
{
+ private Node oldNode;
private Task delegate;
TaskImpl(Process proc, Node oldNode, Task task)
{
- setImplObject(oldNode);
+ this.oldNode = oldNode;
this.delegate = task;
}
@@ -57,14 +57,12 @@
public String getName()
{
- GraphElement oldEl = (GraphElement)getImplObject();
- return oldEl.getName();
+ return oldNode.getName();
}
public void setName(String name)
{
- GraphElement oldEl = (GraphElement)getImplObject();
- oldEl.setName(name);
+ oldNode.setName(name);
}
@Override