| <?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"> |
| |
| <!-- payment related services --> |
| <eca service="captureOrderPayments" event="commit" run-on-failure="false" run-on-error="false"> |
| <action service="sendGoogleChargeRequest" mode="sync"/> |
| </eca> |
| |
| <!-- order related services --> |
| <eca service="changeOrderStatus" event="commit" run-on-error="false"> |
| <condition-field field-name="statusId" operator="not-equals" to-field-name="oldStatusId"/> |
| <condition field-name="statusId" operator="equals" value="ORDER_CANCELLED"/> |
| <action service="sendGoogleOrderCancelRequest" mode="sync"/> |
| </eca> |
| <eca service="changeOrderItemStatus" event="commit" run-on-failure="false" run-on-error="false"> |
| <condition-field field-name="statusId" operator="not-equals" to-field-name="fromStatusId"/> |
| <condition field-name="statusId" operator="equals" value="ITEM_CANCELLED"/> |
| <condition field-name="orderItemSeqId" operator="is-not-empty"/> |
| <action service="sendGoogleOrderItemCancelRequest" mode="sync" result-to-context="true" ignore-failure="false"/> |
| </eca> |
| |
| <!-- return related services --> |
| <eca service="updateReturnHeader" event="commit" run-on-failure="false" run-on-error="false"> |
| <condition field-name="statusId" operator="equals" value="RETURN_RECEIVED"/> |
| <condition field-name="currentStatusId" operator="not-equals" value="RETURN_RECEIVED"/> |
| <action service="sendGoogleReturnRequest" mode="sync"/> |
| </eca> |
| |
| <!-- shipment related services --> |
| <eca service="updateShipment" event="commit" run-on-failure="false" run-on-error="false"> |
| <condition-field field-name="statusId" operator="not-equals" to-field-name="oldStatusId"/> |
| <condition field-name="statusId" operator="equals" value="SHIPMENT_SHIPPED"/> |
| <condition field-name="shipmentTypeId" operator="not-equals" value="PURCHASE_RETURN"/> |
| <action service="sendGoogleShipRequest" mode="sync"/> |
| </eca> |
| |
| <!-- edit order catches --> |
| <eca service="updateOrderItems" event="in-validate" run-on-failure="false"> |
| <action service="catchEditGoogleOrder" mode="sync" result-to-context="true" ignore-failure="false"/> |
| </eca> |
| <eca service="appendOrderItem" event="in-validate" run-on-failure="false"> |
| <action service="catchEditGoogleOrder" mode="sync" result-to-context="true" ignore-failure="false"/> |
| </eca> |
| <eca service="recalcShippingTotal" event="in-validate" run-on-failure="false"> |
| <action service="catchEditGoogleOrder" mode="sync" result-to-context="true" ignore-failure="false"/> |
| </eca> |
| <eca service="recalcTaxTotal" event="in-validate" run-on-failure="false"> |
| <action service="catchEditGoogleOrder" mode="sync" result-to-context="true" ignore-failure="false"/> |
| </eca> |
| <eca service="createOrderAdjustment" event="in-validate" run-on-failure="false"> |
| <action service="catchEditGoogleOrder" mode="sync" result-to-context="true" ignore-failure="false"/> |
| </eca> |
| <eca service="updateOrderAdjustment" event="in-validate" run-on-failure="false"> |
| <action service="catchEditGoogleOrder" mode="sync" result-to-context="true" ignore-failure="false"/> |
| </eca> |
| <eca service="deleteOrderAdjustment" event="in-validate" run-on-failure="false"> |
| <action service="catchEditGoogleOrder" mode="sync" result-to-context="true" ignore-failure="false"/> |
| </eca> |
| </service-eca> |