From 62c7a46967e949304e6b242854526463aae7ee17 Mon Sep 17 00:00:00 2001 From: Andrew Branson Date: Fri, 16 May 2014 10:38:32 +0200 Subject: item.request returns the final outcome, which may be modified during the execution (e.g. in the case of Predefined Steps). Fixes #136 --- src/main/java/com/c2kernel/entity/ItemImplementation.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/main/java/com/c2kernel/entity/ItemImplementation.java') 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"); -- cgit v1.2.3