You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Marlowe Inoferio <ma...@yahoo.com> on 2008/06/20 03:52:17 UTC
Seca run-on-error help
Hi,
Need help on understanding the seca run-on-error ="true" or = "false".
Does it mean if i define an item in the seca with run-on-error="true" the seca definition will still run regardless if it encounters an error during execution ?
Example:
<eca service="changeOrderStatus" event="commit" run-on-error="false">
<condition field-name="statusId" operator="equals" value="ORDER_CANCELLED"/>
<action service="releaseOrderPayments" mode="sync"/>
</eca>
Or will the above definition only run when the changeOrderStatus returns an error during execution and then run the releaseOrderPayments service ?
Need help
Thanks
Marlowe
Re: Seca run-on-error help
Posted by Chirag Manocha <ma...@gmail.com>.
Hello Marlowe
Comments Inline
On Fri, Jun 20, 2008 at 7:22 AM, Marlowe Inoferio <ma...@yahoo.com>
wrote:
> Hi,
>
> Need help on understanding the seca run-on-error ="true" or = "false".
>
> Does it mean if i define an item in the seca with run-on-error="true" the
> seca definition will still run regardless if it encounters an error during
> execution ?
>
> Example:
>
> <eca service="changeOrderStatus" event="commit" run-on-error="false">
> <condition field-name="statusId" operator="equals"
> value="ORDER_CANCELLED"/>
> <action service="releaseOrderPayments" mode="sync"/>
> </eca>
In the above example run-on-error is false
So when the service("changeOrderStatus") successfully runs and the condition
satisfies then only this action will be performed.
This action will not be performed when service("changeOrderStatus") return
error.
>
> Or will the above definition only run when the changeOrderStatus returns an
> error during execution and then run the releaseOrderPayments service ?
>
> Need help
>
> Thanks
>
> Marlowe
>
>
>
>
Here is the example of run-on-error="true"
<eca service="finAccountWithdraw" event="return" run-on-error="true">
<condition field-name="productStoreId" operator="is-not-empty"/>
<action service="finAccountReplenish" mode="async" persist="true"
run-as-user="system"/>
</eca>
When the service(finAccountWithdraw) return error or success and the
conditon of productStoreId, satisfies then this action will be performed.
Notice when the run-on-error is true, action will be performed every time
when this service(finAccountWithdraw) will called and condition satisfies.
--
Regards
Chirag Manocha
Hotwax Media Inc.
(M) +91-982-631-9099