svn commit: r1767550 - in /ofbiz/trunk/applications/humanres: minilang/HumanResServices.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: r1767550 - in /ofbiz/trunk/applications/humanres: minilang/HumanResServices.xml servicedef/services.xml

Deepak Dixit-5
Author: deepak
Date: Tue Nov  1 19:19:50 2016
New Revision: 1767550

URL: http://svn.apache.org/viewvc?rev=1767550&view=rev
Log:
Improved: Converted PartySkill entity CRUD service to entity-auto
(OFBIZ-8662)
Thanks Pawan Verma for your contribution.

Modified:
    ofbiz/trunk/applications/humanres/minilang/HumanResServices.xml
    ofbiz/trunk/applications/humanres/servicedef/services.xml

Modified: ofbiz/trunk/applications/humanres/minilang/HumanResServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/minilang/HumanResServices.xml?rev=1767550&r1=1767549&r2=1767550&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/minilang/HumanResServices.xml (original)
+++ ofbiz/trunk/applications/humanres/minilang/HumanResServices.xml Tue Nov  1 19:19:50 2016
@@ -21,30 +21,6 @@
 <simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://ofbiz.apache.org/Simple-Method" xsi:schemaLocation="http://ofbiz.apache.org/Simple-Method http://ofbiz.apache.org/dtds/simple-methods.xsd">
 
-    <simple-method method-name="createPartySkill" short-description="Create Party Skills">
-        <make-value entity-name="PartySkill" value-field="newEntity"/>
-        <set-pk-fields map="parameters" value-field="newEntity"/>
-        <set-nonpk-fields map="parameters" value-field="newEntity"/>
-        <entity-one entity-name="PartySkill" value-field="partySkill" auto-field-map="true"/>
-        <if>
-            <condition>
-                <and>
-                   <if-compare-field field="partySkill.partyId" to-field="parameters.partyId" operator="equals"/>
-                   <if-compare-field field="partySkill.skillTypeId" to-field="parameters.skillTypeId" operator="equals"/>
-                </and>
-            </condition>
-            <then>
-                 <add-error>
-                    <fail-property resource="HumanResUiLabels" property="HumanResPartySkillsAlreadyExists"/>
-                 </add-error>
-                 <check-errors/>
-            </then>
-            <else>
-                <create-value value-field="newEntity"/>
-            </else>
-        </if>
-    </simple-method>
-
     <!-- Employment Group -->
     <simple-method method-name="createEmployment" short-description="Create Employment"><!--entity-auto-->
         <make-value entity-name="Employment" value-field="newEntity"/>

Modified: ofbiz/trunk/applications/humanres/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/servicedef/services.xml?rev=1767550&r1=1767549&r2=1767550&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/servicedef/services.xml (original)
+++ ofbiz/trunk/applications/humanres/servicedef/services.xml Tue Nov  1 19:19:50 2016
@@ -66,8 +66,7 @@ under the License.
         <auto-attributes mode="IN" include="pk" optional="false"/>
     </service>
 
-    <service name="createPartySkill" engine="simple" default-entity-name="PartySkill"
-             location="component://humanres/minilang/HumanResServices.xml" invoke="createPartySkill" auth="true">
+    <service name="createPartySkill" engine="entity-auto" default-entity-name="PartySkill" invoke="create" auth="true">
         <description>Create Skill for a Party</description>
         <permission-service service-name="humanResManagerPermission" main-action="CREATE"/>
         <auto-attributes mode="IN" include="pk" optional="false"/>