reflex-wms-connector/RFXtoRP_HsaItmLv.ftl
2023-08-29 09:46:06 +02:00

57 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.LVUpdated>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaItmLv_LVUpdated.ftl">
}
]
<#break>
<#case "D">
<#-- *********************************************** Action = DELETE ******************** -->
<#stop "LV deletion not supported" >
<#-- supression LV a décommenter quand API ajouté au connecteur
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign item = JsonUtil.jsonToMap(dataRfx)>
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.LVDeleted>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaItmLv_LVRemoved.ftl">
}
]
-->
<#break>
<#default>
<#stop "event not supported">
</#switch>