reflex-wms-connector/RFXtoRP_HsaItmLv.ftl
2024-12-04 08:08:26 +01:00

46 lines
1.5 KiB
Java

<#-- **** input parameters ***** -->
<#-- input : message RFX -->
<#-- project : projectId in ReflexPlatform -->
<#-- organisation : organisationtId in ReflexPlatform -->
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project>
<#assign organisationRP = organisation>
<#assign aDateTime = .now>
<#switch cloudEventMsg.action>
<#case "C">
<#case "U">
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign lv = JsonUtil.jsonToMap(dataRfx)>
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ItemLogisticVariantUpdated>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaItmLv_LogisticVariantUpdated.ftl">
}
]
<#break>
<#case "D">
<#-- *********************************************** Action = DELETE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign lv = JsonUtil.jsonToMap(dataRfx)>
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ItemLogisticVariantRemoved>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaItmLv_LogisticVariantRemoved.ftl">
}
]
<#break>
<#default>
<#stop >
</#switch>