<#-- **** input parameters ***** --> <#-- input : message HARDIS WMS --> <#-- project : projectId in HARDIS SC NETWORK --> <#-- organisation : organisationtId in HARDIS SC NETWORK --> <#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> <#assign organisationRP = organisation> <#assign aDateTime = .now> <#switch cloudEventMsg.action> <#case "C"> <#-- *********************************************** Action = CREATE ******************** --> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign AncReceipt = JsonUtil.jsonToMap(dataRfx)> [ <#if AncReceipt.line_list?? && AncReceipt.line_list[0]??> { <#assign apiReflexPlatformID = ApiReflexPlatformID.OrderLinesAdded> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HliAntRecLr_OrderLinesAdded.ftl"> }, { <#assign apiReflexPlatformID = ApiReflexPlatformID.OrderReceiptExpected> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsrAntRec_ReceiptExpected.ftl"> } ] <#else> <#stop> <#break> <#case "U"> <#-- *********************************************** Action = UPDATE ******************** --> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign AncReceipt = JsonUtil.jsonToMap(dataRfx)> <#stop> <#break> <#case "D"> <#-- *********************************************** Action = DELETE ******************** --> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign AncReceipt = JsonUtil.jsonToMap(dataRfx)> <#stop> <#break> <#default> <#stop >