diff options
| author | Andrew Branson <andrew.branson@cern.ch> | 2014-10-03 17:30:41 +0200 |
|---|---|---|
| committer | Andrew Branson <andrew.branson@cern.ch> | 2014-10-03 17:30:41 +0200 |
| commit | 275d0bbf555c8917be82ce4cc21eb4cabb00f4c5 (patch) | |
| tree | ddcc6b14077d90d1b970b67829f07120547dbb62 /src/main/java/com/c2kernel/lifecycle/instance/WfVertex.java | |
| parent | a139f95bfeca603333b8c0310ae09c6805e58584 (diff) | |
Huge exception overhaul: Merged ClusterStorageException with
PersistencyException. Replaced MembershipException with
InvalidCollectionModification CORBA Exception. Made all predef steps
throw more accurate exceptions when they go wrong, and let more
exceptions bubble through from underneath.
Diffstat (limited to 'src/main/java/com/c2kernel/lifecycle/instance/WfVertex.java')
| -rw-r--r-- | src/main/java/com/c2kernel/lifecycle/instance/WfVertex.java | 54 |
1 files changed, 29 insertions, 25 deletions
diff --git a/src/main/java/com/c2kernel/lifecycle/instance/WfVertex.java b/src/main/java/com/c2kernel/lifecycle/instance/WfVertex.java index 12cfa4e..7eb61a6 100644 --- a/src/main/java/com/c2kernel/lifecycle/instance/WfVertex.java +++ b/src/main/java/com/c2kernel/lifecycle/instance/WfVertex.java @@ -25,10 +25,11 @@ package com.c2kernel.lifecycle.instance; import java.util.HashMap;
import com.c2kernel.common.AccessRightsException;
-import com.c2kernel.common.InvalidDataException;
-import com.c2kernel.common.InvalidTransitionException;
-import com.c2kernel.common.ObjectAlreadyExistsException;
-import com.c2kernel.common.ObjectNotFoundException;
+import com.c2kernel.common.InvalidData;
+import com.c2kernel.common.InvalidTransition;
+import com.c2kernel.common.ObjectAlreadyExists;
+import com.c2kernel.common.ObjectCannotBeUpdated;
+import com.c2kernel.common.ObjectNotFound;
import com.c2kernel.common.PersistencyException;
import com.c2kernel.graph.model.GraphableVertex;
import com.c2kernel.lifecycle.routingHelpers.ViewpointDataHelper;
@@ -49,13 +50,14 @@ public abstract class WfVertex extends GraphableVertex {
/**sets the activity available to be executed on start of Workflow or composite activity (when it is the first one of the
* (sub)process
- * @throws InvalidDataException
- * @throws ObjectAlreadyExistsException
- * @throws ObjectNotFoundException
+ * @throws InvalidData
+ * @throws ObjectAlreadyExists
+ * @throws ObjectNotFound
* @throws AccessRightsException
- * @throws InvalidTransitionException
- * @throws PersistencyException */
- public abstract void runFirst(AgentPath agent, ItemPath itemPath) throws ScriptingEngineException, InvalidDataException, InvalidTransitionException, AccessRightsException, ObjectNotFoundException, ObjectAlreadyExistsException, PersistencyException;
+ * @throws InvalidTransition
+ * @throws PersistencyException
+ * @throws ObjectCannotBeUpdated */
+ public abstract void runFirst(AgentPath agent, ItemPath itemPath) throws InvalidData;
/**
* @see java.lang.Object#Object()
@@ -69,14 +71,15 @@ public abstract class WfVertex extends GraphableVertex /**
* Method runNext.
- * @throws InvalidDataException
- * @throws ObjectNotFoundException
+ * @throws InvalidData
+ * @throws ObjectNotFound
* @throws AccessRightsException
- * @throws InvalidTransitionException
+ * @throws InvalidTransition
* @throws PersistencyException
- * @throws ObjectAlreadyExistsException
+ * @throws ObjectAlreadyExists
+ * @throws ObjectCannotBeUpdated
*/
- public void runNext(AgentPath agent, ItemPath itemPath) throws InvalidDataException, InvalidTransitionException, AccessRightsException, ObjectNotFoundException, PersistencyException
+ public void runNext(AgentPath agent, ItemPath itemPath) throws InvalidData
{
try
{
@@ -92,10 +95,10 @@ public abstract class WfVertex extends GraphableVertex /**
* Method reinit.
* @param idLoop
- * @throws InvalidDataException
- * @throws ObjectNotFoundException
+ * @throws InvalidData
+ * @throws ObjectNotFound
*/
- public abstract void reinit( int idLoop ) throws InvalidDataException;
+ public abstract void reinit( int idLoop ) throws InvalidData;
/**
* Method verify.
@@ -111,14 +114,15 @@ public abstract class WfVertex extends GraphableVertex /**
* Method run.
- * @throws InvalidDataException
- * @throws ObjectAlreadyExistsException
- * @throws ObjectNotFoundException
+ * @throws InvalidData
+ * @throws ObjectAlreadyExists
+ * @throws ObjectNotFound
* @throws AccessRightsException
- * @throws InvalidTransitionException
+ * @throws InvalidTransition
* @throws PersistencyException
+ * @throws ObjectCannotBeUpdated
*/
- public abstract void run(AgentPath agent, ItemPath itemPath) throws InvalidDataException, InvalidTransitionException, AccessRightsException, ObjectNotFoundException, PersistencyException;
+ public abstract void run(AgentPath agent, ItemPath itemPath) throws InvalidData;
/**
* Method loop.
@@ -155,7 +159,7 @@ public abstract class WfVertex extends GraphableVertex try {
inputParam = ViewpointDataHelper.get(value)[0];
} catch (ArrayIndexOutOfBoundsException ex) {
- throw new InvalidDataException("Could not retrieve data from viewpoint: "+value, "");
+ throw new InvalidData("Could not retrieve data from viewpoint: "+value);
}
}
if (value.startsWith("property//"))
@@ -163,7 +167,7 @@ public abstract class WfVertex extends GraphableVertex value = value.substring(10);
try {
inputParam = Gateway.getStorage().get(itemPath, ClusterStorage.PROPERTY+"/"+value, null);
- } catch (ObjectNotFoundException ex) {
+ } catch (ObjectNotFound ex) {
inputParam = null;
}
}
|
