Author: jonesde
Date: Wed Dec 12 23:54:23 2007 New Revision: 603849 URL: http://svn.apache.org/viewvc?rev=603849&view=rev Log: Changed receiveInventoryProduct service to have an input parameter of currentInventoryItemId and output of inventoryItemId rather than the same for both; soher than the same for both; solves problem when used as a service-multi event Modified: ofbiz/trunk/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml ofbiz/trunk/applications/product/servicedef/services_shipment.xml ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java Modified: ofbiz/trunk/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml?rev=603849&r1=603848&r2=603849&view=diff ============================================================================== --- ofbiz/trunk/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml (original) +++ ofbiz/trunk/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml Wed Dec 12 23:54:23 2007 @@ -88,13 +88,13 @@ <and> <or> <not><if-empty field-name="parameters.serialNumber"/></not> - <not><if-empty field-name="parameters.inventoryItemId"/></not> + <not><if-empty field-name="parameters.currentInventoryItemId"/></not> </or> <if-compare field-name="parameters.quantityAccepted" operator="greater" value="1" type="Double"/> </and> </condition> <then> - <add-error><fail-message message="Tried to receive a serialized inventory item with serialNumber [${parameters.serialNumber}] or inventoryItemId [${parameters.inventoryItemId}] passed in and quantityAccepted [${parameters.quantityAccepted}] was greater than 1; we don't know what to do with that!"/></add-error> + <add-error><fail-message message="Tried to receive a serialized inventory item with serialNumber [${parameters.serialNumber}] or inventoryItemId [${parameters.currentInventoryItemId}] passed in and quantityAccepted [${parameters.quantityAccepted}] was greater than 1; we don't know what to do with that!"/></add-error> </then> </if> @@ -115,7 +115,7 @@ <clear-field field-name="serviceInMap"/> <clear-field field-name="currentInventoryItemId"/> - <if-empty field-name="parameters.inventoryItemId"> + <if-empty field-name="parameters.currentInventoryItemId"> <set-service-fields service-name="createInventoryItem" map-name="parameters" to-map-name="serviceInMap"/> <call-service service-name="createInventoryItem" in-map-name="serviceInMap"> <result-to-field result-name="inventoryItemId" field-name="currentInventoryItemId"/> @@ -124,7 +124,7 @@ <else> <set-service-fields service-name="updateInventoryItem" map-name="parameters" to-map-name="serviceInMap"/> <call-service service-name="updateInventoryItem" in-map-name="serviceInMap"/> - <set field="currentInventoryItemId" from-field="parameters.inventoryItemId"/> + <set field="currentInventoryItemId" from-field="parameters.currentInventoryItemId"/> </else> </if-empty> @@ -276,14 +276,11 @@ <set from-field="returnItem.returnQuantity" field="receiveCtx.quantityAccepted"/> <set from-field="returnHeader.destinationFacilityId" field="receiveCtx.facilityId"/> <!-- important: associate ShipmentReceipt with return shipment created --> - <set from-field="shipmentId" field="receiveCtx.shipmentId"/> + <set field="receiveCtx.shipmentId" from-field="shipmentId"/> - <set value="Returned Item RA# ${returnItem.returnId}" field="receiveCtx.comments"/> - <set from-field="nowTimestamp" field="receiveCtx.datetimeReceived"/> - - <calculate field-name="quantityRejected" map-name="receiveCtx" type="Double"> - <number value="0"/> - </calculate> + <set field="receiveCtx.comments" value="Returned Item RA# ${returnItem.returnId}"/> + <set field="receiveCtx.datetimeReceived" from-field="nowTimestamp"/> + <set field="receiveCtx.quantityRejected" value="0" type="Double"/> <call-service service-name="receiveInventoryProduct" in-map-name="receiveCtx"/> <else> Modified: ofbiz/trunk/applications/product/servicedef/services_shipment.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/servicedef/services_shipment.xml?rev=603849&r1=603848&r2=603849&view=diff ============================================================================== --- ofbiz/trunk/applications/product/servicedef/services_shipment.xml (original) +++ ofbiz/trunk/applications/product/servicedef/services_shipment.xml Wed Dec 12 23:54:23 2007 @@ -544,7 +544,8 @@ <attribute name="inventoryItemDetailSeqId" type="String" mode="IN" optional="true"/> <attribute name="priorityOrderId" type="String" mode="IN" optional="true"/> <attribute name="priorityOrderItemSeqId" type="String" mode="IN" optional="true"/> - <attribute name="inventoryItemId" type="String" mode="INOUT" optional="true"><!-- allow this to be passed in to update an existing InventoryItem, and all else is the same; if not passed in a new one will be created --></attribute> + <attribute name="currentInventoryItemId" type="String" mode="IN" optional="true"><!-- allow this to be passed in to update an existing InventoryItem, and all else is the same; if not passed in a new one will be created --></attribute> + <attribute name="inventoryItemId" type="String" mode="OUT" optional="true"></attribute> <override name="quantityAccepted" optional="false"/> <override name="quantityRejected" optional="false"/> <override name="inventoryItemTypeId" optional="false"/> Modified: ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java?rev=603849&r1=603848&r2=603849&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java (original) +++ ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java Wed Dec 12 23:54:23 2007 @@ -956,7 +956,7 @@ GenericValue inventoryItem = EntityUtil.getFirst(inventoryItemsBySerialNumber); if (inventoryItem != null) { - localRipCtx.put("inventoryItemId", inventoryItem.getString("inventoryItemId")); + localRipCtx.put("currentInventoryItemId", inventoryItem.getString("inventoryItemId")); } Map ripResult = dispatcher.runSync("receiveInventoryProduct", localRipCtx); |
Free forum by Nabble | Edit this page |