ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hansen Wang <han...@gemmall.com>
Subject quickShipEntireOrder problems
Date Fri, 06 Mar 2009 23:20:43 GMT
Hi,

I am using release4.0 and am having the following problems in
quickShipEntireOrder.

1. An order complete email is sent even if payment capture failed.

2. An order complete email is sent with status as "Approved" instead of
"Complete" even when the service succeeded.

The following is the related eca relating to the order complete email.

    <eca service="changeOrderStatus" event="commit" run-on-error="false">
        <condition field-name="statusId" operator="equals"
value="ORDER_COMPLETED"/>
        <condition-field field-name="statusId" operator="not-equals"
to-field-name="oldStatusId"/>
        <action service="resetGrandTotal" mode="sync"/>
        <action service="sendOrderCompleteNotification" mode="async"
persist="true"/>
    </eca>

Based on this eca, sendOrderCompleteNotification should not even be invoked
if changeOrderStatus failed because it is invoked before the commit of the
transaction and the transaction should be marked as rollback.

Problem #2 seems to do with database concurrent accessing. The problem is
that when the eca is invoked, it is comparing the status from the parameter.
However, sendOrderCompleteNotification is accessing the data (order status)
from the database. It is possible that sendOrderCompleteNotification is
commited before changeOrderStatus and in that case it will read the old
status (which is the behaviour of read committed).

So my questions are why #1 happened? Is #2 an expected hahaviour and how can
it be improved in a robust way?

Thanks,
Hansen

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message