diff --git a/RFXtoRP_HsrCarrierApt_SegmentationSelections.ftl b/RFXtoRP_HsrCarrierApt_SegmentationSelections.ftl index 79553d0..ef3e619 100644 --- a/RFXtoRP_HsrCarrierApt_SegmentationSelections.ftl +++ b/RFXtoRP_HsrCarrierApt_SegmentationSelections.ftl @@ -1,6 +1,6 @@ -"SegmentationSelections": [ +"SegmentationKeys": [ ] diff --git a/RFXtoRP_HsrReceiptList.ftl b/RFXtoRP_HsrReceiptList.ftl index 02c1a42..30777a4 100644 --- a/RFXtoRP_HsrReceiptList.ftl +++ b/RFXtoRP_HsrReceiptList.ftl @@ -77,18 +77,23 @@ <#include "RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl"> } <#else> - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl"> - } + <#if receipt.line_list ?? && receipt.line_list[0]??> + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl"> + } + <#else> + <#-- No line--> + <#stop> + <#else> <#if receipt.receipt_type == "030"> diff --git a/RFXtoRP_PlatformLogCreate.ftl b/RFXtoRP_PlatformLogCreate.ftl index ffa5985..ffd4790 100644 --- a/RFXtoRP_PlatformLogCreate.ftl +++ b/RFXtoRP_PlatformLogCreate.ftl @@ -1,7 +1,16 @@ <#include "HfRpConfig.ftl"> [ <#assign UUID = UUID.randomUUID()> - <#assign strJsonBody = JsonUtil.espaceQuoteInJsonString(restResponseBody)> + <#assign strJsonBody = JsonUtil.espaceQuoteInJsonString(restResponseBody)?replace("\n", "")?replace("\r", "")> + <#assign maxLen = 32000> + <#if strJsonBody?length gt maxLen> + <#assign strJsonBody = JsonUtil.espaceQuoteInJsonString(restResponseBody)?replace("\n", "")?replace("\r", "")?replace('"logical_key_list"\\s*:\\s*\\[[^\\]]*\\]', '"logical_key_list": []', 'r')> + + <#if strJsonBody?length gt maxLen> + <#assign safeJsonBody = "{\"truncated\": true, \"original_size\": " + strJsonBody?length + "}"> + <#else> + <#assign safeJsonBody = strJsonBody> + { "Header": { "ProjectID": "${projectRP}" @@ -17,22 +26,22 @@ <#assign severity = SeverityLevel.ERROR> "Severity": "${severity}", "Namespace": "ReflexIntegration", - "DateTime": { - "DateTime": "${aDateTime?iso_utc}", - "AuthorTimeZone": "${time_zone_rfx}" + "DateTime": { + "DateTime": "${aDateTime?iso_utc}", + "AuthorTimeZone": "${time_zone_rfx}" }, "TechMessage": { "Code": "${restResponsetMsg.status!"no Code"}", - "Label": ${strJsonBody?truncate(32000,'...')} + "Label": "${safeJsonBody?json_string}" }, "UserMessage": { "Code": "${restResponsetMsg.status!"no Code"}", - "Label": ${strJsonBody?truncate(32000,'...')}, + "Label": "${safeJsonBody?json_string}", "Params": [] }, "DetailElements": [], "CorrelationID": "${id.correlationid!"no Correlationid"}", - "ContextPayload": ${strJsonBody?truncate(32000,'...')}, + "ContextPayload": "${safeJsonBody?json_string}", "Type": "${event}", "Task": "${id.apiRestReflexID!"no Task"}", "OriginalID": "${id.refid!"no OriginalID"?trim?json_string}", diff --git a/RPtoRFX_AppointmentEvent.ftl b/RPtoRFX_AppointmentEvent.ftl index 343103b..ae4a149 100644 --- a/RPtoRFX_AppointmentEvent.ftl +++ b/RPtoRFX_AppointmentEvent.ftl @@ -28,7 +28,8 @@ <#assign AddComma = false /> <#assign appointment = eventRP.data /> - <#if !eventRP.commissionsUpdated!false && !eventRP.reasonUpdated!false && !eventRP.slotUpdated!false && !eventRP.carrierInformationUpdated!false> + <#-- processing is stopped because the Updated event contains no relevant change to forward to the WMS. --> + <#if !(eventRP.commissionsUpdated!false) && !(eventRP.reasonUpdated!false) && !(eventRP.slotUpdated!false) && !(eventRP.carrierInformationUpdated!false)> <#stop> [ diff --git a/VERSION b/VERSION index e9e11a1..7cda77c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.2.62+1 +1.2.63+2