[OFBiz] SVN: r7497 - in trunk/applications: accounting/script/org/ofbiz/accounting/payment accounting/servicedef party/script/org/ofbiz/party/contact party/servicedef product/script/org/ofbiz/product/storage workeffort/script/org/ofbiz/workeffort/workeffort
jacopo@svn.ofbiz.org
jacopo at svn.ofbiz.org
Wed May 3 05:57:13 CDT 2006
Author: jacopo
Date: 2006-05-03 05:56:38 -0500 (Wed, 03 May 2006)
New Revision: 7497
Modified:
trunk/applications/accounting/script/org/ofbiz/accounting/payment/PaymentMethodServices.xml
trunk/applications/accounting/servicedef/groups.xml
trunk/applications/accounting/servicedef/services_paymentmethod.xml
trunk/applications/party/script/org/ofbiz/party/contact/ContactMechServices.xml
trunk/applications/party/script/org/ofbiz/party/contact/PartyContactMechServices.xml
trunk/applications/party/servicedef/services.xml
trunk/applications/product/script/org/ofbiz/product/storage/FacilityContactMechServices.xml
trunk/applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml
Log:
Refactored the updateContactMech* services to return the oldContactMechId instead of the newContactMechId parameter (the new one is in the contactMechId parameter).
Modified: trunk/applications/accounting/script/org/ofbiz/accounting/payment/PaymentMethodServices.xml
===================================================================
--- trunk/applications/accounting/script/org/ofbiz/accounting/payment/PaymentMethodServices.xml 2006-05-03 08:22:03 UTC (rev 7496)
+++ trunk/applications/accounting/script/org/ofbiz/accounting/payment/PaymentMethodServices.xml 2006-05-03 10:56:38 UTC (rev 7497)
@@ -83,14 +83,14 @@
</if-compare>
</simple-method>
<simple-method method-name="updatePaymentMethodAddress" short-description="Update payment method addresses" use-transaction="false">
- <!-- find all CreditCard and EftAccount instances that use the current contactMechId and update them
- through the updateCreditCard or updateEftAccount services to use the newContactMechId -->
- <field-to-field field-name="contactMechId" map-name="parameters" to-map-name="lookupMap"/>
+ <!-- find all CreditCard and EftAccount instances that use the current oldContactMechId and update them
+ through the updateCreditCard or updateEftAccount services to use the new contactMechId -->
+ <field-to-field field-name="oldContactMechId" map-name="parameters" to-map-name="lookupMap" to-field-name="contactMechId"/>
<find-by-and entity-name="CreditCard" map-name="lookupMap" list-name="creditCards"/>
<iterate entry-name="creditCard" list-name="creditCards">
<set-service-fields service-name="updateCreditCard" map-name="creditCard" to-map-name="uccMap"/>
- <field-to-field field-name="newContactMechId" map-name="parameters" to-field-name="contactMechId" to-map-name="uccMap"/>
+ <field-to-field field-name="contactMechId" map-name="parameters" to-field-name="contactMechId" to-map-name="uccMap"/>
<field-to-field field-name="partyId" map-name="parameters" to-field-name="partyId" to-map-name="uccMap"/>
<!-- use the service so it will expire the old card and create a new one; don't break on error since this is a background process, just get whatever we can done... -->
<call-service service-name="updateCreditCard" in-map-name="uccMap" break-on-error="false"/>
@@ -99,7 +99,7 @@
<find-by-and entity-name="EftAccount" map-name="lookupMap" list-name="eftAccounts"/>
<iterate entry-name="eftAccount" list-name="eftAccounts">
<set-service-fields service-name="updateEftAccount" map-name="eftAccount" to-map-name="ueaMap"/>
- <field-to-field field-name="newContactMechId" map-name="parameters" to-field-name="contactMechId" to-map-name="ueaMap"/>
+ <field-to-field field-name="contactMechId" map-name="parameters" to-field-name="contactMechId" to-map-name="ueaMap"/>
<field-to-field field-name="partyId" map-name="parameters" to-field-name="partyId" to-map-name="ueaMap"/>
<!-- use the service so it will expire the old account and create a new one; don't break on error since this is a background process, just get whatever we can done... -->
<call-service service-name="updateEftAccount" in-map-name="ueaMap" break-on-error="false"/>
Modified: trunk/applications/accounting/servicedef/groups.xml
===================================================================
--- trunk/applications/accounting/servicedef/groups.xml 2006-05-03 08:22:03 UTC (rev 7496)
+++ trunk/applications/accounting/servicedef/groups.xml 2006-05-03 10:56:38 UTC (rev 7497)
@@ -31,6 +31,7 @@
</group>
<group name="updateCreditCardAndAddress" send-mode="all">
<service name="updatePostalAddress" mode="sync" result-to-context="true"/>
+ <service name="createPartyContactMech" mode="sync"/>
<service name="updateCreditCard" mode="sync"/>
</group>
Modified: trunk/applications/accounting/servicedef/services_paymentmethod.xml
===================================================================
--- trunk/applications/accounting/servicedef/services_paymentmethod.xml 2006-05-03 08:22:03 UTC (rev 7496)
+++ trunk/applications/accounting/servicedef/services_paymentmethod.xml 2006-05-03 10:56:38 UTC (rev 7497)
@@ -164,9 +164,9 @@
</service>
<service name="updatePaymentMethodAddress" engine="simple"
location="org/ofbiz/accounting/payment/PaymentMethodServices.xml" invoke="updatePaymentMethodAddress" auth="true" use-transaction="false">
- <description>Finds CreditCards and EftAccounts that use the contactMechId and updates to the newContactMechId</description>
+ <description>Finds CreditCards and EftAccounts that use the oldContactMechId and updates to the contactMechId</description>
<attribute name="contactMechId" type="String" mode="IN" optional="false"/>
- <attribute name="newContactMechId" type="String" mode="IN" optional="false"/>
+ <attribute name="oldContactMechId" type="String" mode="IN" optional="false"/>
<attribute name="partyId" type="String" mode="IN" optional="true"/>
</service>
Modified: trunk/applications/party/script/org/ofbiz/party/contact/ContactMechServices.xml
===================================================================
--- trunk/applications/party/script/org/ofbiz/party/contact/ContactMechServices.xml 2006-05-03 08:22:03 UTC (rev 7496)
+++ trunk/applications/party/script/org/ofbiz/party/contact/ContactMechServices.xml 2006-05-03 10:56:38 UTC (rev 7497)
@@ -147,9 +147,9 @@
</if-compare-field>
</else>
</if-compare-field>
- <field-to-result map-name="newValue" field-name="contactMechId" result-name="newContactMechId"/>
- <field-to-request map-name="newValue" field-name="contactMechId" request-name="newContactMechId"/>
- <field-to-result map-name="parameters" field-name="contactMechId"/>
+ <field-to-request map-name="newValue" field-name="contactMechId" request-name="contactMechId"/>
+ <field-to-result map-name="parameters" field-name="contactMechId" result-name="oldContactMechId"/>
+ <field-to-result map-name="newValue" field-name="contactMechId" result-name="contactMechId"/>
</simple-method>
<simple-method method-name="createTelecomNumber" short-description="Create Contact Mechanism with Telecom Number">
@@ -200,9 +200,8 @@
</if-compare-field>
</else>
</if-compare-field>
- <field-to-result map-name="newValue" field-name="contactMechId" result-name="newContactMechId"/>
- <field-to-request map-name="newValue" field-name="contactMechId" request-name="newContactMechId"/>
- <field-to-result map-name="parameters" field-name="contactMechId"/>
+ <field-to-result map-name="newValue" field-name="contactMechId" result-name="contactMechId"/>
+ <field-to-result map-name="parameters" field-name="contactMechId" result-name="oldContactMechId"/>
</simple-method>
<simple-method method-name="createEmailAddress" short-description="Create an email address contact mechanism">
Modified: trunk/applications/party/script/org/ofbiz/party/contact/PartyContactMechServices.xml
===================================================================
--- trunk/applications/party/script/org/ofbiz/party/contact/PartyContactMechServices.xml 2006-05-03 08:22:03 UTC (rev 7496)
+++ trunk/applications/party/script/org/ofbiz/party/contact/PartyContactMechServices.xml 2006-05-03 10:56:38 UTC (rev 7497)
@@ -215,7 +215,7 @@
<field-to-field field-name="partyId" map-name="parameters" to-field-name="partyId" to-map-name="context"/>
<call-service in-map-name="context" service-name="updatePostalAddress">
<default-message>Postal Address successfully updated</default-message>
- <result-to-field result-name="newContactMechId" map-name="newPartyContactMech" field-name="contactMechId" />
+ <result-to-field result-name="contactMechId" map-name="newPartyContactMech" field-name="contactMechId" />
</call-service>
<call-map-processor xml-resource="org/ofbiz/party/contact/PartyContactMechMapProcs.xml"
processor-name="updatePartyContactMech" in-map-name="parameters" out-map-name="context2"/>
@@ -276,7 +276,7 @@
processor-name="telecomNumber" in-map-name="parameters" out-map-name="context"/>
<call-service in-map-name="context" service-name="updateTelecomNumber">
<default-message>Telecom Number successfully updated</default-message>
- <result-to-field result-name="newContactMechId" map-name="newPartyContactMech" field-name="contactMechId" />
+ <result-to-field result-name="contactMechId" map-name="newPartyContactMech" field-name="contactMechId" />
</call-service>
<call-map-processor xml-resource="org/ofbiz/party/contact/PartyContactMechMapProcs.xml"
Modified: trunk/applications/party/servicedef/services.xml
===================================================================
--- trunk/applications/party/servicedef/services.xml 2006-05-03 08:22:03 UTC (rev 7496)
+++ trunk/applications/party/servicedef/services.xml 2006-05-03 10:56:38 UTC (rev 7497)
@@ -330,9 +330,9 @@
location="org/ofbiz/party/contact/ContactMechServices.xml" invoke="updatePostalAddress" auth="true">
<description>Update a Postal Address</description>
<auto-attributes entity-name="PostalAddress" include="nonpk" mode="IN" optional="true"/>
- <attribute name="contactMechId" type="String" mode="INOUT" optional="false"/>
+ <attribute name="contactMechId" type="String" mode="INOUT" optional="false"/> <!-- the out paramater is the id of the new address -->
<attribute name="directions" type="String" mode="IN" optional="true"/> <!-- ?? -->
- <attribute name="newContactMechId" type="String" mode="OUT" optional="false"/>
+ <attribute name="oldContactMechId" type="String" mode="OUT" optional="false"/> <!-- this is the id of the old address -->
<attribute name="partyId" type="String" mode="IN" optional="true"/>
<override name="address1" optional="false"/>
<override name="city" optional="false"/>
@@ -368,7 +368,7 @@
<description>Update a Telecommunications Number</description>
<auto-attributes entity-name="TelecomNumber" include="nonpk" mode="IN" optional="true"/>
<attribute name="contactMechId" type="String" mode="INOUT" optional="false"/>
- <attribute name="newContactMechId" type="String" mode="OUT" optional="false"/>
+ <attribute name="oldContactMechId" type="String" mode="OUT" optional="false"/>
</service>
<service name="updatePartyTelecomNumber" engine="simple"
location="org/ofbiz/party/contact/PartyContactMechServices.xml" invoke="updatePartyTelecomNumber" auth="true">
Modified: trunk/applications/product/script/org/ofbiz/product/storage/FacilityContactMechServices.xml
===================================================================
--- trunk/applications/product/script/org/ofbiz/product/storage/FacilityContactMechServices.xml 2006-05-03 08:22:03 UTC (rev 7496)
+++ trunk/applications/product/script/org/ofbiz/product/storage/FacilityContactMechServices.xml 2006-05-03 10:56:38 UTC (rev 7497)
@@ -170,7 +170,7 @@
processor-name="postalAddress" in-map-name="parameters" out-map-name="context"/>
<call-service in-map-name="context" service-name="updatePostalAddress">
<default-message>Postal Address successfully updated</default-message>
- <result-to-field result-name="newContactMechId" map-name="newFacilityContactMech" field-name="contactMechId" />
+ <result-to-field result-name="contactMechId" map-name="newFacilityContactMech" field-name="contactMechId" />
</call-service>
<call-map-processor xml-resource="org/ofbiz/product/storage/FacilityContactMechMapProcs.xml"
processor-name="updateFacilityContactMech" in-map-name="parameters" out-map-name="context2"/>
@@ -216,7 +216,7 @@
processor-name="telecomNumber" in-map-name="parameters" out-map-name="context"/>
<call-service in-map-name="context" service-name="updateTelecomNumber">
<default-message>Telecom Number successfully updated</default-message>
- <result-to-field result-name="newContactMechId" map-name="newFacilityContactMech" field-name="contactMechId" />
+ <result-to-field result-name="contactMechId" map-name="newFacilityContactMech" field-name="contactMechId" />
</call-service>
<call-map-processor xml-resource="org/ofbiz/product/storage/FacilityContactMechMapProcs.xml"
Modified: trunk/applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml
===================================================================
--- trunk/applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml 2006-05-03 08:22:03 UTC (rev 7496)
+++ trunk/applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml 2006-05-03 10:56:38 UTC (rev 7497)
@@ -368,7 +368,7 @@
processor-name="postalAddress" in-map-name="parameters" out-map-name="context"/>
<call-service in-map-name="context" service-name="updatePostalAddress">
<default-message>Postal Address successfully updated</default-message>
- <result-to-field result-name="newContactMechId" map-name="newValue" field-name="contactMechId" />
+ <result-to-field result-name="contactMechId" map-name="newValue" field-name="contactMechId" />
</call-service>
<call-map-processor xml-resource="org/ofbiz/workeffort/workeffort/WorkflowMapProcessors.xml"
processor-name="workEffortContactMech" in-map-name="parameters" out-map-name="context2"/>
@@ -419,7 +419,7 @@
processor-name="telecomNumber" in-map-name="parameters" out-map-name="context"/>
<call-service in-map-name="context" service-name="updateTelecomNumber">
<default-message>Telecom Number successfully updated</default-message>
- <result-to-field result-name="newContactMechId" map-name="newValue" field-name="contactMechId" />
+ <result-to-field result-name="contactMechId" map-name="newValue" field-name="contactMechId" />
</call-service>
<call-map-processor xml-resource="org/ofbiz/workeffort/workeffort/WorkflowMapProcessors.xml"
More information about the Svn
mailing list