SCPN1-9399

This commit is contained in:
Francis REAT 2025-10-21 15:36:15 +02:00
parent 01b70e6bb2
commit c93657a95f
45 changed files with 462 additions and 462 deletions

View File

@ -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,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/)

View File

@ -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">

View File

@ -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 -->
<#--

View File

@ -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
*** -->

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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">
<#include "ActorPrefix.ftl">

View File

@ -14,7 +14,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}",
@ -30,7 +30,7 @@
</#if>
"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}",

View File

@ -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": [ ]

View File

@ -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">
<#include "ActorPrefix.ftl">

View File

@ -14,7 +14,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}",
@ -31,7 +31,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?? >

View File

@ -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": [ ]

View File

@ -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>

View File

@ -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": [
{

View File

@ -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>

View File

@ -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": [ ]

View File

@ -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": [ ]

View File

@ -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>

View File

@ -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>

View File

@ -14,7 +14,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}",
"StreetAddressOne" : "${actor.supplier_structured_address.street_and_PO?json_string}",
@ -29,7 +29,7 @@
</#if>
"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}",

View File

@ -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": [ ]

View File

@ -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>

View File

@ -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>

View File

@ -15,7 +15,7 @@
<#include "RFXtoRP_HsrDepot_ActorCreated_Metadata.ftl">,
"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}",
"StreetAddressOne" : "${depot.physical_depot_structured_address.street_and_PO?json_string}",
@ -30,7 +30,7 @@
</#if>
"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}",

View File

@ -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": [ ]

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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" :[

View File

@ -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": [
{

View File

@ -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" :[

View File

@ -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>

View File

@ -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 -->
<#--

View File

@ -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": [ ]

View File

@ -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": [

View File

@ -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>

View File

@ -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 -->
<#--

View File

@ -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": [ ]

View File

@ -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": [

View File

@ -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!"{}")>

View File

@ -14,9 +14,9 @@ those parameters are stored in FTL file Conf-connector.ftl for later use in some
<#noparse><#-- Possible values for SupplyOfTheTrackingNumber parameter : --></#noparse>
<#noparse><#-- 0 : Always empty --></#noparse>
<#noparse><#-- 1 : Always use Reflex WMS tracking --></#noparse>
<#noparse><#-- 1 : Always use HARDIS WMS tracking --></#noparse>
<#noparse><#-- 2 : Always use the HU number --></#noparse>
<#noparse><#-- 3 : Use Reflex tracking if it exists, the HU number otherwise --></#noparse>
<#noparse><#-- 3 : Use HARDIS WMS tracking if it exists, the HU number otherwise --></#noparse>
<#list file.parameters as parameter>
<#switch parameter.type>

View File

@ -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">

View File

@ -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)}" >