From 04048a6c4026b47fc6c372e792ffb60726baee56 Mon Sep 17 00:00:00 2001 From: Andrew Branson Date: Thu, 24 Oct 2013 13:12:52 +0200 Subject: Clear of exceptions --- .../com/c2kernel/lifecycle/instance/WfVertex.java | 29 ++++++++++++++++++---- 1 file changed, 24 insertions(+), 5 deletions(-) (limited to 'src/main/java/com/c2kernel/lifecycle/instance/WfVertex.java') diff --git a/src/main/java/com/c2kernel/lifecycle/instance/WfVertex.java b/src/main/java/com/c2kernel/lifecycle/instance/WfVertex.java index b0872c2..271e8df 100644 --- a/src/main/java/com/c2kernel/lifecycle/instance/WfVertex.java +++ b/src/main/java/com/c2kernel/lifecycle/instance/WfVertex.java @@ -4,8 +4,12 @@ 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.PersistencyException; import com.c2kernel.graph.model.GraphableVertex; import com.c2kernel.lifecycle.routingHelpers.ViewpointDataHelper; import com.c2kernel.lookup.AgentPath; @@ -25,8 +29,13 @@ 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 */ - public abstract void runFirst(AgentPath agent, int itemSysKey) throws ScriptingEngineException, InvalidDataException; + * @throws InvalidDataException + * @throws ObjectAlreadyExistsException + * @throws ObjectNotFoundException + * @throws AccessRightsException + * @throws InvalidTransitionException + * @throws PersistencyException */ + public abstract void runFirst(AgentPath agent, int itemSysKey) throws ScriptingEngineException, InvalidDataException, InvalidTransitionException, AccessRightsException, ObjectNotFoundException, ObjectAlreadyExistsException, PersistencyException; /** * @see java.lang.Object#Object() @@ -41,12 +50,17 @@ public abstract class WfVertex extends GraphableVertex /** * Method runNext. * @throws InvalidDataException + * @throws ObjectNotFoundException + * @throws AccessRightsException + * @throws InvalidTransitionException + * @throws PersistencyException + * @throws ObjectAlreadyExistsException */ - public void runNext(AgentPath agent, int itemSysKey) throws InvalidDataException + public void runNext(AgentPath agent, int itemSysKey) throws InvalidDataException, InvalidTransitionException, AccessRightsException, ObjectNotFoundException, PersistencyException { try { - ((CompositeActivity)getParent()).request(agent, Transitions.COMPLETE, null); + ((CompositeActivity)getParent()).request(agent, itemSysKey, CompositeActivity.COMPLETE, null); } catch (Exception e) { @@ -78,8 +92,13 @@ public abstract class WfVertex extends GraphableVertex /** * Method run. * @throws InvalidDataException + * @throws ObjectAlreadyExistsException + * @throws ObjectNotFoundException + * @throws AccessRightsException + * @throws InvalidTransitionException + * @throws PersistencyException */ - public abstract void run(AgentPath agent, int itemSysKey) throws InvalidDataException; + public abstract void run(AgentPath agent, int itemSysKey) throws InvalidDataException, InvalidTransitionException, AccessRightsException, ObjectNotFoundException, PersistencyException; /** * Method loop. -- cgit v1.2.3