From d43164830403245353080f5d6f838ed9f56d9a35 Mon Sep 17 00:00:00 2001 From: Andrew Branson Date: Mon, 18 Nov 2013 09:48:03 +0100 Subject: 3.0-SNAPSHOT (Will be first open source version) New StateMachine desc IssueID #28 --- .../com/c2kernel/lifecycle/instance/Split.java | 56 ++++++++-------------- 1 file changed, 21 insertions(+), 35 deletions(-) (limited to 'src/main/java/com/c2kernel/lifecycle/instance/Split.java') diff --git a/src/main/java/com/c2kernel/lifecycle/instance/Split.java b/src/main/java/com/c2kernel/lifecycle/instance/Split.java index 4fe1bfc..a123391 100644 --- a/src/main/java/com/c2kernel/lifecycle/instance/Split.java +++ b/src/main/java/com/c2kernel/lifecycle/instance/Split.java @@ -2,10 +2,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.47 $ $Date: 2006/05/29 13:17:45 $ @@ -27,13 +31,16 @@ public abstract class Split extends WfVertex private boolean loopTested; - private int mItemSystemKey = -1; - /** + * @throws InvalidDataException + * @throws ObjectNotFoundException + * @throws AccessRightsException + * @throws InvalidTransitionException + * @throws PersistencyException * @see com.c2kernel.lifecycle.instance.WfVertex#runNext() */ @Override - public abstract void runNext(AgentPath agent) throws ScriptingEngineException; + public abstract void runNext(AgentPath agent, int itemSysKey) throws InvalidDataException, InvalidTransitionException, AccessRightsException, ObjectNotFoundException, PersistencyException; /** * Method addNext. @@ -64,34 +71,8 @@ public abstract class Split extends WfVertex return nxt; } - /** - * Method getItemSystemKey. - * - * @return int - */ - public int getItemSystemKey() - { - return mItemSystemKey; - } - - /** - * Method setItemSystemKey. - * - * @param itemSystemKey - */ - public void setItemSystemKey(int itemSystemKey) - { - mItemSystemKey = itemSystemKey; - } - - /** - * @see com.c2kernel.lifecycle.instance.WfVertex#reinit(int) - */ - // public void initItemSystemKey(String systemKey) { - // setItemSystemKey(systemKey); - // } @Override - public void reinit(int idLoop) + public void reinit(int idLoop) throws InvalidDataException { Vertex[] outVertices = getOutGraphables(); for (Vertex outVertice : outVertices) @@ -165,12 +146,17 @@ public abstract class Split extends WfVertex } /** + * @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); } /** @@ -217,9 +203,9 @@ public abstract class Split extends WfVertex } @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); } } \ No newline at end of file -- cgit v1.2.3