Author: apatel
Date: Sat Sep 15 14:11:55 2007 New Revision: 575983 URL: http://svn.apache.org/viewvc?rev=575983&view=rev Log: Adding map processor for handling data coming from WorkEffortAssoc from, helps in better error handling. Modified: ofbiz/trunk/applications/workeffort/config/WorkEffortUiLabels.properties ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkflowMapProcessors.xml ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkflowSimpleEvents.xml ofbiz/trunk/applications/workeffort/servicedef/services.xml Modified: ofbiz/trunk/applications/workeffort/config/WorkEffortUiLabels.properties URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/config/WorkEffortUiLabels.properties?rev=575983&r1=575982&r2=575983&view=diff ============================================================================== --- ofbiz/trunk/applications/workeffort/config/WorkEffortUiLabels.properties (original) +++ ofbiz/trunk/applications/workeffort/config/WorkEffortUiLabels.properties Sat Sep 15 14:11:55 2007 @@ -447,4 +447,5 @@ FormFieldTitle_startDateTime=Start Date Time FormFieldTitle_finishDateTime=Finish Date Time FormFieldTitle_cancelDateTime=Cancel Date Time +PriorityFormatNotCorrect=Priority format is incorrect Modified: ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkflowMapProcessors.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkflowMapProcessors.xml?rev=575983&r1=575982&r2=575983&view=diff ============================================================================== --- ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkflowMapProcessors.xml (original) +++ ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkflowMapProcessors.xml Sat Sep 15 14:11:55 2007 @@ -34,7 +34,9 @@ <process field="currentStatusId"><copy/><not-empty><fail-property resource="WorkEffortUiLabels" property="WorkEffortStatusIdMissing"/></not-empty></process> <process field="universalId"><copy/></process> <process field="scopeEnumId"><copy/></process> - <process field="priority"><copy/></process> + <process field="priority"><copy/> + <convert type="Long"><fail-property resource="WorkEffortUiLabels" property="PriorityFormatNotCorrect"/></convert> + </process> <process field="percentComplete"><copy/></process> <process field="workEffortName"><copy/><not-empty><fail-property resource="WorkEffortUiLabels" property="WorkEffortNameIsMissing"/></not-empty></process> <process field="description"><copy/></process> @@ -77,4 +79,12 @@ <not-empty><fail-property resource="WorkEffortUiLabels" property="WorkEffortEmailAddressIsMissing"/></not-empty> <validate-method method="isEmail"><fail-property resource="WorkEffortUiLabels" property="WorkEffortEmailAddressNotFormatted"/></validate-method></process> </simple-map-processor> + <simple-map-processor name="createWorkEffortAssocMap"> + <process field="workEffortIdFrom"><copy/></process> + <process field="workEffortIdTo"><copy/></process> + <process field="workEffortAssocTypeId"><copy/></process> + <process field="sequenceNum"><copy/></process> + <process field="fromDate"><copy/></process> + <process field="thruDate"><copy/></process> + </simple-map-processor> </simple-map-processors> Modified: ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkflowSimpleEvents.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkflowSimpleEvents.xml?rev=575983&r1=575982&r2=575983&view=diff ============================================================================== --- ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkflowSimpleEvents.xml (original) +++ ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkflowSimpleEvents.xml Sat Sep 15 14:11:55 2007 @@ -35,4 +35,25 @@ <call-service service-name="wfAcceptRoleAssignment" in-map-name="context"> <default-message>Work Effort successfully created.</default-message></call-service> </simple-method> + <simple-method method-name="createWorkEffort" short-description="Creates WorkEffort"> + <call-map-processor xml-resource="org/ofbiz/workeffort/workeffort/WorkflowMapProcessors.xml" + processor-name="createWorkEffortMap" in-map-name="parameters" out-map-name="context"/> + <check-errors/> + <call-service service-name="createWorkEffort" in-map-name="context"> + <default-message>Work Effort successfully created.</default-message> + <result-to-request result-name="workEffortId"/> + </call-service> + </simple-method> + <simple-method method-name="createWorkEffortAndAssoc" short-description="Creates WorkEffort"> + <call-map-processor xml-resource="org/ofbiz/workeffort/workeffort/WorkflowMapProcessors.xml" + processor-name="createWorkEffortMap" in-map-name="parameters" out-map-name="context"/> + <check-errors/> + <call-map-processor xml-resource="org/ofbiz/workeffort/workeffort/WorkflowMapProcessors.xml" + processor-name="createWorkEffortAssocMap" in-map-name="parameters" out-map-name="context"/> + <check-errors/> + <call-service service-name="createWorkEffortAndAssoc" in-map-name="context"> + <default-message>Work Effort successfully created.</default-message> + <result-to-request result-name="workEffortId"/> + </call-service> + </simple-method> </simple-methods> Modified: ofbiz/trunk/applications/workeffort/servicedef/services.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/servicedef/services.xml?rev=575983&r1=575982&r2=575983&view=diff ============================================================================== --- ofbiz/trunk/applications/workeffort/servicedef/services.xml (original) +++ ofbiz/trunk/applications/workeffort/servicedef/services.xml Sat Sep 15 14:11:55 2007 @@ -237,6 +237,7 @@ <auto-attributes include="nonpk" mode="IN" optional="true" entity-name="WorkEffort"/> <auto-attributes include="pk" mode="INOUT" optional="true" entity-name="WorkEffortAssoc"/> <auto-attributes include="nonpk" mode="IN" optional="true" entity-name="WorkEffortAssoc"/> + <attribute name="quickAssignPartyId" type="String" mode="IN" optional="true"/> </service> <service name="updateWorkEffortAndAssoc" engine="group" location="updateWorkEffortAndAssoc" invoke="" auth="true"> <description>Creates a WorkEffort entity and WorkEffortAssoc</description> |
Free forum by Nabble | Edit this page |