From 6fd0e7e2e4d6a0ea0eb1c0ed8431720d704d4ef5 Mon Sep 17 00:00:00 2001 From: frea Date: Wed, 18 Oct 2023 16:05:07 +0200 Subject: [PATCH] correction syntaxe ftl --- RPtoRFX_ExecutionflowEvent.ftl | 5 +++-- RPtoRFX_PrepOrder.ftl | 4 ++-- RPtoRFX_PrepOrder_DefaultHeaderData.ftl | 2 +- RPtoRFX_PrepOrder_DefaultLineData.ftl | 4 ++-- RPtoRFX_Receipt_DefaultHeaderData.ftl | 2 +- RPtoRFX_Receipt_DefaultLineData.ftl | 2 +- 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/RPtoRFX_ExecutionflowEvent.ftl b/RPtoRFX_ExecutionflowEvent.ftl index a392f4a..24d6407 100644 --- a/RPtoRFX_ExecutionflowEvent.ftl +++ b/RPtoRFX_ExecutionflowEvent.ftl @@ -7,8 +7,9 @@ <#assign projectRP = project> <#assign organisationRP = organisation> - - +#-- initialisation map for SegmentationKey and MetaData --> +<#assign Header_MetaData_Map {} /> +<#assign SegmentationKeys_Map {} /> <#switch eventRP.event> <#case "Created"> diff --git a/RPtoRFX_PrepOrder.ftl b/RPtoRFX_PrepOrder.ftl index 72b42f3..f55bfbb 100644 --- a/RPtoRFX_PrepOrder.ftl +++ b/RPtoRFX_PrepOrder.ftl @@ -53,9 +53,9 @@ <#if line.MetaData??> <#assign Line_MetaData_Map = JsonUtil.sequenceToMap(line.MetaData, "Key", "Value") /> - + <#if line.RequestedContent.Goods.SegmentationKeys??> <#assign SegmentationKeys_Map = JsonUtil.sequenceToMap(line.RequestedContent.Goods.SegmentationKeys, "Key", "Value") /> - + <#include "RPtoRFX_PrepOrder_DefaultLineData.ftl"> { "originator_reference_line_number": ${line.LineID?number}, diff --git a/RPtoRFX_PrepOrder_DefaultHeaderData.ftl b/RPtoRFX_PrepOrder_DefaultHeaderData.ftl index 0bd2ced..1879fd8 100644 --- a/RPtoRFX_PrepOrder_DefaultHeaderData.ftl +++ b/RPtoRFX_PrepOrder_DefaultHeaderData.ftl @@ -2,7 +2,7 @@ <#-- How to use MD Header map Example : - <#assign pick_sequence_code = Header_MetaData_Map['OrderType']/> + <#assign pick_sequence_code = Header_MetaData_Map["OrderType"]!""/> --> diff --git a/RPtoRFX_PrepOrder_DefaultLineData.ftl b/RPtoRFX_PrepOrder_DefaultLineData.ftl index 2929075..1ff229a 100644 --- a/RPtoRFX_PrepOrder_DefaultLineData.ftl +++ b/RPtoRFX_PrepOrder_DefaultLineData.ftl @@ -3,10 +3,10 @@ <#-- How to use MD or SK map Example : - <#assign owner_code_to_prepare = SegmentationKeys_Map['Owner']/> + <#assign owner_code_to_prepare = SegmentationKeys_Map["Owner"]!""/> --> -<#assign owner_code_to_prepare = SegmentationKeys_Map['myOwner']/> +<#assign owner_code_to_prepare = SegmentationKeys_Map["myOwner"]!""/> <#assign grade_code_to_prepare =""/> <#assign batch_1 =""/> diff --git a/RPtoRFX_Receipt_DefaultHeaderData.ftl b/RPtoRFX_Receipt_DefaultHeaderData.ftl index fd8f82d..f2d8220 100644 --- a/RPtoRFX_Receipt_DefaultHeaderData.ftl +++ b/RPtoRFX_Receipt_DefaultHeaderData.ftl @@ -2,7 +2,7 @@ <#-- How to use MD Header map Example : - <#assign receipt_type = Header_MetaData_Map['OrderType']/> + <#assign receipt_type = Header_MetaData_Map["OrderType"]!""/> --> <#assign activity_code = "PEN"/> diff --git a/RPtoRFX_Receipt_DefaultLineData.ftl b/RPtoRFX_Receipt_DefaultLineData.ftl index 821122b..d7383f7 100644 --- a/RPtoRFX_Receipt_DefaultLineData.ftl +++ b/RPtoRFX_Receipt_DefaultLineData.ftl @@ -3,7 +3,7 @@ <#-- How to use MD or SK map Example : - <#assign owner_code = SegmentationKeys_Map['Owner']/> + <#assign owner_code = SegmentationKeys_Map["Owner"]!""/> -->