Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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]
* 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]