You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ha...@apache.org on 2008/08/08 05:57:56 UTC
svn commit: r683833 -
/ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml
Author: hansbak
Date: Thu Aug 7 20:57:55 2008
New Revision: 683833
URL: http://svn.apache.org/viewvc?rev=683833&view=rev
Log:
small error correction from last commit and spaces for tabs
Modified:
ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml
Modified: ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml?rev=683833&r1=683832&r2=683833&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml (original)
+++ ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml Thu Aug 7 20:57:55 2008
@@ -94,7 +94,7 @@
<set field="commRole.statusId" value="COM_ROLE_CREATED" />
<call-service service-name="createCommunicationEventRole" in-map-name="commRole"/>
</if-not-empty>
-
+
<!-- partyIdFrom role-->
<if-not-empty field="newEntity.partyIdFrom">
<set field="commRole.communicationEventId" from-field="newEntity.communicationEventId" />
@@ -105,62 +105,62 @@
<call-service service-name="createCommunicationEventRole" in-map-name="commRole"/>
</if-not-empty>
</simple-method>
- <simple-method method-name="updateCommunicationEvent"
- short-description="Update a CommunicationEvent">
- <entity-one entity-name="CommunicationEvent" value-name="event" />
- <set field="oldStatusId" from-field="event.statusId" />
- <set-nonpk-fields map-name="parameters" value-name="event" />
- <if-compare-field operator="not-equals" field="event.statusId"
- to-field="oldStatusId">
- <call-simple-method method-name="setCommunicationEventStatus" />
- </if-compare-field>
- <store-value value-name="event" />
+ <simple-method method-name="updateCommunicationEvent"
+ short-description="Update a CommunicationEvent">
+ <entity-one entity-name="CommunicationEvent" value-name="event" />
+ <set field="oldStatusId" from-field="event.statusId" />
+ <set-nonpk-fields map-name="parameters" value-name="event" />
+ <if-compare-field operator="not-equals" field="event.statusId"
+ to-field="oldStatusId">
+ <call-simple-method method-name="setCommunicationEventStatus" />
+ </if-compare-field>
+ <store-value value-name="event" />
<!-- if the from- or to-party changed change also the roles -->
- <if-not-empty field="parameters.partyIdFrom">
- <if-compare operator="not-equals" value="parameters.partIdFrom" field="event.partyIdFrom">
+ <if-not-empty field="parameters.partyIdFrom">
+ <if-compare operator="not-equals" value="parameters.partIdFrom" field="event.partyIdFrom">
<!-- check if role exist then delete old role -->
- <entity-one entity-name="CommunicationEventRole"
- value-name="roleFrom">
- <field-map field-name="communicationEventId" env-name="event.communicationEventId" />
- <field-map field-name="partyId" env-name="parameters.partyIdFrom" />
+ <entity-one entity-name="CommunicationEventRole"
+ value-name="roleFrom">
+ <field-map field-name="communicationEventId" env-name="event.communicationEventId" />
+ <field-map field-name="partyId" env-name="parameters.partyIdFrom" />
<field-map field-name="roleTypeId" value="ORIGINATOR" />
- </entity-one>
- <if-not-empty field="roleFrom">
- <remove-value value-name="roleFrom" />
- </if-not-empty>
+ </entity-one>
+ <if-not-empty field="roleFrom">
+ <remove-value value-name="roleFrom" />
+ </if-not-empty>
<!-- add new role -->
- <set field="newRoleFrom.communicationEventId" from-field="event.communicationEventId" />
- <set field="newRoleFrom.partyId" from-field="event.partyIdFrom" />
+ <set field="newRoleFrom.communicationEventId" from-field="event.communicationEventId" />
+ <set field="newRoleFrom.partyId" from-field="event.partyIdFrom" />
<set field="newRoleFrom.roleTypeId" value="ORIGINATOR" />
<set field="newRoleFrom.contactMechId" from-field="event.contactMechIdFrom" />
- <call-service service-name="createCommunicationEventRole"
- in-map-name="newRoleFrom" />
- </if-compare>
- </if-not-empty>
- <if-not-empty field="parameters.partyIdTo">
- <if-compare operator="not-equals" value="parameters.partIdTo"
- field="event.partyIdTo">
+ <call-service service-name="createCommunicationEventRole"
+ in-map-name="newRoleFrom" />
+ </if-compare>
+ </if-not-empty>
+ <if-not-empty field="parameters.partyIdTo">
+ <if-compare operator="not-equals" value="parameters.partIdTo"
+ field="event.partyIdTo">
<!-- check if role exist then delete old role -->
- <entity-one entity-name="CommunicationEventRole"
- value-name="roleTo">
- <field-map field-name="communicationEventId" env-name="event.communicationEventId" />
- <field-map field-name="partyId" env-name="event.partyIdTo" />
- <field-map field-name="roleTypeId" value="ADDRESSEE" />
- <set field="newRoleFrom.contactMechId" from-field="event.contactMechIdTo" />
- </entity-one>
- <if-not-empty field="roleTo">
- <remove-value value-name="roleTo" />
- </if-not-empty>
+ <entity-one entity-name="CommunicationEventRole"
+ value-name="roleTo">
+ <field-map field-name="communicationEventId" env-name="event.communicationEventId" />
+ <field-map field-name="partyId" env-name="event.partyIdTo" />
+ <field-map field-name="roleTypeId" value="ADDRESSEE" />
+ </entity-one>
+ <if-not-empty field="roleTo">
+ <remove-value value-name="roleTo" />
+ </if-not-empty>
<!-- add new role -->
- <set field="newRoleTo.communicationEventId" from-field="event.communicationEventId" />
- <set field="newRoleTo.partyId" from-field="event.partyIdTo" />
- <set field="newRoleTo.roleTypeId" value="ADDRESSEE" />
- <call-service service-name="createCommunicationEventRole"
- in-map-name="newRoleTo" />
- </if-compare>
- </if-not-empty>
- </simple-method>
+ <set field="newRoleTo.communicationEventId" from-field="event.communicationEventId" />
+ <set field="newRoleTo.partyId" from-field="event.partyIdTo" />
+ <set field="newRoleTo.roleTypeId" value="ADDRESSEE" />
+ <set field="newRoleTo.contactMechId" from-field="event.contactMechIdTo" />
+ <call-service service-name="createCommunicationEventRole"
+ in-map-name="newRoleTo" />
+ </if-compare>
+ </if-not-empty>
+ </simple-method>
<simple-method method-name="deleteCommunicationEvent" short-description="Delete a CommunicationEvent">
<entity-one entity-name="CommunicationEvent" value-name="event"/>
@@ -335,14 +335,14 @@
<add-error><fail-message message="Email address is required"/></add-error>
</if-empty>
- <if-empty field="parameters.lastName">
- <add-error><fail-message message="Please enter a lastName"/></add-error>
- </if-empty>
-
- <if-empty field="parameters.firstName">
- <add-error><fail-message message="Please enter a firstName"/></add-error>
- <check-errors/>
- </if-empty>
+ <if-empty field="parameters.lastName">
+ <add-error><fail-message message="Please enter a lastName"/></add-error>
+ </if-empty>
+
+ <if-empty field="parameters.firstName">
+ <add-error><fail-message message="Please enter a firstName"/></add-error>
+ <check-errors/>
+ </if-empty>
</if-empty>
<check-errors/>
@@ -356,23 +356,23 @@
</if-empty>
<!-- allocate email to the party -->
- <if-not-empty field="parameters.emailAddress">
- <entity-one entity-name="Party" value-name="party" />
- <if-empty field="party">
- <add-error>
- <fail-message message="Party ID: ${parameters.partyId} not found" />
- </add-error>
- <check-errors />
- </if-empty>
- <set field="newEmail.contactMechPurposeTypeId" value="PRIMARY_EMAIL" />
- <set field="newEmail.partyId" from-field="parameters.partyId" />
- <set field="newEmail.emailAddress" from-field="parameters.emailAddress" />
- <call-service service-name="createPartyEmailAddress"
- in-map-name="newEmail">
- <result-to-field result-name="contactMechId"
- field-name="inCom.contactMechIdFrom" />
- </call-service>
- </if-not-empty>
+ <if-not-empty field="parameters.emailAddress">
+ <entity-one entity-name="Party" value-name="party" />
+ <if-empty field="party">
+ <add-error>
+ <fail-message message="Party ID: ${parameters.partyId} not found" />
+ </add-error>
+ <check-errors />
+ </if-empty>
+ <set field="newEmail.contactMechPurposeTypeId" value="PRIMARY_EMAIL" />
+ <set field="newEmail.partyId" from-field="parameters.partyId" />
+ <set field="newEmail.emailAddress" from-field="parameters.emailAddress" />
+ <call-service service-name="createPartyEmailAddress"
+ in-map-name="newEmail">
+ <result-to-field result-name="contactMechId"
+ field-name="inCom.contactMechIdFrom" />
+ </call-service>
+ </if-not-empty>
<!-- update the communication event -->
<set field="inCom.communicationEventId" from-field="parameters.communicationEventId"/>