You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jo...@apache.org on 2007/08/04 01:09:07 UTC
svn commit: r562610 -
/ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java
Author: jonesde
Date: Fri Aug 3 16:09:05 2007
New Revision: 562610
URL: http://svn.apache.org/viewvc?view=rev&rev=562610
Log:
Added code to set status and receivedDate and update status; other small fixes
Modified:
ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java
Modified: ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java?view=diff&rev=562610&r1=562609&r2=562610
==============================================================================
--- ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java (original)
+++ ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java Fri Aug 3 16:09:05 2007
@@ -87,6 +87,8 @@
LocalDispatcher dispatcher = ctx.getDispatcher();
GenericDelegator delegator = ctx.getDelegator();
+ Timestamp nowTimestamp = UtilDateTime.nowTimestamp();
+
List errorMapList = FastList.newInstance();
GenericValue userLogin =null;
@@ -129,7 +131,9 @@
oagisMsgInfoCtx.put("confirmation", confirmation);
oagisMsgInfoCtx.put("authId", authId);
oagisMsgInfoCtx.put("outgoingMessage", "N");
+ oagisMsgInfoCtx.put("receivedDate", nowTimestamp);
oagisMsgInfoCtx.put("userLogin", userLogin);
+ oagisMsgInfoCtx.put("processingStatusId", "OAGMP_RECEIVED");
if (OagisServices.debugSaveXmlIn) {
try {
oagisMsgInfoCtx.put("fullMessageXml", UtilXml.writeXmlDocument(doc));
@@ -141,17 +145,17 @@
}
try {
- dispatcher.runAsync("createOagisMessageInfo", oagisMsgInfoCtx, true);
+ dispatcher.runSync("createOagisMessageInfo", oagisMsgInfoCtx, 60, true);
/* running async for better error handling
if (ServiceUtil.isError(oagisMsgInfoResult)){
String errMsg = ServiceUtil.getErrorMessage(oagisMsgInfoResult);
- errorMapList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "CreateOagisMessageInfoServiceError"));
+ // errorMapList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "CreateOagisMessageInfoServiceError"));
Debug.logError(errMsg, module);
}
*/
} catch (GenericServiceException e){
String errMsg = "Error creating OagisMessageInfo for the Incoming Message: "+e.toString();
- errorMapList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "GenericServiceException"));
+ // don't pass this back, nothing they can do about it: errorMapList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "GenericServiceException"));
Debug.logError(e, errMsg, module);
}
@@ -278,6 +282,14 @@
}
}
+ oagisMsgInfoCtx.put("processingStatusId", "OAGMP_RECEIVED");
+ try {
+ dispatcher.runSync("updateOagisMessageInfo", oagisMsgInfoCtx, 60, true);
+ } catch (GenericServiceException e){
+ String errMsg = "Error updating OagisMessageInfo for the Incoming Message: " + e.toString();
+ // don't pass this back, nothing they can do about it: errorMapList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "GenericServiceException"));
+ Debug.logError(e, errMsg, module);
+ }
if (errorMapList.size() > 0) {
//result.putAll(ServiceUtil.returnError("Errors found processing message"));
@@ -370,6 +382,7 @@
String sentDate = dateFormat.format(timestamp);
bodyParameters.put("sentDate", sentDate);
comiCtx.put("sentDate", timestamp);
+
// prepare map to Create Oagis Message Info
comiCtx.put("processingStatusId", "OAGMP_TRIGGERED");
comiCtx.put("component", "INVENTORY");
@@ -379,7 +392,6 @@
comiCtx.put("bsrVerb", "PROCESS");
comiCtx.put("bsrNoun", "SHIPMENT");
comiCtx.put("bsrRevision", "001");
- comiCtx.put("processingStatusId", orderStatusId);
comiCtx.put("orderId", orderId);
comiCtx.put("userLogin", userLogin);
try {