summaryrefslogtreecommitdiff
path: root/source/com/c2kernel/lifecycle/instance/Activity.java
diff options
context:
space:
mode:
authorabranson <andrew.branson@cern.ch>2011-08-04 00:42:34 +0200
committerabranson <andrew.branson@cern.ch>2011-08-04 00:42:34 +0200
commit0ec8481c10cd8277d84c7c1a785483a0a739e5a0 (patch)
tree5f6e5d9ae75193e67e6f3b3dfa488960c5cde1d5 /source/com/c2kernel/lifecycle/instance/Activity.java
parent036cbdba66f804743c4c838ed598d6972c4b3e17 (diff)
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
Diffstat (limited to 'source/com/c2kernel/lifecycle/instance/Activity.java')
-rw-r--r--source/com/c2kernel/lifecycle/instance/Activity.java36
1 files changed, 18 insertions, 18 deletions
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
*/