From 0ec8481c10cd8277d84c7c1a785483a0a739e5a0 Mon Sep 17 00:00:00 2001 From: abranson Date: Thu, 4 Aug 2011 00:42:34 +0200 Subject: More code cleanup: Refactored Entity Proxy Subscription to handle generics better Rewrote RemoteMap to use TreeMap instead of the internal array for order. It now sorts its keys by number if they parse, else as strings. Removed a no-longer-in-progress outcome form class --- .../com/c2kernel/lifecycle/instance/Activity.java | 36 +++++++++++----------- 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'source/com/c2kernel/lifecycle/instance/Activity.java') diff --git a/source/com/c2kernel/lifecycle/instance/Activity.java b/source/com/c2kernel/lifecycle/instance/Activity.java index a0df570..226f0af 100644 --- a/source/com/c2kernel/lifecycle/instance/Activity.java +++ b/source/com/c2kernel/lifecycle/instance/Activity.java @@ -101,6 +101,7 @@ public class Activity extends WfVertex /** * adds a New link between the current Activity and the WfVertex passed in param */ + @Override public Next addNext(WfVertex vertex) { return new Next(this, vertex); @@ -188,13 +189,6 @@ public class Activity extends WfVertex || transitionID == Transitions.PROCEED) try { - try - { - GTimeStamp t = DateUtility.setToNow(new GTimeStamp()); - } - catch (Exception e) - { - } runNext(agent); } catch (ScriptingEngineException e) @@ -258,6 +252,7 @@ public class Activity extends WfVertex return result; } /** launch the verification of the activity */ + @Override public boolean verify() { mErrors.removeAllElements(); @@ -306,6 +301,7 @@ public class Activity extends WfVertex return true; } /** Used in verify() */ + @Override public boolean loop() { boolean loop2 = false; @@ -319,6 +315,7 @@ public class Activity extends WfVertex return loop2; } /** sets the next activity available if possible */ + @Override public void runNext(AgentPath agent) throws ScriptingEngineException { setActive(false); @@ -372,6 +369,7 @@ public class Activity extends WfVertex return null; } /** reinitialises the Activity and propagate (for Loop) */ + @Override public void reinit(int idLoop) { Logger.debug(7, "reinit " + getItemEntityPath().getSysKey() + " " + getPath()); @@ -384,16 +382,17 @@ public class Activity extends WfVertex } } /** return the String that identifies the errors found in th activity */ + @Override public String getErrors() { - String errors = ""; if (mErrors.size() == 0) return "No error"; - return (String) mErrors.elementAt(0); + return mErrors.elementAt(0); } /** * called by precedent Activity runNext() for setting the activity able to be executed */ + @Override public void run(AgentPath agent) throws ScriptingEngineException { Logger.debug(8, getPath() + " run " + getCurrentState()); @@ -418,6 +417,7 @@ public class Activity extends WfVertex /** * sets the activity available to be executed on start of Workflow or composite activity (when it is the first one of the (sub)process */ + @Override public void runfirst(AgentPath agent) throws ScriptingEngineException { Logger.debug(8, getPath() + " runfirst"); @@ -613,7 +613,7 @@ public class Activity extends WfVertex { String agentRole = getCurrentAgentRole(); if (agentRole == null || agentRole.length()==0) return; - + LDAPRoleManager roleMan = Gateway.getLDAPLookup().getRoleManager(); RolePath myRole; try { @@ -625,12 +625,12 @@ public class Activity extends WfVertex if (myRole.hasJobList()) new JobPusher(this, myRole).start(); - } - + } + /** * Returns the activeDate. - * + * * @return GTimeStamp */ public GTimeStamp getActiveDate() @@ -638,7 +638,7 @@ public class Activity extends WfVertex return mActiveDate; } /** * Returns the startDate. - * + * * @return GTimeStamp */ public GTimeStamp getStartDate() @@ -646,7 +646,7 @@ public class Activity extends WfVertex return mStartDate; } /** * Sets the activeDate. - * + * * @param activeDate * The activeDate to set */ @@ -655,7 +655,7 @@ public class Activity extends WfVertex mActiveDate = activeDate; } /** * Sets the startDate. - * + * * @param startDate * The startDate to set */ @@ -664,7 +664,7 @@ public class Activity extends WfVertex mStartDate = startDate; } /** * Returns the type. - * + * * @return String */ public String getType() @@ -672,7 +672,7 @@ public class Activity extends WfVertex return mType; } /** * Sets the type. - * + * * @param type * The type to set */ -- cgit v1.2.3