53 lines
1.8 KiB
Java
53 lines
1.8 KiB
Java
<#-- **** input parameters ***** -->
|
|
<#-- input : message HARDIS WMS -->
|
|
<#-- project : projectId in HARDIS SC NETWORK -->
|
|
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
|
<#include "HfRpConfig.ftl">
|
|
<#include "ReflexUtils.ftl">
|
|
|
|
<#assign eventRP = JsonUtil.jsonToMap(input)>
|
|
<#assign projectRP = project>
|
|
<#assign organisationRP = organisation>
|
|
|
|
<#-- initialisation map for SegmentationKey and MetaData -->
|
|
<#assign Header_MetaData_Map = {} />
|
|
<#assign SegmentationKeys_Map = {} />
|
|
<#assign Line_MetaData_Map = {} />
|
|
|
|
|
|
<#switch eventRP.event>
|
|
<#case "Created">
|
|
<#case "Renotified">
|
|
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
|
<#assign executionflow = eventRP.data />
|
|
|
|
<#-- ******* Header MetaData to maps ******** -->
|
|
<#if executionflow.MetaData??>
|
|
<#assign Header_MetaData_Map = JsonUtil.sequenceToMap(executionflow.MetaData, "Key", "Value") />
|
|
</#if>
|
|
|
|
[
|
|
<#if eventRP.partnerAppRole == "ShipFrom" && executionflow.ShipFrom.ActorID != "" && executionflow.ShipFrom.Actor.IsShipFromConnected?? && executionflow.ShipFrom.Actor.IsShipFromConnected>
|
|
{
|
|
<#assign apiRestReflexID = ApiRestReflexID.preparation_orders_post>
|
|
"apiRestReflexID" : "${apiRestReflexID}",
|
|
"datas" :
|
|
<#include "RPtoRFX_PrepOrder.ftl">
|
|
}
|
|
</#if>
|
|
<#if eventRP.partnerAppRole == "ShipTo" && executionflow.ShipTo.ActorID != "" && executionflow.ShipTo.Actor.IsShipToConnected?? && executionflow.ShipTo.Actor.IsShipToConnected>
|
|
{
|
|
<#assign apiRestReflexID = ApiRestReflexID.receipts_post>
|
|
"apiRestReflexID" : "${apiRestReflexID}",
|
|
"datas" :
|
|
<#include "RPtoRFX_Receipt.ftl">
|
|
}
|
|
</#if>
|
|
|
|
]
|
|
<#break>
|
|
<#default>
|
|
<#stop >
|
|
</#switch>
|
|
|