Compare commits

...

49 Commits

Author SHA1 Message Date
7246a2a117 Merge branch 'release/2.0' into 'main-2.0'
Release/2.0 to main2.0

See merge request r-d-technique/tiers/reflex-wms-connector!190
2025-12-03 09:18:55 +00:00
ad040f82d0 Release 2.0.13+1 2025-12-03 10:17:44 +01:00
a9aac3269e Merge branch 'release/2.0' into 'main-2.0'
Release/2.0 to main2.0

See merge request r-d-technique/tiers/reflex-wms-connector!186
2025-11-26 08:44:03 +00:00
979b90fdb3 Release 2.0.12+1 2025-11-26 09:39:50 +01:00
ec844cbe49 Merge branch 'release/2.0' into 'main-2.0'
Release/2.0 to main2.0

See merge request r-d-technique/tiers/reflex-wms-connector!159
2025-11-06 10:11:10 +00:00
ab9e892640 Release 2.0.11+1 2025-11-06 11:09:15 +01:00
39c8280fa4 Merge branch 'release/2.0' into 'main-2.0'
Release/2.0 to main2.0

See merge request r-d-technique/tiers/reflex-wms-connector!157
2025-11-04 09:35:47 +00:00
00f34c1bc2 Release 2.0.10+2 2025-11-04 10:31:20 +01:00
0406c9b8cc Merge branch 'release2.0-SCPN1-9601' into 'release/2.0'
release 2.0 SCPN1-9601

See merge request r-d-technique/tiers/reflex-wms-connector!156
2025-11-04 09:28:21 +00:00
ceb33abfca SCPN1-9601
(cherry picked from commit 9214df8b96ef9f8864bae3d7ab49ca4fdc6f6c43)
2025-11-04 10:22:37 +01:00
7cbc5111e9 Merge branch 'release/2.0' into 'main-2.0'
Release/2.0 to main2.0

See merge request r-d-technique/tiers/reflex-wms-connector!155
2025-10-29 09:49:58 +00:00
9521679a8d Release 2.0.10+1 2025-10-29 10:48:35 +01:00
0d3b459386 Merge branch 'release/2.0' into 'main-2.0'
Release/2.0 to main 2.0

See merge request r-d-technique/tiers/reflex-wms-connector!152
2025-10-24 08:41:23 +00:00
3dfb366ac7 Release 2.0.9+1 2025-10-24 10:38:43 +02:00
5b6d3749bc Merge branch 'release2.0-SCPN1-9399' into 'release/2.0'
SCPN1-9399 to release 2.0

See merge request r-d-technique/tiers/reflex-wms-connector!147
2025-10-24 08:34:57 +00:00
cc7da39c20 json_string order
(cherry picked from commit d116ab3856fd765f1f1f5588a6b2b2ecf5cde0a1)
2025-10-22 17:02:03 +02:00
18473a26a1 SCPN1-9399 2025-10-22 16:14:56 +02:00
ebd45f67bc SCPN1-9399 2025-10-22 14:56:11 +02:00
d4bca7fabc Merge branch 'release/2.0' into release2.0-SCPN1-9399 2025-10-21 18:16:12 +02:00
c93657a95f SCPN1-9399 2025-10-21 16:19:01 +02:00
01b70e6bb2 SCPN1-9399
(cherry picked from commit f8c4e5d79dd5276f04ee743298c14e5b9c23654c)
2025-10-21 16:14:38 +02:00
498e9ab448 Coorection HliPrepaL
(cherry picked from commit 4f8317f007e3538622b4a2f78c59cd26fb0e0b28)
2025-10-21 16:14:27 +02:00
9d7b3ec2f1 readme
(cherry picked from commit 039e984ec05f6b57a4d3b4fd51180b1a3fd5c0b3)
2025-10-21 16:14:14 +02:00
4f7255d9e8 nouvelle marque
(cherry picked from commit eafbf7a6e32423b13609e55e72592fbaabf092f3)
2025-10-21 16:13:46 +02:00
71fdf435bd Merge branch 'release/2.0' into 'main-2.0'
Release/2.0 to main 2.0

See merge request r-d-technique/tiers/reflex-wms-connector!151
2025-10-16 13:50:08 +00:00
0336a69c3a Release 2.0.8+4 2025-10-16 15:47:04 +02:00
42cf113e71 Merge branch 'release-2.0-SCPN1-9437' into 'release/2.0'
SCPN1-9437 to release 2.0

See merge request r-d-technique/tiers/reflex-wms-connector!148
2025-10-16 13:39:30 +00:00
30c48670c3 SCPN1-9437
(cherry picked from commit 791a958b4d2a0d1a0fc5ebeb9535207d1d2177af)
2025-10-16 15:05:23 +02:00
794d9a3b69 SCPN1-9437
(cherry picked from commit 5bdd9fbfe16fdbf65dd018a643e69adece90546a)
2025-10-16 15:05:10 +02:00
549767f035 SCPN1-9437
(cherry picked from commit 93a0fbd79c9f5a0db9b5f2513819d209fee99f3a)
2025-10-16 15:04:55 +02:00
91916d9100 SCPN1-9437
(cherry picked from commit ae27efacf30349388d5d913cd11bceeed2b951e1)
2025-10-16 15:04:43 +02:00
dd3fb8c1a9 SCPN1-9094
(cherry picked from commit 8ca640ca383f3e43385e70ed28ee7d6bd004d347)
2025-10-08 09:29:28 +02:00
3525d80390 SCPN1-9094
(cherry picked from commit 4129dfdd5817f3513c68427a679a0a2968604b86)
2025-10-08 09:29:17 +02:00
7f55b4f86a Merge branch 'release/2.0' into 'main-2.0'
Release 2.0 to main 2.0

See merge request r-d-technique/tiers/reflex-wms-connector!142
2025-09-26 07:24:15 +00:00
b29f28997a Release 2.0.8+3 2025-09-26 09:23:02 +02:00
fc18c04521 Merge branch 'SCPN1-9348-2.0' into 'release/2.0'
SCPN1-9348-2.0

See merge request r-d-technique/tiers/reflex-wms-connector!141
2025-09-26 07:12:06 +00:00
f4b0561643 SCPN1-9348
(cherry picked from commit a6628be34ea6a0a3bd9e0063fe13df8c29c99f58)
2025-09-25 16:31:24 +02:00
ca5ba7c103 Merge branch 'release/2.0' into 'main-2.0'
Release/2.0 -> Main-2.0

See merge request r-d-technique/tiers/reflex-wms-connector!139
2025-09-24 08:25:40 +00:00
12e157078c Release 2.0.8+2 2025-09-24 10:22:52 +02:00
ac7936a675 Merge branch 'SCPN1-9338' into 'release/2.0'
SCPN1-9338

See merge request r-d-technique/tiers/reflex-wms-connector!138
2025-09-24 08:20:38 +00:00
36804fef81 Correction transfert
(cherry picked from commit 4fd4007794f1ef0e98bad7d3a8d38dd33cdbd238)
2025-09-24 10:13:06 +02:00
7e054d70d2 Merge branch 'release/2.0' into 'main-2.0'
Release/2.0 -> Main-2.0

See merge request r-d-technique/tiers/reflex-wms-connector!135
2025-09-09 07:31:32 +00:00
75ab1602d4 Merge branch 'release/2.0' into 'main-2.0'
Release/2.0 -> Main-2.0

See merge request r-d-technique/tiers/reflex-wms-connector!131
2025-09-08 08:57:49 +00:00
831e6f098b Merge branch 'release/2.0' into 'main-2.0'
Release/2.0 -> Main-2.0

See merge request r-d-technique/tiers/reflex-wms-connector!127
2025-08-26 14:41:50 +00:00
19de302683 Merge branch 'release/2.0' into 'main-2.0'
Release/2.0 -> Main-2.0

See merge request r-d-technique/tiers/reflex-wms-connector!123
2025-07-10 09:36:18 +00:00
6d4e2d5949 Merge branch 'release/2.0' into 'main-2.0'
Release/2.0 -> Main-2.0

See merge request r-d-technique/tiers/reflex-wms-connector!115
2025-06-20 15:59:43 +00:00
4d0382970f Merge branch 'release/2.0' into 'main-2.0'
Release/2.0 -> Main-2.0

See merge request r-d-technique/tiers/reflex-wms-connector!113
2025-05-27 08:00:16 +00:00
218cf62dae Merge branch 'release/2.0' into 'main-2.0'
Release/2.0 -> Main-2.0

See merge request r-d-technique/tiers/reflex-wms-connector!109
2025-05-13 12:53:01 +00:00
6ed0f8e9da Merge branch 'release/2.0' into 'main'
MR->Main

See merge request r-d-technique/tiers/reflex-wms-connector!104
2025-04-24 15:04:25 +00:00
57 changed files with 1071 additions and 532 deletions

View File

@ -1,10 +1,10 @@
# 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.
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
@ -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,60 +1,60 @@
<#-- **** input parameters ***** -->
<#-- input : message RFX -->
<#-- project : projectId in ReflexPlatform -->
<#-- organisation : organisationtId in ReflexPlatform -->
<#-- sum_elt : nb element in snapshot (optional parameter) -->
<#include "HfRpConfig.ftl">
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project>
<#assign organisationRP = organisation>
<#switch cloudEventMsg.action>
<#case "C">
<#case "U">
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign reflexStockPicturesInterface = JsonUtil.jsonToMap(dataRfx)>
<#-- idSnapshot MUST BE UNIQUE regardless of the number of messages in the stock image -->
<#if cloudEventMsg.messageSet??>
<#assign idSnapshot = cloudEventMsg.messageSet />
<#else>
<#assign idSnapshot = cloudEventMsg.id />
</#if>
<#list reflexStockPicturesInterface.detailled_stock_list as stock>
<#if stock.stock_type_code != "200">
<#stop>
<#break>
</#if>
</#list>
[
{
<#if sum_elt??>
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorSnapshotCompleted>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HfDtlStockLs_ActorSnapshotCompleted.ftl">
<#else>
<#assign apiReflexPlatformID = ApiReflexPlatformID.StockSnapshotted>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HfDtlStockLs_StockSnapshotted.ftl">
</#if>
}
]
<#break>
<#case "D">
<#-- *********************************************** Action = DELETE ******************** -->
<#stop >
<#break>
<#default>
<#stop >
</#switch>
<#-- **** input parameters ***** -->
<#-- 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">
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project>
<#assign organisationRP = organisation>
<#switch cloudEventMsg.action>
<#case "C">
<#case "U">
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign reflexStockPicturesInterface = JsonUtil.jsonToMap(dataRfx)>
<#-- idSnapshot MUST BE UNIQUE regardless of the number of messages in the stock image -->
<#if cloudEventMsg.messageSet??>
<#assign idSnapshot = cloudEventMsg.messageSet />
<#else>
<#assign idSnapshot = cloudEventMsg.id />
</#if>
<#list reflexStockPicturesInterface.detailled_stock_list as stock>
<#if stock.stock_type_code != "200">
<#stop>
<#break>
</#if>
</#list>
[
{
<#if sum_elt??>
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorSnapshotCompleted>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HfDtlStockLs_ActorSnapshotCompleted.ftl">
<#else>
<#assign apiReflexPlatformID = ApiReflexPlatformID.StockSnapshotted>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HfDtlStockLs_StockSnapshotted.ftl">
</#if>
}
]
<#break>
<#case "D">
<#-- *********************************************** Action = DELETE ******************** -->
<#stop >
<#break>
<#default>
<#stop >
</#switch>

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>
@ -13,17 +13,89 @@
<#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?? && preparationOrder.total_lv_validated !=0>
<#if preparationOrder.preparation_type_code=="010" || preparationOrder.preparation_type_code=="030">
<#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 refIDHmap ={}>
<#assign hd_numberHmap ={}>
<#assign hd_numberHmapHUadded ={}>
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? ) 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))>
,
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl">
}
</#if>
<#if despatched_ipg.carton_number != "000000000000000000" && despatched_ipg.carton_number!=despatched_ipg.hd_number >
,
{
<#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">
}
</#if>
</#if>
</#list>
</#list>
<#assign refIDHmap ={}>
]
<#else>
<#-- No line-->
<#stop>
</#if>
<#else>
<#-- Preparation Type not supported-->
<#stop>
</#if>
<#else>
<#-- no confirmed quantity for the preparation - preparation closed-->
<#stop>
</#if>
<#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>

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>
@ -11,22 +11,151 @@
<#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_type?? && receipt.receipt_type = "030" && receipt.line_list??> <#-- if reception is a transfer type -->
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowLinesAdded>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HliReceiptLr_TransfertExecutionflowLinesAdded.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrReceiptList_TransfertReceiptExpected.ftl">
<#stop "no generic FTL file available yet for receiptLines">
<#break>
}
]
<#else>
<#if receipt.line_list ??>
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowLinesAdded>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HliReceiptLr_ExecutionflowLinesAdded.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
}
]
<#else>
<#stop>
</#if>
</#if>
<#break>
<#case "U">
<#-- *********************************************** Action = UPDATE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
[
<#if receipt.receipt_type?? && receipt.receipt_type == "030" && 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_TransfertExecutionflowCancelled.ftl">
}
<#else>
<#if receipt.receipt_type?? && receipt.receipt_type == "030" && receipt.receipt_confirmed == "true">
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrReceiptList_TransfertExecutionflowReceiptCompleted.ftl">
}
<#else>
<#if receipt.receipt_confirmed?? && 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 ?? && receipt.receipt_confirmed == "true" >
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl">
}
<#else>
<#if receipt.receipt_type?? && receipt.receipt_type == "030" && receipt.receipt_confirmed == "false" && receipt.line_list??>
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowLinesAdded>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HliReceiptLr_TransfertExecutionflowLinesAdded.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrReceiptList_TransfertReceiptExpected.ftl">
}
]
<#else>
<#stop> <#-- Receipt reference for transfer is empty-->
</#if>
<#else>
<#if receipt.line_list ??>
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowLinesAdded>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HliReceiptLr_TransfertExecutionflowLinesAdded.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
}
<#else>
<#stop>
</#if>
</#if>
</#if>
</#if>
</#if>
</#if>
]
<#break>
<#case "D">
<#-- *********************************************** Action = DELETE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign receiptLines = JsonUtil.jsonToMap(dataRfx)>
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
<#if receipt.line_list ??>
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl">
}
]
<#else>
<#stop> <#-- No line-->
</#if>
<#break>
<#stop "no generic FTL file available yet for receiptLines">
<#break>
<#default>
<#stop >

View File

@ -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": "R${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}"
}
},
"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",
</#if>
</#if>
<#-- 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>,</#sep>
</#list>
]
</#if>
}
}
]

View File

@ -0,0 +1,193 @@
<#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) />
<#assign refIDHmap_local ={}>
[
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
{
"Header": {"ProjectID": "${projectRP}"},
"ID": {
<#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="">
"RefID": "${receipt.origin_order_line_depot?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_reference?trim?json_string}",
<#else>
"RefID": "R${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>
"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",
</#if>
</#if>
<#-- 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>,</#sep>
</#list>
]
</#if>
}
}
<#else>
<#if receipt.line_list??>
<#list receipt.line_list as receipt_line >
<#if receipt_line.origin_order_line_reference!="">
<#if !refIDHmap_local[receipt_line.origin_order_line_reference]?? >
<#if refIDHmap_local?size != 0 >
,
</#if>
<#assign refIDHmap_local +={receipt_line.origin_order_line_reference,receipt_line.origin_order_line_reference}>
{
"Header": {"ProjectID": "${projectRP}"},
"ID": {
<#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="">
"RefID": "${receipt.origin_order_line_depot?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt_line.origin_order_line_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_line.origin_order_line_reference?trim?json_string}",
</#if>
"RefDate": {
"DateTime": "${receipt_creation_datetime}",
"AuthorTimeZone": "${time_zone_rfx}"
}
},
"Payload": {
"CreationDateTime": {
"DateTime": "${receipt_creation_datetime}",
"AuthorTimeZone": "${time_zone_rfx}"
},
"OrderID":"${receipt_line.origin_order_line_reference?trim?json_string}",
<#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",
</#if>
</#if>
<#-- 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>,</#sep>
</#list>
]
</#if>
}
}
</#if>
<#else>
{
"Header": {"ProjectID": "${projectRP}"},
"ID": {
"RefID": "R${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year?trim?json_string}${receipt.receipt_number?trim?json_string}",
"RefDate": {
"DateTime": "${receipt_creation_datetime}",
"AuthorTimeZone": "${time_zone_rfx}"
}
},
"Payload": {
"CreationDateTime": {
"DateTime": "${receipt_creation_datetime}",
"AuthorTimeZone": "${time_zone_rfx}"
},
"OrderID":"${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year?trim?json_string}${receipt.receipt_number?trim?json_string}",
<#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",
</#if>
</#if>
<#-- 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>,</#sep>
</#list>
]
</#if>
}
}
<#break>
</#if>
</#list>
</#if>
</#if>
]

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>
@ -12,20 +12,53 @@
<#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)>
[
<#-- check preparation type code (internal order and reservation are ignored) -->
<#if 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>
</#if>
<#else>
<#-- Preparation order type not supported -->
<#stop>
</#if>
]
<#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>
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign preparation_order = JsonUtil.jsonToMap(dataRfx)>
[
<#if preparation_order.preparation_type_code == "010" || preparation_order.preparation_type_code == "030" >
<#if preparation_order.line_list??>
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPro_ExecutionflowCancelled.ftl">
}
<#else>
<#-- No line -->
<#stop>
</#if>
<#else>
<#-- Preparation order type not supported -->
<#stop>
</#if>
]
<#break>
<#default>
<#stop >
</#switch>

View File

@ -0,0 +1,59 @@
<#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": {
<#if preparation_order.originator_reference?? && preparation_order.originator_reference!="">
"RefID": "${preparation_order.physical_depot_code?trim?json_string}${preparation_order.activity_code?trim?json_string}${preparation_order.originator_code?trim?json_string}${preparation_order.originator_reference?trim?json_string}",
<#else>
"RefID": "O${preparation_order.physical_depot_code?trim?json_string}${preparation_order.activity_code?trim?json_string}${preparation_order.originator_code?trim?json_string}${preparation_order.preparation_order_year}${preparation_order.preparation_order_number}",
</#if>
"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}",
</#if>
<#-- 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}",
</#if>
<#-- 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>,</#sep>
</#list>
]
</#if>
}
}
]

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>
@ -18,15 +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>
<#-- "no LV for the item"-->
<#stop>
</#if>
}
]
<#break>

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

@ -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}"
</#if>
<#-- 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>

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,40 +1,40 @@
<#-- **** 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>
<#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 *************************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
[
{
}
]
<#break>
<#default>
<#stop >
<#-- **** input parameters ***** -->
<#-- input : message HARDIS WMS -->
<#-- project : projectId in HARDIS SC NETWORK -->
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project>
<#assign organisationRP = organisation>
<#assign aDateTime = .now>
<#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 *************************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
[
{
}
]
<#break>
<#default>
<#stop >
</#switch>

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,40 +1,40 @@
<#-- **** 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>
<#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 *************************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
[
{
}
]
<#break>
<#default>
<#stop >
<#-- **** input parameters ***** -->
<#-- input : message HARDIS WMS -->
<#-- project : projectId in HARDIS SC NETWORK -->
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project>
<#assign organisationRP = organisation>
<#assign aDateTime = .now>
<#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 *************************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
[
{
}
]
<#break>
<#default>
<#stop >
</#switch>

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,40 +1,40 @@
<#-- **** 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>
<#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 *************************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
[
{
}
]
<#break>
<#default>
<#stop >
<#-- **** input parameters ***** -->
<#-- input : message HARDIS WMS -->
<#-- project : projectId in HARDIS SC NETWORK -->
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project>
<#assign organisationRP = organisation>
<#assign aDateTime = .now>
<#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 *************************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
[
{
}
]
<#break>
<#default>
<#stop >
</#switch>

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>
@ -51,8 +51,7 @@
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? ) 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>

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

@ -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>
<#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="" >
,

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

@ -38,8 +38,8 @@
<#if preparation_order.preparation_type_code == "030" && preparation_order.optional_attributes.intermediate_consignee_transfer_physical_depot?? && preparation_order.optional_attributes.intermediate_consignee_transfer_physical_depot!="" && preparation_order.optional_attributes.transfer_intermediate_consignee=="true">
"ActorID": "${RFXtoRPprefixDepot(preparation_order.optional_attributes.intermediate_consignee_transfer_physical_depot?json_string)}"
<#else>
<#if preparation_order.preparation_type_code == "030">
"ActorID": "${RFXtoRPprefixDepot(preparation_order.end_consignee_code?json_string)}"
<#if preparation_order.preparation_type_code == "030" && preparation_order.optional_attributes.transfer_intermediate_consignee=="false" && preparation_order.transfer_physical_depot_code?? && preparation_order.transfer_physical_depot_code!="">
"ActorID": "${RFXtoRPprefixDepot(preparation_order.transfer_physical_depot_code?json_string)}"
<#else>
<#if preparation_order.address.address_type_code == "" &&
preparation_order.address.name_or_company_name == "" &&

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

@ -29,7 +29,6 @@
<#else>
"OrderID": "R${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>
"OrderID":"${receipt.receipt_reference?trim?json_string}",
<#-- Header Metadata inclusion -->
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_HeaderMetadata.ftl">,
"ShipFrom":

View File

@ -0,0 +1,11 @@
[
{
"Header": {
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${id.refid?json_string}"
},
"Payload": {}
}
]

View File

@ -1,15 +0,0 @@
[
{
"Header": {
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${id.refid?json_string}"
},
"Payload": {
"ShipToAcked": true
}
}
]

View File

@ -1,206 +1,206 @@
<#-- **** input parameters ***** -->
<#-- input : Response message from Reflex -->
<#-- project : projectId in ReflexPlatform -->
<#-- organisation : organisationtId in ReflexPlatform -->
<#assign restResponsetMsg = JsonUtil.jsonToMap(input)>
<#assign id = JsonUtil.jsonToMap(restResponsetMsg.id!"{}")>
<#assign projectRP = project>
<#assign organisationRP = organisation>
<#assign aDateTime = .now>
<#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}" />
</#if>
<#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}" />
</#if>
<#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">
}
]
<#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">
}
]
</#if>
</#if>
<#break>
<#default>
[
{
<#if restResponsetMsg.body?? >
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
<#else>
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}}" />
</#if>
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_PlatformLogCreate.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_RestResponseAllocationError.ftl">
}
]
</#switch>
<#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}" />
</#if>
<#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">
}
]
<#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">
}
]
</#if>
<#break>
<#default>
[
{
<#if restResponsetMsg.body?? >
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
<#else>
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
</#if>
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_PlatformLogCreate.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_RestResponseAllocationError.ftl">
}
]
</#switch>
<#break>
<#default>
<#stop>
</#switch>
<#-- **** input parameters ***** -->
<#-- 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!"{}")>
<#assign projectRP = project>
<#assign organisationRP = organisation>
<#assign aDateTime = .now>
<#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}" />
</#if>
<#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}" />
</#if>
<#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">
}
]
<#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">
}
]
</#if>
</#if>
<#break>
<#default>
[
{
<#if restResponsetMsg.body?? >
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
<#else>
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}}" />
</#if>
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_PlatformLogCreate.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_RestResponseAllocationError.ftl">
}
]
</#switch>
<#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}" />
</#if>
<#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.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">
}
]
</#if>
<#break>
<#default>
[
{
<#if restResponsetMsg.body?? >
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
<#else>
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
</#if>
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_PlatformLogCreate.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_RestResponseAllocationError.ftl">
}
]
</#switch>
<#break>
<#default>
<#stop>
</#switch>

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

View File

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

View File

@ -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 @@
</#function>
<#-- --------------------------------------------------------------------------------------- -->
<#-- 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 += ",">
</#if>
<#local str += "\"">
<#local str += email>
<#local str += "\"">
</#if>
<#if email?matches("^[\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4}$")>
<#if str != "[">
<#local str += ",">
</#if>
<#local str += "\"">
<#local str += email>
<#local str += "\"">
</#if>
</#list>
<#local str += "]">
<#return (str)>

View File

@ -1 +1 @@
2.0.8+1
2.0.13+1