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
This commit is contained in:
commit
39c8280fa4
@ -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**.
|
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
|
## Role of the FTL Files
|
||||||
|
|
||||||
|
|||||||
11
RFXtoRP_Receipt_ExecutionflowDeleted.ftl
Normal file
11
RFXtoRP_Receipt_ExecutionflowDeleted.ftl
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
"RefID": "${id.refid?json_string}"
|
||||||
|
},
|
||||||
|
"Payload": {}
|
||||||
|
}
|
||||||
|
]
|
||||||
@ -1,15 +0,0 @@
|
|||||||
[
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID": {
|
|
||||||
"RefID": "${id.refid?json_string}"
|
|
||||||
},
|
|
||||||
|
|
||||||
"Payload": {
|
|
||||||
"ShipToAcked": true
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@ -153,10 +153,10 @@
|
|||||||
<#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "SUCCESS" >
|
<#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "SUCCESS" >
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipToAcked>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDeleted>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_Receipt_ShipToAcked.ftl">
|
<#include "RFXtoRP_Receipt_ExecutionflowDeleted.ftl">
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#else>
|
<#else>
|
||||||
|
|||||||
@ -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 >
|
<#function RfxDateTimetoUTC rfxdatetime offset >
|
||||||
<#return ((rfxdatetime + offset)?datetime.iso?iso_utc)>
|
<#return ((rfxdatetime + offset)?datetime.iso?iso_utc)>
|
||||||
@ -10,21 +10,21 @@
|
|||||||
</#function>
|
</#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" -->
|
<#-- Example : splitemail "john.doe@hardis-group.com,; name@hardis-group.com" -->
|
||||||
<#-- return "["john.doe@hardis-group.com","name@hardis-group.com"]" -->
|
<#-- return "["john.doe@hardis-group.com","name@hardis-group.com"]" -->
|
||||||
<#-- --------------------------------------------------------------------------------------- -->
|
<#-- --------------------------------------------------------------------------------------- -->
|
||||||
<#function splitEmailsIntoArray emails >
|
<#function splitEmailsIntoArray emails >
|
||||||
<#local str = "[">
|
<#local str = "[">
|
||||||
<#list emails?split(";|,| |à|/","r")?filter(l -> l != "") as email>
|
<#list emails?split(";|,| |à|/","r")?filter(l -> l != "") as email>
|
||||||
<#if email?matches("^[\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4}$")>
|
<#if email?matches("^[\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4}$")>
|
||||||
<#if str != "[">
|
<#if str != "[">
|
||||||
<#local str += ",">
|
<#local str += ",">
|
||||||
</#if>
|
</#if>
|
||||||
<#local str += "\"">
|
<#local str += "\"">
|
||||||
<#local str += email>
|
<#local str += email>
|
||||||
<#local str += "\"">
|
<#local str += "\"">
|
||||||
</#if>
|
</#if>
|
||||||
</#list>
|
</#list>
|
||||||
<#local str += "]">
|
<#local str += "]">
|
||||||
<#return (str)>
|
<#return (str)>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user