secas.xml
6.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<?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">
<!-- update inventory item -->
<eca service="updateInventoryItem" event="commit">
<condition field-name="statusId" operator="is-not-empty"/>
<condition-field field-name="oldStatusId" operator="not-equals" to-field-name="statusId"/>
<action service="createInventoryItemStatus" mode="sync"/>
</eca>
<eca service="updateInventoryItem" event="commit">
<condition field-name="statusId" operator="is-not-empty"/>
<condition field-name="productId" operator="is-not-empty"/>
<condition-field field-name="oldProductId" operator="not-equals" to-field-name="productId"/>
<action service="createInventoryItemStatus" mode="sync"/>
</eca>
<eca service="updateInventoryItem" event="commit">
<condition field-name="statusId" operator="is-not-empty"/>
<condition field-name="ownerPartyId" operator="is-not-empty"/>
<condition-field field-name="oldOwnerPartyId" operator="not-equals" to-field-name="ownerPartyId"/>
<action service="createInventoryItemStatus" mode="sync"/>
</eca>
<eca service="createItemIssuance" event="return"><!-- change the owner after item issuance transactions are created for old owner -->
<condition field-name="orderId" operator="is-not-empty"/>
<condition field-name="inventoryItemId" operator="is-not-empty"/>
<action service="changeOwnerUponIssuance" mode="sync"/>
</eca>
<!-- inventory transfer -->
<eca service="createInventoryTransfer" event="invoke">
<condition field-name="statusId" operator="not-equals" value="IXF_CANCELLED"/>
<action service="prepareInventoryTransfer" mode="sync"/>
</eca>
<eca service="createInventoryTransfer" event="commit">
<condition field-name="statusId" operator="equals" value="IXF_COMPLETE"/>
<action service="completeInventoryTransfer" mode="sync"/>
<action service="balanceInventoryItems" mode="sync"/>
</eca>
<eca service="updateInventoryTransfer" event="invoke">
<condition field-name="statusId" operator="equals" value="IXF_CANCELLED"/>
<action service="cancelInventoryTransfer" mode="sync"/>
</eca>
<eca service="updateInventoryTransfer" event="commit">
<condition field-name="statusId" operator="equals" value="IXF_COMPLETE"/>
<action service="completeInventoryTransfer" mode="sync"/>
<action service="balanceInventoryItems" mode="sync"/>
</eca>
<!-- inventory variance -->
<eca service="createPhysicalInventoryAndVariance" event="commit">
<action service="balanceInventoryItems" mode="sync"/>
</eca>
<!-- inventory changes -->
<eca service="balanceInventoryItems" event="commit">
<action service="updateProductIfAvailableFromShipment" mode="sync"/>
</eca>
<!-- Product Price Change ECAs -->
<eca service="createProductPrice" event="commit">
<action service="saveProductPriceChange" mode="sync"/>
</eca>
<eca service="updateProductPrice" event="commit">
<condition-field field-name="price" operator="not-equals" to-field-name="oldPrice" type="BigDecimal"/>
<action service="saveProductPriceChange" mode="sync"/>
</eca>
<eca service="deleteProductPrice" event="commit">
<action service="saveProductPriceChange" mode="sync"/>
</eca>
<!-- Product Party ECAs -->
<eca service="addPartyToCategory" event="invoke">
<condition field-name="roleTypeId" operator="equals" value="_NA_"/>
<action service="ensureNaPartyRole" mode="sync"/>
</eca>
<eca service="addPartyToFacility" event="invoke">
<condition field-name="roleTypeId" operator="equals" value="_NA_"/>
<action service="ensureNaPartyRole" mode="sync"/>
</eca>
<eca service="addPartyToFacilityGroup" event="invoke">
<condition field-name="roleTypeId" operator="equals" value="_NA_"/>
<action service="ensureNaPartyRole" mode="sync"/>
</eca>
<eca service="addProdCatalogToParty" event="invoke">
<condition field-name="roleTypeId" operator="equals" value="_NA_"/>
<action service="ensureNaPartyRole" mode="sync"/>
</eca>
<!-- Product Content ECAs -->
<eca service="createProductContent" event="in-validate">
<condition field-name="contentId" operator="is-empty"/>
<action service="createContent" mode="sync"/>
</eca>
<!-- pick list ECAs -->
<eca service="createPicklistFromOrders" event="in-validate">
<condition field-name="orderHeaderList" operator="is-empty"/>
<condition field-name="orderIdList" operator="is-not-empty"/>
<action service="convertPickOrderIdListToHeaders" 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="updateIssuanceShipmentAndPoOnReceiveInventory" mode="sync"/>
</eca>
<!-- Set the average cost of product -->
<eca service="receiveInventoryProduct" event="commit">
<action service="updateProductAverageCostOnReceiveInventory" mode="sync"/>
</eca>
<!-- Remove party content of image -->
<eca service="deletePartyRole" event="commit">
<condition field-name="roleTypeId" operator="equals" value="IMAGEAPPROVER"/>
<action service="removeImageContentApproval" mode="sync"/>
</eca>
<!-- ProductStoreGroup seca -->
<eca service="updateProductStoreGroup" event="commit">
<condition field-name="primaryParentGroupId" operator="not-equals" value=""/>
<action service="checkProductStoreGroupRollup" mode="sync"/>
</eca>
<eca service="createProductStoreGroupRollup" event="commit">
<action service="checkProductStoreGroupRollup" mode="sync"/>
</eca>
</service-eca>