reflex-wms-connector/RFXtoRP_HsaCarrier.ftl
2025-10-21 16:19:01 +02:00

50 lines
1.5 KiB
Java

<#-- **** input parameters ***** -->
<#-- input : message HARDIS WMS -->
<#-- project : projectId in HARDIS SC NETWORK -->
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
<#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl">
<#include "ActorPrefix.ftl">
<#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 carrier = JsonUtil.jsonToMap(dataRfx)>
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreatedv2>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaCarrier_ActorCreated.ftl">
}
]
<#break>
<#case "D">
<#-- *********************************************** Action = DELETE ******************************* -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign carrier = JsonUtil.jsonToMap(dataRfx)>
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorDeleted>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaCarrier_ActorDeleted.ftl">
}
]
<#break>
<#default>
<#stop >
</#switch>