diff options
| author | Andrew Branson <andrew.branson@cern.ch> | 2013-12-09 17:34:51 +0100 |
|---|---|---|
| committer | Andrew Branson <andrew.branson@cern.ch> | 2013-12-09 17:34:51 +0100 |
| commit | c6e9aa47819f5681b187668753ae4a5e53f4e2bc (patch) | |
| tree | bd239126b00dfdea25d83a72c744a594afb06ecb /src/main/java/com/c2kernel/entity | |
| parent | 37bb1907aca2a3246a7b5d759df79b7fd97c276f (diff) | |
Return false from Transition.hasOutcome and hasScript if there are
property symbols but the properties are empty (e.g. activities with no
schema defined). The methods must now be given activity properties.
Diffstat (limited to 'src/main/java/com/c2kernel/entity')
| -rw-r--r-- | src/main/java/com/c2kernel/entity/agent/Job.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/main/java/com/c2kernel/entity/agent/Job.java b/src/main/java/com/c2kernel/entity/agent/Job.java index 5f9e6dc..eecbe19 100644 --- a/src/main/java/com/c2kernel/entity/agent/Job.java +++ b/src/main/java/com/c2kernel/entity/agent/Job.java @@ -189,7 +189,7 @@ public class Job implements C2KLocalObject }
public String getSchemaName() throws InvalidDataException, ObjectNotFoundException {
- if (transition.hasOutcome()) {
+ if (transition.hasOutcome(actProps)) {
Schema schema = transition.getSchema(actProps);
return schema.docType;
}
@@ -197,7 +197,7 @@ public class Job implements C2KLocalObject }
public int getSchemaVersion() throws InvalidDataException, ObjectNotFoundException {
- if (transition.hasOutcome()) {
+ if (transition.hasOutcome(actProps)) {
Schema schema = transition.getSchema(actProps);
return schema.docVersion;
}
@@ -206,18 +206,18 @@ public class Job implements C2KLocalObject public boolean isOutcomeRequired()
{
- return transition.hasOutcome() && transition.getOutcome().isRequired();
+ return transition.hasOutcome(actProps) && transition.getOutcome().isRequired();
}
public String getScriptName() {
- if (transition.hasScript()) {
+ if (transition.hasScript(actProps)) {
return transition.getScript().getScriptName();
}
return null;
}
public int getScriptVersion() throws InvalidDataException {
- if (transition.hasScript()) {
+ if (transition.hasScript(actProps)) {
return transition.getScriptVersion(actProps);
}
return -1;
@@ -312,11 +312,11 @@ public class Job implements C2KLocalObject }
public boolean hasOutcome() {
- return transition.hasOutcome();
+ return transition.hasOutcome(actProps);
}
public boolean hasScript() {
- return transition.hasScript();
+ return transition.hasScript(actProps);
}
public boolean isOutcomeSet() {
|
