From ceb33abfca37e2b390ef2fabf303714ba7c3ec01 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 4 Nov 2025 10:02:37 +0100 Subject: [PATCH 1/2] SCPN1-9601 (cherry picked from commit 9214df8b96ef9f8864bae3d7ab49ca4fdc6f6c43) --- README.md | 2 +- RFXtoRP_Receipt_ExecutionflowDeleted.ftl | 11 +++++++++++ RFXtoRP_Receipt_ShipToAcked.ftl | 15 --------------- RFXtoRP_RestResponse.ftl | 14 +++++++------- ReflexUtils.ftl | 20 ++++++++++---------- 5 files changed, 29 insertions(+), 33 deletions(-) create mode 100644 RFXtoRP_Receipt_ExecutionflowDeleted.ftl delete mode 100644 RFXtoRP_Receipt_ShipToAcked.ftl diff --git a/README.md b/README.md index 577d51c..6dc6e18 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ 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. +This connector does not contain any standalone executable code: it is intended to be used by **HARDIS WMS integration engines** or **data exchange pipelines**, where it applies the mapping rules defined in the `.ftl` files. ## Role of the FTL Files diff --git a/RFXtoRP_Receipt_ExecutionflowDeleted.ftl b/RFXtoRP_Receipt_ExecutionflowDeleted.ftl new file mode 100644 index 0000000..5be2d8c --- /dev/null +++ b/RFXtoRP_Receipt_ExecutionflowDeleted.ftl @@ -0,0 +1,11 @@ +[ + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + "RefID": "${id.refid?json_string}" + }, + "Payload": {} + } +] diff --git a/RFXtoRP_Receipt_ShipToAcked.ftl b/RFXtoRP_Receipt_ShipToAcked.ftl deleted file mode 100644 index a094aeb..0000000 --- a/RFXtoRP_Receipt_ShipToAcked.ftl +++ /dev/null @@ -1,15 +0,0 @@ -[ - { - "Header": { - "ProjectID": "${projectRP}" - }, - "ID": { - "RefID": "${id.refid?json_string}" - }, - - "Payload": { - "ShipToAcked": true - } - - } -] diff --git a/RFXtoRP_RestResponse.ftl b/RFXtoRP_RestResponse.ftl index 151a9b2..5276881 100644 --- a/RFXtoRP_RestResponse.ftl +++ b/RFXtoRP_RestResponse.ftl @@ -10,8 +10,8 @@ <#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> @@ -30,7 +30,7 @@ } ] <#break> - + <#case "preparation_orders_post"> <#switch restResponsetMsg.status!no_status> <#case no_status> @@ -54,7 +54,7 @@ } ] <#break> - + <#case 200> <#case 201> <#-- *********************************************** ApiRestID = preparation_orders_post ******************** --> @@ -144,7 +144,7 @@ } ] <#break> - + <#case 200> <#case 201> <#-- *********************************************** ApiRestID = receipts_post ******************** --> @@ -153,10 +153,10 @@ <#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "SUCCESS" > [ { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipToAcked> + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDeleted> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : - <#include "RFXtoRP_Receipt_ShipToAcked.ftl"> + <#include "RFXtoRP_Receipt_ExecutionflowDeleted.ftl"> } ] <#else> diff --git a/ReflexUtils.ftl b/ReflexUtils.ftl index afa299e..fbe48c5 100644 --- a/ReflexUtils.ftl +++ b/ReflexUtils.ftl @@ -1,5 +1,5 @@ <#-- --------------------------------------------------------------------------------------- --> -<#-- Concat reflex timestamp with reflex time zone and format this date in ISO UTC format --> +<#-- Concat HARDIS WMS timestamp with HARDIS WMS time zone and format this date in ISO UTC format --> <#-- --------------------------------------------------------------------------------------- --> <#function RfxDateTimetoUTC rfxdatetime offset > <#return ((rfxdatetime + offset)?datetime.iso?iso_utc)> @@ -10,21 +10,21 @@ <#-- --------------------------------------------------------------------------------------- --> -<#-- Split email reflex into json array string --> +<#-- Split email HARDIS WMS into json array string --> <#-- Example : splitemail "john.doe@hardis-group.com,; name@hardis-group.com" --> <#-- return "["john.doe@hardis-group.com","name@hardis-group.com"]" --> <#-- --------------------------------------------------------------------------------------- --> <#function splitEmailsIntoArray emails > <#local str = "["> <#list emails?split(";|,| |à|/","r")?filter(l -> l != "") as email> -<#if email?matches("^[\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4}$")> -<#if str != "["> -<#local str += ","> - -<#local str += "\""> -<#local str += email> -<#local str += "\""> - + <#if email?matches("^[\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4}$")> + <#if str != "["> + <#local str += ","> + + <#local str += "\""> + <#local str += email> + <#local str += "\""> + <#local str += "]"> <#return (str)> From 00f34c1bc2dbb4ae1cc895f7320fcbfba815f0d2 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Tue, 4 Nov 2025 10:31:20 +0100 Subject: [PATCH 2/2] Release 2.0.10+2 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index d6ca501..027d820 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.0.10+1 +2.0.10+2