summaryrefslogtreecommitdiff
path: root/src/main/java/com/c2kernel/lifecycle/instance/WfVertex.java
diff options
context:
space:
mode:
authorAndrew Branson <andrew.branson@cern.ch>2014-09-09 12:13:21 +0200
committerAndrew Branson <andrew.branson@cern.ch>2014-09-09 12:13:21 +0200
commitda731d2bb81666b9c697d9099da632e7dfcdc0f7 (patch)
tree567693c3c48f3d15ecbb2dac4f9db03bb6e58c72 /src/main/java/com/c2kernel/lifecycle/instance/WfVertex.java
parentae1e79e33fd30e3d8bcedbef8891a14a048276d7 (diff)
Replaced int sysKey Item identifier with UUID, which is now portable.
ItemPath objects are now used to identify Items throughout the kernel, replacing ints and Integers.
Diffstat (limited to 'src/main/java/com/c2kernel/lifecycle/instance/WfVertex.java')
-rw-r--r--src/main/java/com/c2kernel/lifecycle/instance/WfVertex.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/main/java/com/c2kernel/lifecycle/instance/WfVertex.java b/src/main/java/com/c2kernel/lifecycle/instance/WfVertex.java
index 2f0ef0d..c2596f8 100644
--- a/src/main/java/com/c2kernel/lifecycle/instance/WfVertex.java
+++ b/src/main/java/com/c2kernel/lifecycle/instance/WfVertex.java
@@ -35,7 +35,7 @@ public abstract class WfVertex extends GraphableVertex
* @throws AccessRightsException
* @throws InvalidTransitionException
* @throws PersistencyException */
- public abstract void runFirst(AgentPath agent, int itemSysKey) throws ScriptingEngineException, InvalidDataException, InvalidTransitionException, AccessRightsException, ObjectNotFoundException, ObjectAlreadyExistsException, PersistencyException;
+ public abstract void runFirst(AgentPath agent, ItemPath itemPath) throws ScriptingEngineException, InvalidDataException, InvalidTransitionException, AccessRightsException, ObjectNotFoundException, ObjectAlreadyExistsException, PersistencyException;
/**
* @see java.lang.Object#Object()
@@ -56,11 +56,11 @@ public abstract class WfVertex extends GraphableVertex
* @throws PersistencyException
* @throws ObjectAlreadyExistsException
*/
- public void runNext(AgentPath agent, int itemSysKey) throws InvalidDataException, InvalidTransitionException, AccessRightsException, ObjectNotFoundException, PersistencyException
+ public void runNext(AgentPath agent, ItemPath itemPath) throws InvalidDataException, InvalidTransitionException, AccessRightsException, ObjectNotFoundException, PersistencyException
{
try
{
- ((CompositeActivity)getParent()).request(agent, itemSysKey, CompositeActivity.COMPLETE, null);
+ ((CompositeActivity)getParent()).request(agent, itemPath, CompositeActivity.COMPLETE, null);
}
catch (Exception e)
{
@@ -98,7 +98,7 @@ public abstract class WfVertex extends GraphableVertex
* @throws InvalidTransitionException
* @throws PersistencyException
*/
- public abstract void run(AgentPath agent, int itemSysKey) throws InvalidDataException, InvalidTransitionException, AccessRightsException, ObjectNotFoundException, PersistencyException;
+ public abstract void run(AgentPath agent, ItemPath itemPath) throws InvalidDataException, InvalidTransitionException, AccessRightsException, ObjectNotFoundException, PersistencyException;
/**
* Method loop.
@@ -112,7 +112,7 @@ public abstract class WfVertex extends GraphableVertex
*/
public abstract Next addNext(WfVertex vertex);
- protected Object evaluateScript(String scriptName, Integer scriptVersion, int itemSysKey) throws ScriptingEngineException
+ protected Object evaluateScript(String scriptName, Integer scriptVersion, ItemPath itemPath) throws ScriptingEngineException
{
try
@@ -131,7 +131,7 @@ public abstract class WfVertex extends GraphableVertex
{
value = value.substring(11);
if (value.startsWith("."))
- value = itemSysKey + value.substring(1);
+ value = itemPath.getUUID() + value.substring(1);
try {
inputParam = ViewpointDataHelper.get(value)[0];
} catch (ArrayIndexOutOfBoundsException ex) {
@@ -142,7 +142,7 @@ public abstract class WfVertex extends GraphableVertex
{
value = value.substring(10);
try {
- inputParam = Gateway.getStorage().get(itemSysKey, ClusterStorage.PROPERTY+"/"+value, null);
+ inputParam = Gateway.getStorage().get(itemPath, ClusterStorage.PROPERTY+"/"+value, null);
} catch (ObjectNotFoundException ex) {
inputParam = null;
}
@@ -154,7 +154,7 @@ public abstract class WfVertex extends GraphableVertex
//TODO: is this right?
if (requiredInput.containsKey("item")) {
- script.setInputParamValue("item", Gateway.getProxyManager().getProxy(new ItemPath(itemSysKey)));
+ script.setInputParamValue("item", Gateway.getProxyManager().getProxy(itemPath));
}
if (requiredInput.containsKey("agent")) {
AgentPath systemAgent = Gateway.getLookup().getAgentPath("system");