summaryrefslogtreecommitdiff
path: root/src/main/java/com/c2kernel/lifecycle/instance/Join.java
diff options
context:
space:
mode:
authorAndrew Branson <andrew.branson@cern.ch>2013-11-18 09:48:03 +0100
committerAndrew Branson <andrew.branson@cern.ch>2013-11-18 17:25:00 +0100
commitd43164830403245353080f5d6f838ed9f56d9a35 (patch)
treed880c9103fb61f5ef39f1723c4dbd634d5d83b67 /src/main/java/com/c2kernel/lifecycle/instance/Join.java
parent37a3c3867cb4c7705065ed1d079bdac4f3f52f50 (diff)
3.0-SNAPSHOT (Will be first open source version)
New StateMachine desc IssueID #28
Diffstat (limited to 'src/main/java/com/c2kernel/lifecycle/instance/Join.java')
-rw-r--r--src/main/java/com/c2kernel/lifecycle/instance/Join.java63
1 files changed, 26 insertions, 37 deletions
diff --git a/src/main/java/com/c2kernel/lifecycle/instance/Join.java b/src/main/java/com/c2kernel/lifecycle/instance/Join.java
index 3a4fd7d..7f50ece 100644
--- a/src/main/java/com/c2kernel/lifecycle/instance/Join.java
+++ b/src/main/java/com/c2kernel/lifecycle/instance/Join.java
@@ -1,10 +1,14 @@
package com.c2kernel.lifecycle.instance;
import java.util.Vector;
+import com.c2kernel.common.AccessRightsException;
+import com.c2kernel.common.InvalidDataException;
+import com.c2kernel.common.InvalidTransitionException;
+import com.c2kernel.common.ObjectNotFoundException;
+import com.c2kernel.common.PersistencyException;
import com.c2kernel.graph.model.Vertex;
import com.c2kernel.graph.traversal.GraphTraversal;
import com.c2kernel.lookup.AgentPath;
-import com.c2kernel.scripting.ScriptingEngineException;
/**
* @version $Revision: 1.52 $ $Date: 2005/05/10 15:14:54 $
* @author $Author: abranson $
@@ -22,12 +26,17 @@ public class Join extends WfVertex
}
private boolean loopTested;
public int counter = 0;
- private String mItemSystemKey = "";
+
/**
+ * @throws InvalidDataException
+ * @throws ObjectNotFoundException
+ * @throws AccessRightsException
+ * @throws InvalidTransitionException
+ * @throws PersistencyException
* @see com.c2kernel.lifecycle.instance.WfVertex#runNext()
*/
@Override
- public void runNext(AgentPath agent) throws ScriptingEngineException
+ public void runNext(AgentPath agent, int itemSysKey) throws InvalidDataException, InvalidTransitionException, AccessRightsException, ObjectNotFoundException, PersistencyException
{
AdvancementCalculator adv = new AdvancementCalculator();
adv.calculate((CompositeActivity) getParent());
@@ -37,10 +46,10 @@ public class Join extends WfVertex
if (outVertices.length > 0)
{
WfVertex nextAct = (WfVertex) outVertices[0];
- nextAct.run(agent);
+ nextAct.run(agent, itemSysKey);
}
else
- super.runNext(agent);
+ super.runNext(agent, itemSysKey);
}
}
/**
@@ -53,10 +62,11 @@ public class Join extends WfVertex
new Next(this, (WfVertex) getParent().search(idNext));
}
/**
+ * @throws InvalidDataException
* @see com.c2kernel.lifecycle.instance.WfVertex#reinit(int)
*/
@Override
- public void reinit(int idLoop)
+ public void reinit(int idLoop) throws InvalidDataException
{
Vertex[] outVertices = getOutGraphables();
if (outVertices.length == 1)
@@ -65,33 +75,7 @@ public class Join extends WfVertex
nextAct.reinit(idLoop);
}
}
- /**
- * Method getItemSystemKey.
- *
- * @return String
- */
- /*
- * public CompositeActivity process() { return parent.process(); }
- */
- public String getItemSystemKey()
- {
- return mItemSystemKey;
- }
- /**
- * Method setItemSystemKey.
- *
- * @param itemSystemKey
- */
- public void setItemSystemKey(String itemSystemKey)
- {
- mItemSystemKey = itemSystemKey;
- }
- /**
- * @see com.c2kernel.lifecycle.instance.WfVertex#verify()
- */
- // public void initItemSystemKey(String systemKey) {
- // this.setItemSystemKey(systemKey);
- // }
+
@Override
public boolean verify()
{
@@ -165,12 +149,17 @@ public class Join extends WfVertex
return mErrors.elementAt(0);
}
/**
+ * @throws InvalidDataException
+ * @throws ObjectNotFoundException
+ * @throws AccessRightsException
+ * @throws InvalidTransitionException
+ * @throws PersistencyException
* @see com.c2kernel.lifecycle.instance.WfVertex#run()
*/
@Override
- public void run(AgentPath agent) throws ScriptingEngineException
+ public void run(AgentPath agent, int itemSysKey) throws InvalidDataException, InvalidTransitionException, AccessRightsException, ObjectNotFoundException, PersistencyException
{
- runNext(agent);
+ runNext(agent, itemSysKey);
}
/**
* @see com.c2kernel.lifecycle.instance.WfVertex#addNext(com.c2kernel.lifecycle.instance.WfVertex)
@@ -199,9 +188,9 @@ public class Join extends WfVertex
return loop2;
}
@Override
- public void runfirst(AgentPath agent) throws ScriptingEngineException
+ public void runFirst(AgentPath agent, int itemSysKey) throws InvalidDataException, InvalidTransitionException, AccessRightsException, ObjectNotFoundException, PersistencyException
{
- runNext(agent);
+ runNext(agent, itemSysKey);
}
/*
* (non-Javadoc)