diff options
| author | Andrew Branson <andrew.branson@cern.ch> | 2013-09-17 08:54:33 +0200 |
|---|---|---|
| committer | Andrew Branson <andrew.branson@cern.ch> | 2013-09-17 08:54:33 +0200 |
| commit | 8b32fe15554c0103585321c3d397f6e46dd451b4 (patch) | |
| tree | fbf5f86108d61cafc362bebeceda85a71b8dc0bb /src/main/java/com/c2kernel/lifecycle/instance/Activity.java | |
| parent | e99ed30f6cae36c5f3fa03007d991e67894a01bb (diff) | |
Merge and tidy after 2.4
Diffstat (limited to 'src/main/java/com/c2kernel/lifecycle/instance/Activity.java')
| -rw-r--r-- | src/main/java/com/c2kernel/lifecycle/instance/Activity.java | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/main/java/com/c2kernel/lifecycle/instance/Activity.java b/src/main/java/com/c2kernel/lifecycle/instance/Activity.java index 71909a5..6e03d01 100644 --- a/src/main/java/com/c2kernel/lifecycle/instance/Activity.java +++ b/src/main/java/com/c2kernel/lifecycle/instance/Activity.java @@ -101,6 +101,10 @@ public class Activity extends WfVertex this.state = state;
}
+ public boolean isFinished() throws InvalidDataException {
+ return getStateMachine().getState(state).isFinished();
+ }
+
/** cf Item request
* @throws ObjectNotFoundException
@@ -303,10 +307,10 @@ public class Activity extends WfVertex * @throws InvalidDataException
* @throws ObjectNotFoundException */
@Override
- public void reinit(int idLoop)
+ public void reinit(int idLoop) throws InvalidDataException
{
Vertex[] outVertices = getOutGraphables();
- state = getStateMachine().getInitialState().getId();
+ setState(getStateMachine().getInitialState().getId());
if (outVertices.length > 0)
{
WfVertex nextAct = (WfVertex) outVertices[0];
@@ -382,15 +386,15 @@ public class Activity extends WfVertex /**
* returns the lists of jobs for the activity and children (cf com.c2kernel.entity.Job)
*/
- public ArrayList<Job> calculateJobs(AgentPath agent, int itemSysKey, boolean recurse)
+ public ArrayList<Job> calculateJobs(AgentPath agent, int itemSysKey, boolean recurse) throws ObjectNotFoundException, InvalidDataException
{
return calculateJobsBase(agent, itemSysKey, false);
} //
- public ArrayList<Job> calculateAllJobs(AgentPath agent, int itemSysKey, boolean recurse)
+ public ArrayList<Job> calculateAllJobs(AgentPath agent, int itemSysKey, boolean recurse) throws ObjectNotFoundException, InvalidDataException
{
return calculateJobsBase(agent, itemSysKey, true);
}
- private ArrayList<Job> calculateJobsBase(AgentPath agent, int itemSysKey, boolean includeInactive)
+ private ArrayList<Job> calculateJobsBase(AgentPath agent, int itemSysKey, boolean includeInactive) throws ObjectNotFoundException, InvalidDataException
{
Logger.msg(7, "calculateJobs - " + getPath());
ArrayList<Job> jobs = new ArrayList<Job>();
|
