git-svn-id: https://svn.apache.org/repos/asf/incubator/ofbiz/trunk@449224 13f79535-47bb-0310-9956-ffa450edef68
107 lines
5.0 KiB
XML
107 lines
5.0 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!--
|
|
Copyright 2001-2006 The Apache Software Foundation
|
|
|
|
Licensed 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://www.ofbiz.org/dtds/service-eca.xsd">
|
|
<eca service="createInvoiceForOrder" event="return">
|
|
<condition field-name="invoiceId" operator="is-not-empty"/>
|
|
<action service="capturePaymentsByInvoice" mode="sync"/>
|
|
</eca>
|
|
<eca service="createPaymentApplication" event="commit">
|
|
<condition field-name="invoiceId" operator="is-not-empty"/>
|
|
<action service="checkInvoicePaymentApplications" mode="sync"/>
|
|
<action service="createCommissionInvoices" mode="sync"/>
|
|
</eca>
|
|
<eca service="createCommissionInvoices" event="commit">
|
|
<condition field-name="invoicesCreated" operator="is-not-empty"/>
|
|
<action service="readyInvoices" mode="sync"/>
|
|
</eca>
|
|
<eca service="createPartyPostalAddress" event="commit">
|
|
<condition field-name="paymentMethodId" operator="is-not-empty"/>
|
|
<action service="setPaymentMethodAddress" mode="sync"/>
|
|
</eca>
|
|
<!-- do the updatePostalAddress before the return and after the commit so it can use its own transaction and not effect the updating of the PostalAddress -->
|
|
<eca service="updatePostalAddress" event="return">
|
|
<action service="updatePaymentMethodAddress" mode="sync"/>
|
|
</eca>
|
|
|
|
<eca service="createBillingAccount" event="return">
|
|
<condition field-name="roleTypeId" operator="is-not-empty"/>
|
|
<condition field-name="partyId" operator="is-not-empty"/>
|
|
<action service="createBillingAccountRole" mode="sync"/>
|
|
</eca>
|
|
<eca service="createBillingAccountRole" event="invoke">
|
|
<condition field-name="roleTypeId" operator="is-not-empty"/>
|
|
<condition field-name="partyId" operator="is-not-empty"/>
|
|
<action service="ensurePartyRole" mode="sync"/>
|
|
</eca>
|
|
|
|
<eca service="createCreditCard" event="in-validate">
|
|
<condition field-name="expMonth" operator="is-not-empty"/>
|
|
<condition field-name="expYear" operator="is-not-empty"/>
|
|
<action service="buildCcExpireDate" mode="sync"/>
|
|
</eca>
|
|
<eca service="updateCreditCard" event="in-validate">
|
|
<condition field-name="expMonth" operator="is-not-empty"/>
|
|
<condition field-name="expYear" operator="is-not-empty"/>
|
|
<action service="buildCcExpireDate" mode="sync"/>
|
|
</eca>
|
|
|
|
<eca service="createCreditCardAndAddress" event="in-validate">
|
|
<condition field-name="expMonth" operator="is-not-empty"/>
|
|
<condition field-name="expYear" operator="is-not-empty"/>
|
|
<action service="buildCcExpireDate" mode="sync"/>
|
|
</eca>
|
|
<eca service="updateCreditCardAndAddress" event="in-validate">
|
|
<condition field-name="expMonth" operator="is-not-empty"/>
|
|
<condition field-name="expYear" operator="is-not-empty"/>
|
|
<action service="buildCcExpireDate" mode="sync"/>
|
|
</eca>
|
|
|
|
<eca service="createGiftCard" event="in-validate">
|
|
<condition field-name="expMonth" operator="is-not-empty"/>
|
|
<condition field-name="expYear" operator="is-not-empty"/>
|
|
<action service="buildCcExpireDate" mode="sync"/>
|
|
</eca>
|
|
<eca service="updateGiftCard" event="in-validate">
|
|
<condition field-name="expMonth" operator="is-not-empty"/>
|
|
<condition field-name="expYear" operator="is-not-empty"/>
|
|
<action service="buildCcExpireDate" mode="sync"/>
|
|
</eca>
|
|
|
|
<eca service="authOrderPayments" event="global-rollback">
|
|
<action service="releaseOrderPayments" mode="sync"/>
|
|
</eca>
|
|
|
|
<eca service="retryFailedOrderAuth" event="commit">
|
|
<condition field-name="processResult" operator="not-equals" value="ERROR"/>
|
|
<action service="sendOrderPayRetryNotification" mode="async" persist="true"/>
|
|
</eca>
|
|
|
|
<!-- sample ECA rules for the sampleInvoiceAffiliateCommission service triggering
|
|
<eca service="createPayment" event="commit">
|
|
<condition field-name="statusId" operator="equals" value="PMNT_RECEIVED"/>
|
|
<action service="sampleInvoiceAffiliateCommission" mode="sync"/>
|
|
</eca>
|
|
<eca service="setPaymentStatus" event="commit">
|
|
<condition field-name="statusId" operator="equals" value="PMNT_RECEIVED"/>
|
|
<condition-field field-name="statusId" operator="not-equals" to-field-name="oldStatusId"/>
|
|
<action service="sampleInvoiceAffiliateCommission" mode="sync"/>
|
|
</eca>
|
|
-->
|
|
</service-eca>
|