summaryrefslogtreecommitdiff
path: root/src/main/java/com/c2kernel/lifecycle/instance/Activity.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/c2kernel/lifecycle/instance/Activity.java')
-rw-r--r--src/main/java/com/c2kernel/lifecycle/instance/Activity.java14
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>();