Author: jacopoc
Date: Fri Apr  6 23:29:40 2007
New Revision: 526372

URL: http://svn.apache.org/viewvc?view=rev&rev=526372
Log:
This is a workaround to fix the infinite loop condition that happened when 
canceling an order item of an order with promo items:
added a new service definition for the cancelOrderItem service 
(cancelOrderItemNoActions), without ecas attached to it, that is called from 
the recreateOrderAdjustments service.
Thanks to Scott Gray (and others) for the great helpin fleshing out the problem.
For details see OFBIZ-431.

Modified:
    
ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml
    ofbiz/trunk/applications/order/servicedef/services.xml

Modified: 
ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml?view=diff&rev=526372&r1=526371&r2=526372
==============================================================================
--- 
ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml 
(original)
+++ 
ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml 
Fri Apr  6 23:29:40 2007
@@ -503,9 +503,9 @@
         <iterate list-name="orderItems" entry-name="orderItem">
             <if-compare field-name="orderItem.isPromo" value="Y" 
operator="equals">
                 <clear-field field-name="cancelOrderItemInMap"/>
-                <set-service-fields service-name="cancelOrderItem" 
to-map-name="cancelOrderItemInMap" map-name="parameters"/>
+                <set-service-fields service-name="cancelOrderItemNoActions" 
to-map-name="cancelOrderItemInMap" map-name="parameters"/>
                 <set from-field="orderItem.orderItemSeqId" 
field="cancelOrderItemInMap.orderItemSeqId"/>
-                <call-service service-name="cancelOrderItem" 
in-map-name="cancelOrderItemInMap"/>
+                <call-service service-name="cancelOrderItemNoActions" 
in-map-name="cancelOrderItemInMap"/>
             </if-compare>
         </iterate>
 

Modified: ofbiz/trunk/applications/order/servicedef/services.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/servicedef/services.xml?view=diff&rev=526372&r1=526371&r2=526372
==============================================================================
--- ofbiz/trunk/applications/order/servicedef/services.xml (original)
+++ ofbiz/trunk/applications/order/servicedef/services.xml Fri Apr  6 23:29:40 
2007
@@ -275,6 +275,14 @@
         <attribute name="shipGroupSeqId" type="String" mode="IN" 
optional="true"/>
        <attribute name="cancelQuantity" type="Double" mode="IN" 
optional="true"/>
     </service>
+    <service name="cancelOrderItemNoActions" engine="java" auth="true"
+               location="org.ofbiz.order.order.OrderServices" 
invoke="cancelOrderItem">
+       <description>Cancel an Order Item Quantity. This is equal to 
cancelOrderItem but no ECAs are attached to this service.</description>
+       <attribute name="orderId" type="String" mode="IN" optional="false"/>
+       <attribute name="orderItemSeqId" type="String" mode="IN" 
optional="true"/>
+        <attribute name="shipGroupSeqId" type="String" mode="IN" 
optional="true"/>
+       <attribute name="cancelQuantity" type="Double" mode="IN" 
optional="true"/>
+    </service>
 
     <service name="updateOrderItems" engine="java" auth="true"
             location="org.ofbiz.order.order.OrderServices" 
invoke="updateApprovedOrderItems">


Reply via email to