[ https://issues.apache.org/jira/browse/OFBIZ-13195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17906657#comment-17906657 ]
ASF subversion and git services commented on OFBIZ-13195: --------------------------------------------------------- Commit f493eb25cd22bdf4a53e6c947a28bad4eaac3bd6 in ofbiz-framework's branch refs/heads/trunk from Nicolas Malin [ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=f493eb25cd ] Improved: Add groovydsl method : failure to return a map (OFBIZ-13195) (#867) With groovy dsl we have possibility to return in one line when failure appears but we can only sent a failure message like this : **** return failure('bad state') **** If we need to return information on out we need to realize it like : **** Map result = failure('bad state') result.statusId = 'BAD_STATUS' return result **** Like success() we improved it to do in one line: **** return failure('bad state', [statusId: 'BAD_STATUS']) **** By the way we align success function to refactoring them with default value so remove two unnecessary > 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 > 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)