svn commit: r443244 - in /incubator/ofbiz/trunk/applications/workeffort: script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml servicedef/services.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r443244 - in /incubator/ofbiz/trunk/applications/workeffort: script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml servicedef/services.xml

hansbak-2
Author: hansbak
Date: Wed Sep 13 22:44:16 2006
New Revision: 443244

URL: http://svn.apache.org/viewvc?view=rev&rev=443244
Log:
Allow the creation of a workeffort with a predifined workeffortId

Modified:
    incubator/ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml
    incubator/ofbiz/trunk/applications/workeffort/servicedef/services.xml

Modified: incubator/ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml?view=diff&rev=443244&r1=443243&r2=443244
==============================================================================
--- incubator/ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml (original)
+++ incubator/ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml Wed Sep 13 22:44:16 2006
@@ -21,7 +21,12 @@
         
     <simple-method method-name="createWorkEffort" short-description="Create Work Effort">
         <make-value value-name="newEntity" entity-name="WorkEffort"/>
-        <sequenced-id-to-env sequence-name="WorkEffort" env-name="newEntity.workEffortId"/>
+        <if-empty field-name="parameters.workEffortId">
+            <sequenced-id-to-env sequence-name="WorkEffort" env-name="newEntity.workEffortId"/>
+            <else>
+                <set field="newEntity.workEffortId" from-field="parameters.workEffortId"/>
+            </else>
+        </if-empty>
         <field-to-result field-name="newEntity.workEffortId" result-name="workEffortId"/>
         <set-nonpk-fields map-name="parameters" value-name="newEntity"/>
         

Modified: incubator/ofbiz/trunk/applications/workeffort/servicedef/services.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/workeffort/servicedef/services.xml?view=diff&rev=443244&r1=443243&r2=443244
==============================================================================
--- incubator/ofbiz/trunk/applications/workeffort/servicedef/services.xml (original)
+++ incubator/ofbiz/trunk/applications/workeffort/servicedef/services.xml Wed Sep 13 22:44:16 2006
@@ -38,7 +38,7 @@
             location="org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml" invoke="createWorkEffort">
         <description>Create a WorkEffort Entity</description>
         <implements service="interfaceWorkEffort"/>        
-        <auto-attributes mode="OUT" include="pk" optional="false"/>
+        <auto-attributes mode="INOUT" include="pk" optional="true"/>
         <attribute name="quickAssignPartyId" type="String" mode="IN" optional="true"/>
         <attribute name="requirementId" type="String" mode="IN" optional="true"/>
         <attribute name="communicationEventId" type="String" mode="IN" optional="true"/>