From 13fd56a0116afabfc435a4dc531c466522b63517 Mon Sep 17 00:00:00 2001 From: Devanshu Vyas <62797272+vyasdevanshu@users.noreply.github.com> Date: Fri, 31 Jan 2025 11:29:26 +0530 Subject: [PATCH 1/2] Updated the consumeOMSFeed.md document --- .../order-ledger/consumeOMSFeedSystemMessage.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/project-ideas/order-ledger/consumeOMSFeedSystemMessage.md b/project-ideas/order-ledger/consumeOMSFeedSystemMessage.md index e3158f93..565a0f17 100644 --- a/project-ideas/order-ledger/consumeOMSFeedSystemMessage.md +++ b/project-ideas/order-ledger/consumeOMSFeedSystemMessage.md @@ -1,4 +1,4 @@ -# co.hotwax.orderledger.system.FeedServices.consume#OMSFeedSystemMessage (OMS) +# co.hotwax.orderledger.system.FeedServices.consume#OMSFeed (OMS) 1. Implements _org.moqui.impl.SystemMessageServices.consume#SystemMessage_. 2. Get the systemMessage record from SystemMessageAndType view entity. 3. Set filePathRef = location reference of systemMessage.messageText. @@ -9,8 +9,10 @@ * Split fileName by "." into fileNameArray. * Set errorFileName = fileNameArray[0] + "Error." + fileNameArray[1]. * Set errorFilePathRef = expanded systemMessage.sendPath + "/error/" + errorFileName. - * Initiate a Json file for errorFilePathRef, we will write erroneous records with errors in this file. + * Initiate a JSON file for errorFilePathRef, we will write erroneous records with errors in this file. 7. Iterate through jsonList and for each entry call systemMessage.sendService in new transaction. - * If serviceOutput has error list then write following in error file - ["json":jsonList.entry, "error":serviceOutput.errorMessageList]. -8. Close error file. -9. Create SystemMessage - [systemMessageTypeId:"FeedErrorFile", messageText:errorFilePathRef, parentMessageId:systemMessage.systemMessageId] \ No newline at end of file + * If the service is returned with an error or execution stops due to an exception + * Add a new key value to the entry - "error": error/exception message + * Write the corresponding entry in the error file - ["json":jsonList.entry]. +8. Close the error file. +9. Create SystemMessage - [systemMessageTypeId:"FeedErrorFile", messageText:errorFilePathRef, parentMessageId:systemMessage.systemMessageId] From 6345856fffd0da0ddc11267b3f8590ccba85ccfe Mon Sep 17 00:00:00 2001 From: Devanshu Vyas <62797272+vyasdevanshu@users.noreply.github.com> Date: Fri, 31 Jan 2025 11:30:29 +0530 Subject: [PATCH 2/2] Updated the document name --- .../{consumeOMSFeedSystemMessage.md => consumeOMSFeed.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename project-ideas/order-ledger/{consumeOMSFeedSystemMessage.md => consumeOMSFeed.md} (100%) diff --git a/project-ideas/order-ledger/consumeOMSFeedSystemMessage.md b/project-ideas/order-ledger/consumeOMSFeed.md similarity index 100% rename from project-ideas/order-ledger/consumeOMSFeedSystemMessage.md rename to project-ideas/order-ledger/consumeOMSFeed.md