From af712829f2bb608bd91f3b04678849c43f02b061 Mon Sep 17 00:00:00 2001 From: "GROUP\\frea" Date: Fri, 29 Aug 2025 11:48:14 +0200 Subject: [PATCH 01/30] SCPN1-9254 (cherry picked from commit 7c15a16e57ffa128d9fd0fc324764f31030c27a9) --- RFXtoRP_HsaDesPatch.ftl | 32 ++++++++++++++++++++++++++++++++ RFXtoRP_HsaDespNt.ftl | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 RFXtoRP_HsaDesPatch.ftl create mode 100644 RFXtoRP_HsaDespNt.ftl diff --git a/RFXtoRP_HsaDesPatch.ftl b/RFXtoRP_HsaDesPatch.ftl new file mode 100644 index 0000000..202981f --- /dev/null +++ b/RFXtoRP_HsaDesPatch.ftl @@ -0,0 +1,32 @@ +<#-- **** 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 desPatch = JsonUtil.jsonToMap(dataRfx)> + + <#stop "no generic FTL file available yet for desPatch"> + <#break> + + <#case "D"> + <#-- *********************************************** Action = DELETE ******************** --> + <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> + <#assign desPatch = JsonUtil.jsonToMap(dataRfx)> + + <#stop "no generic FTL file available yet for desPatch"> + <#break> + <#default> + <#stop > + + diff --git a/RFXtoRP_HsaDespNt.ftl b/RFXtoRP_HsaDespNt.ftl new file mode 100644 index 0000000..da1d0c2 --- /dev/null +++ b/RFXtoRP_HsaDespNt.ftl @@ -0,0 +1,32 @@ +<#-- **** 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 despNt = JsonUtil.jsonToMap(dataRfx)> + + <#stop "no generic FTL file available yet for despNt"> + <#break> + + <#case "D"> + <#-- *********************************************** Action = DELETE ******************** --> + <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> + <#assign despNt = JsonUtil.jsonToMap(dataRfx)> + + <#stop "no generic FTL file available yet for despNt"> + <#break> + <#default> + <#stop > + + From 0ad605af1d252d3b15ac8bb736adc9141fa8b84f Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 8 Sep 2025 09:45:36 +0200 Subject: [PATCH 02/30] Correction 080925 --- RFXtoRP_HsaItm_ItemCreated.ftl | 2 +- RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl | 2 +- RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl | 2 +- RFXtoRP_HsrReceiptList_ReceiptExpected.ftl | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/RFXtoRP_HsaItm_ItemCreated.ftl b/RFXtoRP_HsaItm_ItemCreated.ftl index c2d33a9..1f22d6b 100644 --- a/RFXtoRP_HsaItm_ItemCreated.ftl +++ b/RFXtoRP_HsaItm_ItemCreated.ftl @@ -37,7 +37,7 @@ "LVID": "${logistical_variant.logistical_variant_code?json_string}", "Name" : "${logistical_variant.lv_type_code?json_string}", - <#if logistical_variant.id_list??> + <#if logistical_variant.id_list?? && (logistical_variant.id_list?size == logistical_variant.id_list?filter(l ->l??)?size)> "Codes": [ <#list logistical_variant.id_list as id> { diff --git a/RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl b/RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl index ee94331..4412001 100644 --- a/RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl +++ b/RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl @@ -14,7 +14,7 @@ { "Header": {"ProjectID": "${projectRP}"}, "ID": { - "RefID": "${receipt_line.origin_order_line_reference?trim?json_string}", + "RefID": "${receipt_line.receipt_reference?trim?json_string}", "RefDate": { "DateTime": "${receipt_status_datetime}", "AuthorTimeZone": "${time_zone_rfx}" diff --git a/RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl b/RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl index ee94331..4412001 100644 --- a/RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl +++ b/RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl @@ -14,7 +14,7 @@ { "Header": {"ProjectID": "${projectRP}"}, "ID": { - "RefID": "${receipt_line.origin_order_line_reference?trim?json_string}", + "RefID": "${receipt_line.receipt_reference?trim?json_string}", "RefDate": { "DateTime": "${receipt_status_datetime}", "AuthorTimeZone": "${time_zone_rfx}" diff --git a/RFXtoRP_HsrReceiptList_ReceiptExpected.ftl b/RFXtoRP_HsrReceiptList_ReceiptExpected.ftl index ee94331..4412001 100644 --- a/RFXtoRP_HsrReceiptList_ReceiptExpected.ftl +++ b/RFXtoRP_HsrReceiptList_ReceiptExpected.ftl @@ -14,7 +14,7 @@ { "Header": {"ProjectID": "${projectRP}"}, "ID": { - "RefID": "${receipt_line.origin_order_line_reference?trim?json_string}", + "RefID": "${receipt_line.receipt_reference?trim?json_string}", "RefDate": { "DateTime": "${receipt_status_datetime}", "AuthorTimeZone": "${time_zone_rfx}" From 17830c1c6e8a82f68b825882699e7ab1dc5d91e8 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 8 Sep 2025 09:57:24 +0200 Subject: [PATCH 03/30] Corrections 250908 --- RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl | 4 ++-- RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl | 4 ++-- RFXtoRP_HsrReceiptList_ReceiptExpected.ftl | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl b/RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl index 4412001..1c838f8 100644 --- a/RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl +++ b/RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl @@ -5,7 +5,7 @@ [ <#if receipt.line_list??> <#list receipt.line_list as receipt_line > - <#if receipt_line.origin_order_line_reference!=""> + <#if receipt_line.origin_order_line_reference?? && receipt_line.origin_order_line_reference!=""> <#if !refIDHmap_local[receipt_line.origin_order_line_reference]?? > <#if refIDHmap_local?size != 0 > , @@ -14,7 +14,7 @@ { "Header": {"ProjectID": "${projectRP}"}, "ID": { - "RefID": "${receipt_line.receipt_reference?trim?json_string}", + "RefID": "${receipt_line.origin_order_line_reference?trim?json_string}", "RefDate": { "DateTime": "${receipt_status_datetime}", "AuthorTimeZone": "${time_zone_rfx}" diff --git a/RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl b/RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl index 4412001..1c838f8 100644 --- a/RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl +++ b/RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl @@ -5,7 +5,7 @@ [ <#if receipt.line_list??> <#list receipt.line_list as receipt_line > - <#if receipt_line.origin_order_line_reference!=""> + <#if receipt_line.origin_order_line_reference?? && receipt_line.origin_order_line_reference!=""> <#if !refIDHmap_local[receipt_line.origin_order_line_reference]?? > <#if refIDHmap_local?size != 0 > , @@ -14,7 +14,7 @@ { "Header": {"ProjectID": "${projectRP}"}, "ID": { - "RefID": "${receipt_line.receipt_reference?trim?json_string}", + "RefID": "${receipt_line.origin_order_line_reference?trim?json_string}", "RefDate": { "DateTime": "${receipt_status_datetime}", "AuthorTimeZone": "${time_zone_rfx}" diff --git a/RFXtoRP_HsrReceiptList_ReceiptExpected.ftl b/RFXtoRP_HsrReceiptList_ReceiptExpected.ftl index 4412001..1c838f8 100644 --- a/RFXtoRP_HsrReceiptList_ReceiptExpected.ftl +++ b/RFXtoRP_HsrReceiptList_ReceiptExpected.ftl @@ -5,7 +5,7 @@ [ <#if receipt.line_list??> <#list receipt.line_list as receipt_line > - <#if receipt_line.origin_order_line_reference!=""> + <#if receipt_line.origin_order_line_reference?? && receipt_line.origin_order_line_reference!=""> <#if !refIDHmap_local[receipt_line.origin_order_line_reference]?? > <#if refIDHmap_local?size != 0 > , @@ -14,7 +14,7 @@ { "Header": {"ProjectID": "${projectRP}"}, "ID": { - "RefID": "${receipt_line.receipt_reference?trim?json_string}", + "RefID": "${receipt_line.origin_order_line_reference?trim?json_string}", "RefDate": { "DateTime": "${receipt_status_datetime}", "AuthorTimeZone": "${time_zone_rfx}" From 68668789b6dfb4bdc16e6cade450077028b6b2a2 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 8 Sep 2025 17:08:03 +0200 Subject: [PATCH 04/30] Renotified --- RPtoRFX_ExecutionflowEvent.ftl | 1 + 1 file changed, 1 insertion(+) diff --git a/RPtoRFX_ExecutionflowEvent.ftl b/RPtoRFX_ExecutionflowEvent.ftl index 89519e8..b691d83 100644 --- a/RPtoRFX_ExecutionflowEvent.ftl +++ b/RPtoRFX_ExecutionflowEvent.ftl @@ -17,6 +17,7 @@ <#switch eventRP.event> <#case "Created"> + <#case "Renotified"> <#-- *********************************************** Action = CREATE or UPDATE ******************** --> <#assign executionflow = eventRP.data /> From 7d874d7a687d4b4333117e4c0b169257c27484a5 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 9 Sep 2025 08:13:16 +0200 Subject: [PATCH 05/30] Correction list --- RFXtoRP_HsaItmLv_LogisticVariantUpdated.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_HsaItmLv_LogisticVariantUpdated.ftl b/RFXtoRP_HsaItmLv_LogisticVariantUpdated.ftl index c61e73b..b1dbb63 100644 --- a/RFXtoRP_HsaItmLv_LogisticVariantUpdated.ftl +++ b/RFXtoRP_HsaItmLv_LogisticVariantUpdated.ftl @@ -12,7 +12,7 @@ { "LVID": "${lv.logistical_variant_code?json_string}", "Name" : "${lv.lv_type_code?json_string}", - <#if lv.id_list??> + <#if lv.id_list?? && (lv.id_list?size == lv.id_list?filter(l ->l??)?size)> "Codes": [ <#list lv.id_list as id> { From cb2f8fe59e2dca1e7666ba4a9e92a1aecae91e0a Mon Sep 17 00:00:00 2001 From: "GROUP\\frea" Date: Thu, 25 Sep 2025 16:23:34 +0200 Subject: [PATCH 06/30] SCPN1-9348 --- RFXtoRP_HsrPrepa.ftl | 3 +-- RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/RFXtoRP_HsrPrepa.ftl b/RFXtoRP_HsrPrepa.ftl index b90dc7b..2f1fb33 100644 --- a/RFXtoRP_HsrPrepa.ftl +++ b/RFXtoRP_HsrPrepa.ftl @@ -56,8 +56,7 @@ <#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.preparation_order_originator_reference!="") as preparation_line> <#list preparation_line.despatched_ipg_list as despatched_ipg> <#assign HUadded_packing_datetime = RfxDateTimetoUTCWithTimezone(preparation_line.confirmation_datetime,time_zone_rfx) /> - <#if !hd_numberHmap[despatched_ipg.hd_number]?? && (trackingNumberSource==2 || trackingNumberSource==3 || (despatched_ipg.consignment_unit_id!="" && trackingNumberSource==1))> - <#assign hd_numberHmap += {despatched_ipg.hd_number,despatched_ipg.hd_number}> + <#if (!hd_numberHmap[despatched_ipg.hd_number]?? || !hd_numberHmap[despatched_ipg.carton_number]??) && (trackingNumberSource==2 || trackingNumberSource==3 || (despatched_ipg.consignment_unit_id!="" && trackingNumberSource==1))> , { <#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled> diff --git a/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl b/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl index 9f96b31..4f4f46c 100644 --- a/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl +++ b/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl @@ -53,8 +53,10 @@ "Payload": { <#if despatched_ipg.carton_number != "000000000000000000"> "HandlingunitID": "${despatched_ipg.carton_number}" + <#assign hd_numberHmap += {despatched_ipg.carton_number,despatched_ipg.carton_number}> <#else> "HandlingunitID": "${despatched_ipg.hd_number}" + <#assign hd_numberHmap += {despatched_ipg.hd_number,despatched_ipg.hd_number}> <#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="" > , From b8c463ffc1bd73809f8e6f4cc5231957308d589d Mon Sep 17 00:00:00 2001 From: "GROUP\\frea" Date: Mon, 29 Sep 2025 17:39:47 +0200 Subject: [PATCH 07/30] SCPN1-9094 --- RFXtoRP_HliPrepaL.ftl | 83 +++++++++++-- RFXtoRP_HliReceiptLr.ftl | 112 ++++++++++++++++-- ...P_HliReceiptLr_ExecutionflowLinesAdded.ftl | 60 ++++++++++ RFXtoRP_HlrProL.ftl | 58 +++++++-- RFXtoRP_HlrProL_ExecutionflowLinesAdded.ftl | 55 +++++++++ 5 files changed, 341 insertions(+), 27 deletions(-) create mode 100644 RFXtoRP_HliReceiptLr_ExecutionflowLinesAdded.ftl create mode 100644 RFXtoRP_HlrProL_ExecutionflowLinesAdded.ftl diff --git a/RFXtoRP_HliPrepaL.ftl b/RFXtoRP_HliPrepaL.ftl index e643caa..1756f5e 100644 --- a/RFXtoRP_HliPrepaL.ftl +++ b/RFXtoRP_HliPrepaL.ftl @@ -3,6 +3,7 @@ <#-- project : projectId in ReflexPlatform --> <#-- organisation : organisationtId in ReflexPlatform --> <#include "ReflexUtils.ftl"> +<#include "HfRpConfig.ftl"> <#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> <#assign organisationRP = organisation> @@ -13,17 +14,79 @@ <#switch cloudEventMsg.action> <#case "C"> <#--<#case "U"> - <#-- *********************************************** Action = CREATE or UPDATE ******************** --> - <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> - <#assign preparationOrderLines = JsonUtil.jsonToMap(dataRfx)> - <#stop "no generic FTL file available yet for preparationOrderLines"> - <#break> +<#-- *********************************************** Action = CREATE or UPDATE ******************** --> +<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> +<#assign preparationOrder = JsonUtil.jsonToMap(dataRfx)> + + <#if preparationOrder.total_lv_validated !=0> + <#if preparationOrder.preparation_line_lst??> + [ + <#assign first = true> + <#assign refIDHmap ={}> + <#assign hd_numberHmap ={}> + <#assign hd_numberHmapHUadded ={}> + <#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.preparation_order_originator_reference!="") as preparation_line> + <#list preparation_line.despatched_ipg_list as despatched_ipg> + <#assign HUadded_packing_datetime = RfxDateTimetoUTCWithTimezone(preparation_line.confirmation_datetime,time_zone_rfx) /> + <#if (!hd_numberHmap[despatched_ipg.hd_number]?? || !hd_numberHmap[despatched_ipg.carton_number]??) && (trackingNumberSource==2 || trackingNumberSource==3 || (despatched_ipg.consignment_unit_id!="" && trackingNumberSource==1))> + <#if !first > + <#assign first = false> + , + + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl"> + } + + <#if despatched_ipg.carton_number != "000000000000000000" && despatched_ipg.carton_number!=despatched_ipg.hd_number > + <#if !first > + <#assign first = false> + , + + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitHUsAdded> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrPrepa_HandlingunitHUsAdded.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl"> + } + <#if !hd_numberHmapHUadded[despatched_ipg.hd_number]?? && (trackingNumberSource==2 || trackingNumberSource==3 )> + <#assign hd_numberHmapHUadded += {despatched_ipg.hd_number,despatched_ipg.hd_number}> + , + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrPrepa_HUsAdded_TrackingHuLabelled.ftl"> + } + + + + + + <#assign refIDHmap ={}> + ] + <#else> + <#-- No line--> + <#stop > + + <#else> + <#-- no confirmed quantity for the preparation - preparation closed--> + <#stop > + + + +<#break> <#case "D"> - <#-- *********************************************** Action = DELETE ******************** --> - <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> - <#assign preparationOrderLines = JsonUtil.jsonToMap(dataRfx)> - <#stop "no generic FTL file available yet for preparationOrderLines"> - <#break> +<#-- *********************************************** Action = DELETE ******************** --> +<#stop> <#break> <#default> diff --git a/RFXtoRP_HliReceiptLr.ftl b/RFXtoRP_HliReceiptLr.ftl index 61cdef6..f2c6601 100644 --- a/RFXtoRP_HliReceiptLr.ftl +++ b/RFXtoRP_HliReceiptLr.ftl @@ -11,22 +11,118 @@ <#switch cloudEventMsg.action> <#case "C"> - <#case "U"> <#-- *********************************************** Action = CREATE ******************** --> - <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> - <#assign receiptLines = JsonUtil.jsonToMap(dataRfx)> + <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> + <#assign receipt = JsonUtil.jsonToMap(dataRfx)> + <#if receipt.receipt_reference ?? && receipt.receipt_reference!=""> + <#if receipt.receipt_type == "030"> + <#stop "ignored message because receipt type = transfert"> + <#else> + <#if receipt.line_list ??> + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowLinesAdded> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrReceiptList_ExecutionflowLinesAdded.ftl"> - <#stop "no generic FTL file available yet for receiptLines"> - <#break> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl"> + + } + ] + <#else> + <#-- No line--> + <#stop> + + + <#else> + <#-- "Receipt reference is empty"--> + <#stop> + + <#break> + <#case "U"> + <#-- *********************************************** Action = UPDATE ******************** --> + <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> + <#assign receipt = JsonUtil.jsonToMap(dataRfx)> + [ + <#if receipt.receipt_reference?? && receipt.receipt_reference!=""> + <#if receipt.receipt_confirmed == "true" && receipt.confirmation_total_level_1==0 && receipt.confirmation_total_level_2==0 && receipt.confirmation_total_level_3==0> + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl"> + } + <#else> + <#if receipt.receipt_confirmed == "true" > + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl"> + } + <#else> + <#if receipt.receipt_type == "030"> + <#stop "ignored message because receipt type = transfert"> + <#else> + <#if receipt.line_list ??> + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl"> + } + <#else> + <#-- No line--> + <#stop> + + + + + <#else> + <#-- Receipt reference is empty--> + <#stop > + + ] + <#break> <#case "D"> <#-- *********************************************** Action = DELETE ******************** --> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> - <#assign receiptLines = JsonUtil.jsonToMap(dataRfx)> + <#assign receipt = JsonUtil.jsonToMap(dataRfx)> + [ + <#if receipt.receipt_reference?? && receipt.receipt_reference!=""> + <#if receipt.line_list ??> + { + + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl"> + } + <#else> + <#-- No line--> + <#stop> + + <#else> + <#-- Receipt reference is empty--> + <#stop > + + ] + <#break> - <#stop "no generic FTL file available yet for receiptLines"> - <#break> <#default> <#stop > diff --git a/RFXtoRP_HliReceiptLr_ExecutionflowLinesAdded.ftl b/RFXtoRP_HliReceiptLr_ExecutionflowLinesAdded.ftl new file mode 100644 index 0000000..5a805a0 --- /dev/null +++ b/RFXtoRP_HliReceiptLr_ExecutionflowLinesAdded.ftl @@ -0,0 +1,60 @@ +<#include "HfRpConfig.ftl"> +<#include "ReflexUtils.ftl"> +<#include "ActorPrefix.ftl"> +[ + { + <#assign receipt_datetime = RfxDateTimetoUTCWithTimezone(receipt.receipt_datetime,time_zone_rfx) /> + <#assign receipt_creation_datetime = RfxDateTimetoUTCWithTimezone(receipt.creation_datetime,time_zone_rfx) /> + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + "RefID": "${receipt.receipt_reference?trim?json_string}", + "RefDate": { + "DateTime": "${receipt_creation_datetime}", + "AuthorTimeZone": "${time_zone_rfx}" + } + }, + "Payload": { + <#if receipt.line_list??> + "Lines" : [ + <#list receipt.line_list as line> + { + "LineID": "${line.receipt_line_number}", + <#-- Line Metadata inclusion --> + <#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineMetadata.ftl">, + "RequestedContent": + { + "Goods": + { + "ItemID": "${line.item_code?trim?json_string!"0"}", + "LVBranchID": "${line.item_lv_code?json_string!"0"}", + <#if (line.line_without_detail?? && line.line_without_detail.priority_date?length != 0) && (line.line_without_detail.priority_date?starts_with("00") == false)> + <#assign line_without_detail_priority_date = line.line_without_detail.priority_date?datetime(rfx_date_format_default)?iso_utc /> + "PriorityDate": "${line_without_detail_priority_date}", + <#else> + <#if (line.line_detail?? && line.line_detail?size == 1 && line.line_detail[0].priority_date?length != 0) && (line.line_detail[0].priority_date?starts_with("00") == false)> + <#assign line_detail_priority_date = line.line_detail[0].priority_date?datetime(rfx_date_format_default)?iso_utc /> + "PriorityDate": "${line_detail_priority_date}", + <#else> + "PriorityDate": "1970-01-01T00:00:00Z", + + + <#-- Segmentation Keys inclusion --> + <#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_SegmentationKeys.ftl"> + }, + "Quantity" : + { + "LVID": "${quantity_in_base_lv_RP_Cst}", + "Value": "${line.order_quantity_in_lv!0}" + } + } + + } + <#sep>, + + ] + + } + } +] diff --git a/RFXtoRP_HlrProL.ftl b/RFXtoRP_HlrProL.ftl index 7b4504b..ce907a7 100644 --- a/RFXtoRP_HlrProL.ftl +++ b/RFXtoRP_HlrProL.ftl @@ -12,20 +12,60 @@ <#switch cloudEventMsg.action> <#case "C"> <#case "U"> - <#-- *********************************************** Action = CREATE or UPDATE ******************** --> + <#-- *********************************************** Action = CREATE or UPDATE ******************** --> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> - <#assign preparationOrderLines = JsonUtil.jsonToMap(dataRfx)> - - <#stop "no generic FTL file available yet for preparationOrderLines"> - <#break> + <#assign preparation_order = JsonUtil.jsonToMap(dataRfx)> + [ + <#if preparation_order.originator_reference?? && preparation_order.originator_reference!=""> + <#-- check preparation type code (internal order and reservation are ignored) --> + <#if preparation_order.preparation_type_code?? && (preparation_order.preparation_type_code == "010" || preparation_order.preparation_type_code == "030")> + <#if preparation_order.line_list??> + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowLinesAdded> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HlrProL_ExecutionflowLinesAdded.ftl"> + } + <#else> + <#-- No line --> + <#stop> + + <#else> + <#-- preparation order type not supported --> + <#stop> + + <#else> + <#-- PRO reference is empty --> + <#stop> + + ] + <#break> <#case "D"> <#-- *********************************************** Action = DELETE ******************** --> - <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> - <#assign preparationOrderLines = JsonUtil.jsonToMap(dataRfx)> + <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> + <#assign preparation_order = JsonUtil.jsonToMap(dataRfx)> + [ + <#if preparation_order.originator_reference?? && preparation_order.originator_reference!=""> + <#if preparation_order.line_list??> + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrPro_ExecutionflowCancelled.ftl"> + } + <#else> + <#-- No line --> + <#stop> + + <#else> + <#-- PRO reference is empty --> + <#stop> + + ] + <#break> + - <#stop "no generic FTL file available yet for preparationOrderLines"> - <#break> <#default> <#stop > diff --git a/RFXtoRP_HlrProL_ExecutionflowLinesAdded.ftl b/RFXtoRP_HlrProL_ExecutionflowLinesAdded.ftl new file mode 100644 index 0000000..d80e0ca --- /dev/null +++ b/RFXtoRP_HlrProL_ExecutionflowLinesAdded.ftl @@ -0,0 +1,55 @@ +<#include "HfRpConfig.ftl"> +<#include "ReflexUtils.ftl"> +<#include "ActorPrefix.ftl"> +[ + { + <#assign planned_final_delivery_start_datetime = RfxDateTimetoUTCWithTimezone(preparation_order.planned_final_delivery_start_datetime,time_zone_rfx) /> + <#assign pro_creation_datetime = RfxDateTimetoUTCWithTimezone(preparation_order.creation_datetime,time_zone_rfx) /> + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + "RefID": "${preparation_order.originator_reference?trim?json_string}", + "RefDate": { + "DateTime": "${pro_creation_datetime}", + "AuthorTimeZone": "${time_zone_rfx}" + } + }, + "Payload": { + <#if preparation_order.line_list??> + "Lines" : [ + <#list preparation_order.line_list as preparation_order_line > + { + <#if (preparation_order_line.originator_reference_line_number!0) != 0> + "LineID": "${preparation_order_line.originator_reference_line_number}", + <#else> + "LineID": "${preparation_order_line.preparation_order_line_number!0}", + + <#-- Line Metadata inclusion --> + <#include "RFXtoRP_HsrPro_ExecutionflowDetected_LineMetadata.ftl">, + "RequestedContent": + { + "Goods": + { + "ItemID": "${preparation_order_line.item_code?trim?json_string!"0"}", + "LVBranchID": "${preparation_order_line.item_lv_code?json_string!"0"}", + <#if (preparation_order_line.optional_attributes.forced_priority_date?length != 0) && (preparation_order_line.optional_attributes.forced_priority_date?starts_with("00") == false)> + <#assign forced_priority_date = preparation_order_line.optional_attributes.forced_priority_date?datetime(rfx_date_format_default)?iso_utc /> + "PriorityDate": "${forced_priority_date}", + + <#-- Segmentation Keys inclusion --> + <#include "RFXtoRP_HsrPro_ExecutionflowDetected_SegmentationKeys.ftl"> + }, + "Quantity" : + { + "LVID": "${quantity_in_base_lv_RP_Cst}", + "Value": "${preparation_order_line.base_lv_quantity_to_prepare!0}" + } + } + }<#sep>, + + ] + + } + } +] From 4f8b24b78c7732b74e6664bcf27ed2dc061c7bac Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 1 Oct 2025 10:15:39 +0200 Subject: [PATCH 08/30] comment --- RFX_PartnerAPP_Settings.ftl | 1 + RFXtoRP_HsaDispute.ftl | 7 ++++--- RFXtoRP_HsaDispute_MessageSent.ftl | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/RFX_PartnerAPP_Settings.ftl b/RFX_PartnerAPP_Settings.ftl index 6e5411d..719e2ca 100644 --- a/RFX_PartnerAPP_Settings.ftl +++ b/RFX_PartnerAPP_Settings.ftl @@ -1 +1,2 @@ +<#-- To configure the tracking setting carrier --> <#assign trackingNumberSource = 3> diff --git a/RFXtoRP_HsaDispute.ftl b/RFXtoRP_HsaDispute.ftl index 8bc9f6e..e8c4dca 100644 --- a/RFXtoRP_HsaDispute.ftl +++ b/RFXtoRP_HsaDispute.ftl @@ -2,13 +2,11 @@ <#-- input : message RFX --> <#-- project : projectId in ReflexPlatform --> <#-- organisation : organisationtId in ReflexPlatform --> - +<#-- For dispute creation WMS to Platform --> <#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> <#assign organisationRP = organisation> - <#assign aDateTime = .now> - <#switch cloudEventMsg.action> <#case "C"> <#case "U"> @@ -17,6 +15,7 @@ <#assign dispute = JsonUtil.jsonToMap(dataRfx)> [ <#if dispute.dispute_closed == true > + <#-- Only for preparation and receipt disputes --> <#if ((dispute.dispute_type_code=="030" || dispute.dispute_type_code=="070") && dispute.dispute_reception?? && dispute.dispute_reception.reception_reference!="") || (dispute.dispute_type_code=="050" && dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?trim?json_string!="")> { <#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimCreated> @@ -24,9 +23,11 @@ "datas" : <#include "RFXtoRP_HsaDispute_Created.ftl"> } + <#-- Create the table for reason code in RFXtoRP_HsaDispute_TableReasonCodeToClaimTypeID.ftl --> <#if TableReasonCode[dispute.dispute_reason_code]??> , { + <#-- Add message in dispute tchat room --> <#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimMessageSent> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : diff --git a/RFXtoRP_HsaDispute_MessageSent.ftl b/RFXtoRP_HsaDispute_MessageSent.ftl index 6b59ba0..ece9c2b 100644 --- a/RFXtoRP_HsaDispute_MessageSent.ftl +++ b/RFXtoRP_HsaDispute_MessageSent.ftl @@ -2,6 +2,7 @@ <#include "ReflexUtils.ftl"> [ { + <#-- Add refer --> "Header": { "ProjectID": "${projectRP}" }, From af6054122192f36596a3d496854b670ea5625807 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 9 Oct 2025 15:12:34 +0200 Subject: [PATCH 09/30] changement marque --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 0f1ecdd..9c390cd 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# Reflex Platform Core FTLs +# HARDIS SC NETWORK Core FTLs ## Overview -The **Reflex WMS Connector** is a set of **FreeMarker templates (FTL)** designed to transform **outgoing JSON flows from Reflex WMS** into **flows compatible with Reflex Platform**. +The **Reflex WMS Connector** is a set of **FreeMarker templates (FTL)** designed to transform **outgoing JSON flows from Reflex WMS** into **flows compatible with HARDIS SC NETWORK**. This connector does not contain any standalone executable code: it is intended to be used by **Reflex integration engines** or **data exchange pipelines**, where it applies the mapping rules defined in the `.ftl` files. @@ -12,9 +12,9 @@ This connector does not contain any standalone executable code: it is intended t - These templates use the **FreeMarker** syntax to: - Extract the required fields from the WMS source flow. - Apply transformation rules (mapping, conversions, enrichments). - - Generate a **final structured JSON** for Reflex Platform. + - Generate a **final structured JSON** for HARDIS SC NETWORK. ## Useful Resources - [FreeMarker Documentation](https://freemarker.apache.org/docs/index.html) -- [Reflex Platform](https://auth.reflex-platform.com/) +- [HARDIS SC NETWORK](https://auth.reflex-platform.com/) From f1d4ed44ff218908a0931ffd7abd7cf5a0f2e446 Mon Sep 17 00:00:00 2001 From: "GROUP\\frea" Date: Wed, 8 Oct 2025 15:58:21 +0200 Subject: [PATCH 10/30] SCPN1-9400 (cherry picked from commit a262140b4b7e9104e18ceb56b44b7a1db42521fb) --- RPtoRFX_AppointmentEvent.ftl | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 RPtoRFX_AppointmentEvent.ftl diff --git a/RPtoRFX_AppointmentEvent.ftl b/RPtoRFX_AppointmentEvent.ftl new file mode 100644 index 0000000..9891ef8 --- /dev/null +++ b/RPtoRFX_AppointmentEvent.ftl @@ -0,0 +1,28 @@ +<#-- **** input parameters ***** --> +<#-- input : message RFX --> +<#-- project : projectId in ReflexPlatform --> +<#-- organisation : organisationtId in ReflexPlatform --> +<#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"> + <#assign appointment = eventRP.data /> + + <#stop Appointment creation event> + + <#break> + <#default> + <#stop > + + From 4f433f0da8ad72fc6219232e20cb50439209a847 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Tue, 14 Oct 2025 11:16:40 +0200 Subject: [PATCH 11/30] SCPN1-9400 --- RPtoRFX_AppointmentEvent.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RPtoRFX_AppointmentEvent.ftl b/RPtoRFX_AppointmentEvent.ftl index 9891ef8..b5b8da6 100644 --- a/RPtoRFX_AppointmentEvent.ftl +++ b/RPtoRFX_AppointmentEvent.ftl @@ -19,7 +19,7 @@ <#case "Created"> <#assign appointment = eventRP.data /> - <#stop Appointment creation event> + <#stop "Appointment creation event"> <#break> <#default> From f05096636edcb4ba73d91a745a0d05f5a1e16f9b Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 16 Oct 2025 10:23:56 +0200 Subject: [PATCH 12/30] SCPN1-9437 --- README.md | 6 +++--- RFXtoRP_HsaItm.ftl | 4 ---- RFXtoRP_HsaItm_ItemCreated.ftl | 8 +++++--- RFXtoRP_HsrReceiptList.ftl | 7 +------ RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl | 4 ++++ RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl | 12 ++++++++++-- ..._HsrReceiptList_ExecutionflowReceiptCompleted.ftl | 4 ++++ RFXtoRP_HsrReceiptList_ReceiptExpected.ftl | 4 ++++ 8 files changed, 31 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 9c390cd..6bb1720 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# HARDIS SC NETWORK Core FTLs +# Reflex Platform Core FTLs ## Overview -The **Reflex WMS Connector** is a set of **FreeMarker templates (FTL)** designed to transform **outgoing JSON flows from Reflex WMS** into **flows compatible with HARDIS SC NETWORK**. +The **Reflex WMS Connector** is a set of **FreeMarker templates (FTL)** designed to transform **outgoing JSON flows from Reflex WMS** into **flows compatible with Reflex Platform**. This connector does not contain any standalone executable code: it is intended to be used by **Reflex integration engines** or **data exchange pipelines**, where it applies the mapping rules defined in the `.ftl` files. @@ -12,7 +12,7 @@ This connector does not contain any standalone executable code: it is intended t - These templates use the **FreeMarker** syntax to: - Extract the required fields from the WMS source flow. - Apply transformation rules (mapping, conversions, enrichments). - - Generate a **final structured JSON** for HARDIS SC NETWORK. + - Generate a **final structured JSON** for Reflex Platform. ## Useful Resources diff --git a/RFXtoRP_HsaItm.ftl b/RFXtoRP_HsaItm.ftl index 533a2b7..63ca3a2 100644 --- a/RFXtoRP_HsaItm.ftl +++ b/RFXtoRP_HsaItm.ftl @@ -18,14 +18,10 @@ <#assign item = JsonUtil.jsonToMap(dataRfx)> [ { - <#if item.logistical_variant_list?? && (item.logistical_variant_list?size == item.logistical_variant_list?filter(l ->l??)?size)> <#assign apiReflexPlatformID = ApiReflexPlatformID.ItemCreated> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsaItm_ItemCreated.ftl"> - <#else> - <#stop "no LV for the item"> - } ] <#break> diff --git a/RFXtoRP_HsaItm_ItemCreated.ftl b/RFXtoRP_HsaItm_ItemCreated.ftl index 1f22d6b..4433f6e 100644 --- a/RFXtoRP_HsaItm_ItemCreated.ftl +++ b/RFXtoRP_HsaItm_ItemCreated.ftl @@ -21,15 +21,17 @@ }, <#-- Item metadata inclusion --> - <#include "RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl">, + <#include "RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl"> <#-- Item Photo URI could be added here --> <#if item.url?? && item.url!=""> - "PhotoURI": "${item.url?json_string}", + , + "PhotoURI": "${item.url?json_string}" <#-- Loop for the Logistical Variants - LV --> - <#if item.logistical_variant_list??> + <#if item.logistical_variant_list?? && (item.logistical_variant_list?size == item.logistical_variant_list?filter(l ->l??)?size)> + , "LogisticVariants": [ <#list item.logistical_variant_list as logistical_variant> diff --git a/RFXtoRP_HsrReceiptList.ftl b/RFXtoRP_HsrReceiptList.ftl index be3d0c9..9bf1a2d 100644 --- a/RFXtoRP_HsrReceiptList.ftl +++ b/RFXtoRP_HsrReceiptList.ftl @@ -15,7 +15,6 @@ <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign receipt = JsonUtil.jsonToMap(dataRfx)> - <#if receipt.receipt_reference ?? && receipt.receipt_reference!=""> <#if receipt.receipt_type == "030"> <#stop "ignored message because receipt type = transfert"> <#else> @@ -40,11 +39,7 @@ <#-- No line--> <#stop> - - <#else> - <#-- "Receipt reference is empty"--> - <#stop> - + <#break> <#case "U"> <#-- *********************************************** Action = UPDATE ******************** --> diff --git a/RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl b/RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl index 1c838f8..0751f1a 100644 --- a/RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl +++ b/RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl @@ -29,7 +29,11 @@ { "Header": {"ProjectID": "${projectRP}"}, "ID": { + <#if receipt.receipt_reference?? && receipt.receipt_reference!=""> "RefID": "${receipt.receipt_reference?trim?json_string}", + <#else> + "RefID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}", + "RefDate": { "DateTime": "${receipt_status_datetime}", "AuthorTimeZone": "${time_zone_rfx}" diff --git a/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl b/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl index 6d21132..0d3b976 100644 --- a/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl +++ b/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl @@ -9,7 +9,11 @@ "ProjectID": "${projectRP}" }, "ID": { - "RefID": "${receipt.receipt_reference?trim?json_string}", + <#if receipt.receipt_reference?? && receipt.receipt_reference!=""> + "RefID": "${receipt.receipt_reference?trim?json_string}", + <#else> + "RefID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}", + "RefDate": { "DateTime": "${receipt_creation_datetime}", "AuthorTimeZone": "${time_zone_rfx}" @@ -44,7 +48,11 @@ "ActorID":"${RFXtoRPprefixCarrier(receipt.carrier_informations.carrier_code?trim?json_string)}" }, - "OrderID": "${receipt.receipt_reference?trim?json_string}", + <#if receipt.receipt_reference?? && receipt.receipt_reference!=""> + "OrderID": "${receipt.receipt_reference?trim?json_string}", + <#else> + "OrderID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}", + <#if receipt.line_list??> "Lines" : [ <#list receipt.line_list as line> diff --git a/RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl b/RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl index 1c838f8..0751f1a 100644 --- a/RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl +++ b/RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl @@ -29,7 +29,11 @@ { "Header": {"ProjectID": "${projectRP}"}, "ID": { + <#if receipt.receipt_reference?? && receipt.receipt_reference!=""> "RefID": "${receipt.receipt_reference?trim?json_string}", + <#else> + "RefID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}", + "RefDate": { "DateTime": "${receipt_status_datetime}", "AuthorTimeZone": "${time_zone_rfx}" diff --git a/RFXtoRP_HsrReceiptList_ReceiptExpected.ftl b/RFXtoRP_HsrReceiptList_ReceiptExpected.ftl index 1c838f8..0751f1a 100644 --- a/RFXtoRP_HsrReceiptList_ReceiptExpected.ftl +++ b/RFXtoRP_HsrReceiptList_ReceiptExpected.ftl @@ -29,7 +29,11 @@ { "Header": {"ProjectID": "${projectRP}"}, "ID": { + <#if receipt.receipt_reference?? && receipt.receipt_reference!=""> "RefID": "${receipt.receipt_reference?trim?json_string}", + <#else> + "RefID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}", + "RefDate": { "DateTime": "${receipt_status_datetime}", "AuthorTimeZone": "${time_zone_rfx}" From 7786a93b25c235d7ed2202f63493451d857f38d6 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 16 Oct 2025 10:27:57 +0200 Subject: [PATCH 13/30] SCPN1-9437 --- RFXtoRP_HsaIpgMove_GoodsReceived.ftl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/RFXtoRP_HsaIpgMove_GoodsReceived.ftl b/RFXtoRP_HsaIpgMove_GoodsReceived.ftl index 0b78db9..5b586db 100644 --- a/RFXtoRP_HsaIpgMove_GoodsReceived.ftl +++ b/RFXtoRP_HsaIpgMove_GoodsReceived.ftl @@ -37,6 +37,9 @@ <#if reflexMvtStockInterface.receipt_reference?? && reflexMvtStockInterface.receipt_reference!=""> "ExecutionflowID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}", "OrderID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}", + <#else> + "ExecutionflowID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_year_number}${reflexMvtStockInterface.receipt_number}", + "OrderID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_year_number}${reflexMvtStockInterface.receipt_number}", <#else> @@ -44,8 +47,8 @@ "ExecutionflowID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}", "OrderID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}", <#else> - "ExecutionflowID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.ipg_move_year_number}${reflexMvtStockInterface.extended_ipg_move_number}", - "OrderID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.ipg_move_year_number}${reflexMvtStockInterface.extended_ipg_move_number}", + "ExecutionflowID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_year_number}${reflexMvtStockInterface.receipt_number}", + "OrderID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_year_number}${reflexMvtStockInterface.receipt_number}", <#if reflexMvtStockInterface.origin_order_line_number_reference?? && reflexMvtStockInterface.origin_order_line_number_reference!=0> From d787148aae3dad6c263a632412642ee0f2ba1dd0 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 16 Oct 2025 10:50:49 +0200 Subject: [PATCH 14/30] SCPN1-9437 --- RFXtoRP_HsaIpgMove.ftl | 5 ----- RFXtoRP_HsrReceiptList.ftl | 5 ----- 2 files changed, 10 deletions(-) diff --git a/RFXtoRP_HsaIpgMove.ftl b/RFXtoRP_HsaIpgMove.ftl index c2bf457..4b0b7d5 100644 --- a/RFXtoRP_HsaIpgMove.ftl +++ b/RFXtoRP_HsaIpgMove.ftl @@ -47,7 +47,6 @@ <#if (reflexMvtStockInterface.ipg_move_type == "100" || reflexMvtStockInterface.ipg_move_type == "110" || reflexMvtStockInterface.ipg_move_type == "120") > - <#if reflexMvtStockInterface.receipt_reference?? && reflexMvtStockInterface.receipt_reference!=""> [ { <#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsReceived> @@ -56,10 +55,6 @@ <#include "RFXtoRP_HsaIpgMove_GoodsReceived.ftl"> } ] - <#else> - <#-- Case of IPG move type volontarilly ignored, Reference receipt is empty--> - <#stop > - <#else> <#stop> diff --git a/RFXtoRP_HsrReceiptList.ftl b/RFXtoRP_HsrReceiptList.ftl index 9bf1a2d..d83b7fd 100644 --- a/RFXtoRP_HsrReceiptList.ftl +++ b/RFXtoRP_HsrReceiptList.ftl @@ -46,7 +46,6 @@ <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign receipt = JsonUtil.jsonToMap(dataRfx)> [ - <#if receipt.receipt_reference?? && receipt.receipt_reference!=""> <#if receipt.receipt_confirmed == "true" && receipt.confirmation_total_level_1==0 && receipt.confirmation_total_level_2==0 && receipt.confirmation_total_level_3==0> { <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled> @@ -86,10 +85,6 @@ - <#else> - <#-- Receipt reference is empty--> - <#stop > - ] <#break> From 8cafa21aa749f3b2ce43f7a675ad8ff09ff45938 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 16 Oct 2025 11:00:26 +0200 Subject: [PATCH 15/30] SCPN1-9437 --- RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl | 2 -- RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl | 2 -- RFXtoRP_HsrReceiptList_ReceiptExpected.ftl | 2 -- 3 files changed, 6 deletions(-) diff --git a/RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl b/RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl index 0751f1a..c94a309 100644 --- a/RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl +++ b/RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl @@ -25,7 +25,6 @@ } <#else> - <#if receipt.receipt_reference?? && receipt.receipt_reference!=""> { "Header": {"ProjectID": "${projectRP}"}, "ID": { @@ -43,7 +42,6 @@ } } <#break> - diff --git a/RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl b/RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl index 0751f1a..c94a309 100644 --- a/RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl +++ b/RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl @@ -25,7 +25,6 @@ } <#else> - <#if receipt.receipt_reference?? && receipt.receipt_reference!=""> { "Header": {"ProjectID": "${projectRP}"}, "ID": { @@ -43,7 +42,6 @@ } } <#break> - diff --git a/RFXtoRP_HsrReceiptList_ReceiptExpected.ftl b/RFXtoRP_HsrReceiptList_ReceiptExpected.ftl index 0751f1a..c94a309 100644 --- a/RFXtoRP_HsrReceiptList_ReceiptExpected.ftl +++ b/RFXtoRP_HsrReceiptList_ReceiptExpected.ftl @@ -25,7 +25,6 @@ } <#else> - <#if receipt.receipt_reference?? && receipt.receipt_reference!=""> { "Header": {"ProjectID": "${projectRP}"}, "ID": { @@ -43,7 +42,6 @@ } } <#break> - From 374ab5499448d8e8b78f2401d1c9fbb7c42cb8a3 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 16 Oct 2025 11:09:22 +0200 Subject: [PATCH 16/30] SCPN1-9437 --- RFXtoRP_HsrReceiptList.ftl | 5 ----- 1 file changed, 5 deletions(-) diff --git a/RFXtoRP_HsrReceiptList.ftl b/RFXtoRP_HsrReceiptList.ftl index d83b7fd..f05fcba 100644 --- a/RFXtoRP_HsrReceiptList.ftl +++ b/RFXtoRP_HsrReceiptList.ftl @@ -93,7 +93,6 @@ <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign receipt = JsonUtil.jsonToMap(dataRfx)> [ - <#if receipt.receipt_reference?? && receipt.receipt_reference!=""> <#if receipt.line_list ??> { @@ -106,10 +105,6 @@ <#-- No line--> <#stop> - <#else> - <#-- Receipt reference is empty--> - <#stop > - ] <#break> From be0bc9308cc9a9f2dd6941d910388256dd8004b7 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 20 Oct 2025 11:23:13 +0200 Subject: [PATCH 17/30] Erreur inclusion --- RFXtoRP_HliReceiptLr.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_HliReceiptLr.ftl b/RFXtoRP_HliReceiptLr.ftl index f2c6601..f93bbc3 100644 --- a/RFXtoRP_HliReceiptLr.ftl +++ b/RFXtoRP_HliReceiptLr.ftl @@ -25,7 +25,7 @@ <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowLinesAdded> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : - <#include "RFXtoRP_HsrReceiptList_ExecutionflowLinesAdded.ftl"> + <#include "RFXtoRP_HliReceiptLr_ExecutionflowLinesAdded.ftl"> }, { From 8a48556407592fff955b0dc15738fd63a6e028cd Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 20 Oct 2025 14:57:43 +0200 Subject: [PATCH 18/30] goods prepared hliprepa --- RFXtoRP_HliPrepaL.ftl | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/RFXtoRP_HliPrepaL.ftl b/RFXtoRP_HliPrepaL.ftl index 1756f5e..93365e5 100644 --- a/RFXtoRP_HliPrepaL.ftl +++ b/RFXtoRP_HliPrepaL.ftl @@ -21,6 +21,19 @@ <#if preparationOrder.total_lv_validated !=0> <#if preparationOrder.preparation_line_lst??> [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsPrepared> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl"> + }, + { + + <#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl"> + } <#assign first = true> <#assign refIDHmap ={}> <#assign hd_numberHmap ={}> @@ -29,8 +42,8 @@ <#list preparation_line.despatched_ipg_list as despatched_ipg> <#assign HUadded_packing_datetime = RfxDateTimetoUTCWithTimezone(preparation_line.confirmation_datetime,time_zone_rfx) /> <#if (!hd_numberHmap[despatched_ipg.hd_number]?? || !hd_numberHmap[despatched_ipg.carton_number]??) && (trackingNumberSource==2 || trackingNumberSource==3 || (despatched_ipg.consignment_unit_id!="" && trackingNumberSource==1))> - <#if !first > - <#assign first = false> + <#if !first > + <#assign first = false> , { @@ -41,8 +54,8 @@ } <#if despatched_ipg.carton_number != "000000000000000000" && despatched_ipg.carton_number!=despatched_ipg.hd_number > - <#if !first > - <#assign first = false> + <#if !first > + <#assign first = false> , { From d7342439792a2ccf0c7b0fa20324162afbad8a26 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 20 Oct 2025 15:40:00 +0200 Subject: [PATCH 19/30] comma hliprepaL --- RFXtoRP_HliPrepaL.ftl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/RFXtoRP_HliPrepaL.ftl b/RFXtoRP_HliPrepaL.ftl index 93365e5..68ee34b 100644 --- a/RFXtoRP_HliPrepaL.ftl +++ b/RFXtoRP_HliPrepaL.ftl @@ -42,10 +42,12 @@ <#list preparation_line.despatched_ipg_list as despatched_ipg> <#assign HUadded_packing_datetime = RfxDateTimetoUTCWithTimezone(preparation_line.confirmation_datetime,time_zone_rfx) /> <#if (!hd_numberHmap[despatched_ipg.hd_number]?? || !hd_numberHmap[despatched_ipg.carton_number]??) && (trackingNumberSource==2 || trackingNumberSource==3 || (despatched_ipg.consignment_unit_id!="" && trackingNumberSource==1))> + , <#if !first > <#assign first = false> , + { <#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled> "apiReflexPlatformID" : "${apiReflexPlatformID}", @@ -54,6 +56,7 @@ } <#if despatched_ipg.carton_number != "000000000000000000" && despatched_ipg.carton_number!=despatched_ipg.hd_number > + , <#if !first > <#assign first = false> , From 73f1b6ecc4c904128e557696c34ba6103324405b Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 21 Oct 2025 10:31:00 +0200 Subject: [PATCH 20/30] Brand --- README.md | 6 +++--- ...fDtlStockLs_StockSnapshotted_SegmentationKeys.ftl | 2 +- RFXtoRP_HfRpConfig.ftl | 2 +- RFXtoRP_HsaCarrier_ActorCreated.ftl | 4 ++-- RFXtoRP_HsaCarrier_ActorCreated_Metadata.ftl | 2 +- RFXtoRP_HsaCons_ActorCreated.ftl | 4 ++-- RFXtoRP_HsaCons_ActorCreated_Metadata.ftl | 2 +- RFXtoRP_HsaDispute_ClaimMetadata.ftl | 2 +- ...oRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl | 2 +- RFXtoRP_HsaIpgMove_StockMoved_SegmentationKeys.ftl | 12 ++++++------ RFXtoRP_HsaItmLv_LogisticVariantUpdated_Metadata.ftl | 2 +- RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl | 2 +- ...RP_HsaItm_ItemCreated_LogisticVariantMetadata.ftl | 2 +- RFXtoRP_HsaSup_ActorCreated.ftl | 4 ++-- RFXtoRP_HsaSup_ActorCreated_Metadata.ftl | 2 +- RFXtoRP_HsrDepot_ActorCreated.ftl | 4 ++-- RFXtoRP_HsrDepot_ActorCreated_Metadata.ftl | 2 +- ...P_HsrPrepa_GoodsPrepared_HandlingUnitMetadata.ftl | 2 +- RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl | 2 +- RFXtoRP_HsrPrepa_HUsAdded_Metadata.ftl | 2 +- ...P_HsrPro_ExecutionflowDetected_HeaderMetadata.ftl | 4 ++-- ...oRP_HsrPro_ExecutionflowDetected_LineMetadata.ftl | 2 +- ...HsrPro_ExecutionflowDetected_SegmentationKeys.ftl | 4 ++-- ...eiptList_ExecutionflowDetected_HeaderMetadata.ftl | 4 ++-- ...eceiptList_ExecutionflowDetected_LineMetadata.ftl | 2 +- ...ptList_ExecutionflowDetected_SegmentationKeys.ftl | 10 +++++----- RP_connector.ftl | 2 +- RPtoRFX_PrepOrder.ftl | 4 ++-- 28 files changed, 47 insertions(+), 47 deletions(-) diff --git a/README.md b/README.md index 6bb1720..577d51c 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# Reflex Platform Core FTLs +# HARDIS SC NETWORK Core FTLs ## Overview -The **Reflex WMS Connector** is a set of **FreeMarker templates (FTL)** designed to transform **outgoing JSON flows from Reflex WMS** into **flows compatible with Reflex Platform**. +The **HARDIS WMS Connector** is a set of **FreeMarker templates (FTL)** designed to transform **outgoing JSON flows from HARDIS WMS** into **flows compatible with HARDIS SC NETWORK**. This connector does not contain any standalone executable code: it is intended to be used by **Reflex integration engines** or **data exchange pipelines**, where it applies the mapping rules defined in the `.ftl` files. @@ -12,7 +12,7 @@ This connector does not contain any standalone executable code: it is intended t - These templates use the **FreeMarker** syntax to: - Extract the required fields from the WMS source flow. - Apply transformation rules (mapping, conversions, enrichments). - - Generate a **final structured JSON** for Reflex Platform. + - Generate a **final structured JSON** for HARDIS SC NETWORK. ## Useful Resources diff --git a/RFXtoRP_HfDtlStockLs_StockSnapshotted_SegmentationKeys.ftl b/RFXtoRP_HfDtlStockLs_StockSnapshotted_SegmentationKeys.ftl index 9a24817..8fefdd0 100644 --- a/RFXtoRP_HfDtlStockLs_StockSnapshotted_SegmentationKeys.ftl +++ b/RFXtoRP_HfDtlStockLs_StockSnapshotted_SegmentationKeys.ftl @@ -1,4 +1,4 @@ -<#-- use protobuf of class HfDtlStockLs to find Reflex WMS fields names --> +<#-- use protobuf of class HfDtlStockLs to find HARDIS WMS fields names --> <#-- diff --git a/RFXtoRP_HfRpConfig.ftl b/RFXtoRP_HfRpConfig.ftl index 0d0751e..51dc7ae 100644 --- a/RFXtoRP_HfRpConfig.ftl +++ b/RFXtoRP_HfRpConfig.ftl @@ -1,5 +1,5 @@ <#-- **** -Reflex WMS provides some of their environment parameters through the class HfRpConfig +HARDIS WMS provides some of their environment parameters through the class HfRpConfig those parameters are stored in FTL file HfRpConfig.ftl for later use in some of the data ftl files *** --> diff --git a/RFXtoRP_HsaCarrier_ActorCreated.ftl b/RFXtoRP_HsaCarrier_ActorCreated.ftl index 8ac9722..38e55be 100644 --- a/RFXtoRP_HsaCarrier_ActorCreated.ftl +++ b/RFXtoRP_HsaCarrier_ActorCreated.ftl @@ -21,7 +21,7 @@ "Address": { - <#-- if Reflex WMS address is structured --> + <#-- if HARDIS WMS address is structured --> <#if carrier.carrier_structured_address?? > "Name": "${carrier.carrier_structured_address.name_or_company?json_string}", @@ -38,7 +38,7 @@ "ProvinceCode": "${carrier.carrier_structured_address.territorial_div_code?json_string}", "State": "${carrier.carrier_structured_address.country_designation?json_string}" - <#-- if Reflex WMS address is not structured --> + <#-- if HARDIS WMS address is not structured --> <#else> <#if carrier.address??> "Name": "${carrier.address.company_name?json_string}", diff --git a/RFXtoRP_HsaCarrier_ActorCreated_Metadata.ftl b/RFXtoRP_HsaCarrier_ActorCreated_Metadata.ftl index f013ed3..ceb5dfe 100644 --- a/RFXtoRP_HsaCarrier_ActorCreated_Metadata.ftl +++ b/RFXtoRP_HsaCarrier_ActorCreated_Metadata.ftl @@ -1,4 +1,4 @@ -<#-- use protobuf of class HsaCarrier to find Reflex WMS fields names --> +<#-- use protobuf of class HsaCarrier to find HARDIS WMS fields names --> "MetaData": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsaCons_ActorCreated.ftl b/RFXtoRP_HsaCons_ActorCreated.ftl index 84df17a..f2afc88 100644 --- a/RFXtoRP_HsaCons_ActorCreated.ftl +++ b/RFXtoRP_HsaCons_ActorCreated.ftl @@ -23,7 +23,7 @@ "Address": { - <#-- if Reflex WMS is structured --> + <#-- if HARDIS WMS is structured --> <#if actor.consignee_structured_address??> "Name": "${actor.consignee_structured_address.name_or_company?json_string}", @@ -40,7 +40,7 @@ "ProvinceCode": "${actor.consignee_structured_address.territorial_div_code?json_string}", "State": "${actor.consignee_structured_address.country_designation?json_string}" - <#-- if Reflex WMS is not structured --> + <#-- if HARDIS WMS is not structured --> <#else> <#if actor.address?? > diff --git a/RFXtoRP_HsaCons_ActorCreated_Metadata.ftl b/RFXtoRP_HsaCons_ActorCreated_Metadata.ftl index 19decec..8555307 100644 --- a/RFXtoRP_HsaCons_ActorCreated_Metadata.ftl +++ b/RFXtoRP_HsaCons_ActorCreated_Metadata.ftl @@ -1,4 +1,4 @@ -<#-- use protobuf of class HsaCons to find Reflex WMS fields names --> +<#-- use protobuf of class HsaCons to find HARDIS WMS fields names --> "MetaData": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsaDispute_ClaimMetadata.ftl b/RFXtoRP_HsaDispute_ClaimMetadata.ftl index e5b9b99..d0a8314 100644 --- a/RFXtoRP_HsaDispute_ClaimMetadata.ftl +++ b/RFXtoRP_HsaDispute_ClaimMetadata.ftl @@ -1,4 +1,4 @@ -<#-- use protobuf of class HsaDispute to find Reflex Wms fields names --> +<#-- use protobuf of class HsaDispute to find HARDIS WMS fields names --> "MetaData": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl b/RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl index 4fa3d1d..f47abd4 100644 --- a/RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl +++ b/RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl @@ -1,4 +1,4 @@ -<#-- use protobuf of class HsaIpgMove to find Reflex WMS fields names --> +<#-- use protobuf of class HsaIpgMove to find HARDIS WMS fields names --> <#-- diff --git a/RFXtoRP_HsaIpgMove_StockMoved_SegmentationKeys.ftl b/RFXtoRP_HsaIpgMove_StockMoved_SegmentationKeys.ftl index efb4f7b..29d1851 100644 --- a/RFXtoRP_HsaIpgMove_StockMoved_SegmentationKeys.ftl +++ b/RFXtoRP_HsaIpgMove_StockMoved_SegmentationKeys.ftl @@ -1,4 +1,4 @@ -<#-- use protobuf of class HsaIpgMove to find Reflex WMS fields names --> +<#-- use protobuf of class HsaIpgMove to find HARDIS WMS fields names --> <#-- "SegmentationKeys": [ { @@ -15,22 +15,22 @@ "Value": { "String" : "no batch"} <#else> "Value": { "String" : "${reflexMvtStockInterface.batch_1}"} - + }, { "Key": "HeldForSpecificCode", "Value": { "Bool" : "${reflexMvtStockInterface.ipg_specific_code_held}"} }, - + { - <#assign manufacturing_date = reflexMvtStockInterface.manufacture_date?datetime(rfx_date_format_default)?iso_utc /> + <#assign manufacturing_date = reflexMvtStockInterface.manufacture_date?datetime(rfx_date_format_default)?iso_utc /> "Key": "ManufacturingDate", "Value": "Timestamp": { "AuthorTimeZone": "${time_zone_rfx}", "DateTime": "${manufacturing_date}" } - } - ] + } + ] --> "SegmentationKeys": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsaItmLv_LogisticVariantUpdated_Metadata.ftl b/RFXtoRP_HsaItmLv_LogisticVariantUpdated_Metadata.ftl index 72f7aa3..cbbb6f7 100644 --- a/RFXtoRP_HsaItmLv_LogisticVariantUpdated_Metadata.ftl +++ b/RFXtoRP_HsaItmLv_LogisticVariantUpdated_Metadata.ftl @@ -1,4 +1,4 @@ -<#-- use protobuf of class HsaItmLv to find Reflex Wms fields names --> +<#-- use protobuf of class HsaItmLv to find HARDIS WMS fields names --> "MetaData": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl b/RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl index 881c81c..11676ae 100644 --- a/RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl +++ b/RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl @@ -1,4 +1,4 @@ -<#-- use protobuf of class HsaItm to find Reflex Wms fields names --> +<#-- use protobuf of class HsaItm to find HARDIS WMS fields names --> "MetaData": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsaItm_ItemCreated_LogisticVariantMetadata.ftl b/RFXtoRP_HsaItm_ItemCreated_LogisticVariantMetadata.ftl index 49607a6..2b30c89 100644 --- a/RFXtoRP_HsaItm_ItemCreated_LogisticVariantMetadata.ftl +++ b/RFXtoRP_HsaItm_ItemCreated_LogisticVariantMetadata.ftl @@ -1,4 +1,4 @@ -<#-- use protobuf of class HsaItm to find Reflex Wms fields names --> +<#-- use protobuf of class HsaItm to find HARDIS WMS fields names --> "MetaData": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsaSup_ActorCreated.ftl b/RFXtoRP_HsaSup_ActorCreated.ftl index 23a560c..7eb8e33 100644 --- a/RFXtoRP_HsaSup_ActorCreated.ftl +++ b/RFXtoRP_HsaSup_ActorCreated.ftl @@ -20,7 +20,7 @@ "Address": { - <#-- if Reflex WMS address is structured --> + <#-- if HARDIS WMS address is structured --> <#if actor.supplier_structured_address?? > "Name": "${actor.supplier_structured_address.name_or_company?json_string}", @@ -37,7 +37,7 @@ "ProvinceCode": "${actor.supplier_structured_address.territorial_div_code?json_string}", "State": "${actor.supplier_structured_address.country_designation?json_string}" - <#-- if Reflex WMS address is not structured --> + <#-- if HARDIS WMS address is not structured --> <#else> <#if actor.optional_attributes?? > "Name": "${actor.optional_attributes.company_name?json_string}", diff --git a/RFXtoRP_HsaSup_ActorCreated_Metadata.ftl b/RFXtoRP_HsaSup_ActorCreated_Metadata.ftl index 770bf64..80b9a11 100644 --- a/RFXtoRP_HsaSup_ActorCreated_Metadata.ftl +++ b/RFXtoRP_HsaSup_ActorCreated_Metadata.ftl @@ -1,4 +1,4 @@ -<#-- use protobuf of class HsaSup to find Reflex WMS fields names --> +<#-- use protobuf of class HsaSup to find HARDIS WMS fields names --> "MetaData": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsrDepot_ActorCreated.ftl b/RFXtoRP_HsrDepot_ActorCreated.ftl index c64e285..8993853 100644 --- a/RFXtoRP_HsrDepot_ActorCreated.ftl +++ b/RFXtoRP_HsrDepot_ActorCreated.ftl @@ -22,7 +22,7 @@ "Address": { - <#-- if Reflex WMS address is structured --> + <#-- if HARDIS WMS address is structured --> <#if depot.physical_depot_structured_address?? > "Name": "${depot.physical_depot_structured_address.name_or_company?json_string}", @@ -39,7 +39,7 @@ "ProvinceCode": "${depot.physical_depot_structured_address.territorial_div_code?json_string}", "State": "${depot.physical_depot_structured_address.country_designation?json_string}" - <#-- if Reflex WMS address is not structured --> + <#-- if HARDIS WMS address is not structured --> <#else> <#if depot.physical_depot_address??> "Name": "${depot.physical_depot_address.company_name?json_string}", diff --git a/RFXtoRP_HsrDepot_ActorCreated_Metadata.ftl b/RFXtoRP_HsrDepot_ActorCreated_Metadata.ftl index 68c665e..dc02b6c 100644 --- a/RFXtoRP_HsrDepot_ActorCreated_Metadata.ftl +++ b/RFXtoRP_HsrDepot_ActorCreated_Metadata.ftl @@ -1,4 +1,4 @@ -<#-- use protobuf of class HsrDepot to find Reflex WMS fields names --> +<#-- use protobuf of class HsrDepot to find HARDIS WMS fields names --> "MetaData": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsrPrepa_GoodsPrepared_HandlingUnitMetadata.ftl b/RFXtoRP_HsrPrepa_GoodsPrepared_HandlingUnitMetadata.ftl index 9f6c877..dde74cb 100644 --- a/RFXtoRP_HsrPrepa_GoodsPrepared_HandlingUnitMetadata.ftl +++ b/RFXtoRP_HsrPrepa_GoodsPrepared_HandlingUnitMetadata.ftl @@ -1,4 +1,4 @@ -<#-- use protobuf of class HsrPrepa to find Reflex WMS fields names --> +<#-- use protobuf of class HsrPrepa to find HARDIS WMS fields names --> <#-- "MetaData" :[ diff --git a/RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl b/RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl index 0d28cf4..60d6334 100644 --- a/RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl +++ b/RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl @@ -1,4 +1,4 @@ -<#-- use protobuf of class Hsrprepa to find Reflex WMS fields names --> +<#-- use protobuf of class Hsrprepa to find HARDIS WMS fields names --> <#-- "SegmentationKeys": [ { diff --git a/RFXtoRP_HsrPrepa_HUsAdded_Metadata.ftl b/RFXtoRP_HsrPrepa_HUsAdded_Metadata.ftl index 5b233b9..e6d07b1 100644 --- a/RFXtoRP_HsrPrepa_HUsAdded_Metadata.ftl +++ b/RFXtoRP_HsrPrepa_HUsAdded_Metadata.ftl @@ -1,4 +1,4 @@ -<#-- use protobuf of class HsrPrepa to find Reflex WMS fields names --> +<#-- use protobuf of class HsrPrepa to find HARDIS WMS fields names --> <#-- "MetaData" :[ diff --git a/RFXtoRP_HsrPro_ExecutionflowDetected_HeaderMetadata.ftl b/RFXtoRP_HsrPro_ExecutionflowDetected_HeaderMetadata.ftl index 64a37f6..8506511 100644 --- a/RFXtoRP_HsrPro_ExecutionflowDetected_HeaderMetadata.ftl +++ b/RFXtoRP_HsrPro_ExecutionflowDetected_HeaderMetadata.ftl @@ -1,6 +1,6 @@ -<#-- use protobuf of class HsrPro to find Reflex Wms fields names --> +<#-- use protobuf of class HsrPro to find HARDIS WMS fields names --> -<#-- +<#-- "MetaData": [ { diff --git a/RFXtoRP_HsrPro_ExecutionflowDetected_LineMetadata.ftl b/RFXtoRP_HsrPro_ExecutionflowDetected_LineMetadata.ftl index 8dc79af..f0de72a 100644 --- a/RFXtoRP_HsrPro_ExecutionflowDetected_LineMetadata.ftl +++ b/RFXtoRP_HsrPro_ExecutionflowDetected_LineMetadata.ftl @@ -1,4 +1,4 @@ -<#-- use protobuf of class HsrPro to find Reflex Wms fields names --> +<#-- use protobuf of class HsrPro to find HARDIS WMS fields names --> "MetaData": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsrPro_ExecutionflowDetected_SegmentationKeys.ftl b/RFXtoRP_HsrPro_ExecutionflowDetected_SegmentationKeys.ftl index 8cb3286..9cd8bc9 100644 --- a/RFXtoRP_HsrPro_ExecutionflowDetected_SegmentationKeys.ftl +++ b/RFXtoRP_HsrPro_ExecutionflowDetected_SegmentationKeys.ftl @@ -1,4 +1,4 @@ -<#-- use protobuf of class HsrPro to find Reflex WMS fields names --> +<#-- use protobuf of class HsrPro to find HARDIS WMS fields names --> <#-- "SegmentationKeys": [ @@ -16,7 +16,7 @@ "Value": { "String" : "no batch"} <#else> "Value": { "String" : "${preparation_order_line.batch_1}"} - + } ] --> diff --git a/RFXtoRP_HsrReceiptList_ExecutionflowDetected_HeaderMetadata.ftl b/RFXtoRP_HsrReceiptList_ExecutionflowDetected_HeaderMetadata.ftl index 301e1e2..079640d 100644 --- a/RFXtoRP_HsrReceiptList_ExecutionflowDetected_HeaderMetadata.ftl +++ b/RFXtoRP_HsrReceiptList_ExecutionflowDetected_HeaderMetadata.ftl @@ -1,6 +1,6 @@ -<#-- use protobuf of class HsrReceiptList to find Reflex Wms fields names --> +<#-- use protobuf of class HsrReceiptList to find HARDIS WMS fields names --> -<#-- +<#-- "MetaData": [ { diff --git a/RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineMetadata.ftl b/RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineMetadata.ftl index de873ff..d77c54e 100644 --- a/RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineMetadata.ftl +++ b/RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineMetadata.ftl @@ -1,4 +1,4 @@ -<#-- use protobuf of class HsrReceiptList to find Reflex Wms fields names --> +<#-- use protobuf of class HsrReceiptList to find HARDIS WMS fields names --> "MetaData": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsrReceiptList_ExecutionflowDetected_SegmentationKeys.ftl b/RFXtoRP_HsrReceiptList_ExecutionflowDetected_SegmentationKeys.ftl index 8950e72..d39b703 100644 --- a/RFXtoRP_HsrReceiptList_ExecutionflowDetected_SegmentationKeys.ftl +++ b/RFXtoRP_HsrReceiptList_ExecutionflowDetected_SegmentationKeys.ftl @@ -1,4 +1,4 @@ -<#-- use protobuf of class HsrReceiptList to find Reflex WMS fields names --> +<#-- use protobuf of class HsrReceiptList to find HARDIS WMS fields names --> <#-- "SegmentationKeys": [ @@ -16,7 +16,7 @@ "Value": { "String" : "no batch"} <#else> "Value": { "String" : "${line_without_detail.batch_1}"} - + }, { "Key": "HeldForSpecificCode", @@ -25,15 +25,15 @@ <#else> "Value": { "Bool" : "False"} }, - + { - <#assign manufacturing_date = line_without_detail.ipg_date_of_manufacture_date?datetime(rfx_date_format_default)?iso_utc /> + <#assign manufacturing_date = line_without_detail.ipg_date_of_manufacture_date?datetime(rfx_date_format_default)?iso_utc /> "Key": "ManufacturingDate", "Value": "Timestamp": { "AuthorTimeZone": "${time_zone_rfx}", "DateTime": "${manufacturing_date}" } - } + } ] diff --git a/RP_connector.ftl b/RP_connector.ftl index cb996bd..e406b78 100644 --- a/RP_connector.ftl +++ b/RP_connector.ftl @@ -14,7 +14,7 @@ those parameters are stored in FTL file Conf-connector.ftl for later use in some <#noparse><#-- Possible values for SupplyOfTheTrackingNumber parameter : --> <#noparse><#-- 0 : Always empty --> -<#noparse><#-- 1 : Always use Reflex WMS tracking --> +<#noparse><#-- 1 : Always use HARDIS WMS tracking --> <#noparse><#-- 2 : Always use the HU number --> <#noparse><#-- 3 : Use Reflex tracking if it exists, the HU number otherwise --> diff --git a/RPtoRFX_PrepOrder.ftl b/RPtoRFX_PrepOrder.ftl index cc83fb2..5976e5a 100644 --- a/RPtoRFX_PrepOrder.ftl +++ b/RPtoRFX_PrepOrder.ftl @@ -7,8 +7,8 @@ <#assign titlecode ="1"> <#assign contacttypecode ="010"> <#assign adresstypecode ="010"> -<#-- Si vous utilisez des acteurs non référencés, il faudra créer un destinataire "VIZ" dans Reflex WMS pour utiliser cette fonctionnalité --> -<#-- If you are using unreferenced actors, you will need to create a "VIZ" consignee in Reflex WMS to use this feature --> +<#-- Si vous utilisez des acteurs non référencés, il faudra créer un destinataire "VIZ" dans HARDIS WMS pour utiliser cette fonctionnalité --> +<#-- If you are using unreferenced actors, you will need to create a "VIZ" consignee in HARDIS WMS to use this feature --> <#assign defaultactor ="VIZ"> <#if executionflow.ShipTo.ActorID?? && executionflow.ShipTo.ActorID!=""> <#assign actorID = "${RPtoRFXprefixConsignee(executionflow.ShipTo.ActorID)}" > From ca04c4cf375164c123133f52c77cd2b9d7e5aad9 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Tue, 21 Oct 2025 11:35:43 +0200 Subject: [PATCH 21/30] SCPN1-9399 --- RFXtoRP_HliPrepaL.ftl | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/RFXtoRP_HliPrepaL.ftl b/RFXtoRP_HliPrepaL.ftl index 68ee34b..80326bc 100644 --- a/RFXtoRP_HliPrepaL.ftl +++ b/RFXtoRP_HliPrepaL.ftl @@ -34,7 +34,6 @@ "datas" : <#include "RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl"> } - <#assign first = true> <#assign refIDHmap ={}> <#assign hd_numberHmap ={}> <#assign hd_numberHmapHUadded ={}> @@ -43,24 +42,14 @@ <#assign HUadded_packing_datetime = RfxDateTimetoUTCWithTimezone(preparation_line.confirmation_datetime,time_zone_rfx) /> <#if (!hd_numberHmap[despatched_ipg.hd_number]?? || !hd_numberHmap[despatched_ipg.carton_number]??) && (trackingNumberSource==2 || trackingNumberSource==3 || (despatched_ipg.consignment_unit_id!="" && trackingNumberSource==1))> , - <#if !first > - <#assign first = false> - , - - { <#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl"> } - <#if despatched_ipg.carton_number != "000000000000000000" && despatched_ipg.carton_number!=despatched_ipg.hd_number > , - <#if !first > - <#assign first = false> - , - { <#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitHUsAdded> "apiReflexPlatformID" : "${apiReflexPlatformID}", From 6530f7b0dbb73cdf53d2c672bf037325b99b7cff Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Tue, 21 Oct 2025 18:08:20 +0200 Subject: [PATCH 22/30] brand --- RFXtoRP_HfDtlStockLs.ftl | 6 +++--- RFXtoRP_HliPrepaL.ftl | 6 +++--- RFXtoRP_HliReceiptLr.ftl | 6 +++--- RFXtoRP_HlrProL.ftl | 6 +++--- RFXtoRP_HsaCons.ftl | 6 +++--- RFXtoRP_HsaDispute.ftl | 6 +++--- RFXtoRP_HsaItm.ftl | 6 +++--- RFXtoRP_HsaItmLv.ftl | 6 +++--- RFXtoRP_HsaLstCarSta.ftl | 6 +++--- RFXtoRP_HsaProStatus.ftl | 6 +++--- RFXtoRP_HsaSup.ftl | 6 +++--- RFXtoRP_HsrCarrierApt.ftl | 6 +++--- RFXtoRP_HsrDepot.ftl | 6 +++--- RFXtoRP_HsrLoadInfo.ftl | 6 +++--- RFXtoRP_HsrPackBranch.ftl | 6 +++--- RFXtoRP_HsrPackOrder.ftl | 6 +++--- RFXtoRP_HsrPrepa.ftl | 6 +++--- RFXtoRP_HsrPro.ftl | 6 +++--- RFXtoRP_HsrReceiptList.ftl | 6 +++--- RFXtoRP_RestResponse.ftl | 6 +++--- RPtoRFX_ExecutionflowEvent.ftl | 6 +++--- 21 files changed, 63 insertions(+), 63 deletions(-) diff --git a/RFXtoRP_HfDtlStockLs.ftl b/RFXtoRP_HfDtlStockLs.ftl index 28d6d61..54a07fb 100644 --- a/RFXtoRP_HfDtlStockLs.ftl +++ b/RFXtoRP_HfDtlStockLs.ftl @@ -1,7 +1,7 @@ <#-- **** input parameters ***** --> -<#-- input : message RFX --> -<#-- project : projectId in ReflexPlatform --> -<#-- organisation : organisationtId in ReflexPlatform --> +<#-- input : message HARDIS WMS --> +<#-- project : projectId in HARDIS SC NETWORK --> +<#-- organisation : organisationtId in HARDIS SC NETWORK --> <#-- sum_elt : nb element in snapshot (optional parameter) --> <#include "HfRpConfig.ftl"> diff --git a/RFXtoRP_HliPrepaL.ftl b/RFXtoRP_HliPrepaL.ftl index 80326bc..3d81bb3 100644 --- a/RFXtoRP_HliPrepaL.ftl +++ b/RFXtoRP_HliPrepaL.ftl @@ -1,7 +1,7 @@ <#-- **** input parameters ***** --> -<#-- input : message RFX --> -<#-- project : projectId in ReflexPlatform --> -<#-- organisation : organisationtId in ReflexPlatform --> +<#-- input : message HARDIS WMS --> +<#-- project : projectId in HARDIS SC NETWORK --> +<#-- organisation : organisationtId in HARDIS SC NETWORK --> <#include "ReflexUtils.ftl"> <#include "HfRpConfig.ftl"> <#assign cloudEventMsg = JsonUtil.jsonToMap(input)> diff --git a/RFXtoRP_HliReceiptLr.ftl b/RFXtoRP_HliReceiptLr.ftl index f93bbc3..10198a6 100644 --- a/RFXtoRP_HliReceiptLr.ftl +++ b/RFXtoRP_HliReceiptLr.ftl @@ -1,7 +1,7 @@ <#-- **** input parameters ***** --> -<#-- input : message RFX --> -<#-- project : projectId in ReflexPlatform --> -<#-- organisation : organisationtId in ReflexPlatform --> +<#-- input : message HARDIS WMS --> +<#-- project : projectId in HARDIS SC NETWORK --> +<#-- organisation : organisationtId in HARDIS SC NETWORK --> <#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> diff --git a/RFXtoRP_HlrProL.ftl b/RFXtoRP_HlrProL.ftl index ce907a7..2c47904 100644 --- a/RFXtoRP_HlrProL.ftl +++ b/RFXtoRP_HlrProL.ftl @@ -1,7 +1,7 @@ <#-- **** input parameters ***** --> -<#-- input : message RFX --> -<#-- project : projectId in ReflexPlatform --> -<#-- organisation : organisationtId in ReflexPlatform --> +<#-- input : message HARDIS WMS --> +<#-- project : projectId in HARDIS SC NETWORK --> +<#-- organisation : organisationtId in HARDIS SC NETWORK --> <#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> diff --git a/RFXtoRP_HsaCons.ftl b/RFXtoRP_HsaCons.ftl index 8932eb4..0c8a922 100644 --- a/RFXtoRP_HsaCons.ftl +++ b/RFXtoRP_HsaCons.ftl @@ -1,7 +1,7 @@ <#-- **** input parameters ***** --> -<#-- input : message RFX --> -<#-- project : projectId in ReflexPlatform --> -<#-- organisation : organisationtId in ReflexPlatform --> +<#-- input : message HARDIS- WMS --> +<#-- project : projectId in HARDIS SC NETWORK --> +<#-- organisation : organisationtId in HARDIS SC NETWORK --> <#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> diff --git a/RFXtoRP_HsaDispute.ftl b/RFXtoRP_HsaDispute.ftl index e8c4dca..fe36e7c 100644 --- a/RFXtoRP_HsaDispute.ftl +++ b/RFXtoRP_HsaDispute.ftl @@ -1,7 +1,7 @@ <#-- **** input parameters ***** --> -<#-- input : message RFX --> -<#-- project : projectId in ReflexPlatform --> -<#-- organisation : organisationtId in ReflexPlatform --> +<#-- input : message HARDIS WMS --> +<#-- project : projectId in HARDIS SC NETWORK --> +<#-- organisation : organisationtId in HARDIS SC NETWORK --> <#-- For dispute creation WMS to Platform --> <#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> diff --git a/RFXtoRP_HsaItm.ftl b/RFXtoRP_HsaItm.ftl index 63ca3a2..0fe883c 100644 --- a/RFXtoRP_HsaItm.ftl +++ b/RFXtoRP_HsaItm.ftl @@ -1,7 +1,7 @@ <#-- **** input parameters ***** --> -<#-- input : message RFX --> -<#-- project : projectId in ReflexPlatform --> -<#-- organisation : organisationtId in ReflexPlatform --> +<#-- input : message HARDIS WMS --> +<#-- project : projectId in HARDIS SC NETWORK --> +<#-- organisation : organisationtId in HARDIS SC NETWORK --> <#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> diff --git a/RFXtoRP_HsaItmLv.ftl b/RFXtoRP_HsaItmLv.ftl index 4b914aa..19224f5 100644 --- a/RFXtoRP_HsaItmLv.ftl +++ b/RFXtoRP_HsaItmLv.ftl @@ -1,7 +1,7 @@ <#-- **** input parameters ***** --> -<#-- input : message RFX --> -<#-- project : projectId in ReflexPlatform --> -<#-- organisation : organisationtId in ReflexPlatform --> +<#-- input : message HARDIS WMS --> +<#-- project : projectId in HARDIS SC NETWORK --> +<#-- organisation : organisationtId in HARDIS SC NETWORK --> <#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> diff --git a/RFXtoRP_HsaLstCarSta.ftl b/RFXtoRP_HsaLstCarSta.ftl index 635e62b..1e7ac8c 100644 --- a/RFXtoRP_HsaLstCarSta.ftl +++ b/RFXtoRP_HsaLstCarSta.ftl @@ -1,7 +1,7 @@ <#-- **** input parameters ***** --> -<#-- input : message RFX --> -<#-- project : projectId in ReflexPlatform --> -<#-- organisation : organisationtId in ReflexPlatform --> +<#-- input : message HARDIS WMS --> +<#-- project : projectId in HARDIS SC NETWORK --> +<#-- organisation : organisationtId in HARDIS SC NETWORK --> <#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> diff --git a/RFXtoRP_HsaProStatus.ftl b/RFXtoRP_HsaProStatus.ftl index 6c9401d..5151b52 100644 --- a/RFXtoRP_HsaProStatus.ftl +++ b/RFXtoRP_HsaProStatus.ftl @@ -1,7 +1,7 @@ <#-- **** input parameters ***** --> -<#-- input : message RFX --> -<#-- project : projectId in ReflexPlatform --> -<#-- organisation : organisationtId in ReflexPlatform --> +<#-- input : message HARDIS WMS --> +<#-- project : projectId in HARDIS SC NETWORK --> +<#-- organisation : organisationtId in HARDIS SC NETWORK --> <#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> diff --git a/RFXtoRP_HsaSup.ftl b/RFXtoRP_HsaSup.ftl index 7250b4e..2314b35 100644 --- a/RFXtoRP_HsaSup.ftl +++ b/RFXtoRP_HsaSup.ftl @@ -1,7 +1,7 @@ <#-- **** input parameters ***** --> -<#-- input : message RFX --> -<#-- project : projectId in ReflexPlatform --> -<#-- organisation : organisationtId in ReflexPlatform --> +<#-- input : message HARDIS WMS --> +<#-- project : projectId in HARDIS SC NETWORK --> +<#-- organisation : organisationtId in HARDIS SC NETWORK --> <#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> diff --git a/RFXtoRP_HsrCarrierApt.ftl b/RFXtoRP_HsrCarrierApt.ftl index 635e62b..1e7ac8c 100644 --- a/RFXtoRP_HsrCarrierApt.ftl +++ b/RFXtoRP_HsrCarrierApt.ftl @@ -1,7 +1,7 @@ <#-- **** input parameters ***** --> -<#-- input : message RFX --> -<#-- project : projectId in ReflexPlatform --> -<#-- organisation : organisationtId in ReflexPlatform --> +<#-- input : message HARDIS WMS --> +<#-- project : projectId in HARDIS SC NETWORK --> +<#-- organisation : organisationtId in HARDIS SC NETWORK --> <#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> diff --git a/RFXtoRP_HsrDepot.ftl b/RFXtoRP_HsrDepot.ftl index cd822b3..1b9845f 100644 --- a/RFXtoRP_HsrDepot.ftl +++ b/RFXtoRP_HsrDepot.ftl @@ -1,7 +1,7 @@ <#-- **** input parameters ***** --> -<#-- input : message RFX --> -<#-- project : projectId in ReflexPlatform --> -<#-- organisation : organisationtId in ReflexPlatform --> +<#-- input : message HARDIS WMS --> +<#-- project : projectId in HARDIS SC NETWORK --> +<#-- organisation : organisationtId in HARDIS SC NETWORK --> <#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> diff --git a/RFXtoRP_HsrLoadInfo.ftl b/RFXtoRP_HsrLoadInfo.ftl index 635e62b..1e7ac8c 100644 --- a/RFXtoRP_HsrLoadInfo.ftl +++ b/RFXtoRP_HsrLoadInfo.ftl @@ -1,7 +1,7 @@ <#-- **** input parameters ***** --> -<#-- input : message RFX --> -<#-- project : projectId in ReflexPlatform --> -<#-- organisation : organisationtId in ReflexPlatform --> +<#-- input : message HARDIS WMS --> +<#-- project : projectId in HARDIS SC NETWORK --> +<#-- organisation : organisationtId in HARDIS SC NETWORK --> <#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> diff --git a/RFXtoRP_HsrPackBranch.ftl b/RFXtoRP_HsrPackBranch.ftl index f1b7b7d..f0f360e 100644 --- a/RFXtoRP_HsrPackBranch.ftl +++ b/RFXtoRP_HsrPackBranch.ftl @@ -1,7 +1,7 @@ <#-- **** input parameters ***** --> -<#-- input : message RFX --> -<#-- project : projectId in ReflexPlatform --> -<#-- organisation : organisationtId in ReflexPlatform --> +<#-- input : message HARDIS WMS --> +<#-- project : projectId in HARDIS SC NETWORK --> +<#-- organisation : organisationtId in HARDIS SC NETWORK --> <#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> diff --git a/RFXtoRP_HsrPackOrder.ftl b/RFXtoRP_HsrPackOrder.ftl index 1b78ac1..63a612d 100644 --- a/RFXtoRP_HsrPackOrder.ftl +++ b/RFXtoRP_HsrPackOrder.ftl @@ -1,7 +1,7 @@ <#-- **** input parameters ***** --> -<#-- input : message RFX --> -<#-- project : projectId in ReflexPlatform --> -<#-- organisation : organisationtId in ReflexPlatform --> +<#-- input : message HARDIS WMS --> +<#-- project : projectId in HARDIS SC NETWORK --> +<#-- organisation : organisationtId in HARDIS SC NETWORK --> <#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> diff --git a/RFXtoRP_HsrPrepa.ftl b/RFXtoRP_HsrPrepa.ftl index 2f1fb33..5b5507c 100644 --- a/RFXtoRP_HsrPrepa.ftl +++ b/RFXtoRP_HsrPrepa.ftl @@ -1,7 +1,7 @@ <#-- **** input parameters ***** --> -<#-- input : message RFX --> -<#-- project : projectId in ReflexPlatform --> -<#-- organisation : organisationtId in ReflexPlatform --> +<#-- input : message HARDIS WMS --> +<#-- project : projectId in HARDIS SC NETWORK --> +<#-- organisation : organisationtId in HARDIS SC NETWORK --> <#include "ReflexUtils.ftl"> <#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> diff --git a/RFXtoRP_HsrPro.ftl b/RFXtoRP_HsrPro.ftl index 783e7a0..bdc7f26 100644 --- a/RFXtoRP_HsrPro.ftl +++ b/RFXtoRP_HsrPro.ftl @@ -1,7 +1,7 @@ <#-- **** input parameters ***** --> -<#-- input : message RFX --> -<#-- project : projectId in ReflexPlatform --> -<#-- organisation : organisationtId in ReflexPlatform --> +<#-- input : message HARDIS WMS --> +<#-- project : projectId in HARDIS SC NETWORK --> +<#-- organisation : organisationtId in HARDIS SC NETWORK --> <#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> diff --git a/RFXtoRP_HsrReceiptList.ftl b/RFXtoRP_HsrReceiptList.ftl index f05fcba..792be9a 100644 --- a/RFXtoRP_HsrReceiptList.ftl +++ b/RFXtoRP_HsrReceiptList.ftl @@ -1,7 +1,7 @@ <#-- **** input parameters ***** --> -<#-- input : message RFX --> -<#-- project : projectId in ReflexPlatform --> -<#-- organisation : organisationtId in ReflexPlatform --> +<#-- input : message HARDIS WMS --> +<#-- project : projectId in HARDIS SC NETWORK --> +<#-- organisation : organisationtId in HARDIS SC NETWORK --> <#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> diff --git a/RFXtoRP_RestResponse.ftl b/RFXtoRP_RestResponse.ftl index 489cedb..8eba90d 100644 --- a/RFXtoRP_RestResponse.ftl +++ b/RFXtoRP_RestResponse.ftl @@ -1,7 +1,7 @@ <#-- **** input parameters ***** --> -<#-- input : Response message from Reflex --> -<#-- project : projectId in ReflexPlatform --> -<#-- organisation : organisationtId in ReflexPlatform --> +<#-- input : Response message from HARDIS WMS --> +<#-- project : projectId in HARDIS SC NETWORK --> +<#-- organisation : organisationtId in HARDIS SC NETWORK --> <#assign restResponsetMsg = JsonUtil.jsonToMap(input)> <#assign id = JsonUtil.jsonToMap(restResponsetMsg.id!"{}")> diff --git a/RPtoRFX_ExecutionflowEvent.ftl b/RPtoRFX_ExecutionflowEvent.ftl index b691d83..0ea3dae 100644 --- a/RPtoRFX_ExecutionflowEvent.ftl +++ b/RPtoRFX_ExecutionflowEvent.ftl @@ -1,7 +1,7 @@ <#-- **** input parameters ***** --> -<#-- input : message RFX --> -<#-- project : projectId in ReflexPlatform --> -<#-- organisation : organisationtId in ReflexPlatform --> +<#-- input : message HARDIS WMS --> +<#-- project : projectId in HARDIS SC NETWORK --> +<#-- organisation : organisationtId in HARDIS SC NETWORK --> <#include "HfRpConfig.ftl"> <#include "ReflexUtils.ftl"> From 49bd1a7b71f4981dcc86010f2e0f684f6dc5a07e Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Wed, 22 Oct 2025 08:52:13 +0200 Subject: [PATCH 23/30] brand --- RFXtoRP_HsaCarrier.ftl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/RFXtoRP_HsaCarrier.ftl b/RFXtoRP_HsaCarrier.ftl index 6b47034..a8e71a5 100644 --- a/RFXtoRP_HsaCarrier.ftl +++ b/RFXtoRP_HsaCarrier.ftl @@ -1,7 +1,7 @@ <#-- **** input parameters ***** --> -<#-- input : message RFX --> -<#-- project : projectId in ReflexPlatform --> -<#-- organisation : organisationtId in ReflexPlatform --> +<#-- input : message HARDIS WMS --> +<#-- project : projectId in HARDIS SC NETWORK --> +<#-- organisation : organisationtId in HARDIS SC NETWORK --> <#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> From 31a257e52992cc38e6829ec80c752ca6d31e06a1 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Wed, 22 Oct 2025 08:52:33 +0200 Subject: [PATCH 24/30] SCPN1-9399 --- RFXtoRP_HliPrepaL.ftl | 1 + 1 file changed, 1 insertion(+) diff --git a/RFXtoRP_HliPrepaL.ftl b/RFXtoRP_HliPrepaL.ftl index 3d81bb3..b92a2b4 100644 --- a/RFXtoRP_HliPrepaL.ftl +++ b/RFXtoRP_HliPrepaL.ftl @@ -48,6 +48,7 @@ "datas" : <#include "RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl"> } + <#if despatched_ipg.carton_number != "000000000000000000" && despatched_ipg.carton_number!=despatched_ipg.hd_number > , { From 39b1359e8d9a5cb18f312333cca06eb8db548816 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 22 Oct 2025 14:28:22 +0200 Subject: [PATCH 25/30] json_string order --- RPtoRFX_PrepOrder.ftl | 2 +- RPtoRFX_Receipt.ftl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/RPtoRFX_PrepOrder.ftl b/RPtoRFX_PrepOrder.ftl index 5976e5a..3bbf34c 100644 --- a/RPtoRFX_PrepOrder.ftl +++ b/RPtoRFX_PrepOrder.ftl @@ -96,7 +96,7 @@ { <#include "RPtoRFX_PrepOrder_LineMetadata.ftl"> "originator_reference_line_number": ${line.LineID?number}, - "item_code": "${line.RequestedContent.Goods.ItemID!""}", + "item_code": "${line.RequestedContent.Goods.ItemID?json_string!""}", "item_lv_code": "${line.RequestedContent.Goods.LVBranchID!""}", "base_lv_quantity_to_prepare": ${line.RequestedMetrics.QuantityInBaseLV.Value!0}, "owner_code_to_prepare" :"${owner_code_to_prepare}", diff --git a/RPtoRFX_Receipt.ftl b/RPtoRFX_Receipt.ftl index 6ae54c8..b67f2d0 100644 --- a/RPtoRFX_Receipt.ftl +++ b/RPtoRFX_Receipt.ftl @@ -50,7 +50,7 @@ { <#include "RPtoRFX_Receipt_LineMetadata.ftl"> "receipt_reference_line_no": ${line.LineID?number}, - "item_code": "${line.RequestedContent.Goods.ItemID!""}", + "item_code": "${line.RequestedContent.Goods.ItemID?json_string!""}", "item_lv_code": "${line.RequestedContent.Goods.LVBranchID!""}", "level_1_quantity": ${line.RequestedMetrics.QuantityInBaseLV.Value!0}, "owner_code": "${owner_code}", From 160d1ca3bd6d13ef073f43252158bfd674601083 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Wed, 22 Oct 2025 17:18:18 +0200 Subject: [PATCH 26/30] SCPN1-9399 --- RFXtoRP_HliReceiptLr.ftl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RFXtoRP_HliReceiptLr.ftl b/RFXtoRP_HliReceiptLr.ftl index 10198a6..7b49927 100644 --- a/RFXtoRP_HliReceiptLr.ftl +++ b/RFXtoRP_HliReceiptLr.ftl @@ -73,10 +73,10 @@ <#else> <#if receipt.line_list ??> { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected> + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowLinesAdded> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : - <#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl"> + <#include "RFXtoRP_HliReceiptLr_ExecutionflowLinesAdded.ftl"> }, { <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected> From 88f619d5ee1f68b8c0712fff6e4b49d298e34b07 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 30 Oct 2025 14:52:38 +0100 Subject: [PATCH 27/30] SCPN1-9577 --- ...HfDtlStockLs_StockSnapshotted_SegmentationKeys.ftl | 6 ++++++ RFXtoRP_HsaCarrier_ActorCreated_Metadata.ftl | 6 ++++++ RFXtoRP_HsaCons_ActorCreated_Metadata.ftl | 6 ++++++ RFXtoRP_HsaDispute_ClaimMetadata.ftl | 6 ++++++ RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl | 7 ++++++- RFXtoRP_HsaIpgMove_StockMoved_SegmentationKeys.ftl | 7 +++++++ RFXtoRP_HsaItmLv_LogisticVariantUpdated_Metadata.ftl | 6 ++++++ RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl | 6 ++++++ ...oRP_HsaItm_ItemCreated_LogisticVariantMetadata.ftl | 6 ++++++ RFXtoRP_HsaSup_ActorCreated_Metadata.ftl | 6 ++++++ RFXtoRP_HsrDepot_ActorCreated_Metadata.ftl | 6 ++++++ ...RP_HsrPrepa_GoodsPrepared_HandlingUnitMetadata.ftl | 11 +++++++---- RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl | 6 ++++++ RFXtoRP_HsrPrepa_HUsAdded_Metadata.ftl | 11 ++++++----- ...RP_HsrPro_ExecutionflowDetected_HeaderMetadata.ftl | 6 ++++++ RFXtoRP_HsrPro_ExecutionflowDetected_LineMetadata.ftl | 6 ++++++ ..._HsrPro_ExecutionflowDetected_SegmentationKeys.ftl | 6 ++++++ ...ceiptList_ExecutionflowDetected_HeaderMetadata.ftl | 6 ++++++ ...ReceiptList_ExecutionflowDetected_LineMetadata.ftl | 6 ++++++ ...iptList_ExecutionflowDetected_SegmentationKeys.ftl | 7 +++++++ 20 files changed, 123 insertions(+), 10 deletions(-) diff --git a/RFXtoRP_HfDtlStockLs_StockSnapshotted_SegmentationKeys.ftl b/RFXtoRP_HfDtlStockLs_StockSnapshotted_SegmentationKeys.ftl index 8fefdd0..2c862de 100644 --- a/RFXtoRP_HfDtlStockLs_StockSnapshotted_SegmentationKeys.ftl +++ b/RFXtoRP_HfDtlStockLs_StockSnapshotted_SegmentationKeys.ftl @@ -1,6 +1,12 @@ <#-- use protobuf of class HfDtlStockLs to find HARDIS WMS fields names --> <#-- +<#-- Best practices: + If the SK is of type: + - string: add ?json_string (e.g. "${stock.batch_1?json_string}") + - boolean: possible values: true and false + - datetime: expected format: 2025-10-30T10:12:10.000Z + - decimal number: the separator is a point (e.g. 10.5) "SegmentationKeys": [ { diff --git a/RFXtoRP_HsaCarrier_ActorCreated_Metadata.ftl b/RFXtoRP_HsaCarrier_ActorCreated_Metadata.ftl index ceb5dfe..572e497 100644 --- a/RFXtoRP_HsaCarrier_ActorCreated_Metadata.ftl +++ b/RFXtoRP_HsaCarrier_ActorCreated_Metadata.ftl @@ -1,4 +1,10 @@ <#-- use protobuf of class HsaCarrier to find HARDIS WMS fields names --> +<#-- Best practices: + If the SK is of type: + - string: add ?json_string (e.g. "${stock.batch_1?json_string}") + - boolean: possible values: true and false + - datetime: expected format: 2025-10-30T10:12:10.000Z + - decimal number: the separator is a point (e.g. 10.5)--> "MetaData": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsaCons_ActorCreated_Metadata.ftl b/RFXtoRP_HsaCons_ActorCreated_Metadata.ftl index 8555307..772efa2 100644 --- a/RFXtoRP_HsaCons_ActorCreated_Metadata.ftl +++ b/RFXtoRP_HsaCons_ActorCreated_Metadata.ftl @@ -1,4 +1,10 @@ <#-- use protobuf of class HsaCons to find HARDIS WMS fields names --> +<#-- Best practices: + If the SK is of type: + - string: add ?json_string (e.g. "${stock.batch_1?json_string}") + - boolean: possible values: true and false + - datetime: expected format: 2025-10-30T10:12:10.000Z + - decimal number: the separator is a point (e.g. 10.5)--> "MetaData": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsaDispute_ClaimMetadata.ftl b/RFXtoRP_HsaDispute_ClaimMetadata.ftl index d0a8314..e2afd54 100644 --- a/RFXtoRP_HsaDispute_ClaimMetadata.ftl +++ b/RFXtoRP_HsaDispute_ClaimMetadata.ftl @@ -1,4 +1,10 @@ <#-- use protobuf of class HsaDispute to find HARDIS WMS fields names --> +<#-- Best practices: + If the SK is of type: + - string: add ?json_string (e.g. "${stock.batch_1?json_string}") + - boolean: possible values: true and false + - datetime: expected format: 2025-10-30T10:12:10.000Z + - decimal number: the separator is a point (e.g. 10.5)--> "MetaData": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl b/RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl index f47abd4..be83a84 100644 --- a/RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl +++ b/RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl @@ -1,7 +1,12 @@ <#-- use protobuf of class HsaIpgMove to find HARDIS WMS fields names --> <#-- - +<#-- Best practices: + If the SK is of type: + - string: add ?json_string (e.g. "${stock.batch_1?json_string}") + - boolean: possible values: true and false + - datetime: expected format: 2025-10-30T10:12:10.000Z + - decimal number: the separator is a point (e.g. 10.5) "SegmentationKeys": [ { diff --git a/RFXtoRP_HsaIpgMove_StockMoved_SegmentationKeys.ftl b/RFXtoRP_HsaIpgMove_StockMoved_SegmentationKeys.ftl index 29d1851..e5b9d05 100644 --- a/RFXtoRP_HsaIpgMove_StockMoved_SegmentationKeys.ftl +++ b/RFXtoRP_HsaIpgMove_StockMoved_SegmentationKeys.ftl @@ -1,5 +1,12 @@ <#-- use protobuf of class HsaIpgMove to find HARDIS WMS fields names --> <#-- +<#-- Best practices: + If the SK is of type: + - string: add ?json_string (e.g. "${stock.batch_1?json_string}") + - boolean: possible values: true and false + - datetime: expected format: 2025-10-30T10:12:10.000Z + - decimal number: the separator is a point (e.g. 10.5) + "SegmentationKeys": [ { "Key": "Grade", diff --git a/RFXtoRP_HsaItmLv_LogisticVariantUpdated_Metadata.ftl b/RFXtoRP_HsaItmLv_LogisticVariantUpdated_Metadata.ftl index cbbb6f7..744d05d 100644 --- a/RFXtoRP_HsaItmLv_LogisticVariantUpdated_Metadata.ftl +++ b/RFXtoRP_HsaItmLv_LogisticVariantUpdated_Metadata.ftl @@ -1,4 +1,10 @@ <#-- use protobuf of class HsaItmLv to find HARDIS WMS fields names --> +<#-- Best practices: + If the SK is of type: + - string: add ?json_string (e.g. "${stock.batch_1?json_string}") + - boolean: possible values: true and false + - datetime: expected format: 2025-10-30T10:12:10.000Z + - decimal number: the separator is a point (e.g. 10.5)--> "MetaData": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl b/RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl index 11676ae..a4620da 100644 --- a/RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl +++ b/RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl @@ -1,4 +1,10 @@ <#-- use protobuf of class HsaItm to find HARDIS WMS fields names --> +<#-- Best practices: + If the SK is of type: + - string: add ?json_string (e.g. "${stock.batch_1?json_string}") + - boolean: possible values: true and false + - datetime: expected format: 2025-10-30T10:12:10.000Z + - decimal number: the separator is a point (e.g. 10.5)--> "MetaData": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsaItm_ItemCreated_LogisticVariantMetadata.ftl b/RFXtoRP_HsaItm_ItemCreated_LogisticVariantMetadata.ftl index 2b30c89..895a30f 100644 --- a/RFXtoRP_HsaItm_ItemCreated_LogisticVariantMetadata.ftl +++ b/RFXtoRP_HsaItm_ItemCreated_LogisticVariantMetadata.ftl @@ -1,4 +1,10 @@ <#-- use protobuf of class HsaItm to find HARDIS WMS fields names --> +<#-- Best practices: + If the SK is of type: + - string: add ?json_string (e.g. "${stock.batch_1?json_string}") + - boolean: possible values: true and false + - datetime: expected format: 2025-10-30T10:12:10.000Z + - decimal number: the separator is a point (e.g. 10.5)--> "MetaData": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsaSup_ActorCreated_Metadata.ftl b/RFXtoRP_HsaSup_ActorCreated_Metadata.ftl index 80b9a11..ca3c87a 100644 --- a/RFXtoRP_HsaSup_ActorCreated_Metadata.ftl +++ b/RFXtoRP_HsaSup_ActorCreated_Metadata.ftl @@ -1,4 +1,10 @@ <#-- use protobuf of class HsaSup to find HARDIS WMS fields names --> +<#-- Best practices: + If the SK is of type: + - string: add ?json_string (e.g. "${stock.batch_1?json_string}") + - boolean: possible values: true and false + - datetime: expected format: 2025-10-30T10:12:10.000Z + - decimal number: the separator is a point (e.g. 10.5)--> "MetaData": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsrDepot_ActorCreated_Metadata.ftl b/RFXtoRP_HsrDepot_ActorCreated_Metadata.ftl index dc02b6c..61ffd4c 100644 --- a/RFXtoRP_HsrDepot_ActorCreated_Metadata.ftl +++ b/RFXtoRP_HsrDepot_ActorCreated_Metadata.ftl @@ -1,4 +1,10 @@ <#-- use protobuf of class HsrDepot to find HARDIS WMS fields names --> +<#-- Best practices: + If the SK is of type: + - string: add ?json_string (e.g. "${stock.batch_1?json_string}") + - boolean: possible values: true and false + - datetime: expected format: 2025-10-30T10:12:10.000Z + - decimal number: the separator is a point (e.g. 10.5)--> "MetaData": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsrPrepa_GoodsPrepared_HandlingUnitMetadata.ftl b/RFXtoRP_HsrPrepa_GoodsPrepared_HandlingUnitMetadata.ftl index dde74cb..220b470 100644 --- a/RFXtoRP_HsrPrepa_GoodsPrepared_HandlingUnitMetadata.ftl +++ b/RFXtoRP_HsrPrepa_GoodsPrepared_HandlingUnitMetadata.ftl @@ -1,7 +1,10 @@ <#-- use protobuf of class HsrPrepa to find HARDIS WMS fields names --> -<#-- -"MetaData" :[ -] ---> +<#-- Best practices: + If the SK is of type: + - string: add ?json_string (e.g. "${stock.batch_1?json_string}") + - boolean: possible values: true and false + - datetime: expected format: 2025-10-30T10:12:10.000Z + - decimal number: the separator is a point (e.g. 10.5)--> + "MetaData": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl b/RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl index 60d6334..0d23b62 100644 --- a/RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl +++ b/RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl @@ -1,5 +1,11 @@ <#-- use protobuf of class Hsrprepa to find HARDIS WMS fields names --> <#-- +<#-- Best practices: + If the SK is of type: + - string: add ?json_string (e.g. "${stock.batch_1?json_string}") + - boolean: possible values: true and false + - datetime: expected format: 2025-10-30T10:12:10.000Z + - decimal number: the separator is a point (e.g. 10.5) "SegmentationKeys": [ { "Key": "Grade", diff --git a/RFXtoRP_HsrPrepa_HUsAdded_Metadata.ftl b/RFXtoRP_HsrPrepa_HUsAdded_Metadata.ftl index e6d07b1..220b470 100644 --- a/RFXtoRP_HsrPrepa_HUsAdded_Metadata.ftl +++ b/RFXtoRP_HsrPrepa_HUsAdded_Metadata.ftl @@ -1,9 +1,10 @@ <#-- use protobuf of class HsrPrepa to find HARDIS WMS fields names --> -<#-- -"MetaData" :[ +<#-- Best practices: + If the SK is of type: + - string: add ?json_string (e.g. "${stock.batch_1?json_string}") + - boolean: possible values: true and false + - datetime: expected format: 2025-10-30T10:12:10.000Z + - decimal number: the separator is a point (e.g. 10.5)--> - ] - ---> "MetaData": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsrPro_ExecutionflowDetected_HeaderMetadata.ftl b/RFXtoRP_HsrPro_ExecutionflowDetected_HeaderMetadata.ftl index 8506511..1c64c55 100644 --- a/RFXtoRP_HsrPro_ExecutionflowDetected_HeaderMetadata.ftl +++ b/RFXtoRP_HsrPro_ExecutionflowDetected_HeaderMetadata.ftl @@ -1,6 +1,12 @@ <#-- use protobuf of class HsrPro to find HARDIS WMS fields names --> <#-- +<#-- Best practices: + If the SK is of type: + - string: add ?json_string (e.g. "${stock.batch_1?json_string}") + - boolean: possible values: true and false + - datetime: expected format: 2025-10-30T10:12:10.000Z + - decimal number: the separator is a point (e.g. 10.5) "MetaData": [ { diff --git a/RFXtoRP_HsrPro_ExecutionflowDetected_LineMetadata.ftl b/RFXtoRP_HsrPro_ExecutionflowDetected_LineMetadata.ftl index f0de72a..dcc2bc7 100644 --- a/RFXtoRP_HsrPro_ExecutionflowDetected_LineMetadata.ftl +++ b/RFXtoRP_HsrPro_ExecutionflowDetected_LineMetadata.ftl @@ -1,4 +1,10 @@ <#-- use protobuf of class HsrPro to find HARDIS WMS fields names --> +<#-- Best practices: + If the SK is of type: + - string: add ?json_string (e.g. "${stock.batch_1?json_string}") + - boolean: possible values: true and false + - datetime: expected format: 2025-10-30T10:12:10.000Z + - decimal number: the separator is a point (e.g. 10.5)--> "MetaData": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsrPro_ExecutionflowDetected_SegmentationKeys.ftl b/RFXtoRP_HsrPro_ExecutionflowDetected_SegmentationKeys.ftl index 9cd8bc9..3518792 100644 --- a/RFXtoRP_HsrPro_ExecutionflowDetected_SegmentationKeys.ftl +++ b/RFXtoRP_HsrPro_ExecutionflowDetected_SegmentationKeys.ftl @@ -1,5 +1,11 @@ <#-- use protobuf of class HsrPro to find HARDIS WMS fields names --> <#-- +<#-- Best practices: + If the SK is of type: + - string: add ?json_string (e.g. "${stock.batch_1?json_string}") + - boolean: possible values: true and false + - datetime: expected format: 2025-10-30T10:12:10.000Z + - decimal number: the separator is a point (e.g. 10.5) "SegmentationKeys": [ { diff --git a/RFXtoRP_HsrReceiptList_ExecutionflowDetected_HeaderMetadata.ftl b/RFXtoRP_HsrReceiptList_ExecutionflowDetected_HeaderMetadata.ftl index 079640d..be70907 100644 --- a/RFXtoRP_HsrReceiptList_ExecutionflowDetected_HeaderMetadata.ftl +++ b/RFXtoRP_HsrReceiptList_ExecutionflowDetected_HeaderMetadata.ftl @@ -1,6 +1,12 @@ <#-- use protobuf of class HsrReceiptList to find HARDIS WMS fields names --> <#-- +<#-- Best practices: + If the SK is of type: + - string: add ?json_string (e.g. "${stock.batch_1?json_string}") + - boolean: possible values: true and false + - datetime: expected format: 2025-10-30T10:12:10.000Z + - decimal number: the separator is a point (e.g. 10.5) "MetaData": [ { diff --git a/RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineMetadata.ftl b/RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineMetadata.ftl index d77c54e..06f715b 100644 --- a/RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineMetadata.ftl +++ b/RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineMetadata.ftl @@ -1,4 +1,10 @@ <#-- use protobuf of class HsrReceiptList to find HARDIS WMS fields names --> +<#-- Best practices: + If the SK is of type: + - string: add ?json_string (e.g. "${stock.batch_1?json_string}") + - boolean: possible values: true and false + - datetime: expected format: 2025-10-30T10:12:10.000Z + - decimal number: the separator is a point (e.g. 10.5)--> "MetaData": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsrReceiptList_ExecutionflowDetected_SegmentationKeys.ftl b/RFXtoRP_HsrReceiptList_ExecutionflowDetected_SegmentationKeys.ftl index d39b703..aa5d6c2 100644 --- a/RFXtoRP_HsrReceiptList_ExecutionflowDetected_SegmentationKeys.ftl +++ b/RFXtoRP_HsrReceiptList_ExecutionflowDetected_SegmentationKeys.ftl @@ -1,6 +1,13 @@ <#-- use protobuf of class HsrReceiptList to find HARDIS WMS fields names --> <#-- +<#-- Best practices: + If the SK is of type: + - string: add ?json_string (e.g. "${stock.batch_1?json_string}") + - boolean: possible values: true and false + - datetime: expected format: 2025-10-30T10:12:10.000Z + - decimal number: the separator is a point (e.g. 10.5) + "SegmentationKeys": [ { "Key": "Grade", From d0e4342b34198d124db3398c527f321a20f57945 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 5 Nov 2025 15:52:39 +0100 Subject: [PATCH 28/30] SCPN1-9615 --- RFXtoRP_HliReceiptLr.ftl | 5 ----- RFXtoRP_HliReceiptLr_ExecutionflowLinesAdded.ftl | 6 +++++- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/RFXtoRP_HliReceiptLr.ftl b/RFXtoRP_HliReceiptLr.ftl index 7b49927..b32cc46 100644 --- a/RFXtoRP_HliReceiptLr.ftl +++ b/RFXtoRP_HliReceiptLr.ftl @@ -15,7 +15,6 @@ <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign receipt = JsonUtil.jsonToMap(dataRfx)> - <#if receipt.receipt_reference ?? && receipt.receipt_reference!=""> <#if receipt.receipt_type == "030"> <#stop "ignored message because receipt type = transfert"> <#else> @@ -41,10 +40,6 @@ <#stop> - <#else> - <#-- "Receipt reference is empty"--> - <#stop> - <#break> <#case "U"> <#-- *********************************************** Action = UPDATE ******************** --> diff --git a/RFXtoRP_HliReceiptLr_ExecutionflowLinesAdded.ftl b/RFXtoRP_HliReceiptLr_ExecutionflowLinesAdded.ftl index 5a805a0..9e7047e 100644 --- a/RFXtoRP_HliReceiptLr_ExecutionflowLinesAdded.ftl +++ b/RFXtoRP_HliReceiptLr_ExecutionflowLinesAdded.ftl @@ -9,7 +9,11 @@ "ProjectID": "${projectRP}" }, "ID": { - "RefID": "${receipt.receipt_reference?trim?json_string}", + <#if receipt.receipt_reference?? && receipt.receipt_reference!=""> + "RefID": "${receipt.receipt_reference?trim?json_string}", + <#else> + "RefID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}", + "RefDate": { "DateTime": "${receipt_creation_datetime}", "AuthorTimeZone": "${time_zone_rfx}" From 59034eeeef9bf2e7ec66b7d1936f90cd29e8e0b7 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 10 Nov 2025 15:59:08 +0100 Subject: [PATCH 29/30] SCPN1-9640 --- RFXtoRP_HsaProStatus.ftl | 70 +++++++++++++++++++++------------------- 1 file changed, 37 insertions(+), 33 deletions(-) diff --git a/RFXtoRP_HsaProStatus.ftl b/RFXtoRP_HsaProStatus.ftl index 5151b52..a98ce7c 100644 --- a/RFXtoRP_HsaProStatus.ftl +++ b/RFXtoRP_HsaProStatus.ftl @@ -16,56 +16,60 @@ <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign preparationStatusInterface = JsonUtil.jsonToMap(dataRfx) /> [ + <#if preparationStatusInterface.preparation_type_code=="010" || preparationStatusInterface.preparation_type_code=="030"> <#--**Pick batch runned (200) **--> - <#if preparationStatusInterface.preparation_order_originator_reference?? && preparationStatusInterface.preparation_order_originator_reference!=""> - <#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "200" > - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationExpected> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsaProStatus_PreparationExpected.ftl"> - } - <#else> - <#-- ** Collection started (300) and Preparation in progress (400)** --> - <#if preparationStatusInterface.preparation_status_type == "100" && (preparationStatusInterface.preparation_status_code == "300" || preparationStatusInterface.preparation_status_code == "400") > + <#if preparationStatusInterface.preparation_order_originator_reference?? && preparationStatusInterface.preparation_order_originator_reference!=""> + <#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "200" > { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationStarted> + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationExpected> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : - <#include "RFXtoRP_HsaProStatus_PreparationStarted.ftl"> + <#include "RFXtoRP_HsaProStatus_PreparationExpected.ftl"> } <#else> - <#-- ****Preparation dispatched (600)** --> - <#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "600" > - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationCompleted> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsaProStatus_PreparationCompleted.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowTransportStarted> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsaProStatus_TransportStarted.ftl"> - } + <#-- ** Collection started (300) and Preparation in progress (400)** --> + <#if preparationStatusInterface.preparation_status_type == "100" && (preparationStatusInterface.preparation_status_code == "300" || preparationStatusInterface.preparation_status_code == "400") > + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationStarted> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsaProStatus_PreparationStarted.ftl"> + } <#else> - <#-- ****Preparation cancelled (650)**** --> - <#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "650" > + <#-- ****Preparation dispatched (600)** --> + <#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "600" > { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled> + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationCompleted> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : - <#include "RFXtoRP_HsaProStatus_ExecutionflowCancelled.ftl"> + <#include "RFXtoRP_HsaProStatus_PreparationCompleted.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowTransportStarted> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsaProStatus_TransportStarted.ftl"> } <#else> - <#stop> + <#-- ****Preparation cancelled (650)**** --> + <#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "650" > + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsaProStatus_ExecutionflowCancelled.ftl"> + } + <#else> + <#stop> + + <#else> + <#--PRO reference is empty--> + <#stop > <#else> - <#--PRO reference is empty--> <#stop > ] From 7e0cc9440465584e1d941c37a19d2475d547b4fd Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 17 Dec 2025 21:53:17 +0100 Subject: [PATCH 30/30] RDV 1.2 --- RFXtoRP_HsaLstCarSta.ftl | 97 ++- RFXtoRP_HsaLstCarSta_CarrierArrived.ftl | 22 + RFXtoRP_HsaLstCarSta_CarrierDeparted.ftl | 22 + RFXtoRP_HsaLstCarSta_CarrierExpected.ftl | 22 + RFXtoRP_HsaLstCarSta_LoadingCompleted.ftl | 22 + RFXtoRP_HsaLstCarSta_LoadingStarted.ftl | 22 + RFXtoRP_HsaLstCarSta_UnloadingCompleted.ftl | 22 + RFXtoRP_HsaLstCarSta_UnloadingStarted.ftl | 22 + RFXtoRP_HsrCarrierApt.ftl | 169 ++++- ...rCarrierApt_AppointmentCarrierExpected.ftl | 26 + ...rierApt_AppointmentCustomFieldsUpdated.ftl | 48 ++ RFXtoRP_HsrCarrierApt_CarrierArrived.ftl | 22 + RFXtoRP_HsrCarrierApt_CarrierDeparted.ftl | 22 + RFXtoRP_HsrCarrierApt_CarrierInformation.ftl | 3 + RFXtoRP_HsrCarrierApt_LoadingCompleted.ftl | 22 + RFXtoRP_HsrCarrierApt_LoadingStarted.ftl | 22 + RFXtoRP_HsrCarrierApt_MetadataAppointment.ftl | 5 + RFXtoRP_HsrCarrierApt_Quantities.ftl | 5 + ...P_HsrCarrierApt_SegmentationSelections.ftl | 6 + ...RP_HsrCarrierApt_SiteCancelAppointment.ftl | 18 + ...HsrCarrierApt_SiteForceBookAppointment.ftl | 124 ++++ RFXtoRP_HsrCarrierApt_UnloadingCompleted.ftl | 22 + RFXtoRP_HsrCarrierApt_UnloadingStarted.ftl | 22 + RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl | 111 +++ ...RP_HsrCarrierApt_UpdateSlotAppointment.ftl | 68 ++ RFXtoRP_HsrPro.ftl | 6 + ...srPro_ExecutionflowCustomFieldsUpdated.ftl | 40 ++ RFXtoRP_HsrReceiptList.ftl | 7 +- ...oRP_HsrReceiptList_CustomFieldsUpdated.ftl | 44 ++ RFXtoRP_RestResponse.ftl | 653 +++++++++++++----- RPtoRFX_AppointmentEvent.ftl | 97 ++- ...RFX_CarrierAppointmentCanceledByNumber.ftl | 15 + RPtoRFX_CarrierAppointmentCanceledByRef.ftl | 14 + ...RFX_CarrierAppointmentCancellationCode.ftl | 2 + RPtoRFX_CarrierAppointmentCreated.ftl | 59 ++ RPtoRFX_CarrierAppointmentDefaultData.ftl | 14 + ...mentPhysicalReceiptAssociationByNumber.ftl | 33 + ...intmentPhysicalReceiptAssociationByRef.ftl | 32 + ..._CarrierAppointmentSlotUpdatedByNumber.ftl | 30 + ...RFX_CarrierAppointmentSlotUpdatedByRef.ftl | 29 + 40 files changed, 1800 insertions(+), 241 deletions(-) create mode 100644 RFXtoRP_HsaLstCarSta_CarrierArrived.ftl create mode 100644 RFXtoRP_HsaLstCarSta_CarrierDeparted.ftl create mode 100644 RFXtoRP_HsaLstCarSta_CarrierExpected.ftl create mode 100644 RFXtoRP_HsaLstCarSta_LoadingCompleted.ftl create mode 100644 RFXtoRP_HsaLstCarSta_LoadingStarted.ftl create mode 100644 RFXtoRP_HsaLstCarSta_UnloadingCompleted.ftl create mode 100644 RFXtoRP_HsaLstCarSta_UnloadingStarted.ftl create mode 100644 RFXtoRP_HsrCarrierApt_AppointmentCarrierExpected.ftl create mode 100644 RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl create mode 100644 RFXtoRP_HsrCarrierApt_CarrierArrived.ftl create mode 100644 RFXtoRP_HsrCarrierApt_CarrierDeparted.ftl create mode 100644 RFXtoRP_HsrCarrierApt_CarrierInformation.ftl create mode 100644 RFXtoRP_HsrCarrierApt_LoadingCompleted.ftl create mode 100644 RFXtoRP_HsrCarrierApt_LoadingStarted.ftl create mode 100644 RFXtoRP_HsrCarrierApt_MetadataAppointment.ftl create mode 100644 RFXtoRP_HsrCarrierApt_Quantities.ftl create mode 100644 RFXtoRP_HsrCarrierApt_SegmentationSelections.ftl create mode 100644 RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl create mode 100644 RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl create mode 100644 RFXtoRP_HsrCarrierApt_UnloadingCompleted.ftl create mode 100644 RFXtoRP_HsrCarrierApt_UnloadingStarted.ftl create mode 100644 RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl create mode 100644 RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl create mode 100644 RFXtoRP_HsrPro_ExecutionflowCustomFieldsUpdated.ftl create mode 100644 RFXtoRP_HsrReceiptList_CustomFieldsUpdated.ftl create mode 100644 RPtoRFX_CarrierAppointmentCanceledByNumber.ftl create mode 100644 RPtoRFX_CarrierAppointmentCanceledByRef.ftl create mode 100644 RPtoRFX_CarrierAppointmentCancellationCode.ftl create mode 100644 RPtoRFX_CarrierAppointmentCreated.ftl create mode 100644 RPtoRFX_CarrierAppointmentDefaultData.ftl create mode 100644 RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl create mode 100644 RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl create mode 100644 RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl create mode 100644 RPtoRFX_CarrierAppointmentSlotUpdatedByRef.ftl diff --git a/RFXtoRP_HsaLstCarSta.ftl b/RFXtoRP_HsaLstCarSta.ftl index 1e7ac8c..a8aa244 100644 --- a/RFXtoRP_HsaLstCarSta.ftl +++ b/RFXtoRP_HsaLstCarSta.ftl @@ -1,40 +1,89 @@ <#-- **** input parameters ***** --> -<#-- input : message HARDIS WMS --> -<#-- project : projectId in HARDIS SC NETWORK --> -<#-- organisation : organisationtId in HARDIS SC NETWORK --> +<#-- input : message RFX --> +<#-- project : projectId in ReflexPlatform --> +<#-- organisation : organisationtId in ReflexPlatform --> +<#include "ActorPrefix.ftl"> +<#include "HfRpConfig.ftl"> +<#include "ReflexUtils.ftl"> <#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> + <#assign organisationRP = organisation> <#assign aDateTime = .now> -<#stop> - <#switch cloudEventMsg.action> <#case "C"> <#case "U"> - <#-- *********************************************** Action = CREATE or UPDATE ******************** --> - <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> - <#assign depot = JsonUtil.jsonToMap(dataRfx)> - [ - { - - } - ] - <#break> - - <#case "D"> - <#-- *********************************************** Action = DELETE *************************** --> + <#-- *********************************************** Action = Update ******************** --> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> - <#assign depot = JsonUtil.jsonToMap(dataRfx)> - [ - { + <#assign carrier_apt_status = JsonUtil.jsonToMap(dataRfx)> + <#if !carrier_apt_status.status??> + <#stop 'the updated appointment Status not initialized'> + + [ + { + <#switch carrier_apt_status.status.carrier_status_code> + <#case "010"> <#--Carrier Expected --> + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierExpected> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsaLstCarSta_CarrierExpected.ftl"> + <#break> + <#case "020"> <#--Carrier Arrived--> + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierArrived> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsaLstCarSta_CarrierArrived.ftl"> + <#break> + <#case "040"> <#--Unloading Started --> + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentUnloadingStarted> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsaLstCarSta_UnloadingStarted.ftl"> + <#break> + <#case "050"> <#--Unloading Completed--> + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentUnloadingCompleted> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsaLstCarSta_UnloadingCompleted.ftl"> + <#break> + <#case "060"> <#--Loading Started--> + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentLoadingStarted> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsaLstCarSta_LoadingStarted.ftl"> + <#break> + <#case "070"> <#--Loading Completed--> + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentLoadingCompleted> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsaLstCarSta_LoadingCompleted.ftl"> + <#break> + <#case "090"> <#--Carrier Departed--> + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierDeparted> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsaLstCarSta_CarrierDeparted.ftl"> + <#break> - } - ] - <#break> + <#default> + <#stop 'this updated appointment Status not implemented'> + + + } + ] + <#break> + +<#case "D"> + <#-- *********************************************** Action = Delete ******************** --> + <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> + <#assign carrier_apt_status = JsonUtil.jsonToMap(dataRfx)> + <#stop 'Delete Appointment Status not implemented' > + <#break> <#default> <#stop > - \ No newline at end of file + + diff --git a/RFXtoRP_HsaLstCarSta_CarrierArrived.ftl b/RFXtoRP_HsaLstCarSta_CarrierArrived.ftl new file mode 100644 index 0000000..256ab68 --- /dev/null +++ b/RFXtoRP_HsaLstCarSta_CarrierArrived.ftl @@ -0,0 +1,22 @@ +[ + <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) /> + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + <#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !=""> + "RefID": "${carrier_apt_status.appointment_reference?json_string}", + <#else> + "RefID": "${carrier_apt_status.physical_depot?json_string}${carrier_apt_status.appointment_year_number?json_string}${carrier_apt_status.appointment_number?json_string}", + + "RefDate": { + "DateTime": "${ref_datetime}", + "AuthorTimeZone": "${time_zone_rfx}" + } + }, + "Payload":{ + "ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}" + } + } +] \ No newline at end of file diff --git a/RFXtoRP_HsaLstCarSta_CarrierDeparted.ftl b/RFXtoRP_HsaLstCarSta_CarrierDeparted.ftl new file mode 100644 index 0000000..c39c0c3 --- /dev/null +++ b/RFXtoRP_HsaLstCarSta_CarrierDeparted.ftl @@ -0,0 +1,22 @@ +[ + <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) /> + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + <#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !=""> + "RefID": "${carrier_apt_status.appointment_reference?json_string}", + <#else> + "RefID": "${carrier_apt_status.physical_depot?json_string}${carrier_apt_status.appointment_year_number?json_string}${carrier_apt_status.appointment_number?json_string}", + + "RefDate": { + "DateTime": "${ref_datetime}", + "AuthorTimeZone": "${time_zone_rfx}" + } + }, + "Payload":{ + "ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}" + } + } +] \ No newline at end of file diff --git a/RFXtoRP_HsaLstCarSta_CarrierExpected.ftl b/RFXtoRP_HsaLstCarSta_CarrierExpected.ftl new file mode 100644 index 0000000..c39c0c3 --- /dev/null +++ b/RFXtoRP_HsaLstCarSta_CarrierExpected.ftl @@ -0,0 +1,22 @@ +[ + <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) /> + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + <#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !=""> + "RefID": "${carrier_apt_status.appointment_reference?json_string}", + <#else> + "RefID": "${carrier_apt_status.physical_depot?json_string}${carrier_apt_status.appointment_year_number?json_string}${carrier_apt_status.appointment_number?json_string}", + + "RefDate": { + "DateTime": "${ref_datetime}", + "AuthorTimeZone": "${time_zone_rfx}" + } + }, + "Payload":{ + "ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}" + } + } +] \ No newline at end of file diff --git a/RFXtoRP_HsaLstCarSta_LoadingCompleted.ftl b/RFXtoRP_HsaLstCarSta_LoadingCompleted.ftl new file mode 100644 index 0000000..c39c0c3 --- /dev/null +++ b/RFXtoRP_HsaLstCarSta_LoadingCompleted.ftl @@ -0,0 +1,22 @@ +[ + <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) /> + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + <#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !=""> + "RefID": "${carrier_apt_status.appointment_reference?json_string}", + <#else> + "RefID": "${carrier_apt_status.physical_depot?json_string}${carrier_apt_status.appointment_year_number?json_string}${carrier_apt_status.appointment_number?json_string}", + + "RefDate": { + "DateTime": "${ref_datetime}", + "AuthorTimeZone": "${time_zone_rfx}" + } + }, + "Payload":{ + "ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}" + } + } +] \ No newline at end of file diff --git a/RFXtoRP_HsaLstCarSta_LoadingStarted.ftl b/RFXtoRP_HsaLstCarSta_LoadingStarted.ftl new file mode 100644 index 0000000..c39c0c3 --- /dev/null +++ b/RFXtoRP_HsaLstCarSta_LoadingStarted.ftl @@ -0,0 +1,22 @@ +[ + <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) /> + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + <#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !=""> + "RefID": "${carrier_apt_status.appointment_reference?json_string}", + <#else> + "RefID": "${carrier_apt_status.physical_depot?json_string}${carrier_apt_status.appointment_year_number?json_string}${carrier_apt_status.appointment_number?json_string}", + + "RefDate": { + "DateTime": "${ref_datetime}", + "AuthorTimeZone": "${time_zone_rfx}" + } + }, + "Payload":{ + "ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}" + } + } +] \ No newline at end of file diff --git a/RFXtoRP_HsaLstCarSta_UnloadingCompleted.ftl b/RFXtoRP_HsaLstCarSta_UnloadingCompleted.ftl new file mode 100644 index 0000000..c39c0c3 --- /dev/null +++ b/RFXtoRP_HsaLstCarSta_UnloadingCompleted.ftl @@ -0,0 +1,22 @@ +[ + <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) /> + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + <#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !=""> + "RefID": "${carrier_apt_status.appointment_reference?json_string}", + <#else> + "RefID": "${carrier_apt_status.physical_depot?json_string}${carrier_apt_status.appointment_year_number?json_string}${carrier_apt_status.appointment_number?json_string}", + + "RefDate": { + "DateTime": "${ref_datetime}", + "AuthorTimeZone": "${time_zone_rfx}" + } + }, + "Payload":{ + "ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}" + } + } +] \ No newline at end of file diff --git a/RFXtoRP_HsaLstCarSta_UnloadingStarted.ftl b/RFXtoRP_HsaLstCarSta_UnloadingStarted.ftl new file mode 100644 index 0000000..c39c0c3 --- /dev/null +++ b/RFXtoRP_HsaLstCarSta_UnloadingStarted.ftl @@ -0,0 +1,22 @@ +[ + <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) /> + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + <#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !=""> + "RefID": "${carrier_apt_status.appointment_reference?json_string}", + <#else> + "RefID": "${carrier_apt_status.physical_depot?json_string}${carrier_apt_status.appointment_year_number?json_string}${carrier_apt_status.appointment_number?json_string}", + + "RefDate": { + "DateTime": "${ref_datetime}", + "AuthorTimeZone": "${time_zone_rfx}" + } + }, + "Payload":{ + "ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}" + } + } +] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt.ftl b/RFXtoRP_HsrCarrierApt.ftl index 1e7ac8c..fca7621 100644 --- a/RFXtoRP_HsrCarrierApt.ftl +++ b/RFXtoRP_HsrCarrierApt.ftl @@ -1,7 +1,10 @@ <#-- **** input parameters ***** --> -<#-- input : message HARDIS WMS --> -<#-- project : projectId in HARDIS SC NETWORK --> -<#-- organisation : organisationtId in HARDIS SC NETWORK --> +<#-- input : message RFX --> +<#-- project : projectId in ReflexPlatform --> +<#-- organisation : organisationtId in ReflexPlatform --> +<#include "ActorPrefix.ftl"> +<#include "HfRpConfig.ftl"> +<#include "ReflexUtils.ftl"> <#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> @@ -9,32 +12,156 @@ <#assign aDateTime = .now> -<#stop> - <#switch cloudEventMsg.action> <#case "C"> - <#case "U"> <#-- *********************************************** Action = CREATE or UPDATE ******************** --> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> - <#assign depot = JsonUtil.jsonToMap(dataRfx)> + <#assign carrier_apt = JsonUtil.jsonToMap(dataRfx)> [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteForceBookAppointment> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierExpected> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrCarrierApt_AppointmentCarrierExpected.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCustomFieldsUpdated> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl"> + } + ] + <#break> + <#case "U"> + <#-- *********************************************** Action = Update ********************--> + <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> + <#assign carrier_apt = JsonUtil.jsonToMap(dataRfx)> + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCustomFieldsUpdated> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl"> + }, + <#if carrier_apt.status?? && carrier_apt.status.status_code=="999"> + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteCancelAppointment> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl"> + } + ] + <#else> + <#if carrier_apt.status?? && carrier_apt.status.status_code=="100"> <#--Carrier Arrived--> + [ { - + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierArrived> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrCarrierApt_CarrierArrived.ftl"> } - ] - <#break> - - <#case "D"> - <#-- *********************************************** Action = DELETE *************************** --> - <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> - <#assign depot = JsonUtil.jsonToMap(dataRfx)> + ] + <#else> + <#if carrier_apt.status?? && carrier_apt.status.status_code=="210"> <#--Unloading Started --> + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentUnloadingStarted> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrCarrierApt_UnloadingStarted.ftl"> + } + ] + <#else> + <#if carrier_apt.status?? && carrier_apt.status.status_code=="290"><#--Unloading Completed--> + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentUnloadingCompleted> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrCarrierApt_UnloadingCompleted.ftl"> + } + ] + <#else> + <#if carrier_apt.status?? && carrier_apt.status.status_code=="310"><#--Loading Started--> + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentLoadingStarted> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrCarrierApt_LoadingStarted.ftl"> + } + ] + <#else> + <#if carrier_apt.status?? && carrier_apt.status.status_code=="390"><#--Loading Completed--> + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentLoadingCompleted> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrCarrierApt_LoadingCompleted.ftl"> + } + ] + <#else> + <#if carrier_apt.status?? && carrier_apt.status.status_code=="500"><#--Carrier Departed--> + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierDeparted> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrCarrierApt_CarrierDeparted.ftl"> + } + ] + <#else> + <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0)> + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteWMSUpdateAppointment> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl"> + } + ] + <#else> + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteForceRescheduleAppointment> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl"> + } + ] + + + + + + + + + ] + <#break> +<#case "D"> + <#-- *********************************************** Action = Delete ******************** --> + <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> + <#assign carrier_apt = JsonUtil.jsonToMap(dataRfx)> [ - { - - } + <#-- Ajout des lignes--> + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteCancelAppointment> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl"> + } ] - <#break> - + <#break> <#default> <#stop > - \ No newline at end of file + + diff --git a/RFXtoRP_HsrCarrierApt_AppointmentCarrierExpected.ftl b/RFXtoRP_HsrCarrierApt_AppointmentCarrierExpected.ftl new file mode 100644 index 0000000..13bc369 --- /dev/null +++ b/RFXtoRP_HsrCarrierApt_AppointmentCarrierExpected.ftl @@ -0,0 +1,26 @@ +[ + <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.creation_datetime,time_zone_rfx) /> + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> + "RefID": "${carrier_apt.appointment_reference?json_string}", + <#else> + <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> + "RefID": "${carrier_apt.appointment_reference?json_string}${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}", + <#else> + "RefID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}", + + + "RefDate": { + "DateTime": "${ref_datetime}", + "AuthorTimeZone": "${time_zone_rfx}" + } + }, + "Payload":{ + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" + } + } +] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl b/RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl new file mode 100644 index 0000000..4cd5972 --- /dev/null +++ b/RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl @@ -0,0 +1,48 @@ +[ + <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.creation_datetime,time_zone_rfx) /> + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> + "RefID": "${carrier_apt.appointment_reference?json_string}", + <#else> + <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> + "RefID": "${carrier_apt.appointment_reference?json_string}${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}", + <#else> + "RefID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}", + + + "RefDate": { + "DateTime": "${ref_datetime}", + "AuthorTimeZone": "${time_zone_rfx}" + }, + "CustomFields": [ + { + "Key": "depot", + "Value": "${carrier_apt.physical_depot?json_string}" + }, + { + "Key": "year", + "Value": "${carrier_apt.year_number?json_string}" + }, + { + "Key": "number", + "Value": "${carrier_apt.appointment_number?json_string}" + }, + { + "Key": "reference", + "Value": "${carrier_apt.appointment_reference?json_string}" + }, + { + "Key": "carrier", + "Value": "${carrier_apt.planned_carrier?json_string}" + } + ] + }, + "Payload":{ + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" + } + } +] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_CarrierArrived.ftl b/RFXtoRP_HsrCarrierApt_CarrierArrived.ftl new file mode 100644 index 0000000..afdefe6 --- /dev/null +++ b/RFXtoRP_HsrCarrierApt_CarrierArrived.ftl @@ -0,0 +1,22 @@ +[ + <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) /> + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference !=""> + "RefID": "${carrier_apt.appointment_reference?json_string}", + <#else> + "RefID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number?json_string}${carrier_apt.appointment_number?json_string}", + + "RefDate": { + "DateTime": "${ref_datetime}", + "AuthorTimeZone": "${time_zone_rfx}" + } + }, + "Payload":{ + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" + } + } +] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_CarrierDeparted.ftl b/RFXtoRP_HsrCarrierApt_CarrierDeparted.ftl new file mode 100644 index 0000000..afdefe6 --- /dev/null +++ b/RFXtoRP_HsrCarrierApt_CarrierDeparted.ftl @@ -0,0 +1,22 @@ +[ + <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) /> + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference !=""> + "RefID": "${carrier_apt.appointment_reference?json_string}", + <#else> + "RefID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number?json_string}${carrier_apt.appointment_number?json_string}", + + "RefDate": { + "DateTime": "${ref_datetime}", + "AuthorTimeZone": "${time_zone_rfx}" + } + }, + "Payload":{ + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" + } + } +] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_CarrierInformation.ftl b/RFXtoRP_HsrCarrierApt_CarrierInformation.ftl new file mode 100644 index 0000000..df7f552 --- /dev/null +++ b/RFXtoRP_HsrCarrierApt_CarrierInformation.ftl @@ -0,0 +1,3 @@ +"CarrierInformation": [ + + ] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_LoadingCompleted.ftl b/RFXtoRP_HsrCarrierApt_LoadingCompleted.ftl new file mode 100644 index 0000000..afdefe6 --- /dev/null +++ b/RFXtoRP_HsrCarrierApt_LoadingCompleted.ftl @@ -0,0 +1,22 @@ +[ + <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) /> + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference !=""> + "RefID": "${carrier_apt.appointment_reference?json_string}", + <#else> + "RefID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number?json_string}${carrier_apt.appointment_number?json_string}", + + "RefDate": { + "DateTime": "${ref_datetime}", + "AuthorTimeZone": "${time_zone_rfx}" + } + }, + "Payload":{ + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" + } + } +] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_LoadingStarted.ftl b/RFXtoRP_HsrCarrierApt_LoadingStarted.ftl new file mode 100644 index 0000000..afdefe6 --- /dev/null +++ b/RFXtoRP_HsrCarrierApt_LoadingStarted.ftl @@ -0,0 +1,22 @@ +[ + <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) /> + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference !=""> + "RefID": "${carrier_apt.appointment_reference?json_string}", + <#else> + "RefID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number?json_string}${carrier_apt.appointment_number?json_string}", + + "RefDate": { + "DateTime": "${ref_datetime}", + "AuthorTimeZone": "${time_zone_rfx}" + } + }, + "Payload":{ + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" + } + } +] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_MetadataAppointment.ftl b/RFXtoRP_HsrCarrierApt_MetadataAppointment.ftl new file mode 100644 index 0000000..cdc9ee0 --- /dev/null +++ b/RFXtoRP_HsrCarrierApt_MetadataAppointment.ftl @@ -0,0 +1,5 @@ + +"MetaData": [ +] + + diff --git a/RFXtoRP_HsrCarrierApt_Quantities.ftl b/RFXtoRP_HsrCarrierApt_Quantities.ftl new file mode 100644 index 0000000..22b0ec5 --- /dev/null +++ b/RFXtoRP_HsrCarrierApt_Quantities.ftl @@ -0,0 +1,5 @@ +"Quantities": [ + + ] + + diff --git a/RFXtoRP_HsrCarrierApt_SegmentationSelections.ftl b/RFXtoRP_HsrCarrierApt_SegmentationSelections.ftl new file mode 100644 index 0000000..79553d0 --- /dev/null +++ b/RFXtoRP_HsrCarrierApt_SegmentationSelections.ftl @@ -0,0 +1,6 @@ + + +"SegmentationSelections": [ + ] + + diff --git a/RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl new file mode 100644 index 0000000..0d7a7e1 --- /dev/null +++ b/RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl @@ -0,0 +1,18 @@ +<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) /> +[ + { + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> + "AppointmentID": "${carrier_apt.appointment_reference?json_string}", + <#else> + <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> + "AppointmentID": "${carrier_apt.appointment_reference?json_string}${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}", + <#else> + "AppointmentID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}", + + + "Header": { + "ProjectID": "${projectRP}" + }, + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" + } +] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl new file mode 100644 index 0000000..34a0b14 --- /dev/null +++ b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl @@ -0,0 +1,124 @@ +[ + { + "Header":{ + "ProjectID": "${projectRP}" + }, + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> + "AppointmentID": "${carrier_apt.appointment_reference?json_string}", + <#else> + <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> + "AppointmentID": "${carrier_apt.appointment_reference?json_string}${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}", + <#else> + "AppointmentID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}", + + + "TimeZone":"${time_zone_rfx}", + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false"> + <#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") || carrier_apt.planned_unloading_end_datetime?starts_with("00") || carrier_apt.planned_unloading_end_datetime?contains("-00-")> + <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend is not initialized" > + + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNLOADING> + <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_unloading_end_datetime?datetime.iso) /> + <#if (duration <= 0)> + <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" > + + <#else> + <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" > + <#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-") || carrier_apt.planned_load_end_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?contains("-00-")> + <#stop "planned_load_start_datetime or planned_load_end_datetime field of appointmend is not initialized" > + + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_LOADING> + <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_load_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) /> + <#if (duration <= 0)> + <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" > + + <#else> + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> + <#stop "Not managed"> + <#else> + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNKNOWN> + <#assign duration = 0 /> <#-- à confirmer --> + + + + "AppointmentType": "${appointmentType}", + "Emails": ["${carrier_apt.creation_user_email?json_string}"], + "CustomFields": [ + { + "Key": "depot", + "Value": "${carrier_apt.physical_depot?json_string}" + }, + { + "Key": "year", + "Value": "${carrier_apt.year_number?json_string}" + }, + { + "Key": "number", + "Value": "${carrier_apt.appointment_number?json_string}" + }, + { + "Key": "reference", + "Value": "${carrier_apt.appointment_reference?json_string}" + }, + { + "Key": "carrier", + "Value": "${carrier_apt.planned_carrier?json_string}" + } + ], + <#include "RFXtoRP_HsrCarrierApt_SegmentationSelections.ftl">, + <#include "RFXtoRP_HsrCarrierApt_CarrierInformation.ftl">, + <#include "RFXtoRP_HsrCarrierApt_MetadataAppointment.ftl">, + <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0)> + "Commissions": [ + <#list carrier_apt.physical_receipt_list?filter(l ->l??) as physical_receipt> + { + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", + <#if physical_receipt.physical_receipt_reference?? && physical_receipt.physical_receipt_reference!=""> + "OrderID": "${physical_receipt.physical_receipt_reference?json_string}", + "ExecutionflowID":"${physical_receipt.physical_receipt_reference?json_string}", + <#else> + "OrderID": "${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year}${physical_receipt.receipt_number}", + "ExecutionflowID": "${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year?json_string}${physical_receipt.receipt_number?json_string}", + + "ProjectID": "${projectRP}", + <#include "RFXtoRP_HsrCarrierApt_Quantities.ftl"> + }<#sep>, + + ], + <#else> + "Commissions": [ + { + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", + "ProjectID": "${projectRP}", + <#include "RFXtoRP_HsrCarrierApt_Quantities.ftl"> + } + ], + <#if carrier_apt.appointment_designation?? && carrier_apt.appointment_designation!=""> + "Reason": "${carrier_apt.appointment_designation?json_string}", + <#else> + "Reason": "No commission", + + + "Slots": [{ + <#-- calcul de de la durée en fonction des start et end time--> + "DurationInSeconds": "${duration}", + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false" > + <#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-")> + <#stop "planned_unloading_start_datetime field of appointmend is not initialized" > + + + "StartDateTime": "${carrier_apt.planned_unloading_start_datetime}" + <#else> + <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true"> + <#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-")> + <#stop "planned_load_start_datetime field of appointmend is not initialized" > + + "StartDateTime": "${carrier_apt.planned_load_start_datetime}" + <#else> + <#stop "Not managed"> + + + }] + } +] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_UnloadingCompleted.ftl b/RFXtoRP_HsrCarrierApt_UnloadingCompleted.ftl new file mode 100644 index 0000000..afdefe6 --- /dev/null +++ b/RFXtoRP_HsrCarrierApt_UnloadingCompleted.ftl @@ -0,0 +1,22 @@ +[ + <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) /> + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference !=""> + "RefID": "${carrier_apt.appointment_reference?json_string}", + <#else> + "RefID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number?json_string}${carrier_apt.appointment_number?json_string}", + + "RefDate": { + "DateTime": "${ref_datetime}", + "AuthorTimeZone": "${time_zone_rfx}" + } + }, + "Payload":{ + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" + } + } +] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_UnloadingStarted.ftl b/RFXtoRP_HsrCarrierApt_UnloadingStarted.ftl new file mode 100644 index 0000000..afdefe6 --- /dev/null +++ b/RFXtoRP_HsrCarrierApt_UnloadingStarted.ftl @@ -0,0 +1,22 @@ +[ + <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) /> + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference !=""> + "RefID": "${carrier_apt.appointment_reference?json_string}", + <#else> + "RefID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number?json_string}${carrier_apt.appointment_number?json_string}", + + "RefDate": { + "DateTime": "${ref_datetime}", + "AuthorTimeZone": "${time_zone_rfx}" + } + }, + "Payload":{ + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" + } + } +] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl new file mode 100644 index 0000000..0517881 --- /dev/null +++ b/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl @@ -0,0 +1,111 @@ +[ + { + <#assign creation_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.creation_datetime,time_zone_rfx) /> + + "Header":{ + "ProjectID": "${projectRP}" + }, + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> + "AppointmentID": "${carrier_apt.appointment_reference?json_string}", + <#else> + <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> + "AppointmentID": "${carrier_apt.appointment_reference?json_string}${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}", + <#else> + "AppointmentID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}", + + + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false"> + <#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") || carrier_apt.planned_unloading_end_datetime?starts_with("00") || carrier_apt.planned_unloading_end_datetime?contains("-00-")> + <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend is not initialized" > + + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNLOADING> + <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_unloading_end_datetime?datetime.iso) /> + <#if (duration <= 0)> + <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" > + + <#else> + <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" > + <#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-") || carrier_apt.planned_load_end_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?contains("-00-")> + <#stop "planned_load_start_datetime or planned_load_end_datetime field of appointmend is not initialized" > + + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_LOADING> + <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_load_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) /> + <#if (duration <= 0)> + <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" > + + <#else> + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> + <#stop "Not managed"> + <#else> + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNKNOWN> + <#assign duration = 0 /> <#-- à confirmer --> + + + + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", + "CustomFields": [ + { + "Key": "depot", + "Value": "${carrier_apt.physical_depot?json_string}" + }, + { + "Key": "year", + "Value": "${carrier_apt.year_number?json_string}" + }, + { + "Key": "number", + "Value": "${carrier_apt.appointment_number?json_string}" + }, + { + "Key": "reference", + "Value": "${carrier_apt.appointment_reference?json_string}" + }, + { + "Key": "carrier", + "Value": "${carrier_apt.planned_carrier?json_string}" + } + ], + <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0)> + "Commissions": [ + <#list carrier_apt.physical_receipt_list?filter(l ->l??) as physical_receipt> + { + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", + <#if physical_receipt.physical_receipt_reference?? && physical_receipt.physical_receipt_reference!=""> + "OrderID": "${physical_receipt.physical_receipt_reference?json_string}", + "ExecutionflowID":"${physical_receipt.physical_receipt_reference?json_string}", + <#else> + "OrderID": "${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year?json_string}${physical_receipt.receipt_number?json_string}", + "ExecutionflowID": "${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year?json_string}${physical_receipt.receipt_number?json_string}", + + "ProjectID": "${projectRP}" + }<#sep>, + + ], + <#else> + <#stop> + + "Slots": [{ + <#-- calcul de de la durée en fonction des start et end time--> + "DurationInSeconds": "${duration}", + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false" > + <#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-")> + <#stop "planned_unloading_start_datetime field of appointmend is not initialized" > + + + "StartDateTime": "${carrier_apt.planned_unloading_start_datetime}" + <#else> + <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true"> + <#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-")> + <#stop "planned_load_start_datetime field of appointmend is not initialized" > + + "StartDateTime": "${carrier_apt.planned_load_start_datetime}" + <#else> + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> + <#stop "Not managed"> + + + + }] + + } +] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl b/RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl new file mode 100644 index 0000000..ba02b47 --- /dev/null +++ b/RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl @@ -0,0 +1,68 @@ +[ + { + <#assign creation_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.creation_datetime,time_zone_rfx) /> + "Header":{ + "ProjectID": "${projectRP}" + }, + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> + "AppointmentID": "${carrier_apt.appointment_reference?json_string}", + <#else> + <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> + "AppointmentID": "${carrier_apt.appointment_reference?json_string}${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}", + <#else> + "AppointmentID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}", + + + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false"> + <#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") || carrier_apt.planned_unloading_end_datetime?starts_with("00") || carrier_apt.planned_unloading_end_datetime?contains("-00-")> + <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend is not initialized" > + + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNLOADING> + <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_unloading_end_datetime?datetime.iso) /> + <#if (duration <= 0)> + <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" > + + <#else> + <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" > + <#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-") || carrier_apt.planned_load_end_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?contains("-00-")> + <#stop "planned_load_start_datetime or planned_load_end_datetime field of appointmend is not initialized" > + + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_LOADING> + <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_load_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) /> + <#if (duration <= 0)> + <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" > + + <#else> + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> + <#stop "Not managed"> + <#else> + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNKNOWN> + <#assign duration = 0 /> <#-- à confirmer --> + + + + "Slots": [{ + <#-- calcul de de la durée en fonction des start et end time--> + "DurationInSeconds": "${duration}", + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false" > + <#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-")> + <#stop "planned_unloading_start_datetime field of appointmend is not initialized" > + + "StartDateTime": "${carrier_apt.planned_unloading_start_datetime}" + <#else> + <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true"> + <#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-")> + <#stop "planned_load_start_datetime field of appointmend is not initialized" > + + "StartDateTime": "${carrier_apt.planned_load_start_datetime}" + <#else> + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> + <#stop "Not managed"> + + + + }] + + } +] \ No newline at end of file diff --git a/RFXtoRP_HsrPro.ftl b/RFXtoRP_HsrPro.ftl index bdc7f26..ab7b170 100644 --- a/RFXtoRP_HsrPro.ftl +++ b/RFXtoRP_HsrPro.ftl @@ -25,6 +25,12 @@ "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsrPro_ExecutionflowDetected.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCustomFieldsUpdated> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrPro_ExecutionflowCustomFieldsUpdated.ftl"> } <#else> <#-- No line --> diff --git a/RFXtoRP_HsrPro_ExecutionflowCustomFieldsUpdated.ftl b/RFXtoRP_HsrPro_ExecutionflowCustomFieldsUpdated.ftl new file mode 100644 index 0000000..73a441b --- /dev/null +++ b/RFXtoRP_HsrPro_ExecutionflowCustomFieldsUpdated.ftl @@ -0,0 +1,40 @@ +<#include "HfRpConfig.ftl"> +<#include "ReflexUtils.ftl"> +<#include "ActorPrefix.ftl"> +[ + { + "Header": { + "ProjectID": "${projectRP}" + }, + "Payload" :{}, + "ID":{ + "CustomFields": [ + { + "Key": "depot_code", + "Value": "${preparation_order.physical_depot_code?trim?json_string}" + }, + { + "Key": "activity_code", + "Value": "${preparation_order.activity_code?trim?json_string}" + }, + { + "Key": "originator_code", + "Value": "${preparation_order.originator_code?trim?json_string}" + }, + { + "Key": "reference", + "Value": "${preparation_order.originator_reference?trim?json_string}" + }, + { + "Key": "order_year", + "Value": "${preparation_order.preparation_order_year}" + }, + { + "Key": "order_number", + "Value": "${preparation_order.preparation_order_number}" + } + ], + "RefID": "${preparation_order.originator_reference?trim?json_string}" + } + } +] \ No newline at end of file diff --git a/RFXtoRP_HsrReceiptList.ftl b/RFXtoRP_HsrReceiptList.ftl index 792be9a..7c96c29 100644 --- a/RFXtoRP_HsrReceiptList.ftl +++ b/RFXtoRP_HsrReceiptList.ftl @@ -32,7 +32,12 @@ "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl"> - + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCustomFieldsUpdated> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrReceiptList_CustomFieldsUpdated.ftl"> } ] <#else> diff --git a/RFXtoRP_HsrReceiptList_CustomFieldsUpdated.ftl b/RFXtoRP_HsrReceiptList_CustomFieldsUpdated.ftl new file mode 100644 index 0000000..141794d --- /dev/null +++ b/RFXtoRP_HsrReceiptList_CustomFieldsUpdated.ftl @@ -0,0 +1,44 @@ +<#include "HfRpConfig.ftl"> +<#include "ReflexUtils.ftl"> +<#include "ActorPrefix.ftl"> +[ + { + "Header": { + "ProjectID": "${projectRP}" + }, + "Payload" :{}, + "ID":{ + "CustomFields": [ + { + "Key": "depot_code", + "Value": "${receipt.physical_depot_code?trim?json_string}" + }, + { + "Key": "activity_code", + "Value": "${receipt.activity_code?trim?json_string}" + }, + { + "Key": "originator_code", + "Value": "${receipt.originator_code?trim?json_string}" + }, + { + "Key": "reference", + "Value": "${receipt.receipt_reference?trim?json_string}" + }, + { + "Key": "order_year", + "Value": "${receipt.receipt_year}" + }, + { + "Key": "order_number", + "Value": "${receipt.receipt_number}" + } + ], + <#if receipt.receipt_reference?? && receipt.receipt_reference!=""> + "RefID": "${receipt.receipt_reference?trim?json_string}" + <#else> + "RefID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}" + + } + } +] \ No newline at end of file diff --git a/RFXtoRP_RestResponse.ftl b/RFXtoRP_RestResponse.ftl index 8eba90d..e5c8aa1 100644 --- a/RFXtoRP_RestResponse.ftl +++ b/RFXtoRP_RestResponse.ftl @@ -10,197 +10,492 @@ <#assign aDateTime = .now> -<#assign no_apiRestReflexID = "no apiRestReflexID"> -<#assign no_status = -99999> +<#assign no_apiRestReflexID = "no apiRestReflexID"> +<#assign no_status = -99999> <#switch id.apiRestReflexID!no_apiRestReflexID> - <#case no_apiRestReflexID> - [ - { - <#if restResponsetMsg.body?? > - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#else> - <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> - - <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_PlatformLogCreate.ftl"> - } - ] - <#break> - - <#case "preparation_orders_post"> - <#switch restResponsetMsg.status!no_status> - <#case no_status> - [ - { - <#if restResponsetMsg.body?? > - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#else> - <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> - - <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_PlatformLogCreate.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_RestResponseAllocationError.ftl"> - } - ] - <#break> - - <#case 200> - <#case 201> - <#-- *********************************************** ApiRestID = preparation_orders_post ******************** --> - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)> - <#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "SUCCESS" > - [ - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipFromAcked> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_PrepOrder_ShipFromAcked.ftl"> - } - ] + <#case no_apiRestReflexID> + [ + { + <#if restResponsetMsg.body?? > + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#else> + <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> + + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_PlatformLogCreate.ftl"> + } + ] + <#break> +<#-- *********************************************** ApiRestID = preparation_orders_post ******************** --> + <#case "preparation_orders_post"> + <#switch restResponsetMsg.status!no_status> + <#case no_status> + [ + { + <#if restResponsetMsg.body?? > + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> <#else> - <#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "WARN"> - [ - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipFromAcked> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_PrepOrder_ShipFromAcked.ftl"> - } - ] - <#else> - [ - { - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_PlatformLogCreate.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_RestResponseAllocationError.ftl"> - } - ] - - - <#break> - <#default> - [ - { - <#if restResponsetMsg.body?? > - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#else> - <#assign restResponseBody = "${restResponsetMsg?trim?json_string}}" /> - - <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_PlatformLogCreate.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_RestResponseAllocationError.ftl"> - } - ] - - <#break> - - <#case "receipts_post"> - <#switch restResponsetMsg.status!no_status> - <#case no_status> - [ - { - <#if restResponsetMsg.body?? > - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#else> - <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> - - <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_PlatformLogCreate.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_RestResponseAllocationError.ftl"> - } - ] - <#break> - - <#case 200> - <#case 201> - <#-- *********************************************** ApiRestID = receipts_post ******************** --> - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)> - <#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "SUCCESS" > - [ - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipToAcked> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_Receipt_ShipToAcked.ftl"> - } - ] + <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> + + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_PlatformLogCreate.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_RestResponseAllocationError.ftl"> + } + ] + <#break> + <#case 200> + <#case 201> + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)> + <#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "SUCCESS" > + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipFromAcked> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_PrepOrder_ShipFromAcked.ftl"> + } + ] + <#else> + <#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "WARN"> + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipFromAcked> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_PrepOrder_ShipFromAcked.ftl"> + } + ] <#else> - [ - { - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : + [ + { + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : <#include "RFXtoRP_PlatformLogCreate.ftl"> - }, - { + }, + { <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : - <#include "RFXtoRP_RestResponseAllocationError.ftl"> - } - ] - - - <#break> + <#include "RFXtoRP_RestResponseAllocationError.ftl"> + } + ] + + + <#break> + <#default> + [ + { + <#if restResponsetMsg.body?? > + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#else> + <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> + + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_PlatformLogCreate.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_RestResponseAllocationError.ftl"> + } + ] + + <#break> +<#-- *********************************************** ApiRestID = receipts_post ******************** --> + <#case "receipts_post"> + <#switch restResponsetMsg.status!no_status> + <#case no_status> + [ + { + <#if restResponsetMsg.body?? > + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#else> + <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> + + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_PlatformLogCreate.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_RestResponseAllocationError.ftl"> + } + ] + <#break> + <#case 200> + <#case 201> + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)> + <#if preparationOrderPostResponse.status?? && (preparationOrderPostResponse.status == "SUCCESS" || preparationOrderPostResponse.status == "WARN") > + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDeleted> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_Receipt_ExecutionflowDeleted.ftl"> + } + ] + <#else> + [ + { + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_PlatformLogCreate.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_RestResponseAllocationError.ftl"> + } + ] + + <#break> <#default> - [ - { + [ + { <#if restResponsetMsg.body?? > - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#else> - <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> - - <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_PlatformLogCreate.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_RestResponseAllocationError.ftl"> - } - ] + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#else> + <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> + + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_PlatformLogCreate.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_RestResponseAllocationError.ftl"> + } + ] <#break> - <#default> - <#stop> + <#-- *********************************************** Appointment_post_create ******************** --> + <#case "appointment_post_create"> + <#switch restResponsetMsg.status!no_status> + <#case no_status> + [ + { + <#if restResponsetMsg.body?? > + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#else> + <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> + + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_PlatformLogCreate.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_RestResponseAllocationError.ftl"> + } + ] + <#break> + <#case 200> + <#case 201> + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)> + <#if preparationOrderPostResponse.status?? && (preparationOrderPostResponse.status == "SUCCESS" || preparationOrderPostResponse.status == "WARN") > + [ + { + <#stop > + } + ] + <#else> + [ + { + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_PlatformLogCreate.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_RestResponseAllocationError.ftl"> + } + ] + + <#break> + <#default> + [ + { + <#if restResponsetMsg.body?? > + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#else> + <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> + + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_PlatformLogCreate.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_RestResponseAllocationError.ftl"> + } + ] + + <#break> + <#-- *********************************************** ApiRestID = appointment_put_update_ref ******************** --> + <#case "appointment_put_update_by_ref"> + <#case "appointment_put_update_by_number"> + <#switch restResponsetMsg.status!no_status> + <#case no_status> + [ + { + <#if restResponsetMsg.body?? > + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#else> + <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> + + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_PlatformLogCreate.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_RestResponseAllocationError.ftl"> + } + ] + <#break> + <#case 200> + <#case 201> + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)> + <#if preparationOrderPostResponse.status?? && (preparationOrderPostResponse.status == "SUCCESS" || preparationOrderPostResponse.status == "WARN") > + [ + { + <#stop > + } + ] + <#else> + [ + { + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_PlatformLogCreate.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_RestResponseAllocationError.ftl"> + } + ] + + <#break> + <#default> + [ + { + <#if restResponsetMsg.body?? > + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#else> + <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> + + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_PlatformLogCreate.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_RestResponseAllocationError.ftl"> + } + ] + + <#break> + <#-- *********************************************** ApiRestID = canceled ******************** --> + <#case "status_appointment_put_update_by_ref"> + <#case "status_appointment_put_update_by_number"> + <#switch restResponsetMsg.status!no_status> + <#case no_status> + [ + { + <#if restResponsetMsg.body?? > + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#else> + <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> + + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_PlatformLogCreate.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_RestResponseAllocationError.ftl"> + } + ] + <#break> + <#case 200> + <#case 201> + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)> + <#if preparationOrderPostResponse.status?? && (preparationOrderPostResponse.status == "SUCCESS" || preparationOrderPostResponse.status == "WARN") > + [ + { + <#stop > + } + ] + <#else> + [ + { + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_PlatformLogCreate.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_RestResponseAllocationError.ftl"> + } + ] + + <#break> + <#default> + [ + { + <#if restResponsetMsg.body?? > + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#else> + <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> + + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_PlatformLogCreate.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_RestResponseAllocationError.ftl"> + } + ] + + <#break> + <#-- *********************************************** ApiRestID = appointment_post_physical_receipt_associations ******************** --> + <#case "appointment_post_physical_receipt_associations_by_ref"> + <#case "appointment_post_physical_receipt_associations_by_number"> + <#switch restResponsetMsg.status!no_status> + <#case no_status> + [ + { + <#if restResponsetMsg.body?? > + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#else> + <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> + + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_PlatformLogCreate.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_RestResponseAllocationError.ftl"> + } + ] + <#break> + <#case 200> + <#case 201> + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)> + <#if preparationOrderPostResponse.status?? && (preparationOrderPostResponse.status == "SUCCESS" || preparationOrderPostResponse.status == "WARN") > + [ + { + <#stop > + } + ] + <#else> + [ + { + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_PlatformLogCreate.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_RestResponseAllocationError.ftl"> + } + ] + + <#break> + <#default> + [ + { + <#if restResponsetMsg.body?? > + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#else> + <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> + + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_PlatformLogCreate.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_RestResponseAllocationError.ftl"> + } + ] + + <#break> +<#-- *********************************************** default ******************** --> + <#default> + <#stop> diff --git a/RPtoRFX_AppointmentEvent.ftl b/RPtoRFX_AppointmentEvent.ftl index b5b8da6..21be0c7 100644 --- a/RPtoRFX_AppointmentEvent.ftl +++ b/RPtoRFX_AppointmentEvent.ftl @@ -1,28 +1,93 @@ <#-- **** input parameters ***** --> -<#-- input : message RFX --> -<#-- project : projectId in ReflexPlatform --> -<#-- organisation : organisationtId in ReflexPlatform --> +<#-- input : message HARDIS WMS --> +<#-- project : projectId in HARDIS SC NETWORK --> +<#-- organisation : organisationtId in HARDIS SC NETWORK --> <#include "HfRpConfig.ftl"> <#include "ReflexUtils.ftl"> +<#include "ActorPrefix.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> +<#-- *********************************************** Action = CREATE or UPDATE ******************** --> <#case "Created"> - <#assign appointment = eventRP.data /> - - <#stop "Appointment creation event"> - - <#break> - <#default> - <#stop > + <#assign appointment = eventRP.data /> + [ + { + <#assign apiRestReflexID = ApiRestReflexID.appointment_post_create> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : + <#include "RPtoRFX_CarrierAppointmentCreated.ftl"> + } + ] + <#break> +<#-- *********************************************** Action = CommissionsUpdated ******************** --> + <#case "CommissionsUpdated"> + <#assign appointment = eventRP.data /> + [ + <#if eventRP.appointmentCustomFields?has_content> + { + <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_number> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : + <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl"> + } + <#else> + { + <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_ref> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : + <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl"> + } + + ] + <#break> +<#-- *********************************************** Action = SlotUpdated ******************** --> + <#case "SlotUpdated"> + <#assign appointment = eventRP.data /> + [ + <#if eventRP.appointmentCustomFields?has_content> + { + <#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_number> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : + <#include "RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl"> + } + <#else> + { + <#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_ref> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : + <#include "RPtoRFX_CarrierAppointmentSlotUpdatedByRef.ftl"> + } + + ] + <#break> +<#-- *********************************************** Action = SlotUpdated ******************** --> + <#case "Canceled"> + <#assign appointment = eventRP.data /> + [ + <#if eventRP.appointmentCustomFields?has_content> + { + <#assign apiRestReflexID = ApiRestReflexID.status_appointment_put_update_by_number> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : + <#include "RPtoRFX_CarrierAppointmentCanceledByNumber.ftl"> + } + <#else> + { + <#assign apiRestReflexID = ApiRestReflexID.status_appointment_put_update_by_ref> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : + <#include "RPtoRFX_CarrierAppointmentCanceledByRef.ftl"> + } + + ] + <#break> +<#default> + <#stop > + diff --git a/RPtoRFX_CarrierAppointmentCanceledByNumber.ftl b/RPtoRFX_CarrierAppointmentCanceledByNumber.ftl new file mode 100644 index 0000000..4431a3b --- /dev/null +++ b/RPtoRFX_CarrierAppointmentCanceledByNumber.ftl @@ -0,0 +1,15 @@ +{ + "id" : {"refid" : "${eventRP.refid?json_string}"}, + "route" : "rest/public/v1/physical_depots/{physical_depot_code}/appointment_years/{appointment_year}/appointment_numbers/{appointment_number}/status", + "method" : "PUT", + "uri_substitutions": { + "physical_depot_code": "${RPtoRFXprefixDepot(eventRP.actor)}", + "appointment_year":"${eventRP.appointmentCustomFields.year?json_string}", + "appointment_number":"${eventRP.appointmentCustomFields.number?json_string}" + }, + "payload" : + { + "status_code": "999", + <#include "RPtoRFX_CarrierAppointmentCancellationCode.ftl"> + } + } \ No newline at end of file diff --git a/RPtoRFX_CarrierAppointmentCanceledByRef.ftl b/RPtoRFX_CarrierAppointmentCanceledByRef.ftl new file mode 100644 index 0000000..74d5a4e --- /dev/null +++ b/RPtoRFX_CarrierAppointmentCanceledByRef.ftl @@ -0,0 +1,14 @@ +{ + "id" : {"refid" : "${eventRP.refid?json_string}"}, + "route" : "rest/public/v1/physical_depots/{physical_depot_code}/carrier_appointments/{appointment_reference}/status", + "method" : "PUT", + "uri_substitutions": { + "physical_depot_code": "${RPtoRFXprefixDepot(eventRP.actor)}", + "appointment_reference":"${eventRP.refid?json_string}" + }, + "payload" : + { + "status_code": "999", + <#include "RPtoRFX_CarrierAppointmentCancellationCode.ftl"> + } + } \ No newline at end of file diff --git a/RPtoRFX_CarrierAppointmentCancellationCode.ftl b/RPtoRFX_CarrierAppointmentCancellationCode.ftl new file mode 100644 index 0000000..79d6747 --- /dev/null +++ b/RPtoRFX_CarrierAppointmentCancellationCode.ftl @@ -0,0 +1,2 @@ +<#-- To custom with cancellation reason code--> +"cancellation_reason_code": "" \ No newline at end of file diff --git a/RPtoRFX_CarrierAppointmentCreated.ftl b/RPtoRFX_CarrierAppointmentCreated.ftl new file mode 100644 index 0000000..017cee7 --- /dev/null +++ b/RPtoRFX_CarrierAppointmentCreated.ftl @@ -0,0 +1,59 @@ +{ + "id" : {"refid" : "${eventRP.refid?json_string}"}, + "route" : "rest/public/v1/physical_depots/{physical_depot_code}/carrier_appointments", + "method" : "POST", + "uri_substitutions": { + "physical_depot_code": "${RPtoRFXprefixDepot(eventRP.actor)}" + }, + "payload" : + { + "appointment_reference": "${eventRP.refid?json_string}", + <#switch appointment.AppointmentType> + <#case "APPOINTMENT_TYPE_LOADING"> + "unloading_appointment" : "false", + "load_appointment" : "true", + "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", + "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", + <#break> + <#case "APPOINTMENT_TYPE_UNLOADING"> + "unloading_appointment" : "true", + "load_appointment" : "false", + "planned_unloading_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,time_zone_rfx),time_zone_rfx)}", + "planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", + <#break> + <#default> + <#stop "appointment.AppointmentType not implemented" > + + <#include "RPtoRFX_CarrierAppointmentDefaultData.ftl"> + <#if appointment.Commissions??> + <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING"> + <#if appointment.Commissions[0].OrderID?? && appointment.Commissions[0].OrderID!=""> + "physical_receipt_list": [ + <#list eventRP.executionflowCustomFields.entrySet()?filter(l ->l.value?? && l.value?has_content) as custom> + { + "receipt_activity": "${custom.value.activity_code?json_string}", + "originator_code": "${custom.value.originator_code?json_string}", + "physical_receipt_reference": "${custom.value.reference?json_string}", + "receipt_year": "${custom.value.order_year?json_string}", + "receipt_number": "${custom.value.order_number?json_string}" + + } + <#sep>, + + ], + <#else> + "appointment_designation":"${(appointment.Reason!"")!?json_string}", + + <#else> + <#if appointment.AppointmentType == "APPOINTMENT_TYPE_LOADING"> + <#if appointment.Commissions[0].OrderID ?? && appointment.Commissions[0].OrderID!=""> + "appointment_designation":"LOADING", + <#else> + "appointment_designation":"${(appointment.Reason!"")?json_string}", + + + + + "constant_appointment": "false" + } + } diff --git a/RPtoRFX_CarrierAppointmentDefaultData.ftl b/RPtoRFX_CarrierAppointmentDefaultData.ftl new file mode 100644 index 0000000..b773333 --- /dev/null +++ b/RPtoRFX_CarrierAppointmentDefaultData.ftl @@ -0,0 +1,14 @@ +<#-- Note : you can use Order Line Metadata, using the define map : Line_MetaData_Map --> +<#-- Note : you can use Order Line Segmentation keys, using the define map : SegmentationKeys_Map --> + +<#-- How to use MD or SK map + Example : + <#assign owner_code = SegmentationKeys_Map["Owner"].String!""/> + + If your SK is : + Boolean : .Bool + Float : .Float + Timestamp : .Timestamp.DateTime or .Timestamp.AuthorTimeZone + Int : .Int + String : .String +--> \ No newline at end of file diff --git a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl new file mode 100644 index 0000000..3a6ba80 --- /dev/null +++ b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl @@ -0,0 +1,33 @@ +{ + "id" : {"refid" : "${eventRP.refid?json_string}"}, + "route" : "rest/public/v1/physical_depots/{physical_depot_code}/appointment_years/{appointment_year}/appointment_numbers/{appointment_number}/physical_receipt_associations", + "method" : "POST", + "uri_substitutions": { + "physical_depot_code": "${RPtoRFXprefixDepot(eventRP.actor)}", + "appointment_year":"${eventRP.appointmentCustomFields.year?json_string}", + "appointment_number":"${eventRP.appointmentCustomFields.number?json_string}" + }, + "payload" : + { + <#if appointment.Commissions??> + <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING"> + "physical_receipt_list": [ + <#list eventRP.executionflowCustomFields.entrySet()?filter(l ->l.value?? && l.value?has_content) as custom> + { + "receipt_activity": "${custom.value.activity_code?json_string}", + "originator_code": "${custom.value.originator_code?json_string}", + "physical_receipt_reference": "${custom.value.reference?json_string}", + "receipt_year": "${custom.value.order_year?json_string}", + "receipt_number": "${custom.value.order_number?json_string}" + } + <#sep>, + + ] + <#else> + <#if appointment.AppointmentType == "APPOINTMENT_TYPE_LOADING"> + "appointment_designation":"LOADING" + + + + } + } diff --git a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl new file mode 100644 index 0000000..e5b91cf --- /dev/null +++ b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl @@ -0,0 +1,32 @@ +{ + "id" : {"refid" : "${eventRP.refid?json_string}"}, + "route" : "rest/public/v1/physical_depots/{physical_depot_code}/carrier_appointments/{appointment_reference}/physical_receipt_associations", + "method" : "POST", + "uri_substitutions": { + "physical_depot_code": "${RPtoRFXprefixDepot(eventRP.actor)}", + "appointment_reference":"${eventRP.refid?json_string}" + }, + "payload" : + { + <#if appointment.Commissions??> + <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING"> + "physical_receipt_list": [ + <#list eventRP.executionflowCustomFields.entrySet()?filter(l ->l.value?? && l.value?has_content) as custom> + { + "receipt_activity": "${custom.value.activity_code?json_string}", + "originator_code": "${custom.value.originator_code?json_string}", + "physical_receipt_reference": "${custom.value.reference?json_string}", + "receipt_year": "${custom.value.order_year?json_string}", + "receipt_number": "${custom.value.order_number?json_string}" + } + <#sep>, + + ] + <#else> + <#if appointment.AppointmentType == "APPOINTMENT_TYPE_LOADING"> + "appointment_designation":"LOADING" + + + + } + } diff --git a/RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl b/RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl new file mode 100644 index 0000000..efd5dfc --- /dev/null +++ b/RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl @@ -0,0 +1,30 @@ +{ + "id" : {"refid" : "${eventRP.refid?json_string}"}, + "route" : "rest/public/v1/physical_depots/{physical_depot_code}/appointment_years/{appointment_year}/appointment_numbers/{appointment_number}", + "method" : "PUT", + "uri_substitutions": { + "physical_depot_code": "${RPtoRFXprefixDepot(eventRP.actor)}", + "appointment_year":"${eventRP.appointmentCustomFields.year?json_string}", + "appointment_number":"${eventRP.appointmentCustomFields.number?json_string}" + }, + "payload" : + { + <#switch appointment.AppointmentType> + <#case "APPOINTMENT_TYPE_LOADING"> + "unloading_appointment" : "false", + "load_appointment" : "true", + "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", + "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", + <#break> + <#case "APPOINTMENT_TYPE_UNLOADING"> + "unloading_appointment" : "true", + "load_appointment" : "false", + "planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", + "planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", + <#break> + <#default> + <#stop "appointment.AppointmentType not implemented" > + + "appointment_designation":"${(appointment.Reason!"")!?json_string}" + } + } diff --git a/RPtoRFX_CarrierAppointmentSlotUpdatedByRef.ftl b/RPtoRFX_CarrierAppointmentSlotUpdatedByRef.ftl new file mode 100644 index 0000000..b7f102d --- /dev/null +++ b/RPtoRFX_CarrierAppointmentSlotUpdatedByRef.ftl @@ -0,0 +1,29 @@ +{ + "id" : {"refid" : "${eventRP.refid?json_string}"}, + "route" : "rest/public/v1/physical_depots/{physical_depot_code}/carrier_appointments/{appointment_reference}", + "method" : "PUT", + "uri_substitutions": { + "physical_depot_code": "${RPtoRFXprefixDepot(eventRP.actor)}", + "appointment_reference":"${eventRP.refid?json_string}" + }, + "payload" : + { + <#switch appointment.AppointmentType> + <#case "APPOINTMENT_TYPE_LOADING"> + "unloading_appointment" : "false", + "load_appointment" : "true", + "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", + "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", + <#break> + <#case "APPOINTMENT_TYPE_UNLOADING"> + "unloading_appointment" : "true", + "load_appointment" : "false", + "planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", + "planned_unloading_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", + <#break> + <#default> + <#stop "appointment.AppointmentType not implemented" > + + "appointment_designation":"${(appointment.Reason!"")!?json_string}" + } + }