[ \t]+$ => "" (empty) Should be easier to review when committing changes with trailing spaces removed automatically by anyedit or such tool (please refer to http://docs.ofbiz.org/x/mg) Of course this effort to remove trailing spaces has no functional implications. Actually, I was doing a 1st commit and as it's long to upload, I got conflicts with r763135 In the meantime I did some refactoring also in *.java and *.groovy files : ){ => ) { if( => if ( while( => while ( }else => } else else{ => else { switch( => switch ( try{ => try { }catch => } catch catch( => catch ( }finally{ => } finally { So these changes are also in this commit, should not be a problem anyway. git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@763175 13f79535-47bb-0310-9956-ffa450edef68
341 lines
17 KiB
XML
341 lines
17 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!--
|
|
Licensed to the Apache Software Foundation (ASF) under one
|
|
or more contributor license agreements. See the NOTICE file
|
|
distributed with this work for additional information
|
|
regarding copyright ownership. The ASF licenses this file
|
|
to you under the Apache License, Version 2.0 (the
|
|
"License"); you may not use this file except in compliance
|
|
with the License. You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing,
|
|
software distributed under the License is distributed on an
|
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
KIND, either express or implied. See the License for the
|
|
specific language governing permissions and limitations
|
|
under the License.
|
|
-->
|
|
|
|
<service-eca xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/service-eca.xsd">
|
|
<!-- order item status changes -->
|
|
<eca service="storeOrder" event="return">
|
|
<action service="resetGrandTotal" mode="sync"/>
|
|
<action service="addSuggestionsToShoppingList" mode="async" persist="true"/>
|
|
</eca>
|
|
<eca service="storeOrder" event="return">
|
|
<condition field-name="orderTypeId" operator="equals" value="SALES_ORDER"/>
|
|
<action service="checkCreateDropShipPurchaseOrders" mode="sync" run-as-user="system"/>
|
|
</eca>
|
|
<eca service="storeOrder" event="return">
|
|
<action service="balanceOrderItemsWithNegativeReservations" mode="sync"/>
|
|
</eca>
|
|
<eca service="storeOrder" event="return">
|
|
<condition field-name="orderTypeId" operator="equals" value="PURCHASE_ORDER"/>
|
|
<action service="setUnitPriceAsLastPrice" mode="sync"/>
|
|
</eca>
|
|
<eca service="storeOrder" event="return">
|
|
<action service="setOrderReservationPriority" mode="sync"/>
|
|
</eca>
|
|
<eca service="updateOrderItems" event="commit">
|
|
<condition field-name="orderTypeId" operator="equals" value="PURCHASE_ORDER"/>
|
|
<action service="setUnitPriceAsLastPrice" mode="sync"/>
|
|
</eca>
|
|
<eca service="receiveInventoryProduct" event="commit">
|
|
<condition field-name="facilityId" operator="is-not-empty"/>
|
|
<action service="setUnitPriceAsLastPrice" mode="sync"/>
|
|
</eca>
|
|
<eca service="receiveInventoryProduct" event="commit">
|
|
<condition field-name="facilityId" operator="is-not-empty"/>
|
|
<condition field-name="orderId" operator="is-not-empty"/>
|
|
<action service="updatePoOnReceiveInventory" mode="sync"/>
|
|
</eca>
|
|
<eca service="changeOrderItemStatus" event="commit">
|
|
<condition field-name="statusId" operator="equals" value="ITEM_CANCELLED"/>
|
|
<action service="cancelOrderInventoryReservation" mode="sync"/>
|
|
<action service="recalcShippingTotal" mode="sync"/>
|
|
<action service="recalcTaxTotal" mode="sync"/>
|
|
<action service="resetGrandTotal" mode="sync"/>
|
|
<action service="checkOrderItemStatus" mode="sync"/>
|
|
</eca>
|
|
<eca service="changeOrderItemStatus" event="commit">
|
|
<condition field-name="statusId" operator="equals" value="ITEM_COMPLETED"/>
|
|
<action service="checkOrderItemStatus" mode="sync"/>
|
|
</eca>
|
|
<eca service="changeOrderItemStatus" event="commit">
|
|
<condition field-name="statusId" operator="equals" value="ITEM_APPROVED"/>
|
|
<action service="checkOrderItemStatus" mode="sync"/>
|
|
</eca>
|
|
<eca service="changeOrderItemStatus" event="commit">
|
|
<condition field-name="statusId" operator="equals" value="ITEM_APPROVED"/>
|
|
<action service="checkDigitalItemFulfillment" mode="sync"/>
|
|
</eca>
|
|
<eca service="changeOrderItemStatus" event="commit">
|
|
<condition field-name="statusId" operator="equals" value="ITEM_APPROVED"/>
|
|
<action service="invoiceServiceItems" mode="sync"/>
|
|
</eca>
|
|
<!-- order status changes -->
|
|
<eca service="changeOrderStatus" event="commit" run-on-error="false">
|
|
<condition field-name="statusId" operator="equals" value="ORDER_CANCELLED"/>
|
|
<action service="releaseOrderPayments" mode="sync"/>
|
|
</eca>
|
|
<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>
|
|
|
|
<!-- DISABLED FOR NOW
|
|
<eca service="changeOrderStatus" event="commit" run-on-error="false">
|
|
<condition field-name="statusId" operator="equals" value="ORDER_PROCESSING"/>
|
|
<action service="processOrderWf" mode="async" persist="true"/>
|
|
</eca>
|
|
-->
|
|
|
|
<!-- This ECA is for content usage subscriptions -->
|
|
<eca service="changeOrderStatus" event="commit" run-on-error="false">
|
|
<condition field-name="statusId" operator="equals" value="ORDER_APPROVED"/>
|
|
<condition field-name="orderTypeId" operator="equals" value="SALES_ORDER"/>
|
|
<condition-field field-name="statusId" operator="not-equals" to-field-name="oldStatusId"/>
|
|
<action service="updateContentSubscriptionByOrder" mode="sync"/>
|
|
<action service="processExtendSubscriptionByOrder" mode="sync"/>
|
|
</eca>
|
|
|
|
<!-- order adjustments -->
|
|
<eca service="createOrderAdjustment" event="commit">
|
|
<action service="resetGrandTotal" mode="sync"/>
|
|
</eca>
|
|
<eca service="updateOrderAdjustment" event="commit">
|
|
<action service="resetGrandTotal" mode="sync"/>
|
|
</eca>
|
|
<eca service="deleteOrderAdjustment" event="commit">
|
|
<action service="resetGrandTotal" mode="sync"/>
|
|
</eca>
|
|
|
|
<!-- edit/add order items -->
|
|
<eca service="updateOrderItems" event="commit">
|
|
<action service="resetGrandTotal" mode="sync"/>
|
|
<action service="sendOrderChangeNotification" mode="async" persist="true"/>
|
|
</eca>
|
|
<eca service="appendOrderItem" event="commit">
|
|
<action service="resetGrandTotal" mode="sync"/>
|
|
</eca>
|
|
|
|
<!-- cancel order items -->
|
|
<eca service="cancelOrderItem" event="commit">
|
|
<action service="recreateOrderAdjustments" mode="sync"/>
|
|
<action service="resetGrandTotal" mode="sync"/>
|
|
<action service="sendOrderChangeNotification" mode="async" persist="true"/>
|
|
</eca>
|
|
|
|
<!-- order grand total -->
|
|
<!--
|
|
TODO: jacopoc: this is disabled for now, because it was causing problems during
|
|
order checkout under some special circumstances.
|
|
Now the processOrderPayments service is triggered only when updateOrderItems
|
|
and appendOrderItem are run (as it was before rev. 540479); this is a temp fix.
|
|
<eca service="resetGrandTotal" event="return">
|
|
<action service="processOrderPayments" mode="sync"/>
|
|
</eca>
|
|
-->
|
|
<eca service="updateOrderItems" event="return">
|
|
<action service="processOrderPayments" mode="sync"/>
|
|
</eca>
|
|
<eca service="appendOrderItem" event="return">
|
|
<action service="processOrderPayments" mode="sync"/>
|
|
</eca>
|
|
|
|
<!-- order confirmation/notification email ECAs -->
|
|
<eca service="sendOrderConfirmation" event="commit">
|
|
<action service="createOrderNotificationLog" mode="sync"/>
|
|
</eca>
|
|
<eca service="sendOrderChangeNotification" event="commit">
|
|
<action service="createOrderNotificationLog" mode="sync"/>
|
|
</eca>
|
|
<eca service="sendOrderCompleteNotification" event="commit">
|
|
<action service="createOrderNotificationLog" mode="sync"/>
|
|
</eca>
|
|
<eca service="sendOrderBackorderNotification" event="commit">
|
|
<action service="createOrderNotificationLog" mode="sync"/>
|
|
</eca>
|
|
<eca service="sendOrderPayRetryNotification" event="commit">
|
|
<action service="createOrderNotificationLog" mode="sync"/>
|
|
</eca>
|
|
|
|
<!-- Order Delivery Schedule ECAs -->
|
|
<eca service="createOrderDeliverySchedule" event="commit">
|
|
<action service="sendOrderDeliveryScheduleNotification" mode="async" persist="true"/>
|
|
</eca>
|
|
<eca service="updateOrderDeliverySchedule" event="commit">
|
|
<action service="sendOrderDeliveryScheduleNotification" mode="async" persist="true"/>
|
|
</eca>
|
|
|
|
<!-- Return ECAs -->
|
|
<eca service="updateReturnHeader" event="commit">
|
|
<action service="checkReturnComplete" mode="sync"/>
|
|
</eca>
|
|
<eca service="updateReturnHeader" event="return">
|
|
<condition field-name="statusId" operator="equals" value="RETURN_ACCEPTED"/>
|
|
<condition field-name="needsInventoryReceive" operator="equals" value="Y"/>
|
|
<action service="quickReceiveReturn" mode="sync"/>
|
|
</eca>
|
|
<eca service="updateReturnHeader" event="commit">
|
|
<condition field-name="statusId" operator="equals" value="RETURN_ACCEPTED"/>
|
|
<condition field-name="currentStatusId" operator="not-equals" value="RETURN_ACCEPTED"/>
|
|
<action service="createShipmentAndItemsForReturn" mode="sync"/>
|
|
<action service="processCrossShipReplacementReturn" mode="sync"/>
|
|
<action service="createTrackingCodeOrderReturns" mode="sync" run-as-user="system"/>
|
|
<action service="sendReturnAcceptNotification" mode="async" persist="true"/>
|
|
</eca>
|
|
|
|
<eca service="updateReturnHeader" event="commit">
|
|
<condition field-name="statusId" operator="equals" value="RETURN_RECEIVED"/>
|
|
<condition field-name="currentStatusId" operator="not-equals" value="RETURN_RECEIVED"/>
|
|
<action service="processWaitReplacementReturn" mode="sync"/>
|
|
<action service="processRepairReplacementReturn" mode="sync"/>
|
|
<action service="processCreditReturn" mode="sync"/>
|
|
<action service="processRefundReturn" mode="sync"/>
|
|
</eca>
|
|
<eca service="updateReturnStatusFromReceipt" event="global-commit">
|
|
<condition field-name="returnHeaderStatus" operator="equals" value="RETURN_RECEIVED"/>
|
|
<action service="processWaitReplacementReturn" mode="sync"/>
|
|
<action service="processRepairReplacementReturn" mode="sync"/>
|
|
<action service="processCreditReturn" mode="sync"/>
|
|
<action service="processRefundReturn" mode="sync"/>
|
|
</eca>
|
|
|
|
<eca service="updateReturnHeader" event="commit">
|
|
<condition field-name="statusId" operator="equals" value="RETURN_COMPLETED"/>
|
|
<condition field-name="currentStatusId" operator="not-equals" value="RETURN_COMPLETED"/>
|
|
<action service="sendReturnCompleteNotification" mode="async" persist="true"/>
|
|
<action service="processSubscriptionReturn" mode="sync"/>
|
|
</eca>
|
|
<eca service="updateReturnHeader" event="commit">
|
|
<condition field-name="statusId" operator="equals" value="RETURN_CANCELLED"/>
|
|
<condition field-name="currentStatusId" operator="not-equals" value="RETURN_CANCELLED"/>
|
|
<action service="cancelReturnItems" mode="sync"/>
|
|
<action service="sendReturnCancelNotification" mode="async" persist="true"/>
|
|
</eca>
|
|
<eca service="updateReturnHeader" event="commit">
|
|
<condition field-name="statusId" operator="equals" value="SUP_RETURN_SHIPPED"/>
|
|
<condition field-name="currentStatusId" operator="not-equals" value="SUP_RETURN_SHIPPED"/>
|
|
<action service="processWaitReplacementReturn" mode="sync"/>
|
|
</eca>
|
|
|
|
<eca service="updateReturnItem" event="commit">
|
|
<condition field-name="statusId" operator="equals" value="RETURN_CANCELLED"/>
|
|
<condition field-name="currentStatusId" operator="not-equals" value="RETURN_CANCELLED"/>
|
|
<action service="cancelReplacementOrderItems" mode="sync"/>
|
|
</eca>
|
|
|
|
<eca service="processReplacementReturn" event="commit">
|
|
<action service="checkReturnComplete" mode="sync"/>
|
|
</eca>
|
|
<eca service="processCreditReturn" event="commit">
|
|
<action service="checkReturnComplete" mode="sync"/>
|
|
</eca>
|
|
<eca service="processRefundReturn" event="commit">
|
|
<action service="checkReturnComplete" mode="sync"/>
|
|
</eca>
|
|
|
|
<!-- ShoppingList ECAs -->
|
|
<eca service="createShoppingList" event="in-validate">
|
|
<condition field-name="shippingMethodString" operator="is-not-empty"/>
|
|
<action service="splitShipmentMethodString" mode="sync" result-to-context="true"/>
|
|
</eca>
|
|
<eca service="updateShoppingList" event="in-validate">
|
|
<condition field-name="shippingMethodString" operator="is-not-empty"/>
|
|
<action service="splitShipmentMethodString" mode="sync" result-to-context="true"/>
|
|
</eca>
|
|
<eca service="createShoppingList" event="in-validate">
|
|
<condition field-name="frequency" operator="is-not-empty"/>
|
|
<action service="createShoppingListRecurrence" mode="sync" result-to-context="true"/>
|
|
</eca>
|
|
<eca service="updateShoppingList" event="in-validate">
|
|
<condition field-name="frequency" operator="is-not-empty"/>
|
|
<action service="createShoppingListRecurrence" mode="sync" result-to-context="true"/>
|
|
</eca>
|
|
|
|
<eca service="createShoppingListItem" event="in-validate">
|
|
<condition field-name="shoppingListId" operator="is-empty"/>
|
|
<action service="createShoppingList" mode="sync" result-to-context="true"/>
|
|
</eca>
|
|
|
|
<eca service="storeOrder" event="commit">
|
|
<action service="updateShoppingListQuantitiesFromOrder" mode="sync"/>
|
|
</eca>
|
|
|
|
<!-- CustRequest ECAs -->
|
|
<eca service="createCustRequest" event="commit">
|
|
<condition field-name="communicationEventId" operator="is-not-empty"/>
|
|
<condition field-name="custRequestId" operator="is-not-empty"/>
|
|
<action service="updateCommunicationEvent" mode="sync"/>
|
|
</eca>
|
|
|
|
<eca service="updateCustRequest" event="commit">
|
|
<condition field-name="communicationEventId" operator="is-not-empty"/>
|
|
<condition field-name="custRequestId" operator="is-not-empty"/>
|
|
<action service="updateCommunicationEvent" mode="sync"/>
|
|
</eca>
|
|
|
|
<!-- Requirement / CustRequestItem association event -->
|
|
<eca service="createRequirement" event="commit">
|
|
<condition field-name="custRequestId" operator="is-not-empty"/>
|
|
<condition field-name="custRequestItemSeqId" operator="is-not-empty"/>
|
|
<action service="associatedRequirementWithRequestItem" mode="sync"/>
|
|
</eca>
|
|
|
|
<eca service="createRequirement" event="commit">
|
|
<condition field-name="productId" operator="is-not-empty"/>
|
|
<condition field-name="requirementTypeId" operator="equals" value="PRODUCT_REQUIREMENT"/>
|
|
<action service="autoAssignRequirementToSupplier" mode="sync"/>
|
|
</eca>
|
|
|
|
<!-- Requirement / stock level -->
|
|
<eca service="createItemIssuance" event="invoke">
|
|
<condition field-name="quantity" value="0" operator="greater" type="BigDecimal"/>
|
|
<action service="checkCreateStockRequirementQoh" mode="sync" run-as-user="system"/>
|
|
</eca>
|
|
<eca service="updateItemIssuance" event="invoke">
|
|
<condition field-name="quantity" value="0" operator="greater" type="BigDecimal"/>
|
|
<action service="checkCreateStockRequirementQoh" mode="sync" run-as-user="system"/>
|
|
</eca>
|
|
<eca service="reserveOrderItemInventory" event="commit">
|
|
<condition field-name="quantity" value="0" operator="greater" type="BigDecimal"/>
|
|
<action service="checkCreateStockRequirementAtp" mode="sync" run-as-user="system"/>
|
|
</eca>
|
|
<!-- create the automatic and ATP requirements for sales orders but only if the status changes from created to approved -->
|
|
<eca service="changeOrderStatus" event="commit" run-on-error="false">
|
|
<condition field-name="oldStatusId" operator="equals" value="ORDER_CREATED"/>
|
|
<condition field-name="statusId" operator="equals" value="ORDER_APPROVED"/>
|
|
<condition field-name="orderTypeId" operator="equals" value="SALES_ORDER"/>
|
|
<action service="createAutoRequirementsForOrder" mode="sync"/>
|
|
<action service="createATPRequirementsForOrder" mode="sync"/>
|
|
</eca>
|
|
|
|
<!-- WorkEffort -->
|
|
<eca service="createQuoteWorkEffort" event="invoke">
|
|
<condition field-name="workEffortId" operator="is-empty"/>
|
|
<action service="createWorkEffort" mode="sync"/>
|
|
</eca>
|
|
|
|
<!-- customer request notifications -->
|
|
<eca service="setCustRequestStatus" event="commit">
|
|
<condition field-name="oldStatusId" operator="not-equals" value="CRQ_ACCEPTED"/>
|
|
<condition field-name="statusId" operator="equals" value="CRQ_ACCEPTED"/>
|
|
<set field-name="partyIdTo" value="${fromPartyId}"/>
|
|
<set field-name="emailTemplateSettingId" value="CUST_REQ_ACCEPTED"/>
|
|
<action service="sendMailFromTemplateSetting" mode="sync"/>
|
|
</eca>
|
|
<eca service="setCustRequestStatus" event="commit">
|
|
<condition field-name="oldStatusId" operator="not-equals" value="CRQ_COMPLETED"/>
|
|
<condition field-name="statusId" operator="equals" value="CRQ_COMPLETED"/>
|
|
<set field-name="partyIdTo" value="${fromPartyId}"/>
|
|
<set field-name="emailTemplateSettingId" value="CUST_REQ_COMPLETED"/>
|
|
<action service="sendMailFromTemplateSetting" mode="sync"/>
|
|
</eca>
|
|
</service-eca>
|