[ 
https://issues.apache.org/jira/browse/OFBIZ-13195?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nicolas Malin closed OFBIZ-13195.
---------------------------------
      Assignee: Nicolas Malin
    Resolution: Done

> Add groovydsl method : failure to return a map
> ----------------------------------------------
>
>                 Key: OFBIZ-13195
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-13195
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Nicolas Malin
>            Assignee: Nicolas Malin
>            Priority: Minor
>
> With groovy dsl we have possibility to return in one line when failure 
> appears but we can only sent a failure message like this :
> {code:java}
> return failure('bad state')
> {code}
> If we need to return information on out we need to realize it like :
> {code:java}
> Map result = failure('bad state')
> result.statusId = 'BAD_STATUS'
> return result
> {code}
> Like success we improved it to do in one line:
> {code:java}
> return failure('bad state', [statusId: 'BAD_STATUS'])
> {code}
> By the way we align success function to refactoring them with default value 
> so remove two unnecessary



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to