diff options
| author | Andrew Branson <andrew.branson@cern.ch> | 2014-05-16 10:38:32 +0200 |
|---|---|---|
| committer | Andrew Branson <andrew.branson@cern.ch> | 2014-05-16 10:38:32 +0200 |
| commit | 62c7a46967e949304e6b242854526463aae7ee17 (patch) | |
| tree | 50548ae1c30d8355091f77365214c4378870ddac /src/main/java/com/c2kernel/entity/ItemImplementation.java | |
| parent | 8e8185210f5bd87cb5dcda3a458fe059f811aafc (diff) | |
item.request returns the final outcome, which may be modified during the
execution (e.g. in the case of Predefined Steps). Fixes #136
Diffstat (limited to 'src/main/java/com/c2kernel/entity/ItemImplementation.java')
| -rw-r--r-- | src/main/java/com/c2kernel/entity/ItemImplementation.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/com/c2kernel/entity/ItemImplementation.java b/src/main/java/com/c2kernel/entity/ItemImplementation.java index e0d107a..b12e105 100644 --- a/src/main/java/com/c2kernel/entity/ItemImplementation.java +++ b/src/main/java/com/c2kernel/entity/ItemImplementation.java @@ -113,7 +113,7 @@ public class ItemImplementation implements ItemOperations { @Override
- public void requestAction(int agentId, String stepPath, int transitionID,
+ public String requestAction(int agentId, String stepPath, int transitionID,
String requestData) throws AccessRightsException,
InvalidTransitionException, ObjectNotFoundException,
InvalidDataException, PersistencyException,
@@ -128,7 +128,7 @@ public class ItemImplementation implements ItemOperations { Workflow lifeCycle = (Workflow) mStorage.get(mSystemKey,
ClusterStorage.LIFECYCLE + "/workflow", null);
- lifeCycle.requestAction(agent, stepPath, mSystemKey,
+ String finalOutcome = lifeCycle.requestAction(agent, stepPath, mSystemKey,
transitionID, requestData);
// store the workflow if we've changed the state of the domain
@@ -136,6 +136,7 @@ public class ItemImplementation implements ItemOperations { if (!(stepPath.startsWith("workflow/predefined")))
mStorage.put(mSystemKey, lifeCycle, null);
+ return finalOutcome;
// Normal operation exceptions
} catch (AccessRightsException ex) {
Logger.msg("Propagating AccessRightsException back to the calling agent");
|
