[ 
https://issues.apache.org/jira/browse/OFBIZ-1237?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12531107
 ] 

Adrian Crum commented on OFBIZ-1237:
------------------------------------

David,

What I meant by "broke the code" - In my original patch, the result-to-result 
copy was done after the (result != null && !success) code block (line 157). 
Your version does the copy before the code block. So... if the actionResult 
Map's contents have been copied to the service result Map - then the code block 
breaks - because both Maps contain the same thing.

To be more specific: If line 133 is executed, then things like line 177 and 
line 186 won't work - because the source and destination objects are identical.

I originally had it copy only on success because otherwise the results of lines 
157 to 189 would be overwritten by the copy.

I'll be first to admit that I'm a little over my head working on the service 
engine, and I'm myopic in these efforts (I'm trying to get the permission 
checking ECA thing to work). Not only do I appreciate your assistance, I really 
*need* it.

This patch and the related patches I've contributed are tested and working on 
our production server - for whatever that's worth.


> Add the ability to copy ECA action result Map to the service result Map
> -----------------------------------------------------------------------
>
>                 Key: OFBIZ-1237
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1237
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Adrian Crum
>            Assignee: David E. Jones
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: ServiceEcaAction.patch, ServiceEcaAction.patch, 
> ServiceEcaAction.patch
>
>
> The service dispatcher uses the result Map from the initial service invoked 
> and it ignores the result Map of any ECAs that are invoked. So, any values 
> that an ECA service attempts to return are ignored.  It would be preferable 
> to have an action attribute that permits copying the action's result Map to 
> the service's result Map.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to