summaryrefslogtreecommitdiff
path: root/src/main/java/com/c2kernel/entity/proxy/ItemProxy.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/c2kernel/entity/proxy/ItemProxy.java')
-rw-r--r--src/main/java/com/c2kernel/entity/proxy/ItemProxy.java15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/main/java/com/c2kernel/entity/proxy/ItemProxy.java b/src/main/java/com/c2kernel/entity/proxy/ItemProxy.java
index 67685e7..ceea6c3 100644
--- a/src/main/java/com/c2kernel/entity/proxy/ItemProxy.java
+++ b/src/main/java/com/c2kernel/entity/proxy/ItemProxy.java
@@ -26,7 +26,6 @@ import com.c2kernel.entity.ManageableEntity;
import com.c2kernel.entity.agent.Job;
import com.c2kernel.entity.agent.JobArrayList;
import com.c2kernel.lifecycle.instance.Workflow;
-import com.c2kernel.lifecycle.instance.stateMachine.Transitions;
import com.c2kernel.persistency.ClusterStorage;
import com.c2kernel.persistency.outcome.Viewpoint;
import com.c2kernel.process.Gateway;
@@ -108,10 +107,10 @@ public class ItemProxy extends EntityProxy
ObjectAlreadyExistsException
{
String outcome = thisJob.getOutcomeString();
- // check fields that should have been filled in
- if (outcome==null)
- if (thisJob.requiresOutcome())
- throw new InvalidDataException("Outcome is required.", "");
+ // check fields that should have been filled in
+ if (outcome==null)
+ if (thisJob.isOutcomeRequired())
+ throw new InvalidDataException("Outcome is required.", "");
else
outcome="";
@@ -120,7 +119,7 @@ public class ItemProxy extends EntityProxy
Logger.msg(7, "ItemProxy - executing "+thisJob.getStepPath()+" for "+thisJob.getAgentName());
requestAction (thisJob.getAgentId(), thisJob.getStepPath(),
- thisJob.getPossibleTransition(), outcome);
+ thisJob.getTransition().getId(), outcome);
}
//requestData is xmlString
@@ -200,9 +199,7 @@ public class ItemProxy extends EntityProxy
ArrayList<Job> jobList = getJobList(agentId);
for (Job job : jobList) {
- int transition = job.getPossibleTransition();
- if (job.getStepName().equals(actName))
- if (transition == Transitions.COMPLETE || transition == Transitions.DONE)
+ if (job.getStepName().equals(actName) && job.hasOutcome())
return job;
}
return null;