[
https://issues.apache.org/jira/browse/OFBIZ-13281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18011118#comment-18011118
]
ASF subversion and git services commented on OFBIZ-13281:
---------------------------------------------------------
Commit b2b2d4da8bc9be7261d939da47269e7350fa4ee1 in ofbiz-framework's branch
refs/heads/trunk from Nicolas Malin
[ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=b2b2d4da8b ]
Improved: Add ('in', 'not-in') operator for seca condition (OFBIZ-13281)
When you create a seca to follow a status evolution, and you need to run a
service on two status value, currently you define twice the seca :
****
<eca service="setInvoiceStatus" event="return">
<condition field-name="statusId" operator="equals"
value="INVOICE_READY"/>
<action service="runSomething" mode="async" run-as-user="system"/>
</eca>
<eca service="setInvoiceStatus" event="return">
<condition field-name="statusId" operator="equals"
value="INVOICE_RECEIVED"/>
<action service="runSomething" mode="async" run-as-user="system"/>
</eca>
****
A simple improve will optimize this with an in (or not_in) operator already
present on the framework.
****
<eca service="setInvoiceStatus" event="return">
<condition field-name="statusId" operator="in"
value="INVOICE_READY,INVOICE_RECEIVED"/>
<action service="runSomething" mode="async" run-as-user="system"/>
</eca>
****
> Add in, not-in operator for seca condition
> ------------------------------------------
>
> Key: OFBIZ-13281
> URL: https://issues.apache.org/jira/browse/OFBIZ-13281
> Project: OFBiz
> Issue Type: Improvement
> Components: framework/service
> Reporter: Nicolas Malin
> Priority: Minor
>
> When you create a seca to follow a status evolution, and you need to run a
> service on two status value, currently you define twice the seca :
> {code:xml}
> <eca service="setInvoiceStatus" event="return">
> <condition field-name="statusId" operator="equals"
> value="INVOICE_READY"/>
> <action service="runSomething" mode="async" run-as-user="system"/>
> </eca>
> <eca service="setInvoiceStatus" event="return">
> <condition field-name="statusId" operator="equals"
> value="INVOICE_RECEIVED"/>
> <action service="runSomething" mode="async" run-as-user="system"/>
> </eca>
> {code}
> A simple improve will optimize this with an in (or not_in) operator already
> present on the framework.
> {code:xml}
> <eca service="setInvoiceStatus" event="return">
> <condition field-name="statusId" operator="in"
> value="INVOICE_READY,INVOICE_RECEIVED"/>
> <action service="runSomething" mode="async" run-as-user="system"/>
> </eca>
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)