48 lines
1.4 KiB
Java
48 lines
1.4 KiB
Java
<#-- **** 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">
|
|
<#case "U">
|
|
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
|
<#assign item = JsonUtil.jsonToMap(dataRfx)>
|
|
[
|
|
{
|
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ItemCreated>
|
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
"datas" :
|
|
<#include "RFXtoRP_HsaItm_ItemCreated.ftl">
|
|
}
|
|
]
|
|
<#break>
|
|
|
|
<#case "D">
|
|
<#-- *********************************************** Action = DELETE ******************************** -->
|
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
|
<#assign item = JsonUtil.jsonToMap(dataRfx)>
|
|
[
|
|
{
|
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ItemDeleted>
|
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
"datas" :
|
|
<#include "RFXtoRP_HsaItm_ItemDeleted.ftl">
|
|
}
|
|
]
|
|
<#break>
|
|
|
|
|
|
<#default>
|
|
<#stop >
|
|
</#switch>
|
|
|