From 8fe3dd364c3bf521f33b858cbe0ea1d96fbbd192 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 26 Jan 2026 15:33:35 +0100 Subject: [PATCH 01/87] SCPN1-10095 --- ...arrierApt_AppointmentCustomFieldsUpdated.ftl | 4 ++-- RFXtoRP_HsrCarrierApt_CarrierArrived.ftl | 8 ++++---- RFXtoRP_HsrCarrierApt_CarrierDeparted.ftl | 8 ++++---- RFXtoRP_HsrCarrierApt_LoadingCompleted.ftl | 8 ++++---- RFXtoRP_HsrCarrierApt_LoadingStarted.ftl | 8 ++++---- RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl | 17 ++++++++++------- ...P_HsrCarrierApt_SiteForceBookAppointment.ftl | 4 ++-- RFXtoRP_HsrCarrierApt_UnloadingCompleted.ftl | 8 ++++---- RFXtoRP_HsrCarrierApt_UnloadingStarted.ftl | 8 ++++---- RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl | 4 ++-- RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl | 6 +++--- 11 files changed, 43 insertions(+), 40 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl b/RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl index a9aa061..795d001 100644 --- a/RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl +++ b/RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl @@ -7,9 +7,9 @@ "ID": { <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> + "RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#else> - "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#else> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> diff --git a/RFXtoRP_HsrCarrierApt_CarrierArrived.ftl b/RFXtoRP_HsrCarrierApt_CarrierArrived.ftl index 1cd5974..7284ee7 100644 --- a/RFXtoRP_HsrCarrierApt_CarrierArrived.ftl +++ b/RFXtoRP_HsrCarrierApt_CarrierArrived.ftl @@ -7,15 +7,15 @@ "ID": { <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> + "RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#else> - "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#else> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}", + "RefID": "${carrier_apt.appointment_reference?json_string}", <#else> - "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", "RefDate": { diff --git a/RFXtoRP_HsrCarrierApt_CarrierDeparted.ftl b/RFXtoRP_HsrCarrierApt_CarrierDeparted.ftl index 6c93825..5ac8b1c 100644 --- a/RFXtoRP_HsrCarrierApt_CarrierDeparted.ftl +++ b/RFXtoRP_HsrCarrierApt_CarrierDeparted.ftl @@ -7,15 +7,15 @@ "ID": { <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> + "RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#else> - "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#else> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}", + "RefID": "${carrier_apt.appointment_reference?json_string}", <#else> - "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", "RefDate": { diff --git a/RFXtoRP_HsrCarrierApt_LoadingCompleted.ftl b/RFXtoRP_HsrCarrierApt_LoadingCompleted.ftl index 6c93825..5ac8b1c 100644 --- a/RFXtoRP_HsrCarrierApt_LoadingCompleted.ftl +++ b/RFXtoRP_HsrCarrierApt_LoadingCompleted.ftl @@ -7,15 +7,15 @@ "ID": { <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> + "RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#else> - "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#else> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}", + "RefID": "${carrier_apt.appointment_reference?json_string}", <#else> - "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", "RefDate": { diff --git a/RFXtoRP_HsrCarrierApt_LoadingStarted.ftl b/RFXtoRP_HsrCarrierApt_LoadingStarted.ftl index 1cd5974..7284ee7 100644 --- a/RFXtoRP_HsrCarrierApt_LoadingStarted.ftl +++ b/RFXtoRP_HsrCarrierApt_LoadingStarted.ftl @@ -7,15 +7,15 @@ "ID": { <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> + "RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#else> - "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#else> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}", + "RefID": "${carrier_apt.appointment_reference?json_string}", <#else> - "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", "RefDate": { diff --git a/RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl index 0d7a7e1..7730302 100644 --- a/RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl @@ -1,15 +1,18 @@ <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) /> [ { - <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}", + <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> + "RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#else> - <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}", - <#else> - "AppointmentID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}", - + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + <#else> + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> + "RefID": "${carrier_apt.appointment_reference?json_string}", + <#else> + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + "Header": { "ProjectID": "${projectRP}" }, diff --git a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl index 781e568..8ea9242 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl @@ -6,9 +6,9 @@ "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> + "AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#else> - "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> + "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#else> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> diff --git a/RFXtoRP_HsrCarrierApt_UnloadingCompleted.ftl b/RFXtoRP_HsrCarrierApt_UnloadingCompleted.ftl index 1cd5974..3dcd4cf 100644 --- a/RFXtoRP_HsrCarrierApt_UnloadingCompleted.ftl +++ b/RFXtoRP_HsrCarrierApt_UnloadingCompleted.ftl @@ -7,15 +7,15 @@ "ID": { <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> + "RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> <#else> - "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> <#else> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}", + "RefID": "${carrier_apt.appointment_reference?json_string}", <#else> - "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", "RefDate": { diff --git a/RFXtoRP_HsrCarrierApt_UnloadingStarted.ftl b/RFXtoRP_HsrCarrierApt_UnloadingStarted.ftl index 1cd5974..3dcd4cf 100644 --- a/RFXtoRP_HsrCarrierApt_UnloadingStarted.ftl +++ b/RFXtoRP_HsrCarrierApt_UnloadingStarted.ftl @@ -7,15 +7,15 @@ "ID": { <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> + "RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> <#else> - "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> <#else> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}", + "RefID": "${carrier_apt.appointment_reference?json_string}", <#else> - "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", "RefDate": { diff --git a/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl index 1ffc660..1f65c78 100644 --- a/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl @@ -7,9 +7,9 @@ }, <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> + "AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#else> - "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> + "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#else> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> diff --git a/RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl b/RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl index fddb56b..0570db5 100644 --- a/RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl @@ -6,9 +6,9 @@ }, <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> + "AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#else> - "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> + "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#else> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> @@ -75,7 +75,7 @@ "StartDateTime": "${carrier_apt.planned_unloading_start_datetime}" <#else> <#stop "Appointment type not supported" > - + }] From 5552265833aa9ec73aae44a0b3464e110f98d46d Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 26 Jan 2026 16:52:31 +0100 Subject: [PATCH 02/87] SCPN1-10095 --- RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl | 1 + 1 file changed, 1 insertion(+) diff --git a/RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl index 7730302..657f4c3 100644 --- a/RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl @@ -6,6 +6,7 @@ "RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#else> "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + <#else> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> "RefID": "${carrier_apt.appointment_reference?json_string}", From c324773fad1b60fcc2fad64c853f1c4945209336 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 26 Jan 2026 16:57:23 +0100 Subject: [PATCH 03/87] SCPN1-10095 --- RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl index 657f4c3..c4033a6 100644 --- a/RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl @@ -3,15 +3,15 @@ { <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", + "AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#else> - "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#else> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "RefID": "${carrier_apt.appointment_reference?json_string}", + "AppointmentID": "${carrier_apt.appointment_reference?json_string}", <#else> - "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", "Header": { From 289b8c3fc1842254c40ad5058f582e781e6951fd Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 27 Jan 2026 10:14:11 +0100 Subject: [PATCH 04/87] SCPN1-10100 --- RPtoRFX_AppointmentEvent.ftl | 20 ++++++++-- RPtoRFX_CarrierAppointmentUpdatedByNumber.ftl | 40 +++++++++++++++++++ RPtoRFX_CarrierAppointmentUpdatedByRef.ftl | 39 ++++++++++++++++++ 3 files changed, 96 insertions(+), 3 deletions(-) create mode 100644 RPtoRFX_CarrierAppointmentUpdatedByNumber.ftl create mode 100644 RPtoRFX_CarrierAppointmentUpdatedByRef.ftl diff --git a/RPtoRFX_AppointmentEvent.ftl b/RPtoRFX_AppointmentEvent.ftl index 69ea68f..4500758 100644 --- a/RPtoRFX_AppointmentEvent.ftl +++ b/RPtoRFX_AppointmentEvent.ftl @@ -27,7 +27,7 @@ <#case "CommissionsUpdated"> <#assign appointment = eventRP.data /> [ <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING"> - <#if eventRP.addedCommissions?? && eventRP.addedCommissions!=""> + <#if eventRP.addedCommissions?? && eventRP.addedCommissions!=""> <#if eventRP.appointmentCustomFields?has_content> { <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_number> @@ -47,7 +47,7 @@ <#if eventRP.removedCommissions?? && eventRP.removedCommissions!=""> <#if eventRP.addedCommissions?? && eventRP.addedCommissions!=""> , - + <#if eventRP.appointmentCustomFields?has_content> { @@ -66,7 +66,21 @@ <#else> - <#stop "Unsupported Appointment Type for Commissions Update"> + <#if eventRP.appointmentCustomFields?has_content> + { + <#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_number> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : + <#include "RPtoRFX_CarrierAppointmentUpdatedByNumber.ftl"> + } + <#else> + { + <#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_ref> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : + <#include "RPtoRFX_CarrierAppointmentUpdatedByRef.ftl"> + } + ] <#break> diff --git a/RPtoRFX_CarrierAppointmentUpdatedByNumber.ftl b/RPtoRFX_CarrierAppointmentUpdatedByNumber.ftl new file mode 100644 index 0000000..f961dc4 --- /dev/null +++ b/RPtoRFX_CarrierAppointmentUpdatedByNumber.ftl @@ -0,0 +1,40 @@ +{ + "id" : {"refid" : "${eventRP.refid?json_string}","actorID":"${RPtoRFXprefixDepot(eventRP.actor)}"}, + "route" : "rest/public/v1/physical_depots/{physical_depot_code}/appointment_years/{appointment_year}/appointment_numbers/{appointment_number}", + "method" : "PUT", + "uri_substitutions": { + "physical_depot_code": "${RPtoRFXprefixDepot(eventRP.actor)}", + "appointment_year":"${eventRP.appointmentCustomFields.year?json_string}", + "appointment_number":"${eventRP.appointmentCustomFields.number?json_string}" + }, + "payload" : + { +<#-- <#switch appointment.AppointmentType> + <#case "APPOINTMENT_TYPE_LOADING"> + "unloading_appointment" : "false", + "load_appointment" : "true", + <#if appointment.TimeZone?? && appointment.TimeZone!=""> + "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", + "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", + <#else> + "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,time_zone_rfx),time_zone_rfx)}", + "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}", + + <#break> + <#case "APPOINTMENT_TYPE_UNLOADING"> + "unloading_appointment" : "true", + "load_appointment" : "false", + <#if appointment.TimeZone?? && appointment.TimeZone!=""> + "planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", + "planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", + <#else> + "planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,time_zone_rfx),time_zone_rfx)}", + "planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}", + + <#break> + <#default> + <#stop "appointment.AppointmentType not implemented" > + --> + "appointment_designation":"${(appointment.Reason!"")!?json_string}" + } + } diff --git a/RPtoRFX_CarrierAppointmentUpdatedByRef.ftl b/RPtoRFX_CarrierAppointmentUpdatedByRef.ftl new file mode 100644 index 0000000..005f66a --- /dev/null +++ b/RPtoRFX_CarrierAppointmentUpdatedByRef.ftl @@ -0,0 +1,39 @@ +{ + "id" : {"refid" : "${eventRP.refid?json_string}","actorID":"${RPtoRFXprefixDepot(eventRP.actor)}"}, + "route" : "rest/public/v1/physical_depots/{physical_depot_code}/carrier_appointments/{appointment_reference}", + "method" : "PUT", + "uri_substitutions": { + "physical_depot_code": "${RPtoRFXprefixDepot(eventRP.actor)}", + "appointment_reference":"${eventRP.refid?json_string}" + }, + "payload" : + { +<#-- <#switch appointment.AppointmentType> + <#case "APPOINTMENT_TYPE_LOADING"> + "unloading_appointment" : "false", + "load_appointment" : "true", + <#if appointment.TimeZone?? && appointment.TimeZone!=""> + "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", + "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", + <#else> + "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,time_zone_rfx),time_zone_rfx)}", + "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}", + + <#break> + <#case "APPOINTMENT_TYPE_UNLOADING"> + "unloading_appointment" : "true", + "load_appointment" : "false", + <#if appointment.TimeZone?? && appointment.TimeZone!=""> + "planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", + "planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", + <#else> + "planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,time_zone_rfx),time_zone_rfx)}", + "planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}", + + <#break> + <#default> + <#stop "appointment.AppointmentType not implemented" > + --> + "appointment_designation":"${(appointment.Reason!"")!?json_string}" + } + } From e12235319ee5b51565e01134ef8309209e891f32 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 27 Jan 2026 12:02:28 +0100 Subject: [PATCH 05/87] SCPN1-10100 --- RPtoRFX_CarrierAppointmentUpdatedByNumber.ftl | 12 ++++++++++++ RPtoRFX_CarrierAppointmentUpdatedByRef.ftl | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/RPtoRFX_CarrierAppointmentUpdatedByNumber.ftl b/RPtoRFX_CarrierAppointmentUpdatedByNumber.ftl index f961dc4..0bf795b 100644 --- a/RPtoRFX_CarrierAppointmentUpdatedByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentUpdatedByNumber.ftl @@ -35,6 +35,18 @@ <#default> <#stop "appointment.AppointmentType not implemented" > --> + <#switch appointment.AppointmentType> + <#case "APPOINTMENT_TYPE_LOADING"> + "unloading_appointment" : "false", + "load_appointment" : "true", + <#break> + <#case "APPOINTMENT_TYPE_UNLOADING"> + "unloading_appointment" : "true", + "load_appointment" : "false", + <#break> + <#default> + <#stop "appointment.AppointmentType not implemented" > + --> "appointment_designation":"${(appointment.Reason!"")!?json_string}" } } diff --git a/RPtoRFX_CarrierAppointmentUpdatedByRef.ftl b/RPtoRFX_CarrierAppointmentUpdatedByRef.ftl index 005f66a..4dfccdd 100644 --- a/RPtoRFX_CarrierAppointmentUpdatedByRef.ftl +++ b/RPtoRFX_CarrierAppointmentUpdatedByRef.ftl @@ -33,6 +33,18 @@ <#break> <#default> <#stop "appointment.AppointmentType not implemented" > + --> + <#switch appointment.AppointmentType> + <#case "APPOINTMENT_TYPE_LOADING"> + "unloading_appointment" : "false", + "load_appointment" : "true", + <#break> + <#case "APPOINTMENT_TYPE_UNLOADING"> + "unloading_appointment" : "true", + "load_appointment" : "false", + <#break> + <#default> + <#stop "appointment.AppointmentType not implemented" > --> "appointment_designation":"${(appointment.Reason!"")!?json_string}" } From 9b5eec0f7f3f69317db0a63d07cbd3be7b4d60ba Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 27 Jan 2026 12:05:58 +0100 Subject: [PATCH 06/87] SCPN1-10100 --- RPtoRFX_CarrierAppointmentUpdatedByNumber.ftl | 2 +- RPtoRFX_CarrierAppointmentUpdatedByRef.ftl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/RPtoRFX_CarrierAppointmentUpdatedByNumber.ftl b/RPtoRFX_CarrierAppointmentUpdatedByNumber.ftl index 0bf795b..dc49e0c 100644 --- a/RPtoRFX_CarrierAppointmentUpdatedByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentUpdatedByNumber.ftl @@ -46,7 +46,7 @@ <#break> <#default> <#stop "appointment.AppointmentType not implemented" > - --> + "appointment_designation":"${(appointment.Reason!"")!?json_string}" } } diff --git a/RPtoRFX_CarrierAppointmentUpdatedByRef.ftl b/RPtoRFX_CarrierAppointmentUpdatedByRef.ftl index 4dfccdd..8968b2f 100644 --- a/RPtoRFX_CarrierAppointmentUpdatedByRef.ftl +++ b/RPtoRFX_CarrierAppointmentUpdatedByRef.ftl @@ -45,7 +45,7 @@ <#break> <#default> <#stop "appointment.AppointmentType not implemented" > - --> + "appointment_designation":"${(appointment.Reason!"")!?json_string}" } } From 2d022ccf472ffec7aa655b07aa52ac7df8c6cac5 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 27 Jan 2026 13:31:55 +0100 Subject: [PATCH 07/87] SCPN1-10100 --- RPtoRFX_CarrierAppointmentUpdatedByNumber.ftl | 44 ++++--------------- RPtoRFX_CarrierAppointmentUpdatedByRef.ftl | 40 +++-------------- 2 files changed, 16 insertions(+), 68 deletions(-) diff --git a/RPtoRFX_CarrierAppointmentUpdatedByNumber.ftl b/RPtoRFX_CarrierAppointmentUpdatedByNumber.ftl index dc49e0c..4ca9c1d 100644 --- a/RPtoRFX_CarrierAppointmentUpdatedByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentUpdatedByNumber.ftl @@ -9,43 +9,17 @@ }, "payload" : { -<#-- <#switch appointment.AppointmentType> - <#case "APPOINTMENT_TYPE_LOADING"> - "unloading_appointment" : "false", - "load_appointment" : "true", - <#if appointment.TimeZone?? && appointment.TimeZone!=""> - "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", - "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", - <#else> - "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,time_zone_rfx),time_zone_rfx)}", - "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}", - - <#break> - <#case "APPOINTMENT_TYPE_UNLOADING"> - "unloading_appointment" : "true", - "load_appointment" : "false", - <#if appointment.TimeZone?? && appointment.TimeZone!=""> - "planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", - "planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", - <#else> - "planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,time_zone_rfx),time_zone_rfx)}", - "planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}", - - <#break> - <#default> - <#stop "appointment.AppointmentType not implemented" > - --> <#switch appointment.AppointmentType> - <#case "APPOINTMENT_TYPE_LOADING"> - "unloading_appointment" : "false", - "load_appointment" : "true", - <#break> - <#case "APPOINTMENT_TYPE_UNLOADING"> - "unloading_appointment" : "true", - "load_appointment" : "false", + <#case "APPOINTMENT_TYPE_LOADING"> + "unloading_appointment" : "false", + "load_appointment" : "true", <#break> - <#default> - <#stop "appointment.AppointmentType not implemented" > + <#case "APPOINTMENT_TYPE_UNLOADING"> + "unloading_appointment" : "true", + "load_appointment" : "false", + <#break> + <#default> + <#stop "appointment.AppointmentType not implemented" > "appointment_designation":"${(appointment.Reason!"")!?json_string}" } diff --git a/RPtoRFX_CarrierAppointmentUpdatedByRef.ftl b/RPtoRFX_CarrierAppointmentUpdatedByRef.ftl index 8968b2f..cc87aa4 100644 --- a/RPtoRFX_CarrierAppointmentUpdatedByRef.ftl +++ b/RPtoRFX_CarrierAppointmentUpdatedByRef.ftl @@ -8,43 +8,17 @@ }, "payload" : { -<#-- <#switch appointment.AppointmentType> - <#case "APPOINTMENT_TYPE_LOADING"> - "unloading_appointment" : "false", - "load_appointment" : "true", - <#if appointment.TimeZone?? && appointment.TimeZone!=""> - "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", - "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", - <#else> - "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,time_zone_rfx),time_zone_rfx)}", - "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}", - - <#break> - <#case "APPOINTMENT_TYPE_UNLOADING"> - "unloading_appointment" : "true", - "load_appointment" : "false", - <#if appointment.TimeZone?? && appointment.TimeZone!=""> - "planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", - "planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", - <#else> - "planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,time_zone_rfx),time_zone_rfx)}", - "planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}", - - <#break> - <#default> - <#stop "appointment.AppointmentType not implemented" > - --> <#switch appointment.AppointmentType> - <#case "APPOINTMENT_TYPE_LOADING"> - "unloading_appointment" : "false", - "load_appointment" : "true", - <#break> - <#case "APPOINTMENT_TYPE_UNLOADING"> + <#case "APPOINTMENT_TYPE_LOADING"> + "unloading_appointment" : "false", + "load_appointment" : "true", + <#break> + <#case "APPOINTMENT_TYPE_UNLOADING"> "unloading_appointment" : "true", "load_appointment" : "false", <#break> - <#default> - <#stop "appointment.AppointmentType not implemented" > + <#default> + <#stop "appointment.AppointmentType not implemented" > "appointment_designation":"${(appointment.Reason!"")!?json_string}" } From b68855504a0a2e3928a135fe264294451118c5a8 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 27 Jan 2026 14:03:17 +0100 Subject: [PATCH 08/87] SCPN1-10100 --- RPtoRFX_CarrierAppointmentUpdatedByNumber.ftl | 32 +++++++++++++------ RPtoRFX_CarrierAppointmentUpdatedByRef.ftl | 26 +++++++++++---- 2 files changed, 43 insertions(+), 15 deletions(-) diff --git a/RPtoRFX_CarrierAppointmentUpdatedByNumber.ftl b/RPtoRFX_CarrierAppointmentUpdatedByNumber.ftl index 4ca9c1d..be6e241 100644 --- a/RPtoRFX_CarrierAppointmentUpdatedByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentUpdatedByNumber.ftl @@ -10,16 +10,30 @@ "payload" : { <#switch appointment.AppointmentType> - <#case "APPOINTMENT_TYPE_LOADING"> - "unloading_appointment" : "false", - "load_appointment" : "true", + <#case "APPOINTMENT_TYPE_LOADING"> + "unloading_appointment" : "false", + "load_appointment" : "true", + <#if appointment.TimeZone?? && appointment.TimeZone!=""> + "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", + "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", + <#else> + "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,time_zone_rfx),time_zone_rfx)}", + "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}", + + <#break> + <#case "APPOINTMENT_TYPE_UNLOADING"> + "unloading_appointment" : "true", + "load_appointment" : "false", + <#if appointment.TimeZone?? && appointment.TimeZone!=""> + "planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", + "planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", + <#else> + "planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,time_zone_rfx),time_zone_rfx)}", + "planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}", + <#break> - <#case "APPOINTMENT_TYPE_UNLOADING"> - "unloading_appointment" : "true", - "load_appointment" : "false", - <#break> - <#default> - <#stop "appointment.AppointmentType not implemented" > + <#default> + <#stop "appointment.AppointmentType not implemented" > "appointment_designation":"${(appointment.Reason!"")!?json_string}" } diff --git a/RPtoRFX_CarrierAppointmentUpdatedByRef.ftl b/RPtoRFX_CarrierAppointmentUpdatedByRef.ftl index cc87aa4..90a726d 100644 --- a/RPtoRFX_CarrierAppointmentUpdatedByRef.ftl +++ b/RPtoRFX_CarrierAppointmentUpdatedByRef.ftl @@ -9,16 +9,30 @@ "payload" : { <#switch appointment.AppointmentType> - <#case "APPOINTMENT_TYPE_LOADING"> - "unloading_appointment" : "false", - "load_appointment" : "true", + <#case "APPOINTMENT_TYPE_LOADING"> + "unloading_appointment" : "false", + "load_appointment" : "true", + <#if appointment.TimeZone?? && appointment.TimeZone!=""> + "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", + "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", + <#else> + "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,time_zone_rfx),time_zone_rfx)}", + "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}", + <#break> - <#case "APPOINTMENT_TYPE_UNLOADING"> + <#case "APPOINTMENT_TYPE_UNLOADING"> "unloading_appointment" : "true", "load_appointment" : "false", + <#if appointment.TimeZone?? && appointment.TimeZone!=""> + "planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", + "planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", + <#else> + "planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,time_zone_rfx),time_zone_rfx)}", + "planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}", + <#break> - <#default> - <#stop "appointment.AppointmentType not implemented" > + <#default> + <#stop "appointment.AppointmentType not implemented" > "appointment_designation":"${(appointment.Reason!"")!?json_string}" } From 91467086c49f384949a6b3b86f6c5b14c066f489 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 27 Jan 2026 14:31:24 +0100 Subject: [PATCH 09/87] SCPN1-10100 --- RPtoRFX_AppointmentEvent.ftl | 11 ++++++----- ...PtoRFX_CarrierAppointmentReasonUpdatedByNumber.ftl | 0 ...> RPtoRFX_CarrierAppointmentReasonUpdatedByRef.ftl | 0 ...intmentSlotOrCarrierInformationUpdatedByNumber.ftl | 1 + ...ppointmentSlotOrCarrierInformationUpdatedByRef.ftl | 1 + 5 files changed, 8 insertions(+), 5 deletions(-) rename RPtoRFX_CarrierAppointmentUpdatedByNumber.ftl => RPtoRFX_CarrierAppointmentReasonUpdatedByNumber.ftl (100%) rename RPtoRFX_CarrierAppointmentUpdatedByRef.ftl => RPtoRFX_CarrierAppointmentReasonUpdatedByRef.ftl (100%) rename RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl => RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl (97%) rename RPtoRFX_CarrierAppointmentSlotUpdatedByRef.ftl => RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl (97%) diff --git a/RPtoRFX_AppointmentEvent.ftl b/RPtoRFX_AppointmentEvent.ftl index 4500758..1a77303 100644 --- a/RPtoRFX_AppointmentEvent.ftl +++ b/RPtoRFX_AppointmentEvent.ftl @@ -71,21 +71,22 @@ <#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_number> "apiRestReflexID" : "${apiRestReflexID}", "datas" : - <#include "RPtoRFX_CarrierAppointmentUpdatedByNumber.ftl"> + <#include "RPtoRFX_CarrierAppointmentReasonUpdatedByNumber.ftl"> } <#else> { <#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_ref> "apiRestReflexID" : "${apiRestReflexID}", "datas" : - <#include "RPtoRFX_CarrierAppointmentUpdatedByRef.ftl"> + <#include "RPtoRFX_CarrierAppointmentReasonUpdatedByRef.ftl"> } ] <#break> -<#-- *********************************************** Action = SlotUpdated ******************** --> +<#-- *********************************************** Action = SlotUpdated or CarrierInformationUpdated ******************** --> <#case "SlotUpdated"> + <#case "CarrierInformationUpdated"> <#assign appointment = eventRP.data /> [ <#if eventRP.appointmentCustomFields?has_content> @@ -93,7 +94,7 @@ <#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_number> "apiRestReflexID" : "${apiRestReflexID}", "datas" : - <#include "RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl"> + <#include "RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl"> } <#else> { @@ -105,7 +106,7 @@ ] <#break> -<#-- *********************************************** Action = SlotUpdated ******************** --> +<#-- *********************************************** Action = Canceled ******************** --> <#case "Canceled"> <#assign appointment = eventRP.data /> [ diff --git a/RPtoRFX_CarrierAppointmentUpdatedByNumber.ftl b/RPtoRFX_CarrierAppointmentReasonUpdatedByNumber.ftl similarity index 100% rename from RPtoRFX_CarrierAppointmentUpdatedByNumber.ftl rename to RPtoRFX_CarrierAppointmentReasonUpdatedByNumber.ftl diff --git a/RPtoRFX_CarrierAppointmentUpdatedByRef.ftl b/RPtoRFX_CarrierAppointmentReasonUpdatedByRef.ftl similarity index 100% rename from RPtoRFX_CarrierAppointmentUpdatedByRef.ftl rename to RPtoRFX_CarrierAppointmentReasonUpdatedByRef.ftl diff --git a/RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl b/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl similarity index 97% rename from RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl rename to RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl index 1261a72..dc07f24 100644 --- a/RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl @@ -35,6 +35,7 @@ <#default> <#stop "appointment.AppointmentType not implemented" > + <#include "RPtoRFX_CarrierAppointmentDataUpdated.ftl"> "appointment_designation":"${(appointment.Reason!"")!?json_string}" } } diff --git a/RPtoRFX_CarrierAppointmentSlotUpdatedByRef.ftl b/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl similarity index 97% rename from RPtoRFX_CarrierAppointmentSlotUpdatedByRef.ftl rename to RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl index 6bfd554..0acc67f 100644 --- a/RPtoRFX_CarrierAppointmentSlotUpdatedByRef.ftl +++ b/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl @@ -34,6 +34,7 @@ <#default> <#stop "appointment.AppointmentType not implemented" > + <#include "RPtoRFX_CarrierAppointmentDataUpdated.ftl"> "appointment_designation":"${(appointment.Reason!"")!?json_string}" } } From efeb0c0185a7307635aaec148ae6eb1eafd61853 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 27 Jan 2026 14:34:06 +0100 Subject: [PATCH 10/87] SCPN1-10100 --- RPtoRFX_CarrierAppointmentDataUpdated.ftl | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 RPtoRFX_CarrierAppointmentDataUpdated.ftl diff --git a/RPtoRFX_CarrierAppointmentDataUpdated.ftl b/RPtoRFX_CarrierAppointmentDataUpdated.ftl new file mode 100644 index 0000000..93b4aa7 --- /dev/null +++ b/RPtoRFX_CarrierAppointmentDataUpdated.ftl @@ -0,0 +1,21 @@ +<#-- Note : you can use Order Line Metadata, using the define map : Line_MetaData_Map --> +<#-- Note : you can use Order Line Segmentation keys, using the define map : SegmentationKeys_Map --> + +<#-- How to use MD or SK map + <#if appointment.CarrierInformation??> + <#assign CarrierInformation_Map = JsonUtil.sequenceToMap(appointment.CarrierInformation, "Key", "Value") /> + <#if CarrierInformation_Map["Immatriculation"]??> + <#assign registration_number1 = CarrierInformation_Map["Immatriculation"].String!""/> + "registration_number":"${registration_number1}", + <#else> + "registration_number":"no plate number", + + + + If your SK is : + Boolean : .Bool + Float : .Float + Timestamp : .Timestamp.DateTime or .Timestamp.AuthorTimeZone + Int : .Int + String : .String +--> \ No newline at end of file From c1ea6e46afe9889b0be12366fac9262e45e1eb94 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 27 Jan 2026 14:40:05 +0100 Subject: [PATCH 11/87] SCPN1-10100 --- RPtoRFX_AppointmentEvent.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RPtoRFX_AppointmentEvent.ftl b/RPtoRFX_AppointmentEvent.ftl index 1a77303..8d0692a 100644 --- a/RPtoRFX_AppointmentEvent.ftl +++ b/RPtoRFX_AppointmentEvent.ftl @@ -101,7 +101,7 @@ <#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_ref> "apiRestReflexID" : "${apiRestReflexID}", "datas" : - <#include "RPtoRFX_CarrierAppointmentSlotUpdatedByRef.ftl"> + <#include "RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl"> } ] From 5492139935d899c9d081d1d916d271e821a08d9c Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 27 Jan 2026 15:01:08 +0100 Subject: [PATCH 12/87] SCPN1-10100 --- ...arrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl | 2 +- ...X_CarrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl b/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl index dc07f24..9c61263 100644 --- a/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl @@ -9,6 +9,7 @@ }, "payload" : { + <#include "RPtoRFX_CarrierAppointmentDataUpdated.ftl"> <#switch appointment.AppointmentType> <#case "APPOINTMENT_TYPE_LOADING"> "unloading_appointment" : "false", @@ -35,7 +36,6 @@ <#default> <#stop "appointment.AppointmentType not implemented" > - <#include "RPtoRFX_CarrierAppointmentDataUpdated.ftl"> "appointment_designation":"${(appointment.Reason!"")!?json_string}" } } diff --git a/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl b/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl index 0acc67f..8c9f571 100644 --- a/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl +++ b/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl @@ -8,6 +8,7 @@ }, "payload" : { + <#include "RPtoRFX_CarrierAppointmentDataUpdated.ftl"> <#switch appointment.AppointmentType> <#case "APPOINTMENT_TYPE_LOADING"> "unloading_appointment" : "false", @@ -34,7 +35,6 @@ <#default> <#stop "appointment.AppointmentType not implemented" > - <#include "RPtoRFX_CarrierAppointmentDataUpdated.ftl"> "appointment_designation":"${(appointment.Reason!"")!?json_string}" } } From 27ea4f3795fa802983ae6fe081ebab4902a39cef Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 27 Jan 2026 16:06:40 +0100 Subject: [PATCH 13/87] SCPN1-10100 --- RFXtoRP_HsrCarrierApt.ftl | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt.ftl b/RFXtoRP_HsrCarrierApt.ftl index d96a39e..e9c0e45 100644 --- a/RFXtoRP_HsrCarrierApt.ftl +++ b/RFXtoRP_HsrCarrierApt.ftl @@ -107,25 +107,20 @@ } ] <#else> - <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0) && ((carrier_apt.unloading_appointment =="true" && carrier_apt.load_appointment =="false") || (carrier_apt.unloading_appointment =="false" && carrier_apt.load_appointment =="true"))> [ { <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteWMSUpdateAppointment> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteForceRescheduleAppointment> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl"> } - ] - <#else> - [ - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteForceRescheduleAppointment> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl"> - } ] - @@ -138,7 +133,7 @@ <#case "D"> <#-- *********************************************** Action = Delete ******************** --> [ - <#-- Ajout des lignes--> + { <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteCancelAppointment> "apiReflexPlatformID" : "${apiReflexPlatformID}", From 0f4191012d5aa25ea5ad3b72b35236c463932aae Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 27 Jan 2026 17:12:04 +0100 Subject: [PATCH 14/87] SCPN1-10100 --- RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl index 1f65c78..caabe14 100644 --- a/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl @@ -98,8 +98,7 @@ "Commissions": [ { "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", - "ProjectID": "${projectRP}", - <#include "RFXtoRP_HsrCarrierApt_Quantities.ftl"> + "ProjectID": "${projectRP}" } ], <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> From 1c07a8dd77350e16250423db768d26f2b9327ba0 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 27 Jan 2026 18:23:15 +0100 Subject: [PATCH 15/87] SCPN1-10100 --- RFXtoRP_HsrCarrierApt.ftl | 18 ++++-- ...t_AppointmentCarrierInformationUpdated.ftl | 9 +++ ...ntCarrierInformationUpdatedToConfigure.ftl | 42 ++++++++++++++ ..._AppointmentMetadataUpdatedToConfigure.ftl | 8 +-- RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl | 57 ++++++++----------- ...RP_HsrCarrierApt_UpdateSlotAppointment.ftl | 2 +- 6 files changed, 93 insertions(+), 43 deletions(-) create mode 100644 RFXtoRP_HsrCarrierApt_AppointmentCarrierInformationUpdated.ftl create mode 100644 RFXtoRP_HsrCarrierApt_AppointmentCarrierInformationUpdatedToConfigure.ftl diff --git a/RFXtoRP_HsrCarrierApt.ftl b/RFXtoRP_HsrCarrierApt.ftl index e9c0e45..559d259 100644 --- a/RFXtoRP_HsrCarrierApt.ftl +++ b/RFXtoRP_HsrCarrierApt.ftl @@ -37,6 +37,7 @@ <#include "RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl"> }, <#include "RFXtoRP_HsrCarrierApt_AppointmentMetadataUpdated.ftl"> + <#include "RFXtoRP_HsrCarrierApt_AppointmentCarrierInformationUpdated.ftl"> <#if carrier_apt.status?? && (carrier_apt.status.status_code=="999" || carrier_apt.status.status_code=="040" || carrier_apt.status.status_code=="030")> [ { @@ -107,20 +108,25 @@ } ] <#else> + <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0) && ((carrier_apt.unloading_appointment =="true" && carrier_apt.load_appointment =="false") || (carrier_apt.unloading_appointment =="false" && carrier_apt.load_appointment =="true"))> [ { <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteWMSUpdateAppointment> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteForceRescheduleAppointment> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl"> } + ] + <#else> + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteForceRescheduleAppointment> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl"> + } ] + diff --git a/RFXtoRP_HsrCarrierApt_AppointmentCarrierInformationUpdated.ftl b/RFXtoRP_HsrCarrierApt_AppointmentCarrierInformationUpdated.ftl new file mode 100644 index 0000000..9ae2079 --- /dev/null +++ b/RFXtoRP_HsrCarrierApt_AppointmentCarrierInformationUpdated.ftl @@ -0,0 +1,9 @@ + <#-- A décommenter si besoin de les utiliser--> + <#-- Uncomment if you need to use them--> + <#--{ + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierInformationUpdated> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrCarrierApt_AppointmentCarrierInformationUpdatedToConfigure.ftl"> + }, +--> \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_AppointmentCarrierInformationUpdatedToConfigure.ftl b/RFXtoRP_HsrCarrierApt_AppointmentCarrierInformationUpdatedToConfigure.ftl new file mode 100644 index 0000000..b74a5e4 --- /dev/null +++ b/RFXtoRP_HsrCarrierApt_AppointmentCarrierInformationUpdatedToConfigure.ftl @@ -0,0 +1,42 @@ +<#-- + [ + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> + "RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", + <#else> + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + + <#else> + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> + "RefID": "${carrier_apt.appointment_reference?json_string}", + <#else> + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + + + } + "Payload": { + "ActorID": "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", + <#--To configure--> +<#-- "CarrierInformation": [ + { + "Key": "string", + "Value": { + "Bool": "true / false", + "Float": 3.1415, + "Int": 42, + "String": "Hello World !", + "Timestamp": { + "AuthorTimeZone": "Europe/Paris", + "DateTime": "2023-01-01T00:00:00Z" + } + } + ] + } +} +] +--> \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_AppointmentMetadataUpdatedToConfigure.ftl b/RFXtoRP_HsrCarrierApt_AppointmentMetadataUpdatedToConfigure.ftl index f746294..8f27a20 100644 --- a/RFXtoRP_HsrCarrierApt_AppointmentMetadataUpdatedToConfigure.ftl +++ b/RFXtoRP_HsrCarrierApt_AppointmentMetadataUpdatedToConfigure.ftl @@ -7,15 +7,15 @@ "ID": { <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", + "RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#else> - "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#else> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}", + "RefID": "${carrier_apt.appointment_reference?json_string}", <#else> - "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", } diff --git a/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl index caabe14..a345221 100644 --- a/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl @@ -50,7 +50,7 @@ <#else> <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNKNOWN> - <#assign duration = 0 /> <#-- à confirmer --> + <#assign duration = 0 /> @@ -79,42 +79,35 @@ "Value": "${carrier_apt.planned_carrier?json_string}" } ], - <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0)> - "Commissions": [ - <#list carrier_apt.physical_receipt_list?filter(l ->l??) as physical_receipt> - { - "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", - <#if physical_receipt.physical_receipt_reference?? && physical_receipt.physical_receipt_reference!=""> - "OrderID": "${physical_receipt.physical_receipt_reference?json_string}", - <#else> - "OrderID": "R${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year}${physical_receipt.receipt_number}", - - "ExecutionflowID": "R${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year?json_string}${physical_receipt.receipt_number?json_string}", - "ProjectID": "${projectRP}" - }<#sep>, - - ], - <#else> - "Commissions": [ - { - "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", - "ProjectID": "${projectRP}" - } - ], + <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0) && ((carrier_apt.unloading_appointment =="true" && carrier_apt.load_appointment =="false") || (carrier_apt.unloading_appointment =="false" && carrier_apt.load_appointment =="true"))> + "Commissions": [ + <#list carrier_apt.physical_receipt_list?filter(l ->l??) as physical_receipt> + { + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", + <#if physical_receipt.physical_receipt_reference?? && physical_receipt.physical_receipt_reference!=""> + "OrderID": "${physical_receipt.physical_receipt_reference?json_string}", + <#else> + "OrderID": "R${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year}${physical_receipt.receipt_number}", + + "ExecutionflowID": "R${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year?json_string}${physical_receipt.receipt_number?json_string}", + "ProjectID": "${projectRP}" + }<#sep>, + + ], + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> - "Reason": "UNLOADING AND LOADING / ${carrier_apt.appointment_designation?json_string}", - <#else> - <#if carrier_apt.appointment_designation?? && carrier_apt.appointment_designation!=""> - "Reason": "${carrier_apt.appointment_designation?json_string}", + "Reason": "UNLOADING AND LOADING / ${carrier_apt.appointment_designation?json_string}", <#else> - <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "Reason": "${carrier_apt.appointment_reference?json_string}", + <#if carrier_apt.appointment_designation?? && carrier_apt.appointment_designation!=""> + "Reason": "${carrier_apt.appointment_designation?json_string}", <#else> - "Reason": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> + "Reason": "${carrier_apt.appointment_reference?json_string}", + <#else> + "Reason": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + - - "Slots": [{ <#-- calcul de de la durée en fonction des start et end time--> "DurationInSeconds": "${duration}", diff --git a/RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl b/RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl index 0570db5..48fa4ea 100644 --- a/RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl @@ -49,7 +49,7 @@ <#else> <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNKNOWN> - <#assign duration = 0 /> <#-- à confirmer --> + <#assign duration = 0 /> From 944f3a2da58991e8cd99b59d3109d07657d47acb Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 27 Jan 2026 18:32:34 +0100 Subject: [PATCH 16/87] SCPN1-10100 --- RFXtoRP_HsrCarrierApt.ftl | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt.ftl b/RFXtoRP_HsrCarrierApt.ftl index 559d259..ba56e95 100644 --- a/RFXtoRP_HsrCarrierApt.ftl +++ b/RFXtoRP_HsrCarrierApt.ftl @@ -108,25 +108,20 @@ } ] <#else> - <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0) && ((carrier_apt.unloading_appointment =="true" && carrier_apt.load_appointment =="false") || (carrier_apt.unloading_appointment =="false" && carrier_apt.load_appointment =="true"))> [ { <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteWMSUpdateAppointment> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteForceRescheduleAppointment> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl"> } - ] - <#else> - [ - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteForceRescheduleAppointment> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl"> - } ] - From 264257fcd07ce654ff6c353671e461e2e4f0f3d3 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 27 Jan 2026 18:39:34 +0100 Subject: [PATCH 17/87] SCPN1-10100 --- RFXtoRP_HsrCarrierApt.ftl | 17 +++++++++++------ RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl | 4 ++-- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt.ftl b/RFXtoRP_HsrCarrierApt.ftl index ba56e95..559d259 100644 --- a/RFXtoRP_HsrCarrierApt.ftl +++ b/RFXtoRP_HsrCarrierApt.ftl @@ -108,20 +108,25 @@ } ] <#else> + <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0) && ((carrier_apt.unloading_appointment =="true" && carrier_apt.load_appointment =="false") || (carrier_apt.unloading_appointment =="false" && carrier_apt.load_appointment =="true"))> [ { <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteWMSUpdateAppointment> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteForceRescheduleAppointment> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl"> } + ] + <#else> + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteForceRescheduleAppointment> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl"> + } ] + diff --git a/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl index a345221..6cf23f5 100644 --- a/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl @@ -95,7 +95,7 @@ ], - <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> + <#--<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> "Reason": "UNLOADING AND LOADING / ${carrier_apt.appointment_designation?json_string}", <#else> <#if carrier_apt.appointment_designation?? && carrier_apt.appointment_designation!=""> @@ -107,7 +107,7 @@ "Reason": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", - + --> "Slots": [{ <#-- calcul de de la durée en fonction des start et end time--> "DurationInSeconds": "${duration}", From 04a72fcda41a6034b1cedbe884f6b1a227d8a8c0 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 28 Jan 2026 11:51:58 +0100 Subject: [PATCH 18/87] SCPN1-10100 --- RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl | 8 ++++++++ RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl | 14 ++++++++++++-- RPtoRFX_AppointmentEvent.ftl | 3 ++- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl index 8ea9242..a8bdd1f 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl @@ -75,6 +75,14 @@ { "Key": "carrier", "Value": "${carrier_apt.planned_carrier?json_string}" + }, + { + "Key": "loading", + "Value": "${carrier_apt.load_appointment?json_string}" + }, + { + "Key": "unloading", + "Value": "${carrier_apt.unloading_appointment?json_string}" } ], <#include "RFXtoRP_HsrCarrierApt_SegmentationSelections.ftl">, diff --git a/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl index 6cf23f5..9fcc9f2 100644 --- a/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl @@ -77,6 +77,14 @@ { "Key": "carrier", "Value": "${carrier_apt.planned_carrier?json_string}" + }, + { + "Key": "loading", + "Value": "${carrier_apt.load_appointment?json_string}" + }, + { + "Key": "unloading", + "Value": "${carrier_apt.unloading_appointment?json_string}" } ], <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0) && ((carrier_apt.unloading_appointment =="true" && carrier_apt.load_appointment =="false") || (carrier_apt.unloading_appointment =="false" && carrier_apt.load_appointment =="true"))> @@ -94,8 +102,8 @@ }<#sep>, ], - - <#--<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> + <#else> + <#--<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> "Reason": "UNLOADING AND LOADING / ${carrier_apt.appointment_designation?json_string}", <#else> <#if carrier_apt.appointment_designation?? && carrier_apt.appointment_designation!=""> @@ -108,6 +116,8 @@ --> + + "Slots": [{ <#-- calcul de de la durée en fonction des start et end time--> "DurationInSeconds": "${duration}", diff --git a/RPtoRFX_AppointmentEvent.ftl b/RPtoRFX_AppointmentEvent.ftl index 8d0692a..7fd725d 100644 --- a/RPtoRFX_AppointmentEvent.ftl +++ b/RPtoRFX_AppointmentEvent.ftl @@ -84,9 +84,10 @@ ] <#break> -<#-- *********************************************** Action = SlotUpdated or CarrierInformationUpdated ******************** --> +<#-- *********************************************** Action = SlotUpdated or CarrierInformationUpdated or ReasonUpdated******************** --> <#case "SlotUpdated"> <#case "CarrierInformationUpdated"> + <#case "ReasonUpdated"> <#assign appointment = eventRP.data /> [ <#if eventRP.appointmentCustomFields?has_content> From 8d4eb4ec4cfb72a0cf6c5d157898697475cdce6f Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 28 Jan 2026 14:39:01 +0100 Subject: [PATCH 19/87] SCPN1-10100 --- RFXtoRP_HsrCarrierApt.ftl | 8 ++------ RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl | 5 ++--- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt.ftl b/RFXtoRP_HsrCarrierApt.ftl index 559d259..d66de54 100644 --- a/RFXtoRP_HsrCarrierApt.ftl +++ b/RFXtoRP_HsrCarrierApt.ftl @@ -108,17 +108,14 @@ } ] <#else> - <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0) && ((carrier_apt.unloading_appointment =="true" && carrier_apt.load_appointment =="false") || (carrier_apt.unloading_appointment =="false" && carrier_apt.load_appointment =="true"))> + [ { <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteWMSUpdateAppointment> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl"> - } - ] - <#else> - [ + }, { <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteForceRescheduleAppointment> "apiReflexPlatformID" : "${apiReflexPlatformID}", @@ -126,7 +123,6 @@ <#include "RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl"> } ] - diff --git a/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl index 9fcc9f2..2d5cf78 100644 --- a/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl @@ -103,7 +103,7 @@ ], <#else> - <#--<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> "Reason": "UNLOADING AND LOADING / ${carrier_apt.appointment_designation?json_string}", <#else> <#if carrier_apt.appointment_designation?? && carrier_apt.appointment_designation!=""> @@ -115,9 +115,8 @@ "Reason": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", - --> + - "Slots": [{ <#-- calcul de de la durée en fonction des start et end time--> "DurationInSeconds": "${duration}", From 1772ed970bb546a895e4337dc65e38cba0f6ebbe Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 28 Jan 2026 14:48:31 +0100 Subject: [PATCH 20/87] SCPN1-10100 --- RFXtoRP_HsrCarrierApt.ftl | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt.ftl b/RFXtoRP_HsrCarrierApt.ftl index d66de54..91273ec 100644 --- a/RFXtoRP_HsrCarrierApt.ftl +++ b/RFXtoRP_HsrCarrierApt.ftl @@ -108,20 +108,13 @@ } ] <#else> - [ { <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteWMSUpdateAppointment> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteForceRescheduleAppointment> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl"> - } + } ] From 456b3048790adf8ff94c2d5ad00763bfe9f4012a Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 28 Jan 2026 16:34:14 +0100 Subject: [PATCH 21/87] SCPN1-10100 --- ..._HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl b/RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl index 795d001..3ef5331 100644 --- a/RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl +++ b/RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl @@ -42,8 +42,16 @@ { "Key": "carrier", "Value": "${carrier_apt.planned_carrier?json_string}" - } - ] + }, + { + "Key": "loading", + "Value": "${carrier_apt.load_appointment?json_string}" + }, + { + "Key": "unloading", + "Value": "${carrier_apt.unloading_appointment?json_string}" + } + ] }, "Payload":{ "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" From 24d7ad81bdc3d88f0a642b1d679ee0068b5497d0 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 28 Jan 2026 16:43:49 +0100 Subject: [PATCH 22/87] SCPN1-10100 --- RPtoRFX_CarrierAppointmentReasonUpdatedByNumber.ftl | 6 ++---- RPtoRFX_CarrierAppointmentReasonUpdatedByRef.ftl | 6 ++---- ...erAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl | 6 ++---- ...rrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl | 6 ++---- 4 files changed, 8 insertions(+), 16 deletions(-) diff --git a/RPtoRFX_CarrierAppointmentReasonUpdatedByNumber.ftl b/RPtoRFX_CarrierAppointmentReasonUpdatedByNumber.ftl index be6e241..171d33a 100644 --- a/RPtoRFX_CarrierAppointmentReasonUpdatedByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentReasonUpdatedByNumber.ftl @@ -9,10 +9,10 @@ }, "payload" : { + "unloading_appointment" : "${eventRP.appointmentCustomFields.unloading?json_string}",, + "load_appointment" : "${eventRP.appointmentCustomFields.loading?json_string}", <#switch appointment.AppointmentType> <#case "APPOINTMENT_TYPE_LOADING"> - "unloading_appointment" : "false", - "load_appointment" : "true", <#if appointment.TimeZone?? && appointment.TimeZone!=""> "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", @@ -22,8 +22,6 @@ <#break> <#case "APPOINTMENT_TYPE_UNLOADING"> - "unloading_appointment" : "true", - "load_appointment" : "false", <#if appointment.TimeZone?? && appointment.TimeZone!=""> "planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", "planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", diff --git a/RPtoRFX_CarrierAppointmentReasonUpdatedByRef.ftl b/RPtoRFX_CarrierAppointmentReasonUpdatedByRef.ftl index 90a726d..9acad81 100644 --- a/RPtoRFX_CarrierAppointmentReasonUpdatedByRef.ftl +++ b/RPtoRFX_CarrierAppointmentReasonUpdatedByRef.ftl @@ -8,10 +8,10 @@ }, "payload" : { + "unloading_appointment" : "${eventRP.appointmentCustomFields.unloading?json_string}",, + "load_appointment" : "${eventRP.appointmentCustomFields.loading?json_string}", <#switch appointment.AppointmentType> <#case "APPOINTMENT_TYPE_LOADING"> - "unloading_appointment" : "false", - "load_appointment" : "true", <#if appointment.TimeZone?? && appointment.TimeZone!=""> "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", @@ -21,8 +21,6 @@ <#break> <#case "APPOINTMENT_TYPE_UNLOADING"> - "unloading_appointment" : "true", - "load_appointment" : "false", <#if appointment.TimeZone?? && appointment.TimeZone!=""> "planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", "planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", diff --git a/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl b/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl index 9c61263..b6144e1 100644 --- a/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl @@ -10,10 +10,10 @@ "payload" : { <#include "RPtoRFX_CarrierAppointmentDataUpdated.ftl"> + "unloading_appointment" : "${eventRP.appointmentCustomFields.unloading?json_string}",, + "load_appointment" : "${eventRP.appointmentCustomFields.loading?json_string}", <#switch appointment.AppointmentType> <#case "APPOINTMENT_TYPE_LOADING"> - "unloading_appointment" : "false", - "load_appointment" : "true", <#if appointment.TimeZone?? && appointment.TimeZone!=""> "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", @@ -23,8 +23,6 @@ <#break> <#case "APPOINTMENT_TYPE_UNLOADING"> - "unloading_appointment" : "true", - "load_appointment" : "false", <#if appointment.TimeZone?? && appointment.TimeZone!=""> "planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", "planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", diff --git a/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl b/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl index 8c9f571..dc24e75 100644 --- a/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl +++ b/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl @@ -9,10 +9,10 @@ "payload" : { <#include "RPtoRFX_CarrierAppointmentDataUpdated.ftl"> + "unloading_appointment" : "${eventRP.appointmentCustomFields.unloading?json_string}",, + "load_appointment" : "${eventRP.appointmentCustomFields.loading?json_string}", <#switch appointment.AppointmentType> <#case "APPOINTMENT_TYPE_LOADING"> - "unloading_appointment" : "false", - "load_appointment" : "true", <#if appointment.TimeZone?? && appointment.TimeZone!=""> "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", @@ -22,8 +22,6 @@ <#break> <#case "APPOINTMENT_TYPE_UNLOADING"> - "unloading_appointment" : "true", - "load_appointment" : "false", <#if appointment.TimeZone?? && appointment.TimeZone!=""> "planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", "planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", From 5b316bb395d1b848338f7e1b1cdcd71989c9a495 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 28 Jan 2026 16:55:00 +0100 Subject: [PATCH 23/87] SCPN1-10100 --- RPtoRFX_CarrierAppointmentReasonUpdatedByNumber.ftl | 2 +- RPtoRFX_CarrierAppointmentReasonUpdatedByRef.ftl | 2 +- ...arrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl | 2 +- ...X_CarrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/RPtoRFX_CarrierAppointmentReasonUpdatedByNumber.ftl b/RPtoRFX_CarrierAppointmentReasonUpdatedByNumber.ftl index 171d33a..7a57906 100644 --- a/RPtoRFX_CarrierAppointmentReasonUpdatedByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentReasonUpdatedByNumber.ftl @@ -9,7 +9,7 @@ }, "payload" : { - "unloading_appointment" : "${eventRP.appointmentCustomFields.unloading?json_string}",, + "unloading_appointment" : "${eventRP.appointmentCustomFields.unloading?json_string}", "load_appointment" : "${eventRP.appointmentCustomFields.loading?json_string}", <#switch appointment.AppointmentType> <#case "APPOINTMENT_TYPE_LOADING"> diff --git a/RPtoRFX_CarrierAppointmentReasonUpdatedByRef.ftl b/RPtoRFX_CarrierAppointmentReasonUpdatedByRef.ftl index 9acad81..325650a 100644 --- a/RPtoRFX_CarrierAppointmentReasonUpdatedByRef.ftl +++ b/RPtoRFX_CarrierAppointmentReasonUpdatedByRef.ftl @@ -8,7 +8,7 @@ }, "payload" : { - "unloading_appointment" : "${eventRP.appointmentCustomFields.unloading?json_string}",, + "unloading_appointment" : "${eventRP.appointmentCustomFields.unloading?json_string}", "load_appointment" : "${eventRP.appointmentCustomFields.loading?json_string}", <#switch appointment.AppointmentType> <#case "APPOINTMENT_TYPE_LOADING"> diff --git a/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl b/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl index b6144e1..21333a8 100644 --- a/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl @@ -10,7 +10,7 @@ "payload" : { <#include "RPtoRFX_CarrierAppointmentDataUpdated.ftl"> - "unloading_appointment" : "${eventRP.appointmentCustomFields.unloading?json_string}",, + "unloading_appointment" : "${eventRP.appointmentCustomFields.unloading?json_string}", "load_appointment" : "${eventRP.appointmentCustomFields.loading?json_string}", <#switch appointment.AppointmentType> <#case "APPOINTMENT_TYPE_LOADING"> diff --git a/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl b/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl index dc24e75..870fc50 100644 --- a/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl +++ b/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl @@ -9,7 +9,7 @@ "payload" : { <#include "RPtoRFX_CarrierAppointmentDataUpdated.ftl"> - "unloading_appointment" : "${eventRP.appointmentCustomFields.unloading?json_string}",, + "unloading_appointment" : "${eventRP.appointmentCustomFields.unloading?json_string}", "load_appointment" : "${eventRP.appointmentCustomFields.loading?json_string}", <#switch appointment.AppointmentType> <#case "APPOINTMENT_TYPE_LOADING"> From 650990b0452162a6f30b9fddb847d50d475256c8 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 30 Jan 2026 16:02:20 +0100 Subject: [PATCH 24/87] SCPN1-10100 --- RPtoRFX_CarrierAppointmentReasonUpdatedByRef.ftl | 6 ++++-- ...rrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/RPtoRFX_CarrierAppointmentReasonUpdatedByRef.ftl b/RPtoRFX_CarrierAppointmentReasonUpdatedByRef.ftl index 325650a..00595f4 100644 --- a/RPtoRFX_CarrierAppointmentReasonUpdatedByRef.ftl +++ b/RPtoRFX_CarrierAppointmentReasonUpdatedByRef.ftl @@ -8,10 +8,10 @@ }, "payload" : { - "unloading_appointment" : "${eventRP.appointmentCustomFields.unloading?json_string}", - "load_appointment" : "${eventRP.appointmentCustomFields.loading?json_string}", <#switch appointment.AppointmentType> <#case "APPOINTMENT_TYPE_LOADING"> + "unloading_appointment" : "false", + "load_appointment" : "true", <#if appointment.TimeZone?? && appointment.TimeZone!=""> "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", @@ -21,6 +21,8 @@ <#break> <#case "APPOINTMENT_TYPE_UNLOADING"> + "unloading_appointment" : "true", + "load_appointment" : "false", <#if appointment.TimeZone?? && appointment.TimeZone!=""> "planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", "planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", diff --git a/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl b/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl index 870fc50..8c9f571 100644 --- a/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl +++ b/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl @@ -9,10 +9,10 @@ "payload" : { <#include "RPtoRFX_CarrierAppointmentDataUpdated.ftl"> - "unloading_appointment" : "${eventRP.appointmentCustomFields.unloading?json_string}", - "load_appointment" : "${eventRP.appointmentCustomFields.loading?json_string}", <#switch appointment.AppointmentType> <#case "APPOINTMENT_TYPE_LOADING"> + "unloading_appointment" : "false", + "load_appointment" : "true", <#if appointment.TimeZone?? && appointment.TimeZone!=""> "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", @@ -22,6 +22,8 @@ <#break> <#case "APPOINTMENT_TYPE_UNLOADING"> + "unloading_appointment" : "true", + "load_appointment" : "false", <#if appointment.TimeZone?? && appointment.TimeZone!=""> "planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", "planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", From 95f07b1ae0959aee55b98fc066984b4c46934c2e Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 2 Feb 2026 11:25:32 +0100 Subject: [PATCH 25/87] SCPN1-10100 --- ...RP_HsrCarrierApt_UpdateSlotAppointment.ftl | 84 ------------------- 1 file changed, 84 deletions(-) delete mode 100644 RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl diff --git a/RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl b/RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl deleted file mode 100644 index 48fa4ea..0000000 --- a/RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl +++ /dev/null @@ -1,84 +0,0 @@ -[ - { - <#assign creation_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.creation_datetime,time_zone_rfx) /> - "Header":{ - "ProjectID": "${projectRP}" - }, - <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> - <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", - <#else> - "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", - - <#else> - <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}", - <#else> - "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", - - - "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", - <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false"> - <#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") || carrier_apt.planned_unloading_end_datetime?starts_with("00") || carrier_apt.planned_unloading_end_datetime?contains("-00-")> - <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend is not initialized" > - - <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNLOADING> - <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_unloading_end_datetime?datetime.iso) /> - <#if (duration <= 0)> - <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" > - - <#else> - <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" > - <#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-") || carrier_apt.planned_load_end_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?contains("-00-")> - <#stop "planned_load_start_datetime or planned_load_end_datetime field of appointmend is not initialized" > - - <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_LOADING> - <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_load_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) /> - <#if (duration <= 0)> - <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" > - - <#else> - <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> - <#if carrier_apt.planned_load_end_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?contains("-00-") || carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") > - <#stop "planned_unloading_start_datetime or planned_load_end_datetime field of appointmend is not initialized" > - - <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNLOADING> - <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) /> - <#if (duration <= 0)> - <#stop "planned_unloading_start_datetime or planned_load_end_datetime field of appointmend are not valid" > - - <#else> - <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNKNOWN> - <#assign duration = 0 /> - - - - "Slots": [{ - <#-- calcul de de la durée en fonction des start et end time--> - "DurationInSeconds": "${duration}", - <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false" > - <#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-")> - <#stop "planned_unloading_start_datetime field of appointmend is not initialized" > - - "StartDateTime": "${carrier_apt.planned_unloading_start_datetime}" - <#else> - <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true"> - <#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-")> - <#stop "planned_load_start_datetime field of appointmend is not initialized" > - - "StartDateTime": "${carrier_apt.planned_load_start_datetime}" - <#else> - <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> - <#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-")> - <#stop "planned_unloading_start_datetime field of appointmend is not initialized" > - - "StartDateTime": "${carrier_apt.planned_unloading_start_datetime}" - <#else> - <#stop "Appointment type not supported" > - - - - }] - - } -] \ No newline at end of file From cb59aa28b599fc0f80df7a2f2cd2aa364c936868 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Fri, 13 Feb 2026 10:48:40 +0100 Subject: [PATCH 26/87] SCPN1-9965 --- RPtoRFX_CarrierAppointmentCreated.ftl | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/RPtoRFX_CarrierAppointmentCreated.ftl b/RPtoRFX_CarrierAppointmentCreated.ftl index a6ce97d..93cac18 100644 --- a/RPtoRFX_CarrierAppointmentCreated.ftl +++ b/RPtoRFX_CarrierAppointmentCreated.ftl @@ -1,4 +1,10 @@ { + <#assign appointmentPathURL = JsonUtil.getAppointmentPathURL(eventRP.site,eventRP.refid)> + <#assign payLoad = '{ "Header": {"ProjectID": "${projectRP!""}"},,"IsOnce": false,"IsPublic": true,"TimeToLive": "0","URL": "${appointmentPathURL}"}' /> + <#assign projectGetTinyURL = QueryApiReflexPlatformID.ProjectGetTinyURL> + <#assign response = QueryApiReflexPlatformCall.call(projectGetTinyURL,payLoad) /> + <#assign tinyURL = JsonUtil.jsonToMap(response)> + "id" : {"refid" : "${eventRP.refid?json_string}","actorID":"${RPtoRFXprefixDepot(eventRP.actor)}"}, "route" : "rest/public/v1/physical_depots/{physical_depot_code}/carrier_appointments", "method" : "POST", @@ -7,6 +13,16 @@ }, "payload" : { + <#if tinyURL?? && tinyURL.TinyURL?? > + "comment_list": [ + { + "line_number": 1, + "group_code": "SCN", + "text": "${tinyURL.TinyURL.URL?json_string}" + } + ], + + "appointment_reference": "${eventRP.refid?json_string}", <#switch appointment.AppointmentType> <#case "APPOINTMENT_TYPE_LOADING"> From 71bd4918a9f1bec467a3ab071cf03bb0ee38f67e Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Fri, 13 Feb 2026 10:58:13 +0100 Subject: [PATCH 27/87] SCPN1-9965 (cherry picked from commit 7c4c7ea3957fce0e8d643a463f77b4cb888e8df9) --- RPtoRFX_CarrierAppointmentCreated.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RPtoRFX_CarrierAppointmentCreated.ftl b/RPtoRFX_CarrierAppointmentCreated.ftl index 93cac18..68de19d 100644 --- a/RPtoRFX_CarrierAppointmentCreated.ftl +++ b/RPtoRFX_CarrierAppointmentCreated.ftl @@ -1,6 +1,6 @@ { <#assign appointmentPathURL = JsonUtil.getAppointmentPathURL(eventRP.site,eventRP.refid)> - <#assign payLoad = '{ "Header": {"ProjectID": "${projectRP!""}"},,"IsOnce": false,"IsPublic": true,"TimeToLive": "0","URL": "${appointmentPathURL}"}' /> + <#assign payLoad = '{ "Header": {"ProjectID": "${projectRP!""}"},"IsOnce": false,"IsPublic": true,"TimeToLive": "0","URL": "${appointmentPathURL}"}' /> <#assign projectGetTinyURL = QueryApiReflexPlatformID.ProjectGetTinyURL> <#assign response = QueryApiReflexPlatformCall.call(projectGetTinyURL,payLoad) /> <#assign tinyURL = JsonUtil.jsonToMap(response)> From e24e537650f4f24e4118a52109d52dd8a954fc1b Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Mon, 16 Feb 2026 11:48:56 +0100 Subject: [PATCH 28/87] SCPN1-9965 --- RPtoRFX_CarrierAppointmentCreated.ftl | 16 ---------------- RPtoRFX_CarrierAppointmentDefaultData.ftl | 22 +++++++++++++++++++++- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/RPtoRFX_CarrierAppointmentCreated.ftl b/RPtoRFX_CarrierAppointmentCreated.ftl index 68de19d..a6ce97d 100644 --- a/RPtoRFX_CarrierAppointmentCreated.ftl +++ b/RPtoRFX_CarrierAppointmentCreated.ftl @@ -1,10 +1,4 @@ { - <#assign appointmentPathURL = JsonUtil.getAppointmentPathURL(eventRP.site,eventRP.refid)> - <#assign payLoad = '{ "Header": {"ProjectID": "${projectRP!""}"},"IsOnce": false,"IsPublic": true,"TimeToLive": "0","URL": "${appointmentPathURL}"}' /> - <#assign projectGetTinyURL = QueryApiReflexPlatformID.ProjectGetTinyURL> - <#assign response = QueryApiReflexPlatformCall.call(projectGetTinyURL,payLoad) /> - <#assign tinyURL = JsonUtil.jsonToMap(response)> - "id" : {"refid" : "${eventRP.refid?json_string}","actorID":"${RPtoRFXprefixDepot(eventRP.actor)}"}, "route" : "rest/public/v1/physical_depots/{physical_depot_code}/carrier_appointments", "method" : "POST", @@ -13,16 +7,6 @@ }, "payload" : { - <#if tinyURL?? && tinyURL.TinyURL?? > - "comment_list": [ - { - "line_number": 1, - "group_code": "SCN", - "text": "${tinyURL.TinyURL.URL?json_string}" - } - ], - - "appointment_reference": "${eventRP.refid?json_string}", <#switch appointment.AppointmentType> <#case "APPOINTMENT_TYPE_LOADING"> diff --git a/RPtoRFX_CarrierAppointmentDefaultData.ftl b/RPtoRFX_CarrierAppointmentDefaultData.ftl index 93b4aa7..f4a57b4 100644 --- a/RPtoRFX_CarrierAppointmentDefaultData.ftl +++ b/RPtoRFX_CarrierAppointmentDefaultData.ftl @@ -18,4 +18,24 @@ Timestamp : .Timestamp.DateTime or .Timestamp.AuthorTimeZone Int : .Int String : .String ---> \ No newline at end of file +--> + +<#-- Note : you can send url path of appointment to WMS, using this below code --> + +<#-- + <#assign appointmentPathURL = JsonUtil.getAppointmentPathURL(eventRP.site,eventRP.refid)> + <#assign payLoad = '{ "Header": {"ProjectID": "${projectRP!""}"},"IsOnce": false,"IsPublic": true,"TimeToLive": "0","URL": "${appointmentPathURL}"}' /> + <#assign projectGetTinyURL = QueryApiReflexPlatformID.ProjectGetTinyURL> + <#assign response = QueryApiReflexPlatformCall.call(projectGetTinyURL,payLoad) /> + <#assign tinyURL = JsonUtil.jsonToMap(response)> + + <#if tinyURL?? && tinyURL.TinyURL?? > + "comment_list": [ + { + "line_number": 1, + "group_code": "SCN", + "text": "${tinyURL.TinyURL.URL?json_string}" + } + ], + +--> \ No newline at end of file From c3364d77a28c419ecc5bf6d69e216cb0d78edfcb Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 16 Feb 2026 17:11:48 +0100 Subject: [PATCH 29/87] SCPN1-10244 --- ...pointmentCarrierInformationUpdatedToConfigure.ftl | 12 ++++++------ ...rierApt_AppointmentMetadataUpdatedToConfigure.ftl | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt_AppointmentCarrierInformationUpdatedToConfigure.ftl b/RFXtoRP_HsrCarrierApt_AppointmentCarrierInformationUpdatedToConfigure.ftl index b74a5e4..eba9475 100644 --- a/RFXtoRP_HsrCarrierApt_AppointmentCarrierInformationUpdatedToConfigure.ftl +++ b/RFXtoRP_HsrCarrierApt_AppointmentCarrierInformationUpdatedToConfigure.ftl @@ -7,20 +7,20 @@ "ID": { <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", + "RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}" <#else> - "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}" <#else> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "RefID": "${carrier_apt.appointment_reference?json_string}", + "RefID": "${carrier_apt.appointment_reference?json_string}" <#else> - "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}" - } + }, "Payload": { - "ActorID": "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", <#--To configure--> <#-- "CarrierInformation": [ { diff --git a/RFXtoRP_HsrCarrierApt_AppointmentMetadataUpdatedToConfigure.ftl b/RFXtoRP_HsrCarrierApt_AppointmentMetadataUpdatedToConfigure.ftl index 8f27a20..1c4c5d1 100644 --- a/RFXtoRP_HsrCarrierApt_AppointmentMetadataUpdatedToConfigure.ftl +++ b/RFXtoRP_HsrCarrierApt_AppointmentMetadataUpdatedToConfigure.ftl @@ -7,20 +7,20 @@ "ID": { <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", + "RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}" <#else> - "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}" <#else> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "RefID": "${carrier_apt.appointment_reference?json_string}", + "RefID": "${carrier_apt.appointment_reference?json_string}" <#else> - "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}" - } + }, "Payload": { - "ActorID": "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", <#--To configure--> <#-- "MetaData": [ { From dca0fa7fe46ee4aff6604bf1a0934a6b09a6f929 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Fri, 20 Feb 2026 13:52:18 +0100 Subject: [PATCH 30/87] SCPN1-10276 --- RPtoRFX_AppointmentEvent.ftl | 133 +++++++++++++++++++++-------------- 1 file changed, 79 insertions(+), 54 deletions(-) diff --git a/RPtoRFX_AppointmentEvent.ftl b/RPtoRFX_AppointmentEvent.ftl index 7fd725d..647d16b 100644 --- a/RPtoRFX_AppointmentEvent.ftl +++ b/RPtoRFX_AppointmentEvent.ftl @@ -24,72 +24,95 @@ ] <#break> <#-- *********************************************** Action = CommissionsUpdated ******************** --> - <#case "CommissionsUpdated"> + <#case "Updated"> + <#assign AddComma = false /> <#assign appointment = eventRP.data /> - [ <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING"> - <#if eventRP.addedCommissions?? && eventRP.addedCommissions!=""> - <#if eventRP.appointmentCustomFields?has_content> - { - <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_number> - "apiRestReflexID" : "${apiRestReflexID}", - "datas" : - <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl"> - } - <#else> - { - <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_ref> - "apiRestReflexID" : "${apiRestReflexID}", - "datas" : - <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl"> - } - - - <#if eventRP.removedCommissions?? && eventRP.removedCommissions!=""> - <#if eventRP.addedCommissions?? && eventRP.addedCommissions!=""> - , - - - <#if eventRP.appointmentCustomFields?has_content> - { - <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_dissociations_by_number> - "apiRestReflexID" : "${apiRestReflexID}", - "datas" : - <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByNumber.ftl"> - } - <#else> - { - <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_dissociations_by_ref> - "apiRestReflexID" : "${apiRestReflexID}", - "datas" : - <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl"> - } - - - <#else> + [ + <#if eventRP.commissionsUpdated> + <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING" && eventRP.addedUnloadCommissions?? && eventRP.addedCaddedUnloadCommissionsommissions!=""> <#if eventRP.appointmentCustomFields?has_content> { - <#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_number> + <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_number> "apiRestReflexID" : "${apiRestReflexID}", "datas" : - <#include "RPtoRFX_CarrierAppointmentReasonUpdatedByNumber.ftl"> + <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl"> } <#else> { - <#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_ref> + <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_ref> "apiRestReflexID" : "${apiRestReflexID}", "datas" : - <#include "RPtoRFX_CarrierAppointmentReasonUpdatedByRef.ftl"> + <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl"> } + <#assign AddComma = true /> + + <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING" && eventRP.removedUnloadCommissions?? && eventRP.removedCaddedUnloadCommissionsommissions!=""> + <#if AddComma == true> + , + + + <#if eventRP.appointmentCustomFields?has_content> + { + <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_dissociations_by_number> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : + <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByNumber.ftl"> + } + <#else> + { + <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_dissociations_by_ref> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : + <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl"> + } + + <#assign AddComma = true /> + + <#if appointment.AppointmentType == "APPOINTMENT_TYPE_LOADING" && eventRP.addedloadCommissions?? && eventRP.addedCaddedloadCommissionsommissions!=""> + <#if eventRP.appointmentCustomFields?has_content> + { + <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_number> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : + <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl"> + } + <#else> + { + <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_ref> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : + <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl"> + } + + <#assign AddComma = true /> + + <#if appointment.AppointmentType == "APPOINTMENT_TYPE_LOADING" && eventRP.removedloadCommissions?? && eventRP.removedCaddedloadCommissionsommissions!=""> + <#if AddComma == true> + , + + <#if eventRP.appointmentCustomFields?has_content> + { + <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_dissociations_by_number> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : + <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByNumber.ftl"> + } + <#else> + { + <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_dissociations_by_ref> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : + <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl"> + } + + <#assign AddComma = true /> + + + <#if eventRP.reasonUpdated || eventRP.slotUpdated || eventRP.carrierInformationUpdated> + <#if AddComma == true> + , - ] - <#break> -<#-- *********************************************** Action = SlotUpdated or CarrierInformationUpdated or ReasonUpdated******************** --> - <#case "SlotUpdated"> - <#case "CarrierInformationUpdated"> - <#case "ReasonUpdated"> - <#assign appointment = eventRP.data /> - [ <#if eventRP.appointmentCustomFields?has_content> { <#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_number> @@ -105,7 +128,9 @@ <#include "RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl"> } - ] + <#assign AddComma = true /> + + ] <#break> <#-- *********************************************** Action = Canceled ******************** --> <#case "Canceled"> From d2b5eeafdfb131c241048a19c7548ab8617bc87e Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 24 Feb 2026 09:37:32 +0100 Subject: [PATCH 31/87] SCPN1-10276 --- RPtoRFX_AppointmentEvent.ftl | 47 +++--------------------------------- 1 file changed, 4 insertions(+), 43 deletions(-) diff --git a/RPtoRFX_AppointmentEvent.ftl b/RPtoRFX_AppointmentEvent.ftl index 647d16b..4179557 100644 --- a/RPtoRFX_AppointmentEvent.ftl +++ b/RPtoRFX_AppointmentEvent.ftl @@ -11,7 +11,7 @@ <#assign organisationRP = organisation> <#switch eventRP.event> -<#-- *********************************************** Action = CREATE or UPDATE ******************** --> +<#-- *********************************************** Action = CREATE ******************** --> <#case "Created"> <#assign appointment = eventRP.data /> [ @@ -29,7 +29,7 @@ <#assign appointment = eventRP.data /> [ <#if eventRP.commissionsUpdated> - <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING" && eventRP.addedUnloadCommissions?? && eventRP.addedCaddedUnloadCommissionsommissions!=""> + <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING" && eventRP.addedUnloadCommissions?? && eventRP.addedUnloadCommissions != ""> <#if eventRP.appointmentCustomFields?has_content> { <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_number> @@ -47,7 +47,7 @@ <#assign AddComma = true /> - <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING" && eventRP.removedUnloadCommissions?? && eventRP.removedCaddedUnloadCommissionsommissions!=""> + <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING" && eventRP.removedUnloadCommissions?? && eventRP.removedUnloadCommissions!=""> <#if AddComma == true> , @@ -69,46 +69,7 @@ <#assign AddComma = true /> - <#if appointment.AppointmentType == "APPOINTMENT_TYPE_LOADING" && eventRP.addedloadCommissions?? && eventRP.addedCaddedloadCommissionsommissions!=""> - <#if eventRP.appointmentCustomFields?has_content> - { - <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_number> - "apiRestReflexID" : "${apiRestReflexID}", - "datas" : - <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl"> - } - <#else> - { - <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_ref> - "apiRestReflexID" : "${apiRestReflexID}", - "datas" : - <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl"> - } - - <#assign AddComma = true /> - - <#if appointment.AppointmentType == "APPOINTMENT_TYPE_LOADING" && eventRP.removedloadCommissions?? && eventRP.removedCaddedloadCommissionsommissions!=""> - <#if AddComma == true> - , - - <#if eventRP.appointmentCustomFields?has_content> - { - <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_dissociations_by_number> - "apiRestReflexID" : "${apiRestReflexID}", - "datas" : - <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByNumber.ftl"> - } - <#else> - { - <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_dissociations_by_ref> - "apiRestReflexID" : "${apiRestReflexID}", - "datas" : - <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl"> - } - - <#assign AddComma = true /> - - +<#-- *********************************************** Action = reasonUpdated or slotUpdated ******************** --> <#if eventRP.reasonUpdated || eventRP.slotUpdated || eventRP.carrierInformationUpdated> <#if AddComma == true> , From c561f9674bb5fb34ea0d606359cc16d44a13a473 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 24 Feb 2026 11:37:02 +0100 Subject: [PATCH 32/87] SCPN1-10294 --- RFXtoRP_HsaItm_ItemCreated.ftl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RFXtoRP_HsaItm_ItemCreated.ftl b/RFXtoRP_HsaItm_ItemCreated.ftl index 4433f6e..ecfee3d 100644 --- a/RFXtoRP_HsaItm_ItemCreated.ftl +++ b/RFXtoRP_HsaItm_ItemCreated.ftl @@ -24,9 +24,9 @@ <#include "RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl"> <#-- Item Photo URI could be added here --> - <#if item.url?? && item.url!=""> + <#if item.saved_picture_path?? && item.saved_picture_path!=""> , - "PhotoURI": "${item.url?json_string}" + "PhotoURI": "${item.saved_picture_path?json_string}" <#-- Loop for the Logistical Variants - LV --> From 7bb190e4f558d57742810b9bf17cb41b9271e0c4 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 24 Feb 2026 15:04:36 +0100 Subject: [PATCH 33/87] SCPN1-10294 --- RFXtoRP_HsaItm_ItemCreated.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_HsaItm_ItemCreated.ftl b/RFXtoRP_HsaItm_ItemCreated.ftl index ecfee3d..e7cb4bc 100644 --- a/RFXtoRP_HsaItm_ItemCreated.ftl +++ b/RFXtoRP_HsaItm_ItemCreated.ftl @@ -24,7 +24,7 @@ <#include "RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl"> <#-- Item Photo URI could be added here --> - <#if item.saved_picture_path?? && item.saved_picture_path!=""> + <#if item.saved_picture_path?? && item.saved_picture_path!="" && item.saved_picture_path?starts_with("http") == true> , "PhotoURI": "${item.saved_picture_path?json_string}" From b1527f9e7efcd4e2b8219e2ff467b409c4200e48 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 25 Feb 2026 11:04:29 +0100 Subject: [PATCH 34/87] SCPN1-10294 --- RFXtoRP_HsaItm_ItemCreated.ftl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/RFXtoRP_HsaItm_ItemCreated.ftl b/RFXtoRP_HsaItm_ItemCreated.ftl index e7cb4bc..a6ad061 100644 --- a/RFXtoRP_HsaItm_ItemCreated.ftl +++ b/RFXtoRP_HsaItm_ItemCreated.ftl @@ -25,8 +25,13 @@ <#-- Item Photo URI could be added here --> <#if item.saved_picture_path?? && item.saved_picture_path!="" && item.saved_picture_path?starts_with("http") == true> - , + , "PhotoURI": "${item.saved_picture_path?json_string}" + <#else> + <#if item.url?? && item.url!="" && item.url?starts_with("http") == true> + , + "PhotoURI": "${item.url?json_string}" + <#-- Loop for the Logistical Variants - LV --> From 02de5592357d40e23cb3dc7f3449a382e8d2398f Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Wed, 25 Feb 2026 18:47:58 +0100 Subject: [PATCH 35/87] SCPN1-10253 --- RFXtoRP_HsrCarrierApt.ftl | 21 +- ...HsrCarrierApt_BookingCancelAppointment.ftl | 58 ++++++ ...CarrierApt_BookingForceBookAppointment.ftl | 183 ++++++++++++++++++ ...CarrierApt_BookingWMSUpdateAppointment.ftl | 164 ++++++++++++++++ RFXtoRP_HsrCarrierApt_ProjectQuantities.ftl | 5 + RFXtoRP_HsrCarrierApt_TotalQuantities.ftl | 5 + RPtoRFX_AppointmentEvent.ftl | 1 + RPtoRFX_CarrierAppointmentCreated.ftl | 44 +++-- ...mentPhysicalReceiptAssociationByNumber.ftl | 8 +- ...intmentPhysicalReceiptAssociationByRef.ftl | 8 +- ...entPhysicalReceiptDissociationByNumber.ftl | 8 +- ...ntmentPhysicalReceiptDissociationByRef.ftl | 8 +- 12 files changed, 478 insertions(+), 35 deletions(-) create mode 100644 RFXtoRP_HsrCarrierApt_BookingCancelAppointment.ftl create mode 100644 RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl create mode 100644 RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl create mode 100644 RFXtoRP_HsrCarrierApt_ProjectQuantities.ftl create mode 100644 RFXtoRP_HsrCarrierApt_TotalQuantities.ftl diff --git a/RFXtoRP_HsrCarrierApt.ftl b/RFXtoRP_HsrCarrierApt.ftl index 91273ec..a14f38b 100644 --- a/RFXtoRP_HsrCarrierApt.ftl +++ b/RFXtoRP_HsrCarrierApt.ftl @@ -7,8 +7,9 @@ <#include "ReflexUtils.ftl"> <#assign cloudEventMsg = JsonUtil.jsonToMap(input)> -<#assign projectRP = project> -<#assign organisationRP = organisation> +<#assign projectRP = project> +<#assign organisationRP = organisation> +<#assign partnerApplicationRP = partnerApplication> <#assign aDateTime = .now> @@ -20,10 +21,10 @@ <#-- *********************************************** Action = CREATE or UPDATE ******************** --> [ { - <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteForceBookAppointment> + <#assign apiReflexPlatformID = ApiReflexPlatformID.BookingForceBookAppointment> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : - <#include "RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl"> + <#include "RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl"> } ] <#break> @@ -41,10 +42,10 @@ <#if carrier_apt.status?? && (carrier_apt.status.status_code=="999" || carrier_apt.status.status_code=="040" || carrier_apt.status.status_code=="030")> [ { - <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteCancelAppointment> + <#assign apiReflexPlatformID = ApiReflexPlatformID.BookingCancelAppointment> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : - <#include "RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl"> + <#include "RFXtoRP_HsrCarrierApt_BookingCancelAppointment.ftl"> } ] <#else> @@ -110,10 +111,10 @@ <#else> [ { - <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteWMSUpdateAppointment> + <#assign apiReflexPlatformID = ApiReflexPlatformID.BookingWMSUpdateAppointment> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : - <#include "RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl"> + <#include "RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl"> } ] @@ -130,10 +131,10 @@ [ { - <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteCancelAppointment> + <#assign apiReflexPlatformID = ApiReflexPlatformID.BookingCancelAppointment> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : - <#include "RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl"> + <#include "RFXtoRP_HsrCarrierApt_BookingCancelAppointment.ftl"> } ] <#break> diff --git a/RFXtoRP_HsrCarrierApt_BookingCancelAppointment.ftl b/RFXtoRP_HsrCarrierApt_BookingCancelAppointment.ftl new file mode 100644 index 0000000..f86f788 --- /dev/null +++ b/RFXtoRP_HsrCarrierApt_BookingCancelAppointment.ftl @@ -0,0 +1,58 @@ +<#assign update_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) /> +[ + { + "ID":{ + <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> + "RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", + <#else> + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + + <#else> + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> + "RefID": "${carrier_apt.appointment_reference?json_string}", + <#else> + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + + + "RefDate": { + "DateTime": "${update_datetime}", + "AuthorTimeZone": "${time_zone_rfx}" + }, + "CustomFields": [ + { + "Key": "depot", + "Value": "${carrier_apt.physical_depot?json_string}" + }, + { + "Key": "year", + "Value": "${carrier_apt.year_number?json_string}" + }, + { + "Key": "number", + "Value": "${carrier_apt.appointment_number?json_string}" + }, + { + "Key": "reference", + "Value": "${carrier_apt.appointment_reference?json_string}" + }, + { + "Key": "carrier", + "Value": "${carrier_apt.planned_carrier?json_string}" + }, + { + "Key": "loading", + "Value": "${carrier_apt.load_appointment?json_string}" + }, + { + "Key": "unloading", + "Value": "${carrier_apt.unloading_appointment?json_string}" + } + ] + + }, + "Header": { + "ProjectID": "${projectRP}:${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" + } + } +] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl new file mode 100644 index 0000000..5ef9252 --- /dev/null +++ b/RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl @@ -0,0 +1,183 @@ +[ + <#assign creation_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.creation_datetime,time_zone_rfx) /> + { + "Header":{ + "ProjectID": "${projectRP}:${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" + }, + "ID":{ + "RefDate": { + "DateTime": "${creation_datetime}", + "AuthorTimeZone": "${time_zone_rfx}" + }, + <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> + "RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", + <#else> + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + + <#else> + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> + "RefID": "${carrier_apt.appointment_reference?json_string}", + <#else> + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + + + "CustomFields": [ + { + "Key": "depot", + "Value": "${carrier_apt.physical_depot?json_string}" + }, + { + "Key": "year", + "Value": "${carrier_apt.year_number?json_string}" + }, + { + "Key": "number", + "Value": "${carrier_apt.appointment_number?json_string}" + }, + { + "Key": "reference", + "Value": "${carrier_apt.appointment_reference?json_string}" + }, + { + "Key": "carrier", + "Value": "${carrier_apt.planned_carrier?json_string}" + }, + { + "Key": "loading", + "Value": "${carrier_apt.load_appointment?json_string}" + }, + { + "Key": "unloading", + "Value": "${carrier_apt.unloading_appointment?json_string}" + } + ] + }, + "Payload": { + "TimeZone":"${time_zone_rfx}", + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false"> + <#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") || carrier_apt.planned_unloading_end_datetime?starts_with("00") || carrier_apt.planned_unloading_end_datetime?contains("-00-")> + <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend is not initialized" > + + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNLOADING> + <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_unloading_end_datetime?datetime.iso) /> + <#if (duration <= 0)> + <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" > + + <#else> + <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" > + <#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-") || carrier_apt.planned_load_end_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?contains("-00-")> + <#stop "planned_load_start_datetime or planned_load_end_datetime field of appointmend is not initialized" > + + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_LOADING> + <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_load_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) /> + <#if (duration <= 0)> + <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" > + + <#else> + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> + <#if carrier_apt.planned_load_end_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?contains("-00-") || carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") > + <#stop "planned_unloading_start_datetime or planned_load_end_datetime field of appointmend is not initialized" > + + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNLOADING> + <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) /> + <#if (duration <= 0)> + <#stop "planned_unloading_start_datetime or planned_load_end_datetime field of appointmend are not valid" > + + <#else> + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNKNOWN> + <#assign duration = 0 /> + + + + "AppointmentType": "${appointmentType}", + "Emails": ["${carrier_apt.creation_user_email?json_string}"], + + <#include "RFXtoRP_HsrCarrierApt_SegmentationSelections.ftl">, + <#include "RFXtoRP_HsrCarrierApt_CarrierInformation.ftl">, + <#include "RFXtoRP_HsrCarrierApt_MetadataAppointment.ftl">, + <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0)> + "Unloading" : + { + "Projects" : [{ + "Commissions": [ + <#list carrier_apt.physical_receipt_list?filter(l ->l??) as physical_receipt> + { + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", + <#if physical_receipt.physical_receipt_reference?? && physical_receipt.physical_receipt_reference!=""> + "OrderID": "${physical_receipt.physical_receipt_reference?json_string}", + <#else> + "OrderID": "R${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year}${physical_receipt.receipt_number}", + + "ExecutionflowID": "R${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year?json_string}${physical_receipt.receipt_number?json_string}", + "ProjectID": "${projectRP}", + "PartnerAppID": "${partnerApplicationRP}", + "OrganisationID": "${organisationRP}", + <#include "RFXtoRP_HsrCarrierApt_Quantities.ftl"> + }<#sep>, + + ], + "ProjectID" : "${projectRP}", + <#include "RFXtoRP_HsrCarrierApt_ProjectQuantities.ftl"> + }], + <#include "RFXtoRP_HsrCarrierApt_TotalQuantities.ftl"> + }, + <#else> + "Loading" : + { + "Projects" : [{ + "Commissions": [{ + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", + "ProjectID": "${projectRP}", + "PartnerAppID": "${partnerApplicationRP}", + "OrganisationID": "${organisationRP}", + <#include "RFXtoRP_HsrCarrierApt_Quantities.ftl"> + }], + "ProjectID" : "${projectRP}:${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", + <#include "RFXtoRP_HsrCarrierApt_ProjectQuantities.ftl"> + }], + <#include "RFXtoRP_HsrCarrierApt_TotalQuantities.ftl"> + }, + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> + "Reason": "UNLOADING AND LOADING / ${carrier_apt.appointment_designation?json_string}", + <#else> + <#if carrier_apt.appointment_designation?? && carrier_apt.appointment_designation!=""> + "Reason": "${carrier_apt.appointment_designation?json_string}", + <#else> + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> + "Reason": "${carrier_apt.appointment_reference?json_string}", + <#else> + "Reason": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + + + + + "Slot": { + <#-- calcul de de la durée en fonction des start et end time--> + "DurationInSeconds": "${duration}", + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false" > + <#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-")> + <#stop "planned_unloading_start_datetime field of appointmend is not initialized" > + + "StartDateTime": "${carrier_apt.planned_unloading_start_datetime}" + <#else> + <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true"> + <#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-")> + <#stop "planned_load_start_datetime field of appointmend is not initialized" > + + "StartDateTime": "${carrier_apt.planned_load_start_datetime}" + <#else> + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> + <#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-")> + <#stop "planned_unloading_start_datetime field of appointmend is not initialized" > + + "StartDateTime": "${carrier_apt.planned_unloading_start_datetime}" + <#else> + <#stop "Appointment type not supported" > + + + + } + } + } +] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl new file mode 100644 index 0000000..7085a3e --- /dev/null +++ b/RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl @@ -0,0 +1,164 @@ +[ + { + <#assign update_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) /> + + "Header":{ + "ProjectID": "${projectRP}:${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" + }, + "ID":{ + "RefDate": { + "DateTime": "${update_datetime}", + "AuthorTimeZone": "${time_zone_rfx}" + }, + <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> + "RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", + <#else> + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + + <#else> + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> + "RefID": "${carrier_apt.appointment_reference?json_string}", + <#else> + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + + + "CustomFields": [ + { + "Key": "depot", + "Value": "${carrier_apt.physical_depot?json_string}" + }, + { + "Key": "year", + "Value": "${carrier_apt.year_number?json_string}" + }, + { + "Key": "number", + "Value": "${carrier_apt.appointment_number?json_string}" + }, + { + "Key": "reference", + "Value": "${carrier_apt.appointment_reference?json_string}" + }, + { + "Key": "carrier", + "Value": "${carrier_apt.planned_carrier?json_string}" + }, + { + "Key": "loading", + "Value": "${carrier_apt.load_appointment?json_string}" + }, + { + "Key": "unloading", + "Value": "${carrier_apt.unloading_appointment?json_string}" + } + ] + }, + "Payload": { + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false"> + <#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") || carrier_apt.planned_unloading_end_datetime?starts_with("00") || carrier_apt.planned_unloading_end_datetime?contains("-00-")> + <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend is not initialized" > + + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNLOADING> + <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_unloading_end_datetime?datetime.iso) /> + <#if (duration <= 0)> + <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" > + + <#else> + <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" > + <#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-") || carrier_apt.planned_load_end_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?contains("-00-")> + <#stop "planned_load_start_datetime or planned_load_end_datetime field of appointmend is not initialized" > + + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_LOADING> + <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_load_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) /> + <#if (duration <= 0)> + <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" > + + <#else> + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> + <#if carrier_apt.planned_load_end_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?contains("-00-") || carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") > + <#stop "planned_unloading_start_datetime or planned_load_end_datetime field of appointmend is not initialized" > + + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNLOADING> + <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) /> + <#if (duration <= 0)> + <#stop "planned_unloading_start_datetime or planned_load_end_datetime field of appointmend are not valid" > + + <#else> + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNKNOWN> + <#assign duration = 0 /> + + + + "TimeZone":"${time_zone_rfx}", + <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0) && ((carrier_apt.unloading_appointment =="true" && carrier_apt.load_appointment =="false") || (carrier_apt.unloading_appointment =="false" && carrier_apt.load_appointment =="true"))> + "Unloading" : + { + "Projects" : [ + { + "Commissions": [ + <#list carrier_apt.physical_receipt_list?filter(l ->l??) as physical_receipt> + { + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", + <#if physical_receipt.physical_receipt_reference?? && physical_receipt.physical_receipt_reference!=""> + "OrderID": "${physical_receipt.physical_receipt_reference?json_string}", + <#else> + "OrderID": "R${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year}${physical_receipt.receipt_number}", + + "ExecutionflowID": "R${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year?json_string}${physical_receipt.receipt_number?json_string}", + "ProjectID": "${projectRP}", + "PartnerAppID": "${partnerApplicationRP}", + "OrganisationID": "${organisationRP}", + <#include "RFXtoRP_HsrCarrierApt_Quantities.ftl"> + }<#sep>, + + ], + "ProjectID" : "${projectRP}", + <#include "RFXtoRP_HsrCarrierApt_ProjectQuantities.ftl"> + }], + <#include "RFXtoRP_HsrCarrierApt_TotalQuantities.ftl"> + }, + <#else> + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> + "Reason": "UNLOADING AND LOADING / ${carrier_apt.appointment_designation?json_string}", + <#else> + <#if carrier_apt.appointment_designation?? && carrier_apt.appointment_designation!=""> + "Reason": "${carrier_apt.appointment_designation?json_string}", + <#else> + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> + "Reason": "${carrier_apt.appointment_reference?json_string}", + <#else> + "Reason": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + + + + + "Slot": { + <#-- calcul de de la durée en fonction des start et end time--> + "DurationInSeconds": "${duration}", + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false" > + <#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-")> + <#stop "planned_unloading_start_datetime field of appointmend is not initialized" > + + "StartDateTime": "${carrier_apt.planned_unloading_start_datetime}" + <#else> + <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true"> + <#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-")> + <#stop "planned_load_start_datetime field of appointmend is not initialized" > + + "StartDateTime": "${carrier_apt.planned_load_start_datetime}" + <#else> + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> + <#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-")> + <#stop "planned_unloading_start_datetime field of appointmend is not initialized" > + + "StartDateTime": "${carrier_apt.planned_unloading_start_datetime}" + <#else> + <#stop "Appointment type not supported" > + + + + } + } + } +] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_ProjectQuantities.ftl b/RFXtoRP_HsrCarrierApt_ProjectQuantities.ftl new file mode 100644 index 0000000..6c84c6f --- /dev/null +++ b/RFXtoRP_HsrCarrierApt_ProjectQuantities.ftl @@ -0,0 +1,5 @@ +"ProjectQuantities": [ + + ] + + diff --git a/RFXtoRP_HsrCarrierApt_TotalQuantities.ftl b/RFXtoRP_HsrCarrierApt_TotalQuantities.ftl new file mode 100644 index 0000000..61bfaac --- /dev/null +++ b/RFXtoRP_HsrCarrierApt_TotalQuantities.ftl @@ -0,0 +1,5 @@ +"TotalQuantities": [ + + ] + + diff --git a/RPtoRFX_AppointmentEvent.ftl b/RPtoRFX_AppointmentEvent.ftl index 4179557..06f345f 100644 --- a/RPtoRFX_AppointmentEvent.ftl +++ b/RPtoRFX_AppointmentEvent.ftl @@ -69,6 +69,7 @@ <#assign AddComma = true /> + <#-- *********************************************** Action = reasonUpdated or slotUpdated ******************** --> <#if eventRP.reasonUpdated || eventRP.slotUpdated || eventRP.carrierInformationUpdated> <#if AddComma == true> diff --git a/RPtoRFX_CarrierAppointmentCreated.ftl b/RPtoRFX_CarrierAppointmentCreated.ftl index a6ce97d..ebc72cb 100644 --- a/RPtoRFX_CarrierAppointmentCreated.ftl +++ b/RPtoRFX_CarrierAppointmentCreated.ftl @@ -35,29 +35,31 @@ <#stop "appointment.AppointmentType not implemented" > <#include "RPtoRFX_CarrierAppointmentDefaultData.ftl"> - <#if appointment.Commissions??> - <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING"> - <#if appointment.Commissions[0].OrderID?? && appointment.Commissions[0].OrderID!=""> - "physical_receipt_list": [ - <#list eventRP.executionflowCustomFields.entrySet()?filter(l ->l.value?? && l.value?has_content) as custom> - { - "receipt_activity": "${custom.value.activity_code?json_string}", - "originator_code": "${custom.value.originator_code?json_string}", - "physical_receipt_reference": "${custom.value.reference?json_string}", - "receipt_year": "${custom.value.order_year?json_string}", - "receipt_number": "${custom.value.order_number?json_string}" + <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING" > + <#if appointment.Unloading?? && appointment.Unloading.Projects?? && appointment.Unloading.Projects[0]?? && + appointment.Unloading.Projects[0].Commissions?? && + appointment.Unloading.Projects[0].Commissions[0]?? && + appointment.Unloading.Projects[0].Commissions[0].OrderID?? && + appointment.Unloading.Projects[0].Commissions[0].OrderID != ""> + "physical_receipt_list": [ + <#list eventRP.executionflowCustomFields.entrySet()?filter(l ->l.value?? && l.value?has_content) as custom> + { + "receipt_activity": "${custom.value.activity_code?json_string}", + "originator_code": "${custom.value.originator_code?json_string}", + "physical_receipt_reference": "${custom.value.reference?json_string}", + "receipt_year": "${custom.value.order_year?json_string}", + "receipt_number": "${custom.value.order_number?json_string}" - } - <#sep>, - - ], - <#else> - "appointment_designation":"${(appointment.Reason!"")!?json_string}", - + } + <#sep>, + + ], <#else> - <#if appointment.AppointmentType == "APPOINTMENT_TYPE_LOADING"> - "appointment_designation":"${(appointment.Reason!"")?json_string}", - + "appointment_designation":"${(appointment.Reason!"")!?json_string}", + + <#else> + <#if appointment.AppointmentType == "APPOINTMENT_TYPE_LOADING"> + "appointment_designation":"${(appointment.Reason!"")?json_string}", "constant_appointment": "false" diff --git a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl index 39f9177..da1299f 100644 --- a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl @@ -10,8 +10,14 @@ "payload" : { <#assign executionflowCustomFields = eventRP.executionflowCustomFields > + <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING"> + <#assign addedCommissions = eventRP.addedUnloadCommissions /> + <#else> + <#assign addedCommissions = eventRP.addedLoadCommissions /> + + "physical_receipt_list": [ - <#list eventRP.addedCommissions as addedCommission> + <#list addedCommissions as addedCommission> { "receipt_activity": "${executionflowCustomFields[addedCommission.ExecutionflowID].activity_code?json_string}", "originator_code": "${executionflowCustomFields[addedCommission.ExecutionflowID].originator_code?json_string}", diff --git a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl index 333c8a0..60e2655 100644 --- a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl +++ b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl @@ -9,8 +9,14 @@ "payload" : { <#assign executionflowCustomFields = eventRP.executionflowCustomFields > + <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING"> + <#assign addedCommissions = eventRP.addedUnloadCommissions /> + <#else> + <#assign addedCommissions = eventRP.addedLoadCommissions /> + + "physical_receipt_list": [ - <#list eventRP.addedCommissions as addedCommission> + <#list addedCommissions as addedCommission> { "receipt_activity": "${executionflowCustomFields[addedCommission.ExecutionflowID].activity_code?json_string}", "originator_code": "${executionflowCustomFields[addedCommission.ExecutionflowID].originator_code?json_string}", diff --git a/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByNumber.ftl b/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByNumber.ftl index 2a3e93c..7f09d94 100644 --- a/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByNumber.ftl @@ -10,8 +10,14 @@ "payload" : { <#assign executionflowCustomFields = eventRP.executionflowCustomFields > + <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING"> + <#assign removedCommissions = eventRP.removedUnloadCommissions /> + <#else> + <#assign removedCommissions = eventRP.removedLoadCommissions /> + + "physical_receipt_list": [ - <#list eventRP.removedCommissions as removedCommission> + <#list removedCommissions as removedCommission> { "receipt_activity": "${executionflowCustomFields[removedCommission.ExecutionflowID].activity_code?json_string}", "originator_code": "${executionflowCustomFields[removedCommission.ExecutionflowID].originator_code?json_string}", diff --git a/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl b/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl index 2cc8e4c..6f9691e 100644 --- a/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl +++ b/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl @@ -9,8 +9,14 @@ "payload" : { <#assign executionflowCustomFields = eventRP.executionflowCustomFields > + <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING"> + <#assign removedCommissions = eventRP.removedUnloadCommissions /> + <#else> + <#assign removedCommissions = eventRP.removedLoadCommissions /> + + "physical_receipt_list": [ - <#list eventRP.removedCommissions as removedCommission> + <#list removedCommissions as removedCommission> { "receipt_activity": "${executionflowCustomFields[removedCommission.ExecutionflowID].activity_code?json_string}", "originator_code": "${executionflowCustomFields[removedCommission.ExecutionflowID].originator_code?json_string}", From 57113f4c5104cbe04cd6feb692470147086ce116 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Thu, 26 Feb 2026 15:15:11 +0100 Subject: [PATCH 36/87] SCPN1-10253 --- ...rrierAppointmentPhysicalReceiptAssociationByNumber.ftl | 2 +- ..._CarrierAppointmentPhysicalReceiptAssociationByRef.ftl | 2 +- ...rierAppointmentPhysicalReceiptDissociationByNumber.ftl | 2 +- ...CarrierAppointmentPhysicalReceiptDissociationByRef.ftl | 2 +- ...AppointmentSlotOrCarrierInformationUpdatedByNumber.ftl | 8 +++++--- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl index da1299f..5677a75 100644 --- a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl @@ -17,7 +17,7 @@ "physical_receipt_list": [ - <#list addedCommissions as addedCommission> + <#list addedCommissions?filter(l -> l.ExecutionflowID??) as addedCommission> { "receipt_activity": "${executionflowCustomFields[addedCommission.ExecutionflowID].activity_code?json_string}", "originator_code": "${executionflowCustomFields[addedCommission.ExecutionflowID].originator_code?json_string}", diff --git a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl index 60e2655..d19ea66 100644 --- a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl +++ b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl @@ -16,7 +16,7 @@ "physical_receipt_list": [ - <#list addedCommissions as addedCommission> + <#list addedCommissions?filter(l -> l.ExecutionflowID??) as addedCommission> { "receipt_activity": "${executionflowCustomFields[addedCommission.ExecutionflowID].activity_code?json_string}", "originator_code": "${executionflowCustomFields[addedCommission.ExecutionflowID].originator_code?json_string}", diff --git a/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByNumber.ftl b/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByNumber.ftl index 7f09d94..f3f2b2b 100644 --- a/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByNumber.ftl @@ -17,7 +17,7 @@ "physical_receipt_list": [ - <#list removedCommissions as removedCommission> + <#list removedCommissions?filter(l -> l.ExecutionflowID??) as removedCommission> { "receipt_activity": "${executionflowCustomFields[removedCommission.ExecutionflowID].activity_code?json_string}", "originator_code": "${executionflowCustomFields[removedCommission.ExecutionflowID].originator_code?json_string}", diff --git a/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl b/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl index 6f9691e..85a66dc 100644 --- a/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl +++ b/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl @@ -16,7 +16,7 @@ "physical_receipt_list": [ - <#list removedCommissions as removedCommission> + <#list removedCommissions?filter(l -> l.ExecutionflowID??) as removedCommission> { "receipt_activity": "${executionflowCustomFields[removedCommission.ExecutionflowID].activity_code?json_string}", "originator_code": "${executionflowCustomFields[removedCommission.ExecutionflowID].originator_code?json_string}", diff --git a/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl b/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl index 21333a8..ba489cf 100644 --- a/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl @@ -10,10 +10,10 @@ "payload" : { <#include "RPtoRFX_CarrierAppointmentDataUpdated.ftl"> - "unloading_appointment" : "${eventRP.appointmentCustomFields.unloading?json_string}", - "load_appointment" : "${eventRP.appointmentCustomFields.loading?json_string}", - <#switch appointment.AppointmentType> + <#switch appointment.AppointmentType> <#case "APPOINTMENT_TYPE_LOADING"> + "unloading_appointment" : "false", + "load_appointment" : "true", <#if appointment.TimeZone?? && appointment.TimeZone!=""> "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", @@ -23,6 +23,8 @@ <#break> <#case "APPOINTMENT_TYPE_UNLOADING"> + "unloading_appointment" : "true", + "load_appointment" : "false", <#if appointment.TimeZone?? && appointment.TimeZone!=""> "planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", "planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", From b1577d17917cd284181378739a564dab821b8f97 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Thu, 26 Feb 2026 15:48:51 +0100 Subject: [PATCH 37/87] SCPN1-10253 --- ...erAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl b/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl index ba489cf..7cc0667 100644 --- a/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl @@ -10,10 +10,10 @@ "payload" : { <#include "RPtoRFX_CarrierAppointmentDataUpdated.ftl"> + "unloading_appointment" : "${eventRP.appointmentCustomFields.unloading?json_string}", + "load_appointment" : "${eventRP.appointmentCustomFields.loading?json_string}", <#switch appointment.AppointmentType> <#case "APPOINTMENT_TYPE_LOADING"> - "unloading_appointment" : "false", - "load_appointment" : "true", <#if appointment.TimeZone?? && appointment.TimeZone!=""> "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", @@ -23,8 +23,6 @@ <#break> <#case "APPOINTMENT_TYPE_UNLOADING"> - "unloading_appointment" : "true", - "load_appointment" : "false", <#if appointment.TimeZone?? && appointment.TimeZone!=""> "planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", "planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", From 127a662057633f5c6091b7a7e8dd091c26c43986 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Fri, 27 Feb 2026 09:45:31 +0100 Subject: [PATCH 38/87] SCPN1-10253 --- ...RP_HsrCarrierApt_SiteCancelAppointment.ftl | 22 --- ...HsrCarrierApt_SiteForceBookAppointment.ftl | 156 ------------------ RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl | 149 ----------------- 3 files changed, 327 deletions(-) delete mode 100644 RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl delete mode 100644 RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl delete mode 100644 RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl diff --git a/RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl deleted file mode 100644 index c4033a6..0000000 --- a/RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl +++ /dev/null @@ -1,22 +0,0 @@ -<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) /> -[ - { - <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> - <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", - <#else> - "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", - - <#else> - <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}", - <#else> - "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", - - - "Header": { - "ProjectID": "${projectRP}" - }, - "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" - } -] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl deleted file mode 100644 index a8bdd1f..0000000 --- a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl +++ /dev/null @@ -1,156 +0,0 @@ -[ - { - "Header":{ - "ProjectID": "${projectRP}" - }, - "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", - <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> - <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", - <#else> - "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", - - <#else> - <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}", - <#else> - "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", - - - "TimeZone":"${time_zone_rfx}", - <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false"> - <#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") || carrier_apt.planned_unloading_end_datetime?starts_with("00") || carrier_apt.planned_unloading_end_datetime?contains("-00-")> - <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend is not initialized" > - - <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNLOADING> - <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_unloading_end_datetime?datetime.iso) /> - <#if (duration <= 0)> - <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" > - - <#else> - <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" > - <#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-") || carrier_apt.planned_load_end_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?contains("-00-")> - <#stop "planned_load_start_datetime or planned_load_end_datetime field of appointmend is not initialized" > - - <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_LOADING> - <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_load_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) /> - <#if (duration <= 0)> - <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" > - - <#else> - <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> - <#if carrier_apt.planned_load_end_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?contains("-00-") || carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") > - <#stop "planned_unloading_start_datetime or planned_load_end_datetime field of appointmend is not initialized" > - - <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNLOADING> - <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) /> - <#if (duration <= 0)> - <#stop "planned_unloading_start_datetime or planned_load_end_datetime field of appointmend are not valid" > - - <#else> - <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNKNOWN> - <#assign duration = 0 /> - - - - "AppointmentType": "${appointmentType}", - "Emails": ["${carrier_apt.creation_user_email?json_string}"], - "CustomFields": [ - { - "Key": "depot", - "Value": "${carrier_apt.physical_depot?json_string}" - }, - { - "Key": "year", - "Value": "${carrier_apt.year_number?json_string}" - }, - { - "Key": "number", - "Value": "${carrier_apt.appointment_number?json_string}" - }, - { - "Key": "reference", - "Value": "${carrier_apt.appointment_reference?json_string}" - }, - { - "Key": "carrier", - "Value": "${carrier_apt.planned_carrier?json_string}" - }, - { - "Key": "loading", - "Value": "${carrier_apt.load_appointment?json_string}" - }, - { - "Key": "unloading", - "Value": "${carrier_apt.unloading_appointment?json_string}" - } - ], - <#include "RFXtoRP_HsrCarrierApt_SegmentationSelections.ftl">, - <#include "RFXtoRP_HsrCarrierApt_CarrierInformation.ftl">, - <#include "RFXtoRP_HsrCarrierApt_MetadataAppointment.ftl">, - <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0)> - "Commissions": [ - <#list carrier_apt.physical_receipt_list?filter(l ->l??) as physical_receipt> - { - "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", - <#if physical_receipt.physical_receipt_reference?? && physical_receipt.physical_receipt_reference!=""> - "OrderID": "${physical_receipt.physical_receipt_reference?json_string}", - <#else> - "OrderID": "R${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year}${physical_receipt.receipt_number}", - - "ExecutionflowID": "R${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year?json_string}${physical_receipt.receipt_number?json_string}", - "ProjectID": "${projectRP}", - <#include "RFXtoRP_HsrCarrierApt_Quantities.ftl"> - }<#sep>, - - ], - <#else> - "Commissions": [ - { - "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", - "ProjectID": "${projectRP}", - <#include "RFXtoRP_HsrCarrierApt_Quantities.ftl"> - } - ], - <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> - "Reason": "UNLOADING AND LOADING / ${carrier_apt.appointment_designation?json_string}", - <#else> - <#if carrier_apt.appointment_designation?? && carrier_apt.appointment_designation!=""> - "Reason": "${carrier_apt.appointment_designation?json_string}", - <#else> - <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "Reason": "${carrier_apt.appointment_reference?json_string}", - <#else> - "Reason": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", - - - - - "Slots": [{ - <#-- calcul de de la durée en fonction des start et end time--> - "DurationInSeconds": "${duration}", - <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false" > - <#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-")> - <#stop "planned_unloading_start_datetime field of appointmend is not initialized" > - - "StartDateTime": "${carrier_apt.planned_unloading_start_datetime}" - <#else> - <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true"> - <#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-")> - <#stop "planned_load_start_datetime field of appointmend is not initialized" > - - "StartDateTime": "${carrier_apt.planned_load_start_datetime}" - <#else> - <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> - <#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-")> - <#stop "planned_unloading_start_datetime field of appointmend is not initialized" > - - "StartDateTime": "${carrier_apt.planned_unloading_start_datetime}" - <#else> - <#stop "Appointment type not supported" > - - - - }] - } -] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl deleted file mode 100644 index 2d5cf78..0000000 --- a/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl +++ /dev/null @@ -1,149 +0,0 @@ -[ - { - <#assign creation_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.creation_datetime,time_zone_rfx) /> - - "Header":{ - "ProjectID": "${projectRP}" - }, - <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> - <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", - <#else> - "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", - - <#else> - <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}", - <#else> - "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", - - - <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false"> - <#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") || carrier_apt.planned_unloading_end_datetime?starts_with("00") || carrier_apt.planned_unloading_end_datetime?contains("-00-")> - <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend is not initialized" > - - <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNLOADING> - <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_unloading_end_datetime?datetime.iso) /> - <#if (duration <= 0)> - <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" > - - <#else> - <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" > - <#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-") || carrier_apt.planned_load_end_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?contains("-00-")> - <#stop "planned_load_start_datetime or planned_load_end_datetime field of appointmend is not initialized" > - - <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_LOADING> - <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_load_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) /> - <#if (duration <= 0)> - <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" > - - <#else> - <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> - <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> - <#if carrier_apt.planned_load_end_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?contains("-00-") || carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") > - <#stop "planned_unloading_start_datetime or planned_load_end_datetime field of appointmend is not initialized" > - - <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNLOADING> - <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) /> - <#if (duration <= 0)> - <#stop "planned_unloading_start_datetime or planned_load_end_datetime field of appointmend are not valid" > - - <#else> - <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNKNOWN> - <#assign duration = 0 /> - - - - - "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", - "TimeZone":"${time_zone_rfx}", - "CustomFields": [ - { - "Key": "depot", - "Value": "${carrier_apt.physical_depot?json_string}" - }, - { - "Key": "year", - "Value": "${carrier_apt.year_number?json_string}" - }, - { - "Key": "number", - "Value": "${carrier_apt.appointment_number?json_string}" - }, - { - "Key": "reference", - "Value": "${carrier_apt.appointment_reference?json_string}" - }, - { - "Key": "carrier", - "Value": "${carrier_apt.planned_carrier?json_string}" - }, - { - "Key": "loading", - "Value": "${carrier_apt.load_appointment?json_string}" - }, - { - "Key": "unloading", - "Value": "${carrier_apt.unloading_appointment?json_string}" - } - ], - <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0) && ((carrier_apt.unloading_appointment =="true" && carrier_apt.load_appointment =="false") || (carrier_apt.unloading_appointment =="false" && carrier_apt.load_appointment =="true"))> - "Commissions": [ - <#list carrier_apt.physical_receipt_list?filter(l ->l??) as physical_receipt> - { - "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", - <#if physical_receipt.physical_receipt_reference?? && physical_receipt.physical_receipt_reference!=""> - "OrderID": "${physical_receipt.physical_receipt_reference?json_string}", - <#else> - "OrderID": "R${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year}${physical_receipt.receipt_number}", - - "ExecutionflowID": "R${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year?json_string}${physical_receipt.receipt_number?json_string}", - "ProjectID": "${projectRP}" - }<#sep>, - - ], - <#else> - <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> - "Reason": "UNLOADING AND LOADING / ${carrier_apt.appointment_designation?json_string}", - <#else> - <#if carrier_apt.appointment_designation?? && carrier_apt.appointment_designation!=""> - "Reason": "${carrier_apt.appointment_designation?json_string}", - <#else> - <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "Reason": "${carrier_apt.appointment_reference?json_string}", - <#else> - "Reason": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", - - - - - "Slots": [{ - <#-- calcul de de la durée en fonction des start et end time--> - "DurationInSeconds": "${duration}", - <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false" > - <#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-")> - <#stop "planned_unloading_start_datetime field of appointmend is not initialized" > - - - "StartDateTime": "${carrier_apt.planned_unloading_start_datetime}" - <#else> - <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true"> - <#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-")> - <#stop "planned_load_start_datetime field of appointmend is not initialized" > - - "StartDateTime": "${carrier_apt.planned_load_start_datetime}" - <#else> - <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> - <#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-")> - <#stop "planned_unloading_start_datetime field of appointmend is not initialized" > - - "StartDateTime": "${carrier_apt.planned_unloading_start_datetime}" - <#else> - <#stop "Appointment type not supported" > - - - - }] - - } -] \ No newline at end of file From ac5219b94a0a529f3f7669b155e1ad6097b86c68 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Fri, 27 Feb 2026 16:27:33 +0100 Subject: [PATCH 39/87] SCPN1-10253 --- RFXtoRP_PlatformLogCreate.ftl | 82 +++--- RFXtoRP_RestResponse.ftl | 524 ++++++++++++++++++++++++++++++++++ 2 files changed, 565 insertions(+), 41 deletions(-) diff --git a/RFXtoRP_PlatformLogCreate.ftl b/RFXtoRP_PlatformLogCreate.ftl index f48b2b9..e38863f 100644 --- a/RFXtoRP_PlatformLogCreate.ftl +++ b/RFXtoRP_PlatformLogCreate.ftl @@ -1,42 +1,42 @@ -<#include "HfRpConfig.ftl"> -[ - <#assign UUID = UUID.randomUUID()> - <#assign strJsonBody = JsonUtil.espaceQuoteInJsonString(restResponseBody)> - { - "Header": { - "ProjectID": "${projectRP}" - }, - "ID": { - "RefID": "${UUID}", - "RefDate": { - "DateTime": "${aDateTime?iso_utc}", - "AuthorTimeZone": "${time_zone_rfx}" - } - }, - "Payload": { - <#assign severity = SeverityLevel.ERROR> - "Severity": "${severity}", - "Namespace": "ReflexIntegration", - "DateTime": { - "DateTime": "${aDateTime?iso_utc}", - "AuthorTimeZone": "${time_zone_rfx}" - }, - "TechMessage": { - "Code": "${restResponsetMsg.status!"no Code"}", - "Label": ${strJsonBody} - }, - "UserMessage": { - "Code": "${restResponsetMsg.status!"no Code"}", - "Label": ${strJsonBody}, - "Params": [] - }, - "DetailElements": [], - "CorrelationID": "${id.correlationid!"no Correlationid"}", - "ContextPayload": ${strJsonBody}, - "Type": "RP_EXECUTIONFLOW_EVENT", - "Task": "${id.apiRestReflexID!"no Task"}", - "OriginalID": "${id.refid!"no OriginalID"?trim?json_string}", - "StackTrace": "" - } - } +<#include "HfRpConfig.ftl"> +[ + <#assign UUID = UUID.randomUUID()> + <#assign strJsonBody = JsonUtil.espaceQuoteInJsonString(restResponseBody)> + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + "RefID": "${UUID}", + "RefDate": { + "DateTime": "${aDateTime?iso_utc}", + "AuthorTimeZone": "${time_zone_rfx}" + } + }, + "Payload": { + <#assign severity = SeverityLevel.ERROR> + "Severity": "${severity}", + "Namespace": "ReflexIntegration", + "DateTime": { + "DateTime": "${aDateTime?iso_utc}", + "AuthorTimeZone": "${time_zone_rfx}" + }, + "TechMessage": { + "Code": "${restResponsetMsg.status!"no Code"}", + "Label": ${strJsonBody} + }, + "UserMessage": { + "Code": "${restResponsetMsg.status!"no Code"}", + "Label": ${strJsonBody}, + "Params": [] + }, + "DetailElements": [], + "CorrelationID": "${id.correlationid!"no Correlationid"}", + "ContextPayload": ${strJsonBody}, + "Type": ${event}, + "Task": "${id.apiRestReflexID!"no Task"}", + "OriginalID": "${id.refid!"no OriginalID"?trim?json_string}", + "StackTrace": "" + } + } ] \ No newline at end of file diff --git a/RFXtoRP_RestResponse.ftl b/RFXtoRP_RestResponse.ftl index d374992..6a4d000 100644 --- a/RFXtoRP_RestResponse.ftl +++ b/RFXtoRP_RestResponse.ftl @@ -1,3 +1,4 @@ +<<<<<<< HEAD <#-- **** input parameters ***** --> <#-- input : Response message from HARDIS WMS --> <#-- project : projectId in HARDIS SC NETWORK --> @@ -501,3 +502,526 @@ <#stop> +======= +<#-- **** 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> +<#assign event = "UNKNOW_EVENT" > + +<#switch id.apiRestReflexID!no_apiRestReflexID> + <#case no_apiRestReflexID> + [ + { + <#if restResponsetMsg.body?? > + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#else> + <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> + + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_PlatformLogCreate.ftl"> + } + ] + <#break> +<#-- *********************************************** ApiRestID = preparation_orders_post ******************** --> + <#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}" /> + + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#assign event = "RP_EXECUTIONFLOW_EVENT" /> + <#include "RFXtoRP_PlatformLogCreate.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_RestResponseAllocationError.ftl"> + } + ] + <#break> + <#case 200> + <#case 201> + <#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" : + <#assign event = "RP_EXECUTIONFLOW_EVENT"> + <#include "RFXtoRP_PlatformLogCreate.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_RestResponseAllocationError.ftl"> + } + ] + + + <#break> + <#default> + [ + { + <#if restResponsetMsg.body?? > + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#else> + <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> + + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#assign event = "RP_EXECUTIONFLOW_EVENT" /> + <#include "RFXtoRP_PlatformLogCreate.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_RestResponseAllocationError.ftl"> + } + ] + + <#break> +<#-- *********************************************** ApiRestID = receipts_post ******************** --> + <#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}" /> + + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#assign event = "RP_EXECUTIONFLOW_EVENT" /> + <#include "RFXtoRP_PlatformLogCreate.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_RestResponseAllocationError.ftl"> + } + ] + <#break> + <#case 200> + <#case 201> + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)> + <#if preparationOrderPostResponse.status?? && (preparationOrderPostResponse.status == "SUCCESS" || preparationOrderPostResponse.status == "WARN") > + [ + { + <#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" : + <#assign event = "RP_EXECUTIONFLOW_EVENT" /> + <#include "RFXtoRP_PlatformLogCreate.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_RestResponseAllocationError.ftl"> + } + ] + + <#break> + <#default> + [ + { + <#if restResponsetMsg.body?? > + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#else> + <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> + + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#assign event = "RP_EXECUTIONFLOW_EVENT" /> + <#include "RFXtoRP_PlatformLogCreate.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_RestResponseAllocationError.ftl"> + } + ] + + <#break> + <#-- *********************************************** Appointment_post_create ******************** --> + <#case "appointment_post_create"> + <#switch restResponsetMsg.status!no_status> + <#case no_status> + [ + { + <#if restResponsetMsg.body?? > + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#else> + <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> + + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#assign event = "RP_APPOINTMENT_EVENT" /> + <#include "RFXtoRP_PlatformLogCreate.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentAllocationError> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_RestResponseAppointmentAllocationError.ftl"> + } + ] + <#break> + <#case 200> + <#case 201> + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)> + <#if preparationOrderPostResponse.status?? && (preparationOrderPostResponse.status == "SUCCESS" || preparationOrderPostResponse.status == "WARN") > + [ + { + <#stop > + } + ] + <#else> + [ + { + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#assign event = "RP_APPOINTMENT_EVENT" /> + <#include "RFXtoRP_PlatformLogCreate.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentAllocationError> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_RestResponseAppointmentAllocationError.ftl"> + } + ] + + <#break> + <#default> + [ + { + <#if restResponsetMsg.body?? > + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#else> + <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> + + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#assign event = "RP_APPOINTMENT_EVENT" /> + <#include "RFXtoRP_PlatformLogCreate.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentAllocationError> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_RestResponseAppointmentAllocationError.ftl"> + } + ] + + <#break> + <#-- *********************************************** ApiRestID = appointment_put_update_ref ******************** --> + <#case "appointment_put_update_by_ref"> + <#case "appointment_put_update_by_number"> + <#switch restResponsetMsg.status!no_status> + <#case no_status> + [ + { + <#if restResponsetMsg.body?? > + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#else> + <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> + + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#assign event = "RP_APPOINTMENT_EVENT" /> + <#include "RFXtoRP_PlatformLogCreate.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentAllocationError> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_RestResponseAppointmentAllocationError.ftl"> + } + ] + <#break> + <#case 200> + <#case 201> + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)> + <#if preparationOrderPostResponse.status?? && (preparationOrderPostResponse.status == "SUCCESS" || preparationOrderPostResponse.status == "WARN") > + [ + { + <#stop > + } + ] + <#else> + [ + { + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#assign event = "RP_APPOINTMENT_EVENT" /> + <#include "RFXtoRP_PlatformLogCreate.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentAllocationError> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_RestResponseAppointmentAllocationError.ftl"> + } + ] + + <#break> + <#default> + [ + { + <#if restResponsetMsg.body?? > + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#else> + <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> + + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#assign event = "RP_APPOINTMENT_EVENT" /> + <#include "RFXtoRP_PlatformLogCreate.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentAllocationError> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_RestResponseAppointmentAllocationError.ftl"> + } + ] + + <#break> + <#-- *********************************************** ApiRestID = canceled ******************** --> + <#case "status_appointment_put_update_by_ref"> + <#case "status_appointment_put_update_by_number"> + <#switch restResponsetMsg.status!no_status> + <#case no_status> + [ + { + <#if restResponsetMsg.body?? > + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#else> + <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> + + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#assign event = "RP_APPOINTMENT_EVENT" /> + <#include "RFXtoRP_PlatformLogCreate.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentAllocationError> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_RestResponseAppointmentAllocationError.ftl"> + } + ] + <#break> + <#case 200> + <#case 201> + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)> + <#if preparationOrderPostResponse.status?? && (preparationOrderPostResponse.status == "SUCCESS" || preparationOrderPostResponse.status == "WARN") > + [ + { + <#stop > + } + ] + <#else> + [ + { + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#assign event = "RP_APPOINTMENT_EVENT" /> + <#include "RFXtoRP_PlatformLogCreate.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentAllocationError> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_RestResponseAppointmentAllocationError.ftl"> + } + ] + + <#break> + <#default> + [ + { + <#if restResponsetMsg.body?? > + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#else> + <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> + + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#assign event = "RP_APPOINTMENT_EVENT" /> + <#include "RFXtoRP_PlatformLogCreate.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentAllocationError> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_RestResponseAppointmentAllocationError.ftl"> + } + ] + + <#break> + <#-- *********************************************** ApiRestID = appointment_post_physical_receipt_associations/dissociations ******************** --> + <#case "appointment_post_physical_receipt_associations_by_ref"> + <#case "appointment_post_physical_receipt_associations_by_number"> + <#case "appointment_post_physical_receipt_dissociations_by_ref"> + <#case "appointment_post_physical_receipt_dissociations_by_number"> + <#switch restResponsetMsg.status!no_status> + <#case no_status> + [ + { + <#if restResponsetMsg.body?? > + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#else> + <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> + + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#assign event = "RP_APPOINTMENT_EVENT" /> + <#include "RFXtoRP_PlatformLogCreate.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentAllocationError> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_RestResponseAppointmentAllocationError.ftl"> + } + ] + <#break> + <#case 200> + <#case 201> + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)> + <#if preparationOrderPostResponse.status?? && (preparationOrderPostResponse.status == "SUCCESS" || preparationOrderPostResponse.status == "WARN") > + [ + { + <#stop > + } + ] + <#else> + [ + { + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#assign event = "RP_APPOINTMENT_EVENT" /> + <#include "RFXtoRP_PlatformLogCreate.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentAllocationError> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_RestResponseAppointmentAllocationError.ftl"> + } + ] + + <#break> + <#default> + [ + { + <#if restResponsetMsg.body?? > + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#else> + <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> + + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#assign event = "RP_APPOINTMENT_EVENT" /> + <#include "RFXtoRP_PlatformLogCreate.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentAllocationError> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_RestResponseAppointmentAllocationError.ftl"> + } + ] + + <#break> +<#-- *********************************************** default ******************** --> + <#default> + <#stop> + + +>>>>>>> bb2174a (SCPN1-10253) From 4784cc2bc1852b8cf914a6d45cd5b841cf3b0a3c Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Fri, 27 Feb 2026 16:37:25 +0100 Subject: [PATCH 40/87] SCPN1-10253 --- RFXtoRP_RestResponse.ftl | 506 --------------------------------------- 1 file changed, 506 deletions(-) diff --git a/RFXtoRP_RestResponse.ftl b/RFXtoRP_RestResponse.ftl index 6a4d000..2a29aeb 100644 --- a/RFXtoRP_RestResponse.ftl +++ b/RFXtoRP_RestResponse.ftl @@ -1,508 +1,3 @@ -<<<<<<< HEAD -<#-- **** 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}" /> - - <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_PlatformLogCreate.ftl"> - } - ] - <#break> -<#-- *********************************************** ApiRestID = preparation_orders_post ******************** --> - <#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}" /> - - <#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> - <#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"> - } - ] - - - <#break> - <#default> - [ - { - <#if restResponsetMsg.body?? > - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#else> - <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> - - <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_PlatformLogCreate.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_RestResponseAllocationError.ftl"> - } - ] - - <#break> -<#-- *********************************************** ApiRestID = receipts_post ******************** --> - <#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}" /> - - <#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> - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)> - <#if preparationOrderPostResponse.status?? && (preparationOrderPostResponse.status == "SUCCESS" || preparationOrderPostResponse.status == "WARN") > - [ - { - <#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"> - } - ] - - <#break> - <#default> - [ - { - <#if restResponsetMsg.body?? > - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#else> - <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> - - <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_PlatformLogCreate.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_RestResponseAllocationError.ftl"> - } - ] - - <#break> - <#-- *********************************************** Appointment_post_create ******************** --> - <#case "appointment_post_create"> - <#switch restResponsetMsg.status!no_status> - <#case no_status> - [ - { - <#if restResponsetMsg.body?? > - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#else> - <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> - - <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_PlatformLogCreate.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentAllocationError> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_RestResponseAppointmentAllocationError.ftl"> - } - ] - <#break> - <#case 200> - <#case 201> - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)> - <#if preparationOrderPostResponse.status?? && (preparationOrderPostResponse.status == "SUCCESS" || preparationOrderPostResponse.status == "WARN") > - [ - { - <#stop > - } - ] - <#else> - [ - { - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_PlatformLogCreate.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentAllocationError> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_RestResponseAppointmentAllocationError.ftl"> - } - ] - - <#break> - <#default> - [ - { - <#if restResponsetMsg.body?? > - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#else> - <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> - - <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_PlatformLogCreate.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentAllocationError> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_RestResponseAppointmentAllocationError.ftl"> - } - ] - - <#break> - <#-- *********************************************** ApiRestID = appointment_put_update_ref ******************** --> - <#case "appointment_put_update_by_ref"> - <#case "appointment_put_update_by_number"> - <#switch restResponsetMsg.status!no_status> - <#case no_status> - [ - { - <#if restResponsetMsg.body?? > - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#else> - <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> - - <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_PlatformLogCreate.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentAllocationError> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_RestResponseAppointmentAllocationError.ftl"> - } - ] - <#break> - <#case 200> - <#case 201> - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)> - <#if preparationOrderPostResponse.status?? && (preparationOrderPostResponse.status == "SUCCESS" || preparationOrderPostResponse.status == "WARN") > - [ - { - <#stop > - } - ] - <#else> - [ - { - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_PlatformLogCreate.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentAllocationError> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_RestResponseAppointmentAllocationError.ftl"> - } - ] - - <#break> - <#default> - [ - { - <#if restResponsetMsg.body?? > - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#else> - <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> - - <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_PlatformLogCreate.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentAllocationError> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_RestResponseAppointmentAllocationError.ftl"> - } - ] - - <#break> - <#-- *********************************************** ApiRestID = canceled ******************** --> - <#case "status_appointment_put_update_by_ref"> - <#case "status_appointment_put_update_by_number"> - <#switch restResponsetMsg.status!no_status> - <#case no_status> - [ - { - <#if restResponsetMsg.body?? > - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#else> - <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> - - <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_PlatformLogCreate.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentAllocationError> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_RestResponseAppointmentAllocationError.ftl"> - } - ] - <#break> - <#case 200> - <#case 201> - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)> - <#if preparationOrderPostResponse.status?? && (preparationOrderPostResponse.status == "SUCCESS" || preparationOrderPostResponse.status == "WARN") > - [ - { - <#stop > - } - ] - <#else> - [ - { - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_PlatformLogCreate.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentAllocationError> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_RestResponseAppointmentAllocationError.ftl"> - } - ] - - <#break> - <#default> - [ - { - <#if restResponsetMsg.body?? > - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#else> - <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> - - <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_PlatformLogCreate.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentAllocationError> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_RestResponseAppointmentAllocationError.ftl"> - } - ] - - <#break> - <#-- *********************************************** ApiRestID = appointment_post_physical_receipt_associations ******************** --> - <#case "appointment_post_physical_receipt_associations_by_ref"> - <#case "appointment_post_physical_receipt_associations_by_number"> - <#case "appointment_post_physical_receipt_dissociations_by_ref"> - <#case "appointment_post_physical_receipt_dissociations_by_number"> - <#switch restResponsetMsg.status!no_status> - <#case no_status> - [ - { - <#if restResponsetMsg.body?? > - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#else> - <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> - - <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_PlatformLogCreate.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentAllocationError> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_RestResponseAppointmentAllocationError.ftl"> - } - ] - <#break> - <#case 200> - <#case 201> - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)> - <#if preparationOrderPostResponse.status?? && (preparationOrderPostResponse.status == "SUCCESS" || preparationOrderPostResponse.status == "WARN") > - [ - { - <#stop > - } - ] - <#else> - [ - { - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_PlatformLogCreate.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentAllocationError> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_RestResponseAppointmentAllocationError.ftl"> - } - ] - - <#break> - <#default> - [ - { - <#if restResponsetMsg.body?? > - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#else> - <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> - - <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_PlatformLogCreate.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentAllocationError> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_RestResponseAppointmentAllocationError.ftl"> - } - ] - - <#break> -<#-- *********************************************** default ******************** --> - <#default> - <#stop> - - -======= <#-- **** input parameters ***** --> <#-- input : Response message from HARDIS WMS --> <#-- project : projectId in HARDIS SC NETWORK --> @@ -1024,4 +519,3 @@ <#stop> ->>>>>>> bb2174a (SCPN1-10253) From 2a908a85d778a0083fe0dc5b20e18ee31557825f Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Mon, 2 Mar 2026 12:10:01 +0100 Subject: [PATCH 41/87] SCPN1-10253 --- RFXtoRP_PlatformLogCreate.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_PlatformLogCreate.ftl b/RFXtoRP_PlatformLogCreate.ftl index e38863f..953c214 100644 --- a/RFXtoRP_PlatformLogCreate.ftl +++ b/RFXtoRP_PlatformLogCreate.ftl @@ -33,7 +33,7 @@ "DetailElements": [], "CorrelationID": "${id.correlationid!"no Correlationid"}", "ContextPayload": ${strJsonBody}, - "Type": ${event}, + "Type": "${event}", "Task": "${id.apiRestReflexID!"no Task"}", "OriginalID": "${id.refid!"no OriginalID"?trim?json_string}", "StackTrace": "" From eea2a41313e5ee3b118223b3d0e748b8a69eb17e Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Mon, 2 Mar 2026 16:18:04 +0100 Subject: [PATCH 42/87] SCPN1-10253 --- ...rCarrierApt_BookingForceBookAppointment.ftl | 18 ++++++------------ ...rCarrierApt_BookingWMSUpdateAppointment.ftl | 9 +++------ RFXtoRP_HsrCarrierApt_ProjectQuantities.ftl | 5 ----- RFXtoRP_HsrCarrierApt_Quantities.ftl | 5 ----- RFXtoRP_HsrCarrierApt_TotalQuantities.ftl | 5 ----- 5 files changed, 9 insertions(+), 33 deletions(-) delete mode 100644 RFXtoRP_HsrCarrierApt_ProjectQuantities.ftl delete mode 100644 RFXtoRP_HsrCarrierApt_Quantities.ftl delete mode 100644 RFXtoRP_HsrCarrierApt_TotalQuantities.ftl diff --git a/RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl index 5ef9252..43307e6 100644 --- a/RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl @@ -112,15 +112,12 @@ "ExecutionflowID": "R${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year?json_string}${physical_receipt.receipt_number?json_string}", "ProjectID": "${projectRP}", "PartnerAppID": "${partnerApplicationRP}", - "OrganisationID": "${organisationRP}", - <#include "RFXtoRP_HsrCarrierApt_Quantities.ftl"> + "OrganisationID": "${organisationRP}" }<#sep>, ], - "ProjectID" : "${projectRP}", - <#include "RFXtoRP_HsrCarrierApt_ProjectQuantities.ftl"> - }], - <#include "RFXtoRP_HsrCarrierApt_TotalQuantities.ftl"> + "ProjectID" : "${projectRP}" + }] }, <#else> "Loading" : @@ -130,13 +127,10 @@ "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", "ProjectID": "${projectRP}", "PartnerAppID": "${partnerApplicationRP}", - "OrganisationID": "${organisationRP}", - <#include "RFXtoRP_HsrCarrierApt_Quantities.ftl"> + "OrganisationID": "${organisationRP}" }], - "ProjectID" : "${projectRP}:${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", - <#include "RFXtoRP_HsrCarrierApt_ProjectQuantities.ftl"> - }], - <#include "RFXtoRP_HsrCarrierApt_TotalQuantities.ftl"> + "ProjectID" : "${projectRP}:${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" + }] }, <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> "Reason": "UNLOADING AND LOADING / ${carrier_apt.appointment_designation?json_string}", diff --git a/RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl index 7085a3e..c1dc1bb 100644 --- a/RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl @@ -108,15 +108,12 @@ "ExecutionflowID": "R${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year?json_string}${physical_receipt.receipt_number?json_string}", "ProjectID": "${projectRP}", "PartnerAppID": "${partnerApplicationRP}", - "OrganisationID": "${organisationRP}", - <#include "RFXtoRP_HsrCarrierApt_Quantities.ftl"> + "OrganisationID": "${organisationRP}" }<#sep>, ], - "ProjectID" : "${projectRP}", - <#include "RFXtoRP_HsrCarrierApt_ProjectQuantities.ftl"> - }], - <#include "RFXtoRP_HsrCarrierApt_TotalQuantities.ftl"> + "ProjectID" : "${projectRP}" + }] }, <#else> <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> diff --git a/RFXtoRP_HsrCarrierApt_ProjectQuantities.ftl b/RFXtoRP_HsrCarrierApt_ProjectQuantities.ftl deleted file mode 100644 index 6c84c6f..0000000 --- a/RFXtoRP_HsrCarrierApt_ProjectQuantities.ftl +++ /dev/null @@ -1,5 +0,0 @@ -"ProjectQuantities": [ - - ] - - diff --git a/RFXtoRP_HsrCarrierApt_Quantities.ftl b/RFXtoRP_HsrCarrierApt_Quantities.ftl deleted file mode 100644 index 22b0ec5..0000000 --- a/RFXtoRP_HsrCarrierApt_Quantities.ftl +++ /dev/null @@ -1,5 +0,0 @@ -"Quantities": [ - - ] - - diff --git a/RFXtoRP_HsrCarrierApt_TotalQuantities.ftl b/RFXtoRP_HsrCarrierApt_TotalQuantities.ftl deleted file mode 100644 index 61bfaac..0000000 --- a/RFXtoRP_HsrCarrierApt_TotalQuantities.ftl +++ /dev/null @@ -1,5 +0,0 @@ -"TotalQuantities": [ - - ] - - From 64fc9f3e1546ec9858879cc9e2d2e8ad266ac92c Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 10 Mar 2026 10:42:51 +0100 Subject: [PATCH 43/87] SCPN1-10408 --- RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl | 11 +++++------ RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl | 9 ++++----- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl index 43307e6..011f49f 100644 --- a/RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl @@ -8,7 +8,7 @@ "RefDate": { "DateTime": "${creation_datetime}", "AuthorTimeZone": "${time_zone_rfx}" - }, + }, <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> "RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", @@ -85,8 +85,7 @@ <#stop "planned_unloading_start_datetime or planned_load_end_datetime field of appointmend are not valid" > <#else> - <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNKNOWN> - <#assign duration = 0 /> + <#stop "Appointment type not supported" > @@ -98,7 +97,7 @@ <#include "RFXtoRP_HsrCarrierApt_MetadataAppointment.ftl">, <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0)> "Unloading" : - { + { "Projects" : [{ "Commissions": [ <#list carrier_apt.physical_receipt_list?filter(l ->l??) as physical_receipt> @@ -121,13 +120,13 @@ }, <#else> "Loading" : - { + { "Projects" : [{ "Commissions": [{ "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", "ProjectID": "${projectRP}", "PartnerAppID": "${partnerApplicationRP}", - "OrganisationID": "${organisationRP}" + "OrganisationID": "${organisationRP}" }], "ProjectID" : "${projectRP}:${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" }] diff --git a/RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl index c1dc1bb..cb731ac 100644 --- a/RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl @@ -9,7 +9,7 @@ "RefDate": { "DateTime": "${update_datetime}", "AuthorTimeZone": "${time_zone_rfx}" - }, + }, <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> "RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", @@ -85,17 +85,16 @@ <#stop "planned_unloading_start_datetime or planned_load_end_datetime field of appointmend are not valid" > <#else> - <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNKNOWN> - <#assign duration = 0 /> + <#stop "Appointment type not supported" > "TimeZone":"${time_zone_rfx}", <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0) && ((carrier_apt.unloading_appointment =="true" && carrier_apt.load_appointment =="false") || (carrier_apt.unloading_appointment =="false" && carrier_apt.load_appointment =="true"))> "Unloading" : - { + { "Projects" : [ - { + { "Commissions": [ <#list carrier_apt.physical_receipt_list?filter(l ->l??) as physical_receipt> { From 81c6dec4f26182175d11a2949ad14e72da9a31cb Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 11 Mar 2026 11:29:53 +0100 Subject: [PATCH 44/87] SCPN1-10414 --- RFXtoRP_RestResponse.ftl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/RFXtoRP_RestResponse.ftl b/RFXtoRP_RestResponse.ftl index 2a29aeb..60a609a 100644 --- a/RFXtoRP_RestResponse.ftl +++ b/RFXtoRP_RestResponse.ftl @@ -25,7 +25,7 @@ <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : + "datas" : <#include "RFXtoRP_PlatformLogCreate.ftl"> } ] @@ -153,10 +153,10 @@ <#if preparationOrderPostResponse.status?? && (preparationOrderPostResponse.status == "SUCCESS" || preparationOrderPostResponse.status == "WARN") > [ { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipToAcked> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_Receipt_ShipToAcked.ftl"> + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDeleted> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_Receipt_ExecutionflowDeleted.ftl"> } ] <#else> From 07a50a71d948184593b633c9a2b3c19e9f675778 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 18 Mar 2026 11:13:55 +0100 Subject: [PATCH 45/87] SCPN1-10443 --- RFXtoRP_HsrReceiptList.ftl | 76 +++++++++++++++++++++++++++++++------- 1 file changed, 62 insertions(+), 14 deletions(-) diff --git a/RFXtoRP_HsrReceiptList.ftl b/RFXtoRP_HsrReceiptList.ftl index 3d67332..3bb5391 100644 --- a/RFXtoRP_HsrReceiptList.ftl +++ b/RFXtoRP_HsrReceiptList.ftl @@ -79,12 +79,42 @@ } <#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"> - } + <#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!=""> + <#assign ID = "${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> + <#assign ID = "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}"/> + + <#assign payload = '{"Header": {"ProjectID": "${projectRP!""}"},"IDs": [{"RefID": ${ID}"}]}' /> + <#assign queryApiReflexPlatformID = QueryApiReflexPlatformID.ExecutionflowGetByIds> + <#assign response = QueryApiReflexPlatformCall.call(queryApiReflexPlatformID,payload) /> + <#assign executionflowRP = JsonUtil.jsonToMap(response)> + <#if executionflowRP?? && executionflowRP.Objects?? && executionflowRP.Objects[0]?? && executionflowRP.Objects[0].ID.RefID?? > + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrReceiptList_TransfertExecutionflowReceiptCompleted.ftl"> + } + <#else> + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrReceiptList_TransfertExecutionflowDetected.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrReceiptList_TransfertReceiptExpected.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCustomFieldsUpdated> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrReceiptList_TransfertCustomFieldsUpdated.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> { @@ -95,12 +125,32 @@ } <#else> <#if receipt.receipt_confirmed ?? && receipt.receipt_confirmed == "true" > - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl"> - } + <#assign ID = "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}"/> + <#assign payload = '{"Header": {"ProjectID": "${projectRP!""}"},"IDs": [{"RefID": ${ID}"}]}' /> + <#assign queryApiReflexPlatformID = QueryApiReflexPlatformID.ExecutionflowGetByIds> + <#assign response = QueryApiReflexPlatformCall.call(queryApiReflexPlatformID,payload) /> + <#assign executionflowRP = JsonUtil.jsonToMap(response)> + <#if executionflowRP?? && executionflowRP.Objects?? && executionflowRP.Objects[0]?? && executionflowRP.Objects[0].ID.RefID?? > + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl"> + } + <#else> + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl"> + } + <#else> <#if receipt.receipt_type?? && receipt.receipt_type == "030" && receipt.receipt_confirmed == "false" && receipt.line_list??> <#if receipt.receipt_reference?? && receipt.receipt_reference!=""> @@ -110,14 +160,12 @@ "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsrReceiptList_TransfertExecutionflowDetected.ftl"> - }, { <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsrReceiptList_TransfertReceiptExpected.ftl"> - } ] <#else> From 48be4322cb6b99fb12fbc1170d6d0f868190dd0b Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 19 Mar 2026 11:14:45 +0100 Subject: [PATCH 46/87] SCPN1-10443 --- RFXtoRP_HsrReceiptList.ftl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/RFXtoRP_HsrReceiptList.ftl b/RFXtoRP_HsrReceiptList.ftl index 3bb5391..eddb514 100644 --- a/RFXtoRP_HsrReceiptList.ftl +++ b/RFXtoRP_HsrReceiptList.ftl @@ -15,7 +15,7 @@ <#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 --> + <#if receipt.receipt_type?? && receipt.receipt_type = "030" && receipt.line_list?? && receipt.line_list[0]?? > <#-- if reception is a transfer type --> [ { <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected> @@ -38,7 +38,7 @@ } ] <#else> - <#if receipt.line_list ??> + <#if receipt.line_list ?? && receipt.line_list[0]??> [ { <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected> @@ -145,14 +145,14 @@ <#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl"> }, { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected> + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : - <#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl"> + <#include "RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl"> } <#else> - <#if receipt.receipt_type?? && receipt.receipt_type == "030" && receipt.receipt_confirmed == "false" && receipt.line_list??> + <#if receipt.receipt_type?? && receipt.receipt_type == "030" && receipt.receipt_confirmed == "false" && receipt.line_list?? && receipt.line_list[0]??> <#if receipt.receipt_reference?? && receipt.receipt_reference!=""> [ { @@ -172,7 +172,7 @@ <#stop> <#-- Receipt reference for transfer is empty--> <#else> - <#if receipt.line_list ??> + <#if receipt.line_list ?? receipt.line_list[0]??> { <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected> "apiReflexPlatformID" : "${apiReflexPlatformID}", From 9dd59d75f3f32d20a59e0463c86657cd63b97c6b Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 19 Mar 2026 11:34:25 +0100 Subject: [PATCH 47/87] SCPN1-10443 --- RFXtoRP_HsrReceiptList.ftl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/RFXtoRP_HsrReceiptList.ftl b/RFXtoRP_HsrReceiptList.ftl index eddb514..8c7ee95 100644 --- a/RFXtoRP_HsrReceiptList.ftl +++ b/RFXtoRP_HsrReceiptList.ftl @@ -103,10 +103,10 @@ <#include "RFXtoRP_HsrReceiptList_TransfertExecutionflowDetected.ftl"> }, { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrReceiptList_TransfertReceiptExpected.ftl"> + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrReceiptList_TransfertExecutionflowReceiptCompleted.ftl"> }, { <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCustomFieldsUpdated> From f26dda887a767ac0d704b35d0779c2cab780d598 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 19 Mar 2026 11:51:15 +0100 Subject: [PATCH 48/87] SCPN1-10459 --- RFXtoRP_HsrPro.ftl | 6 --- ...srPro_ExecutionflowCustomFieldsUpdated.ftl | 44 ----------------- RFXtoRP_HsrReceiptList.ftl | 18 ------- ...oRP_HsrReceiptList_CustomFieldsUpdated.ftl | 40 ---------------- ...ceiptList_TransfertCustomFieldsUpdated.ftl | 48 ------------------- 5 files changed, 156 deletions(-) delete mode 100644 RFXtoRP_HsrPro_ExecutionflowCustomFieldsUpdated.ftl delete mode 100644 RFXtoRP_HsrReceiptList_CustomFieldsUpdated.ftl delete mode 100644 RFXtoRP_HsrReceiptList_TransfertCustomFieldsUpdated.ftl diff --git a/RFXtoRP_HsrPro.ftl b/RFXtoRP_HsrPro.ftl index 1eee43f..23ab2fb 100644 --- a/RFXtoRP_HsrPro.ftl +++ b/RFXtoRP_HsrPro.ftl @@ -24,12 +24,6 @@ "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsrPro_ExecutionflowDetected.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCustomFieldsUpdated> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrPro_ExecutionflowCustomFieldsUpdated.ftl"> } <#else> <#-- No line --> diff --git a/RFXtoRP_HsrPro_ExecutionflowCustomFieldsUpdated.ftl b/RFXtoRP_HsrPro_ExecutionflowCustomFieldsUpdated.ftl deleted file mode 100644 index aa18239..0000000 --- a/RFXtoRP_HsrPro_ExecutionflowCustomFieldsUpdated.ftl +++ /dev/null @@ -1,44 +0,0 @@ -<#include "HfRpConfig.ftl"> -<#include "ReflexUtils.ftl"> -<#include "ActorPrefix.ftl"> -[ - { - "Header": { - "ProjectID": "${projectRP}" - }, - "Payload" :{}, - "ID":{ - "CustomFields": [ - { - "Key": "depot_code", - "Value": "${preparation_order.physical_depot_code?trim?json_string}" - }, - { - "Key": "activity_code", - "Value": "${preparation_order.activity_code?trim?json_string}" - }, - { - "Key": "originator_code", - "Value": "${preparation_order.originator_code?trim?json_string}" - }, - { - "Key": "reference", - "Value": "${preparation_order.originator_reference?trim?json_string}" - }, - { - "Key": "order_year", - "Value": "${preparation_order.preparation_order_year}" - }, - { - "Key": "order_number", - "Value": "${preparation_order.preparation_order_number}" - } - ], - <#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}" - - } - } -] \ No newline at end of file diff --git a/RFXtoRP_HsrReceiptList.ftl b/RFXtoRP_HsrReceiptList.ftl index 8c7ee95..a60b5a0 100644 --- a/RFXtoRP_HsrReceiptList.ftl +++ b/RFXtoRP_HsrReceiptList.ftl @@ -29,12 +29,6 @@ "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsrReceiptList_TransfertReceiptExpected.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCustomFieldsUpdated> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrReceiptList_TransfertCustomFieldsUpdated.ftl"> } ] <#else> @@ -52,12 +46,6 @@ "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCustomFieldsUpdated> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrReceiptList_CustomFieldsUpdated.ftl"> } ] <#else> @@ -107,12 +95,6 @@ "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsrReceiptList_TransfertExecutionflowReceiptCompleted.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCustomFieldsUpdated> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrReceiptList_TransfertCustomFieldsUpdated.ftl"> } <#else> diff --git a/RFXtoRP_HsrReceiptList_CustomFieldsUpdated.ftl b/RFXtoRP_HsrReceiptList_CustomFieldsUpdated.ftl deleted file mode 100644 index af70611..0000000 --- a/RFXtoRP_HsrReceiptList_CustomFieldsUpdated.ftl +++ /dev/null @@ -1,40 +0,0 @@ -<#include "HfRpConfig.ftl"> -<#include "ReflexUtils.ftl"> -<#include "ActorPrefix.ftl"> -[ - { - "Header": { - "ProjectID": "${projectRP}" - }, - "Payload" :{}, - "ID":{ - "CustomFields": [ - { - "Key": "depot_code", - "Value": "${receipt.physical_depot_code?trim?json_string}" - }, - { - "Key": "activity_code", - "Value": "${receipt.activity_code?trim?json_string}" - }, - { - "Key": "originator_code", - "Value": "${receipt.originator_code?trim?json_string}" - }, - { - "Key": "reference", - "Value": "${receipt.receipt_reference?trim?json_string}" - }, - { - "Key": "order_year", - "Value": "${receipt.receipt_year}" - }, - { - "Key": "order_number", - "Value": "${receipt.receipt_number}" - } - ], - "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}" - } - } -] \ No newline at end of file diff --git a/RFXtoRP_HsrReceiptList_TransfertCustomFieldsUpdated.ftl b/RFXtoRP_HsrReceiptList_TransfertCustomFieldsUpdated.ftl deleted file mode 100644 index 0d940e0..0000000 --- a/RFXtoRP_HsrReceiptList_TransfertCustomFieldsUpdated.ftl +++ /dev/null @@ -1,48 +0,0 @@ -<#include "HfRpConfig.ftl"> -<#include "ReflexUtils.ftl"> -<#include "ActorPrefix.ftl"> -[ - { - "Header": { - "ProjectID": "${projectRP}" - }, - "Payload" :{}, - "ID":{ - "CustomFields": [ - { - "Key": "depot_code", - <#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!=""> - "Value": "${receipt.origin_order_line_depot?trim?json_string}" - <#else> - "Value": "${receipt.physical_depot_code?trim?json_string}" - - }, - { - "Key": "activity_code", - "Value": "${receipt.activity_code?trim?json_string}" - }, - { - "Key": "originator_code", - "Value": "${receipt.originator_code?trim?json_string}" - }, - { - "Key": "reference", - "Value": "${receipt.receipt_reference?trim?json_string}" - }, - { - "Key": "order_year", - "Value": "${receipt.receipt_year}" - }, - { - "Key": "order_number", - "Value": "${receipt.receipt_number}" - } - ], - <#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}" - - } - } -] \ No newline at end of file From 647e2d45aff12b5b35cf06ffe8ec038f4536659e Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 19 Mar 2026 14:15:15 +0100 Subject: [PATCH 49/87] SCPN1-10443 --- RFXtoRP_HsrReceiptList.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_HsrReceiptList.ftl b/RFXtoRP_HsrReceiptList.ftl index a60b5a0..e9aa791 100644 --- a/RFXtoRP_HsrReceiptList.ftl +++ b/RFXtoRP_HsrReceiptList.ftl @@ -154,7 +154,7 @@ <#stop> <#-- Receipt reference for transfer is empty--> <#else> - <#if receipt.line_list ?? receipt.line_list[0]??> + <#if receipt.line_list ?? && receipt.line_list[0]??> { <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected> "apiReflexPlatformID" : "${apiReflexPlatformID}", From 6ce6ac0b8d4ff6c9ed2c654f9b2c68d4e8ee6f2e Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 19 Mar 2026 14:30:00 +0100 Subject: [PATCH 50/87] SCPN1-10443 --- RFXtoRP_HsrReceiptList.ftl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RFXtoRP_HsrReceiptList.ftl b/RFXtoRP_HsrReceiptList.ftl index e9aa791..a898fc4 100644 --- a/RFXtoRP_HsrReceiptList.ftl +++ b/RFXtoRP_HsrReceiptList.ftl @@ -72,7 +72,7 @@ <#else> <#assign ID = "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}"/> - <#assign payload = '{"Header": {"ProjectID": "${projectRP!""}"},"IDs": [{"RefID": ${ID}"}]}' /> + <#assign payload = '{"Header": {"ProjectID": "${projectRP!""}"},"IDs": [{"RefID": "${ID}"}]}' /> <#assign queryApiReflexPlatformID = QueryApiReflexPlatformID.ExecutionflowGetByIds> <#assign response = QueryApiReflexPlatformCall.call(queryApiReflexPlatformID,payload) /> <#assign executionflowRP = JsonUtil.jsonToMap(response)> @@ -108,7 +108,7 @@ <#else> <#if receipt.receipt_confirmed ?? && receipt.receipt_confirmed == "true" > <#assign ID = "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}"/> - <#assign payload = '{"Header": {"ProjectID": "${projectRP!""}"},"IDs": [{"RefID": ${ID}"}]}' /> + <#assign payload = '{"Header": {"ProjectID": "${projectRP!""}"},"IDs": [{"RefID": ${ID}"}]}'/> <#assign queryApiReflexPlatformID = QueryApiReflexPlatformID.ExecutionflowGetByIds> <#assign response = QueryApiReflexPlatformCall.call(queryApiReflexPlatformID,payload) /> <#assign executionflowRP = JsonUtil.jsonToMap(response)> From d02e6feead986aec99224d350819d68550975cb4 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 19 Mar 2026 14:35:06 +0100 Subject: [PATCH 51/87] SCPN1-10443 --- RFXtoRP_HsrReceiptList.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_HsrReceiptList.ftl b/RFXtoRP_HsrReceiptList.ftl index a898fc4..5a0b680 100644 --- a/RFXtoRP_HsrReceiptList.ftl +++ b/RFXtoRP_HsrReceiptList.ftl @@ -108,7 +108,7 @@ <#else> <#if receipt.receipt_confirmed ?? && receipt.receipt_confirmed == "true" > <#assign ID = "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}"/> - <#assign payload = '{"Header": {"ProjectID": "${projectRP!""}"},"IDs": [{"RefID": ${ID}"}]}'/> + <#assign payload = '{"Header": {"ProjectID": "${projectRP!""}"},"IDs": [{"RefID": "${ID}"}]}'/> <#assign queryApiReflexPlatformID = QueryApiReflexPlatformID.ExecutionflowGetByIds> <#assign response = QueryApiReflexPlatformCall.call(queryApiReflexPlatformID,payload) /> <#assign executionflowRP = JsonUtil.jsonToMap(response)> From c89c74d2e232d8006a440332f64dd885985ea65a Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 19 Mar 2026 16:26:24 +0100 Subject: [PATCH 52/87] SCPN1-10443 --- RFXtoRP_HsrReceiptList.ftl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RFXtoRP_HsrReceiptList.ftl b/RFXtoRP_HsrReceiptList.ftl index 5a0b680..b12c160 100644 --- a/RFXtoRP_HsrReceiptList.ftl +++ b/RFXtoRP_HsrReceiptList.ftl @@ -72,7 +72,7 @@ <#else> <#assign ID = "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}"/> - <#assign payload = '{"Header": {"ProjectID": "${projectRP!""}"},"IDs": [{"RefID": "${ID}"}]}' /> + <#assign payload = '{"Header": {"ProjectID": "${projectRP!""}"},"IDs": [{"RefID": ${ID}}]}' /> <#assign queryApiReflexPlatformID = QueryApiReflexPlatformID.ExecutionflowGetByIds> <#assign response = QueryApiReflexPlatformCall.call(queryApiReflexPlatformID,payload) /> <#assign executionflowRP = JsonUtil.jsonToMap(response)> @@ -108,7 +108,7 @@ <#else> <#if receipt.receipt_confirmed ?? && receipt.receipt_confirmed == "true" > <#assign ID = "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}"/> - <#assign payload = '{"Header": {"ProjectID": "${projectRP!""}"},"IDs": [{"RefID": "${ID}"}]}'/> + <#assign payload = '{"Header": {"ProjectID": "${projectRP!""}"},"IDs": [{"RefID": ${ID}}]}'/> <#assign queryApiReflexPlatformID = QueryApiReflexPlatformID.ExecutionflowGetByIds> <#assign response = QueryApiReflexPlatformCall.call(queryApiReflexPlatformID,payload) /> <#assign executionflowRP = JsonUtil.jsonToMap(response)> From 6ae3af7139eb4a31745d2306ffac8157a6d23e59 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 19 Mar 2026 16:37:35 +0100 Subject: [PATCH 53/87] SCPN1-10443 --- RFXtoRP_HsrReceiptList_TransfertExecutionflowDetected.ftl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/RFXtoRP_HsrReceiptList_TransfertExecutionflowDetected.ftl b/RFXtoRP_HsrReceiptList_TransfertExecutionflowDetected.ftl index bffb8ec..adc340a 100644 --- a/RFXtoRP_HsrReceiptList_TransfertExecutionflowDetected.ftl +++ b/RFXtoRP_HsrReceiptList_TransfertExecutionflowDetected.ftl @@ -54,10 +54,14 @@ "DateTime": "${receipt_creation_datetime}", "AuthorTimeZone": "${time_zone_rfx}" }, - <#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!=""> + <#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="" && receipt.receipt_reference?? && receipt.receipt_reference!=""> "OrderID": "${receipt.receipt_reference?trim?json_string}", <#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 receipt.receipt_reference?? && receipt.receipt_reference!=""> + "OrderID": "${receipt.receipt_reference?trim?json_string}", + <#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}", + <#-- Header Metadata inclusion --> <#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_HeaderMetadata.ftl">, From f7394986c2d674c91d01de6dbf3ea4fab874d670 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 19 Mar 2026 16:57:33 +0100 Subject: [PATCH 54/87] SCPN1-10443 --- RFXtoRP_HsrReceiptList_TransfertExecutionflowDetected.ftl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/RFXtoRP_HsrReceiptList_TransfertExecutionflowDetected.ftl b/RFXtoRP_HsrReceiptList_TransfertExecutionflowDetected.ftl index adc340a..53b8270 100644 --- a/RFXtoRP_HsrReceiptList_TransfertExecutionflowDetected.ftl +++ b/RFXtoRP_HsrReceiptList_TransfertExecutionflowDetected.ftl @@ -39,10 +39,14 @@ "Value": "${receipt.receipt_number}" } ], - <#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!=""> + <#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="" && receipt.receipt_reference?? && receipt.receipt_reference!=""> "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 receipt.receipt_reference?? && receipt.receipt_reference!=""> + "RefID": "${receipt.physical_depot_code?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}", + "RefDate": { "DateTime": "${receipt_creation_datetime}", From 33ea0af1b946f3a2b666f28d32841a597e02960f Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 19 Mar 2026 17:10:10 +0100 Subject: [PATCH 55/87] SCPN1-10443 --- RFXtoRP_HsrReceiptList.ftl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RFXtoRP_HsrReceiptList.ftl b/RFXtoRP_HsrReceiptList.ftl index b12c160..5a0b680 100644 --- a/RFXtoRP_HsrReceiptList.ftl +++ b/RFXtoRP_HsrReceiptList.ftl @@ -72,7 +72,7 @@ <#else> <#assign ID = "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}"/> - <#assign payload = '{"Header": {"ProjectID": "${projectRP!""}"},"IDs": [{"RefID": ${ID}}]}' /> + <#assign payload = '{"Header": {"ProjectID": "${projectRP!""}"},"IDs": [{"RefID": "${ID}"}]}' /> <#assign queryApiReflexPlatformID = QueryApiReflexPlatformID.ExecutionflowGetByIds> <#assign response = QueryApiReflexPlatformCall.call(queryApiReflexPlatformID,payload) /> <#assign executionflowRP = JsonUtil.jsonToMap(response)> @@ -108,7 +108,7 @@ <#else> <#if receipt.receipt_confirmed ?? && receipt.receipt_confirmed == "true" > <#assign ID = "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}"/> - <#assign payload = '{"Header": {"ProjectID": "${projectRP!""}"},"IDs": [{"RefID": ${ID}}]}'/> + <#assign payload = '{"Header": {"ProjectID": "${projectRP!""}"},"IDs": [{"RefID": "${ID}"}]}'/> <#assign queryApiReflexPlatformID = QueryApiReflexPlatformID.ExecutionflowGetByIds> <#assign response = QueryApiReflexPlatformCall.call(queryApiReflexPlatformID,payload) /> <#assign executionflowRP = JsonUtil.jsonToMap(response)> From e5482ad09cefe8a721d5a1e9a2be8418c6afbbc3 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 19 Mar 2026 17:18:31 +0100 Subject: [PATCH 56/87] SCPN1-10443 --- RFXtoRP_HsrReceiptList.ftl | 17 +++++++++++++++-- ...ceiptList_TransfertExecutionflowDetected.ftl | 4 ---- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/RFXtoRP_HsrReceiptList.ftl b/RFXtoRP_HsrReceiptList.ftl index 5a0b680..cfad28e 100644 --- a/RFXtoRP_HsrReceiptList.ftl +++ b/RFXtoRP_HsrReceiptList.ftl @@ -67,11 +67,24 @@ } <#else> <#if receipt.receipt_type?? && receipt.receipt_type == "030" && receipt.receipt_confirmed == "true"> - <#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!=""> + <#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="" && receipt.receipt_reference?? && receipt.receipt_reference!=""> <#assign ID = "${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> - <#assign ID = "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 receipt.receipt_reference?? && receipt.receipt_reference!=""> + <#assign ID = "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_reference?trim?json_string}"/> + <#else> + <#assign ID = "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 receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="" && receipt.receipt_reference?? && receipt.receipt_reference!=""> + "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> + <#if receipt.receipt_reference?? && receipt.receipt_reference!=""> + "RefID": "${receipt.physical_depot_code?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}", + + <#assign payload = '{"Header": {"ProjectID": "${projectRP!""}"},"IDs": [{"RefID": "${ID}"}]}' /> <#assign queryApiReflexPlatformID = QueryApiReflexPlatformID.ExecutionflowGetByIds> <#assign response = QueryApiReflexPlatformCall.call(queryApiReflexPlatformID,payload) /> diff --git a/RFXtoRP_HsrReceiptList_TransfertExecutionflowDetected.ftl b/RFXtoRP_HsrReceiptList_TransfertExecutionflowDetected.ftl index 53b8270..5820692 100644 --- a/RFXtoRP_HsrReceiptList_TransfertExecutionflowDetected.ftl +++ b/RFXtoRP_HsrReceiptList_TransfertExecutionflowDetected.ftl @@ -58,15 +58,11 @@ "DateTime": "${receipt_creation_datetime}", "AuthorTimeZone": "${time_zone_rfx}" }, - <#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="" && receipt.receipt_reference?? && receipt.receipt_reference!=""> - "OrderID": "${receipt.receipt_reference?trim?json_string}", - <#else> <#if receipt.receipt_reference?? && receipt.receipt_reference!=""> "OrderID": "${receipt.receipt_reference?trim?json_string}", <#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}", - <#-- Header Metadata inclusion --> <#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_HeaderMetadata.ftl">, "ShipFrom": From 6fd708cf5835c82ef38920891b83ff322995225b Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 19 Mar 2026 17:28:52 +0100 Subject: [PATCH 57/87] SCPN1-10443 --- RFXtoRP_HsrReceiptList.ftl | 9 --------- 1 file changed, 9 deletions(-) diff --git a/RFXtoRP_HsrReceiptList.ftl b/RFXtoRP_HsrReceiptList.ftl index cfad28e..0528353 100644 --- a/RFXtoRP_HsrReceiptList.ftl +++ b/RFXtoRP_HsrReceiptList.ftl @@ -76,15 +76,6 @@ <#assign ID = "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 receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="" && receipt.receipt_reference?? && receipt.receipt_reference!=""> - "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> - <#if receipt.receipt_reference?? && receipt.receipt_reference!=""> - "RefID": "${receipt.physical_depot_code?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}", - - <#assign payload = '{"Header": {"ProjectID": "${projectRP!""}"},"IDs": [{"RefID": "${ID}"}]}' /> <#assign queryApiReflexPlatformID = QueryApiReflexPlatformID.ExecutionflowGetByIds> <#assign response = QueryApiReflexPlatformCall.call(queryApiReflexPlatformID,payload) /> From 217a2680ded5ea4245724dfbabc5933fed2bd6e0 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 20 Mar 2026 13:27:45 +0100 Subject: [PATCH 58/87] SCPN1-10443 --- RFXtoRP_HsrReceiptList.ftl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/RFXtoRP_HsrReceiptList.ftl b/RFXtoRP_HsrReceiptList.ftl index 0528353..ae3e72c 100644 --- a/RFXtoRP_HsrReceiptList.ftl +++ b/RFXtoRP_HsrReceiptList.ftl @@ -77,10 +77,10 @@ <#assign payload = '{"Header": {"ProjectID": "${projectRP!""}"},"IDs": [{"RefID": "${ID}"}]}' /> - <#assign queryApiReflexPlatformID = QueryApiReflexPlatformID.ExecutionflowGetByIds> + <#assign queryApiReflexPlatformID = QueryApiReflexPlatformID.OrderGetByIds> <#assign response = QueryApiReflexPlatformCall.call(queryApiReflexPlatformID,payload) /> - <#assign executionflowRP = JsonUtil.jsonToMap(response)> - <#if executionflowRP?? && executionflowRP.Objects?? && executionflowRP.Objects[0]?? && executionflowRP.Objects[0].ID.RefID?? > + <#assign orderRP = JsonUtil.jsonToMap(response)> + <#if orderRP?? && orderRP.Objects?? && orderRP.Objects[0]?? && orderRP.Objects[0].ID.RefID?? > { <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted> "apiReflexPlatformID" : "${apiReflexPlatformID}", @@ -113,10 +113,10 @@ <#if receipt.receipt_confirmed ?? && receipt.receipt_confirmed == "true" > <#assign ID = "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}"/> <#assign payload = '{"Header": {"ProjectID": "${projectRP!""}"},"IDs": [{"RefID": "${ID}"}]}'/> - <#assign queryApiReflexPlatformID = QueryApiReflexPlatformID.ExecutionflowGetByIds> + <#assign queryApiReflexPlatformID = QueryApiReflexPlatformID.OrderGetByIds> <#assign response = QueryApiReflexPlatformCall.call(queryApiReflexPlatformID,payload) /> - <#assign executionflowRP = JsonUtil.jsonToMap(response)> - <#if executionflowRP?? && executionflowRP.Objects?? && executionflowRP.Objects[0]?? && executionflowRP.Objects[0].ID.RefID?? > + <#assign orderRP = JsonUtil.jsonToMap(response)> + <#if orderRP?? && orderRP.Objects?? && orderRP.Objects[0]?? && orderRP.Objects[0].ID.RefID?? > { <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted> "apiReflexPlatformID" : "${apiReflexPlatformID}", From 37495ca1416025d149bdc1e9de3ec9d1d1414c9f Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Tue, 24 Mar 2026 17:07:31 +0100 Subject: [PATCH 59/87] SCPN1-9218 --- RFXtoRP_HsrPro_ExecutionflowDetected.ftl | 1 + ...oRP_HsrPro_ExecutionflowDetected_ShipToMetadata.ftl | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 RFXtoRP_HsrPro_ExecutionflowDetected_ShipToMetadata.ftl diff --git a/RFXtoRP_HsrPro_ExecutionflowDetected.ftl b/RFXtoRP_HsrPro_ExecutionflowDetected.ftl index 32d421c..5d38307 100644 --- a/RFXtoRP_HsrPro_ExecutionflowDetected.ftl +++ b/RFXtoRP_HsrPro_ExecutionflowDetected.ftl @@ -79,6 +79,7 @@ <#else> "Actor": { + <#include "RFXtoRP_HsrPro_ExecutionflowDetected_ShipToMetadata.ftl">, "Name" : "${(preparation_order.address.name_or_company_name!"")?json_string}", "Address" : { diff --git a/RFXtoRP_HsrPro_ExecutionflowDetected_ShipToMetadata.ftl b/RFXtoRP_HsrPro_ExecutionflowDetected_ShipToMetadata.ftl new file mode 100644 index 0000000..dcc2bc7 --- /dev/null +++ b/RFXtoRP_HsrPro_ExecutionflowDetected_ShipToMetadata.ftl @@ -0,0 +1,10 @@ +<#-- use protobuf of class HsrPro to find HARDIS WMS fields names --> + +<#-- Best practices: + If the SK is of type: + - string: add ?json_string (e.g. "${stock.batch_1?json_string}") + - boolean: possible values: true and false + - datetime: expected format: 2025-10-30T10:12:10.000Z + - decimal number: the separator is a point (e.g. 10.5)--> + +"MetaData": [ ] \ No newline at end of file From f602f74da17e704bd7315e5f111867922fefc769 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Tue, 24 Mar 2026 17:10:45 +0100 Subject: [PATCH 60/87] SCPN1-10471 SCPN1-10402 --- RPtoRFX_AppointmentEvent.ftl | 103 ++++++++++-------- RPtoRFX_CarrierAppointmentCreated.ftl | 35 +++--- ...mentPhysicalReceiptAssociationByNumber.ftl | 2 +- ...intmentPhysicalReceiptAssociationByRef.ftl | 2 +- ...entPhysicalReceiptDissociationByNumber.ftl | 2 +- ...ntmentPhysicalReceiptDissociationByRef.ftl | 2 +- ...arrierAppointmentReasonUpdatedByNumber.ftl | 4 +- ...X_CarrierAppointmentReasonUpdatedByRef.ftl | 4 +- ...lotOrCarrierInformationUpdatedByNumber.ftl | 4 +- ...ntSlotOrCarrierInformationUpdatedByRef.ftl | 4 +- 10 files changed, 85 insertions(+), 77 deletions(-) diff --git a/RPtoRFX_AppointmentEvent.ftl b/RPtoRFX_AppointmentEvent.ftl index 06f345f..8c17b0a 100644 --- a/RPtoRFX_AppointmentEvent.ftl +++ b/RPtoRFX_AppointmentEvent.ftl @@ -28,70 +28,79 @@ <#assign AddComma = false /> <#assign appointment = eventRP.data /> [ - <#if eventRP.commissionsUpdated> - <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING" && eventRP.addedUnloadCommissions?? && eventRP.addedUnloadCommissions != ""> - <#if eventRP.appointmentCustomFields?has_content> - { - <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_number> - "apiRestReflexID" : "${apiRestReflexID}", - "datas" : - <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl"> - } - <#else> - { - <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_ref> - "apiRestReflexID" : "${apiRestReflexID}", - "datas" : - <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl"> - } + <#if appointment?? && appointment.Status?? && appointment.Status.Current?? && appointment.Status.Current.StatusCode?? && appointment.Status.Current.StatusCode == AppointmentStatusCode.APPOINTMENT_0150_ALLOCATION_ERROR> + { + <#assign apiRestReflexID = ApiRestReflexID.appointment_post_create> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : + <#include "RPtoRFX_CarrierAppointmentCreated.ftl"> + } + <#else> + <#if eventRP.commissionsUpdated> + <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING" && eventRP.addedUnloadCommissions?? && eventRP.addedUnloadCommissions != ""> + <#if eventRP.appointmentCustomFields?has_content> + { + <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_number> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : + <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl"> + } + <#else> + { + <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_ref> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : + <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl"> + } + + <#assign AddComma = true /> - <#assign AddComma = true /> - - <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING" && eventRP.removedUnloadCommissions?? && eventRP.removedUnloadCommissions!=""> + <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING" && eventRP.removedUnloadCommissions?? && eventRP.removedUnloadCommissions!=""> + <#if AddComma == true> + , + + + <#if eventRP.appointmentCustomFields?has_content> + { + <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_dissociations_by_number> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : + <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByNumber.ftl"> + } + <#else> + { + <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_dissociations_by_ref> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : + <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl"> + } + + <#assign AddComma = true /> + + + <#-- *********************************************** Action = reasonUpdated or slotUpdated ******************** --> + <#if eventRP.reasonUpdated || eventRP.slotUpdated || eventRP.carrierInformationUpdated> <#if AddComma == true> , - <#if eventRP.appointmentCustomFields?has_content> { - <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_dissociations_by_number> + <#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_number> "apiRestReflexID" : "${apiRestReflexID}", "datas" : - <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByNumber.ftl"> + <#include "RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl"> } <#else> { - <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_dissociations_by_ref> + <#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_ref> "apiRestReflexID" : "${apiRestReflexID}", "datas" : - <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl"> + <#include "RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl"> } <#assign AddComma = true /> - -<#-- *********************************************** Action = reasonUpdated or slotUpdated ******************** --> - <#if eventRP.reasonUpdated || eventRP.slotUpdated || eventRP.carrierInformationUpdated> - <#if AddComma == true> - , - - <#if eventRP.appointmentCustomFields?has_content> - { - <#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_number> - "apiRestReflexID" : "${apiRestReflexID}", - "datas" : - <#include "RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl"> - } - <#else> - { - <#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_ref> - "apiRestReflexID" : "${apiRestReflexID}", - "datas" : - <#include "RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl"> - } - - <#assign AddComma = true /> - + ] <#break> <#-- *********************************************** Action = Canceled ******************** --> diff --git a/RPtoRFX_CarrierAppointmentCreated.ftl b/RPtoRFX_CarrierAppointmentCreated.ftl index ebc72cb..f332b98 100644 --- a/RPtoRFX_CarrierAppointmentCreated.ftl +++ b/RPtoRFX_CarrierAppointmentCreated.ftl @@ -9,7 +9,7 @@ { "appointment_reference": "${eventRP.refid?json_string}", <#switch appointment.AppointmentType> - <#case "APPOINTMENT_TYPE_LOADING"> + <#case AppointmentType.APPOINTMENT_TYPE_LOADING> "unloading_appointment" : "false", "load_appointment" : "true", <#if appointment.TimeZone?? && appointment.TimeZone!=""> @@ -20,7 +20,7 @@ "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}", <#break> - <#case "APPOINTMENT_TYPE_UNLOADING"> + <#case AppointmentType.APPOINTMENT_TYPE_UNLOADING> "unloading_appointment" : "true", "load_appointment" : "false", <#if appointment.TimeZone?? && appointment.TimeZone!=""> @@ -35,30 +35,29 @@ <#stop "appointment.AppointmentType not implemented" > <#include "RPtoRFX_CarrierAppointmentDefaultData.ftl"> - <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING" > + <#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING > <#if appointment.Unloading?? && appointment.Unloading.Projects?? && appointment.Unloading.Projects[0]?? && appointment.Unloading.Projects[0].Commissions?? && - appointment.Unloading.Projects[0].Commissions[0]?? && - appointment.Unloading.Projects[0].Commissions[0].OrderID?? && - appointment.Unloading.Projects[0].Commissions[0].OrderID != ""> + appointment.Unloading.Projects[0].Commissions[0]??> "physical_receipt_list": [ - <#list eventRP.executionflowCustomFields.entrySet()?filter(l ->l.value?? && l.value?has_content) as custom> - { - "receipt_activity": "${custom.value.activity_code?json_string}", - "originator_code": "${custom.value.originator_code?json_string}", - "physical_receipt_reference": "${custom.value.reference?json_string}", - "receipt_year": "${custom.value.order_year?json_string}", - "receipt_number": "${custom.value.order_number?json_string}" - - } - <#sep>, - + <#list appointment.Unloading.Projects[0].Commissions?filter(l ->l.ExecutionflowID?? && l.ExecutionflowID !="") as commission> + <#list eventRP.executionflowCustomFields.entrySet()?filter(l ->l.key == commission.ExecutionflowID && l.value?? && l.value?has_content) as custom> + { + "receipt_activity": "${custom.value.activity_code?json_string}", + "originator_code": "${custom.value.originator_code?json_string}", + "physical_receipt_reference": "${custom.value.reference?json_string}", + "receipt_year": "${custom.value.order_year?json_string}", + "receipt_number": "${custom.value.order_number?json_string}" + } + <#sep>, + + ], <#else> "appointment_designation":"${(appointment.Reason!"")!?json_string}", <#else> - <#if appointment.AppointmentType == "APPOINTMENT_TYPE_LOADING"> + <#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_LOADING> "appointment_designation":"${(appointment.Reason!"")?json_string}", diff --git a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl index 5677a75..2d532b1 100644 --- a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl @@ -10,7 +10,7 @@ "payload" : { <#assign executionflowCustomFields = eventRP.executionflowCustomFields > - <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING"> + <#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING> <#assign addedCommissions = eventRP.addedUnloadCommissions /> <#else> <#assign addedCommissions = eventRP.addedLoadCommissions /> diff --git a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl index d19ea66..0fef024 100644 --- a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl +++ b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl @@ -9,7 +9,7 @@ "payload" : { <#assign executionflowCustomFields = eventRP.executionflowCustomFields > - <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING"> + <#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING> <#assign addedCommissions = eventRP.addedUnloadCommissions /> <#else> <#assign addedCommissions = eventRP.addedLoadCommissions /> diff --git a/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByNumber.ftl b/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByNumber.ftl index f3f2b2b..2f70e6c 100644 --- a/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByNumber.ftl @@ -10,7 +10,7 @@ "payload" : { <#assign executionflowCustomFields = eventRP.executionflowCustomFields > - <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING"> + <#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING> <#assign removedCommissions = eventRP.removedUnloadCommissions /> <#else> <#assign removedCommissions = eventRP.removedLoadCommissions /> diff --git a/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl b/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl index 85a66dc..20735f9 100644 --- a/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl +++ b/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl @@ -9,7 +9,7 @@ "payload" : { <#assign executionflowCustomFields = eventRP.executionflowCustomFields > - <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING"> + <#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING> <#assign removedCommissions = eventRP.removedUnloadCommissions /> <#else> <#assign removedCommissions = eventRP.removedLoadCommissions /> diff --git a/RPtoRFX_CarrierAppointmentReasonUpdatedByNumber.ftl b/RPtoRFX_CarrierAppointmentReasonUpdatedByNumber.ftl index 7a57906..a8c7598 100644 --- a/RPtoRFX_CarrierAppointmentReasonUpdatedByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentReasonUpdatedByNumber.ftl @@ -12,7 +12,7 @@ "unloading_appointment" : "${eventRP.appointmentCustomFields.unloading?json_string}", "load_appointment" : "${eventRP.appointmentCustomFields.loading?json_string}", <#switch appointment.AppointmentType> - <#case "APPOINTMENT_TYPE_LOADING"> + <#case AppointmentType.APPOINTMENT_TYPE_LOADING> <#if appointment.TimeZone?? && appointment.TimeZone!=""> "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", @@ -21,7 +21,7 @@ "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}", <#break> - <#case "APPOINTMENT_TYPE_UNLOADING"> + <#case AppointmentType.APPOINTMENT_TYPE_UNLOADING> <#if appointment.TimeZone?? && appointment.TimeZone!=""> "planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", "planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", diff --git a/RPtoRFX_CarrierAppointmentReasonUpdatedByRef.ftl b/RPtoRFX_CarrierAppointmentReasonUpdatedByRef.ftl index 00595f4..1ccf476 100644 --- a/RPtoRFX_CarrierAppointmentReasonUpdatedByRef.ftl +++ b/RPtoRFX_CarrierAppointmentReasonUpdatedByRef.ftl @@ -9,7 +9,7 @@ "payload" : { <#switch appointment.AppointmentType> - <#case "APPOINTMENT_TYPE_LOADING"> + <#case AppointmentType.APPOINTMENT_TYPE_LOADING> "unloading_appointment" : "false", "load_appointment" : "true", <#if appointment.TimeZone?? && appointment.TimeZone!=""> @@ -20,7 +20,7 @@ "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}", <#break> - <#case "APPOINTMENT_TYPE_UNLOADING"> + <#case AppointmentType.APPOINTMENT_TYPE_UNLOADING> "unloading_appointment" : "true", "load_appointment" : "false", <#if appointment.TimeZone?? && appointment.TimeZone!=""> diff --git a/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl b/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl index 7cc0667..1c94ae1 100644 --- a/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl @@ -13,7 +13,7 @@ "unloading_appointment" : "${eventRP.appointmentCustomFields.unloading?json_string}", "load_appointment" : "${eventRP.appointmentCustomFields.loading?json_string}", <#switch appointment.AppointmentType> - <#case "APPOINTMENT_TYPE_LOADING"> + <#case AppointmentType.APPOINTMENT_TYPE_LOADING> <#if appointment.TimeZone?? && appointment.TimeZone!=""> "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", @@ -22,7 +22,7 @@ "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}", <#break> - <#case "APPOINTMENT_TYPE_UNLOADING"> + <#case AppointmentType.APPOINTMENT_TYPE_UNLOADING> <#if appointment.TimeZone?? && appointment.TimeZone!=""> "planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", "planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", diff --git a/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl b/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl index 8c9f571..043550a 100644 --- a/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl +++ b/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl @@ -10,7 +10,7 @@ { <#include "RPtoRFX_CarrierAppointmentDataUpdated.ftl"> <#switch appointment.AppointmentType> - <#case "APPOINTMENT_TYPE_LOADING"> + <#case AppointmentType.APPOINTMENT_TYPE_LOADING> "unloading_appointment" : "false", "load_appointment" : "true", <#if appointment.TimeZone?? && appointment.TimeZone!=""> @@ -21,7 +21,7 @@ "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}", <#break> - <#case "APPOINTMENT_TYPE_UNLOADING"> + <#case AppointmentType.APPOINTMENT_TYPE_UNLOADING> "unloading_appointment" : "true", "load_appointment" : "false", <#if appointment.TimeZone?? && appointment.TimeZone!=""> From 8ebaa8e15a170219b476e71de1eccef17382d51a Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 26 Mar 2026 11:28:56 +0100 Subject: [PATCH 61/87] https://pid.hardis.fr/jira/browse/SCPN1-10443 --- RFXtoRP_HsrReceiptList_TransfertExecutionflowDetected.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_HsrReceiptList_TransfertExecutionflowDetected.ftl b/RFXtoRP_HsrReceiptList_TransfertExecutionflowDetected.ftl index 5820692..e972642 100644 --- a/RFXtoRP_HsrReceiptList_TransfertExecutionflowDetected.ftl +++ b/RFXtoRP_HsrReceiptList_TransfertExecutionflowDetected.ftl @@ -237,7 +237,7 @@ "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}", + "OrderID":"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}", <#-- Header Metadata inclusion --> <#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_HeaderMetadata.ftl">, "ShipFrom": From 83260c7ac57acd56235c47b9bf81149686beb626 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 26 Mar 2026 11:37:46 +0100 Subject: [PATCH 62/87] SCPN1-10443 --- ...ReceiptList_TransfertExecutionflowCancelled.ftl | 14 +++++++++----- ...List_TransfertExecutionflowReceiptCompleted.ftl | 14 +++++++++----- ...oRP_HsrReceiptList_TransfertReceiptExpected.ftl | 14 +++++++++----- 3 files changed, 27 insertions(+), 15 deletions(-) diff --git a/RFXtoRP_HsrReceiptList_TransfertExecutionflowCancelled.ftl b/RFXtoRP_HsrReceiptList_TransfertExecutionflowCancelled.ftl index 1ea0c2b..e4721b6 100644 --- a/RFXtoRP_HsrReceiptList_TransfertExecutionflowCancelled.ftl +++ b/RFXtoRP_HsrReceiptList_TransfertExecutionflowCancelled.ftl @@ -7,11 +7,15 @@ { "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": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_reference?trim?json_string}", - + <#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="" && receipt.receipt_reference?? && receipt.receipt_reference!=""> + "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> + <#if receipt.receipt_reference?? && receipt.receipt_reference!=""> + "RefID": "${receipt.physical_depot_code?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}", + + "RefDate": { "DateTime": "${receipt_status_datetime}", "AuthorTimeZone": "${time_zone_rfx}" diff --git a/RFXtoRP_HsrReceiptList_TransfertExecutionflowReceiptCompleted.ftl b/RFXtoRP_HsrReceiptList_TransfertExecutionflowReceiptCompleted.ftl index e8b647d..37876c4 100644 --- a/RFXtoRP_HsrReceiptList_TransfertExecutionflowReceiptCompleted.ftl +++ b/RFXtoRP_HsrReceiptList_TransfertExecutionflowReceiptCompleted.ftl @@ -7,11 +7,15 @@ { "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": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_reference?trim?json_string}", - + <#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="" && receipt.receipt_reference?? && receipt.receipt_reference!=""> + "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> + <#if receipt.receipt_reference?? && receipt.receipt_reference!=""> + "RefID": "${receipt.physical_depot_code?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}", + + "RefDate": { "DateTime": "${receipt_status_datetime}", "AuthorTimeZone": "${time_zone_rfx}" diff --git a/RFXtoRP_HsrReceiptList_TransfertReceiptExpected.ftl b/RFXtoRP_HsrReceiptList_TransfertReceiptExpected.ftl index 3ffb8c4..7b692e7 100644 --- a/RFXtoRP_HsrReceiptList_TransfertReceiptExpected.ftl +++ b/RFXtoRP_HsrReceiptList_TransfertReceiptExpected.ftl @@ -7,11 +7,15 @@ { "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": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_reference?trim?json_string}", - + <#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="" && receipt.receipt_reference?? && receipt.receipt_reference!=""> + "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> + <#if receipt.receipt_reference?? && receipt.receipt_reference!=""> + "RefID": "${receipt.physical_depot_code?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}", + + "RefDate": { "DateTime": "${receipt_status_datetime}", "AuthorTimeZone": "${time_zone_rfx}" From 57576b1ac068938574c1af88b1818f8633204e65 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 26 Mar 2026 14:14:31 +0100 Subject: [PATCH 63/87] SCPN1-10443 --- RFXtoRP_HsaIpgMove_GoodsReceived.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_HsaIpgMove_GoodsReceived.ftl b/RFXtoRP_HsaIpgMove_GoodsReceived.ftl index ac9ea2c..c0d861b 100644 --- a/RFXtoRP_HsaIpgMove_GoodsReceived.ftl +++ b/RFXtoRP_HsaIpgMove_GoodsReceived.ftl @@ -34,7 +34,7 @@ "ExecutionflowID": "${reflexMvtStockInterface.original_receipt_physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.origin_order_line_reference?trim?json_string}", "OrderID": "${reflexMvtStockInterface.origin_order_line_reference?trim?json_string}", <#else> - <#if reflexMvtStockInterface.receipt_reference?? && reflexMvtStockInterface.receipt_reference!=""> + <#if reflexMvtStockInterface.receipt_reference?? && reflexMvtStockInterface.receipt_reference!="" && !reflexMvtStockInterface.receipt_reference?starts_with(reflexMvtStockInterface.original_receipt_physical_depot_code + reflexMvtStockInterface.activity_code + reflexMvtStockInterface.receipt_year_number)> "ExecutionflowID": "${reflexMvtStockInterface.original_receipt_physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_reference?trim?json_string}", "OrderID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}", <#else> From 3d585203ef29061eafc03856fcbdd003302f4f9e Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Tue, 31 Mar 2026 08:53:18 +0200 Subject: [PATCH 64/87] SCPN1-10402 --- RPtoRFX_AppointmentEvent.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RPtoRFX_AppointmentEvent.ftl b/RPtoRFX_AppointmentEvent.ftl index 8c17b0a..703fc1b 100644 --- a/RPtoRFX_AppointmentEvent.ftl +++ b/RPtoRFX_AppointmentEvent.ftl @@ -28,7 +28,7 @@ <#assign AddComma = false /> <#assign appointment = eventRP.data /> [ - <#if appointment?? && appointment.Status?? && appointment.Status.Current?? && appointment.Status.Current.StatusCode?? && appointment.Status.Current.StatusCode == AppointmentStatusCode.APPOINTMENT_0150_ALLOCATION_ERROR> + <#if appointment?? && (!(appointment.WMSCreated??) || !appointment.WMSCreated) && appointment.Status?? && appointment.Status.Current?? && appointment.Status.Current.StatusCode?? && appointment.Status.Current.StatusCode == AppointmentStatusCode.APPOINTMENT_0150_ALLOCATION_ERROR> { <#assign apiRestReflexID = ApiRestReflexID.appointment_post_create> "apiRestReflexID" : "${apiRestReflexID}", From 93effa78ffd41e8745ff251293a97e13841b73d2 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Tue, 31 Mar 2026 17:57:33 +0200 Subject: [PATCH 65/87] SCPN1-10402 --- RPtoRFX_AppointmentEvent.ftl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RPtoRFX_AppointmentEvent.ftl b/RPtoRFX_AppointmentEvent.ftl index 703fc1b..c83464d 100644 --- a/RPtoRFX_AppointmentEvent.ftl +++ b/RPtoRFX_AppointmentEvent.ftl @@ -37,7 +37,7 @@ } <#else> <#if eventRP.commissionsUpdated> - <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING" && eventRP.addedUnloadCommissions?? && eventRP.addedUnloadCommissions != ""> + <#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING && eventRP.addedUnloadCommissions?? && eventRP.addedUnloadCommissions != ""> <#if eventRP.appointmentCustomFields?has_content> { <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_number> @@ -55,7 +55,7 @@ <#assign AddComma = true /> - <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING" && eventRP.removedUnloadCommissions?? && eventRP.removedUnloadCommissions!=""> + <#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING && eventRP.removedUnloadCommissions?? && eventRP.removedUnloadCommissions!=""> <#if AddComma == true> , From 20437cace5bc0bc04ab0a2d7b6a184c265ecb4d9 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 2 Apr 2026 11:48:30 +0200 Subject: [PATCH 66/87] SCPN1-10534 --- ...ted.ftl => RFXtoRP_ExecutionflowDeleted.ftl | 0 RFXtoRP_RestResponse.ftl | 18 +++++++++--------- 2 files changed, 9 insertions(+), 9 deletions(-) rename RFXtoRP_Receipt_ExecutionflowDeleted.ftl => RFXtoRP_ExecutionflowDeleted.ftl (100%) diff --git a/RFXtoRP_Receipt_ExecutionflowDeleted.ftl b/RFXtoRP_ExecutionflowDeleted.ftl similarity index 100% rename from RFXtoRP_Receipt_ExecutionflowDeleted.ftl rename to RFXtoRP_ExecutionflowDeleted.ftl diff --git a/RFXtoRP_RestResponse.ftl b/RFXtoRP_RestResponse.ftl index 60a609a..4910c41 100644 --- a/RFXtoRP_RestResponse.ftl +++ b/RFXtoRP_RestResponse.ftl @@ -62,20 +62,20 @@ <#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "SUCCESS" > [ { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipFromAcked> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_PrepOrder_ShipFromAcked.ftl"> + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDeleted> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_ExecutionflowDeleted.ftl"> } ] <#else> <#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "WARN"> [ { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipFromAcked> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_PrepOrder_ShipFromAcked.ftl"> + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDeleted> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_ExecutionflowDeleted.ftl"> } ] <#else> @@ -156,7 +156,7 @@ <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDeleted> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : - <#include "RFXtoRP_Receipt_ExecutionflowDeleted.ftl"> + <#include "RFXtoRP_ExecutionflowDeleted.ftl"> } ] <#else> From 4e3162556c73c277a875f62b42cbe28f15896c7f Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Fri, 3 Apr 2026 14:30:18 +0200 Subject: [PATCH 67/87] SCPN1-10402 --- RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl | 8 ++++++-- RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl | 1 + RPtoRFX_CarrierAppointmentCreated.ftl | 3 ++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl index 011f49f..d2b0ba7 100644 --- a/RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl @@ -119,7 +119,11 @@ }] }, <#else> - "Loading" : + <#if appointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING> + "Unloading" : + <#else> + "Loading" : + { "Projects" : [{ "Commissions": [{ @@ -128,7 +132,7 @@ "PartnerAppID": "${partnerApplicationRP}", "OrganisationID": "${organisationRP}" }], - "ProjectID" : "${projectRP}:${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" + "ProjectID" : "${projectRP}" }] }, <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> diff --git a/RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl index cb731ac..47eb211 100644 --- a/RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl @@ -114,6 +114,7 @@ "ProjectID" : "${projectRP}" }] }, + "Reason": "", <#else> <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> "Reason": "UNLOADING AND LOADING / ${carrier_apt.appointment_designation?json_string}", diff --git a/RPtoRFX_CarrierAppointmentCreated.ftl b/RPtoRFX_CarrierAppointmentCreated.ftl index f332b98..f936c07 100644 --- a/RPtoRFX_CarrierAppointmentCreated.ftl +++ b/RPtoRFX_CarrierAppointmentCreated.ftl @@ -51,7 +51,8 @@ } <#sep>, - + <#sep>, + ], <#else> "appointment_designation":"${(appointment.Reason!"")!?json_string}", From ee7e5bb8c94df6a854a13e8489b9b6818ff1295f Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 3 Apr 2026 16:22:31 +0200 Subject: [PATCH 68/87] SCPN1-10534 --- RFXtoRP_RestResponse.ftl | 68 +++++++++++++++++++--------------- RPtoRFX_ExecutionflowEvent.ftl | 6 +-- 2 files changed, 42 insertions(+), 32 deletions(-) diff --git a/RFXtoRP_RestResponse.ftl b/RFXtoRP_RestResponse.ftl index 4910c41..9ce70f5 100644 --- a/RFXtoRP_RestResponse.ftl +++ b/RFXtoRP_RestResponse.ftl @@ -8,12 +8,22 @@ <#assign projectRP = project> <#assign organisationRP = organisation> - <#assign aDateTime = .now> <#assign no_apiRestReflexID = "no apiRestReflexID"> <#assign no_status = -99999> <#assign event = "UNKNOW_EVENT" > +<#-- --------------------------------------------------------------------------------------- --> +<#-- DeleteEF est un paramètre qui permet de déterminer si l’exécution logistique doit être supprimée lors de la création d’une commande.--> +<#-- Attention : si vous choisissez de la supprimer, toutes les métadonnées associées à cette exécution logistique seront également supprimées. --> +<#-- Si DeleteEF_False = vrai, nous ne supprimons pas l'exécution logistique, Si DeleteEF_False = false, nous supprimons l'exécution logistique.--> +<#-- --------------------------------------------------------------------------------------- --> +<#-- DeleteEF is a parameter used to determine whether the logistics execution should be deleted when creating an order.--> +<#-- Warning: if deletion is selected, all metadata related to the logistics execution will also be removed. --> +<#-- If DeleteEF_False = true, we do not delete the logistics execution. If DeleteEF_False = false, we delete the logistics execution. --> +<#-- --------------------------------------------------------------------------------------- --> +<#assign DeleteEF_False = true> + <#switch id.apiRestReflexID!no_apiRestReflexID> <#case no_apiRestReflexID> [ @@ -59,17 +69,17 @@ <#case 201> <#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_ExecutionflowDeleted.ftl"> - } - ] - <#else> - <#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "WARN"> + <#if preparationOrderPostResponse.status?? && (preparationOrderPostResponse.status == "SUCCESS" || preparationOrderPostResponse.status == "WARN") > + <#if DeleteEF_False> + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipFromAcked> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_PrepOrder_ShipFromAcked.ftl"> + } + ] + <#else> [ { <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDeleted> @@ -78,24 +88,24 @@ <#include "RFXtoRP_ExecutionflowDeleted.ftl"> } ] - <#else> - [ - { - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#assign event = "RP_EXECUTIONFLOW_EVENT"> - <#include "RFXtoRP_PlatformLogCreate.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_RestResponseAllocationError.ftl"> - } - ] + <#else> + [ + { + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#assign event = "RP_EXECUTIONFLOW_EVENT"> + <#include "RFXtoRP_PlatformLogCreate.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_RestResponseAllocationError.ftl"> + } + ] <#break> <#default> diff --git a/RPtoRFX_ExecutionflowEvent.ftl b/RPtoRFX_ExecutionflowEvent.ftl index b959c1e..a6b8883 100644 --- a/RPtoRFX_ExecutionflowEvent.ftl +++ b/RPtoRFX_ExecutionflowEvent.ftl @@ -29,9 +29,9 @@ [ <#if eventRP.partnerAppRole == "ShipFrom" && executionflow.ShipFrom.ActorID != "" && executionflow.ShipFrom.Actor.IsShipFromConnected?? && executionflow.ShipFrom.Actor.IsShipFromConnected> { - <#assign apiRestReflexID = ApiRestReflexID.preparation_orders_post> - "apiRestReflexID" : "${apiRestReflexID}", - "datas" : + <#assign apiRestReflexID = ApiRestReflexID.preparation_orders_post> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : <#include "RPtoRFX_PrepOrder.ftl"> } From 97f93a1f26f7cbf32a138a456be8ee8b24d9b1a9 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 3 Apr 2026 16:32:02 +0200 Subject: [PATCH 69/87] SCPN1-10534 --- RFXtoRP_RestResponse.ftl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/RFXtoRP_RestResponse.ftl b/RFXtoRP_RestResponse.ftl index 9ce70f5..306ec77 100644 --- a/RFXtoRP_RestResponse.ftl +++ b/RFXtoRP_RestResponse.ftl @@ -22,7 +22,7 @@ <#-- Warning: if deletion is selected, all metadata related to the logistics execution will also be removed. --> <#-- If DeleteEF_False = true, we do not delete the logistics execution. If DeleteEF_False = false, we delete the logistics execution. --> <#-- --------------------------------------------------------------------------------------- --> -<#assign DeleteEF_False = true> +<#assign DeleteEF_False = false> <#switch id.apiRestReflexID!no_apiRestReflexID> <#case no_apiRestReflexID> @@ -164,8 +164,8 @@ [ { <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDeleted> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : <#include "RFXtoRP_ExecutionflowDeleted.ftl"> } ] From 62cdd584d3f0c5f729c0cf26fafbf24654e2006d Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 3 Apr 2026 16:36:54 +0200 Subject: [PATCH 70/87] SCPN1-10534 --- InternalSettings.ftl | 11 +++++++++++ RFXtoRP_RestResponse.ftl | 11 +---------- 2 files changed, 12 insertions(+), 10 deletions(-) create mode 100644 InternalSettings.ftl diff --git a/InternalSettings.ftl b/InternalSettings.ftl new file mode 100644 index 0000000..2e985b8 --- /dev/null +++ b/InternalSettings.ftl @@ -0,0 +1,11 @@ + +<#-- --------------------------------------------------------------------------------------- --> +<#-- DeleteEF est un paramètre qui permet de déterminer si l’exécution logistique doit être supprimée lors de la création d’une commande.--> +<#-- Attention : si vous choisissez de la supprimer, toutes les métadonnées associées à cette exécution logistique seront également supprimées. --> +<#-- Si DeleteEF_False = vrai, nous ne supprimons pas l'exécution logistique, Si DeleteEF_False = false, nous supprimons l'exécution logistique.--> +<#-- --------------------------------------------------------------------------------------- --> +<#-- DeleteEF is a parameter used to determine whether the logistics execution should be deleted when creating an order.--> +<#-- Warning: if deletion is selected, all metadata related to the logistics execution will also be removed. --> +<#-- If DeleteEF_False = true, we do not delete the logistics execution. If DeleteEF_False = false, we delete the logistics execution. --> +<#-- --------------------------------------------------------------------------------------- --> +<#assign DeleteEF_False = true> \ No newline at end of file diff --git a/RFXtoRP_RestResponse.ftl b/RFXtoRP_RestResponse.ftl index 306ec77..d5d8d93 100644 --- a/RFXtoRP_RestResponse.ftl +++ b/RFXtoRP_RestResponse.ftl @@ -13,16 +13,7 @@ <#assign no_status = -99999> <#assign event = "UNKNOW_EVENT" > -<#-- --------------------------------------------------------------------------------------- --> -<#-- DeleteEF est un paramètre qui permet de déterminer si l’exécution logistique doit être supprimée lors de la création d’une commande.--> -<#-- Attention : si vous choisissez de la supprimer, toutes les métadonnées associées à cette exécution logistique seront également supprimées. --> -<#-- Si DeleteEF_False = vrai, nous ne supprimons pas l'exécution logistique, Si DeleteEF_False = false, nous supprimons l'exécution logistique.--> -<#-- --------------------------------------------------------------------------------------- --> -<#-- DeleteEF is a parameter used to determine whether the logistics execution should be deleted when creating an order.--> -<#-- Warning: if deletion is selected, all metadata related to the logistics execution will also be removed. --> -<#-- If DeleteEF_False = true, we do not delete the logistics execution. If DeleteEF_False = false, we delete the logistics execution. --> -<#-- --------------------------------------------------------------------------------------- --> -<#assign DeleteEF_False = false> +<#include "InternalSettings.ftl"> <#switch id.apiRestReflexID!no_apiRestReflexID> <#case no_apiRestReflexID> From 6c0deafd93bfaefef17bc34c050cace1803e97e7 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 3 Apr 2026 16:54:48 +0200 Subject: [PATCH 71/87] SCPN1-10534 --- RFXtoRP_RestResponse.ftl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/RFXtoRP_RestResponse.ftl b/RFXtoRP_RestResponse.ftl index d5d8d93..5f01e87 100644 --- a/RFXtoRP_RestResponse.ftl +++ b/RFXtoRP_RestResponse.ftl @@ -12,7 +12,8 @@ <#assign no_apiRestReflexID = "no apiRestReflexID"> <#assign no_status = -99999> <#assign event = "UNKNOW_EVENT" > - +<#-- DeleteEF_False a définir dans ce fichier --> +<#-- DeleteEF_False to be defined in this file.--> <#include "InternalSettings.ftl"> <#switch id.apiRestReflexID!no_apiRestReflexID> From eaaa9bbea5336571189d189873dd9d8bbf297af4 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 3 Apr 2026 17:01:28 +0200 Subject: [PATCH 72/87] SCPN1-10534 --- InternalSettings.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InternalSettings.ftl b/InternalSettings.ftl index 2e985b8..7cd70f6 100644 --- a/InternalSettings.ftl +++ b/InternalSettings.ftl @@ -2,7 +2,7 @@ <#-- --------------------------------------------------------------------------------------- --> <#-- DeleteEF est un paramètre qui permet de déterminer si l’exécution logistique doit être supprimée lors de la création d’une commande.--> <#-- Attention : si vous choisissez de la supprimer, toutes les métadonnées associées à cette exécution logistique seront également supprimées. --> -<#-- Si DeleteEF_False = vrai, nous ne supprimons pas l'exécution logistique, Si DeleteEF_False = false, nous supprimons l'exécution logistique.--> +<#-- Si DeleteEF_False = true, nous ne supprimons pas l'exécution logistique, Si DeleteEF_False = false, nous supprimons l'exécution logistique.--> <#-- --------------------------------------------------------------------------------------- --> <#-- DeleteEF is a parameter used to determine whether the logistics execution should be deleted when creating an order.--> <#-- Warning: if deletion is selected, all metadata related to the logistics execution will also be removed. --> From e12c6e64e49b467d4c8279742ba03f1c0919dd05 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 13 Apr 2026 10:08:38 +0200 Subject: [PATCH 73/87] Delete Rec_Prev --- RFXtoRP_HsrAntRec.ftl | 10 +-- RFXtoRP_HsrAntRec_Created.ftl | 81 ------------------- RFXtoRP_HsrAntRec_Created_HeaderMetadata.ftl | 19 ----- RFXtoRP_HsrAntRec_Created_LineMetadata.ftl | 10 --- ...oRP_HsrAntRec_Created_SegmentationKeys.ftl | 47 ----------- 5 files changed, 3 insertions(+), 164 deletions(-) delete mode 100644 RFXtoRP_HsrAntRec_Created.ftl delete mode 100644 RFXtoRP_HsrAntRec_Created_HeaderMetadata.ftl delete mode 100644 RFXtoRP_HsrAntRec_Created_LineMetadata.ftl delete mode 100644 RFXtoRP_HsrAntRec_Created_SegmentationKeys.ftl diff --git a/RFXtoRP_HsrAntRec.ftl b/RFXtoRP_HsrAntRec.ftl index 440b422..97ece4c 100644 --- a/RFXtoRP_HsrAntRec.ftl +++ b/RFXtoRP_HsrAntRec.ftl @@ -17,11 +17,7 @@ <#assign ancReceipt = JsonUtil.jsonToMap(dataRfx)> [ { - <#--<#assign apiReflexPlatformID = ApiReflexPlatformID.OrderCreated> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrAntRec_Created.ftl">--> - <#stop "create anticipated receipt"> + <#stop > } ] <#break> @@ -31,7 +27,7 @@ <#assign ancReceipt = JsonUtil.jsonToMap(dataRfx)> [ { - <#stop "update anticipated receipt"> + <#stop > } ] <#break> @@ -43,7 +39,7 @@ [ { - <#stop "delete anticipated receipt"> + <#stop "delete > } ] <#break> diff --git a/RFXtoRP_HsrAntRec_Created.ftl b/RFXtoRP_HsrAntRec_Created.ftl deleted file mode 100644 index 3963b77..0000000 --- a/RFXtoRP_HsrAntRec_Created.ftl +++ /dev/null @@ -1,81 +0,0 @@ -<#include "ReflexUtils.ftl"> -<#include "HfRpConfig.ftl"> -<#include "ActorPrefix.ftl"> -[ - { - <#assign creationDate = RfxDateTimetoUTCWithTimezone(dataRfx.@timestamp,time_zone_rfx) /> - "Header": { - "ProjectID": "${projectRP}" - }, - "ID": { - "CustomFields": [ - { - "Key": "anticipated_receipt_reference", - "Value": "${ancReceipt.anticipated_receipt_reference?json_string}" - }, - { - "Key": "anticipated_receipt_year", - "Value": "${ancReceipt.anticipated_receipt_year?json_string}" - }, - { - "Key": "anticipated_receipt_number", - "Value": "${ancReceipt.anticipated_receipt_number?json_string}" - }, - { - "Key": "originator_code", - "Value": "${ancReceipt.originator_code?json_string}" - }, - { - "Key": "activity_code", - "Value": "${ancReceipt.activity_code?json_string}" - }, - { - "Key": "depot_code", - "Value": "${ancReceipt.physical_depot_code?json_string}" - } - ], - "RefID": "${ancReceipt.anticipated_receipt_reference?json_string}" - }, - "Payload": { - "ShipFrom": { - "ActorID": "${RFXtoRPprefixSupplier(ancReceipt.original_code?json_string)}" - }, - "ShipTo": { - "ActorID": "${RFXtoRPprefixDepot(ancReceipt.physical_depot_code?json_string)}" - }, - "CreationDateTime": { - "DateTime": "${creationDate}", - "AuthorTimeZone": "${time_zone_rfx}" - }, - "LanguageCodeISO6391":"fr", - <#-- Header Metadata inclusion --> - <#include "RFXtoRP_HsrAntRec_Created_HeaderMetadata.ftl">, - "Lines": [ - <#list ancReceipt.line_list?filter(l -> l??) as line> - { - <#if line.anticipated_receipt_reference_line_no?? && line.anticipated_receipt_reference_line_no!=0> - "LineID": ${line.anticipated_receipt_reference_line_no}, - <#else> - "LineID": ${line.anticipated_receipt_line_number}, - - <#-- Line Metadata inclusion --> - <#include "RFXtoRP_HsrAntRec_Created_LineMetadata.ftl">, - "RequestedContent":{ - "Goods":{ - "ItemID":"${line.item_code?trim?json_string!"0"}", - "LVBranchID":"${line.item_lv_code?trim?json_string!"0"}", - <#-- Segmentation Keys inclusion --> - <#include "RFXtoRP_HsrAntRec_Created_SegmentationKeys.ftl"> - }, - "Quantity" : - { - "LVID": "${quantity_in_base_lv_RP_Cst}", - "Value": "${line.planned_quantity_in_base_lv!0}" - } - } - }<#sep>, - - ] - } -} -] diff --git a/RFXtoRP_HsrAntRec_Created_HeaderMetadata.ftl b/RFXtoRP_HsrAntRec_Created_HeaderMetadata.ftl deleted file mode 100644 index 40f44a9..0000000 --- a/RFXtoRP_HsrAntRec_Created_HeaderMetadata.ftl +++ /dev/null @@ -1,19 +0,0 @@ -<#-- use protobuf of class HsrReceiptList to find HARDIS WMS fields names --> - -<#-- -<#-- Best practices: - If the SK is of type: - - string: add ?json_string (e.g. "${stock.batch_1?json_string}") - - boolean: possible values: true and false - - datetime: expected format: 2025-10-30T10:12:10.000Z - - decimal number: the separator is a point (e.g. 10.5) -"MetaData": [ - { - "Key": "OrderType", - "Value": { "String" : "${order.optional_attributes.reason_code}"} - } - ], ---> - - -"MetaData": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsrAntRec_Created_LineMetadata.ftl b/RFXtoRP_HsrAntRec_Created_LineMetadata.ftl deleted file mode 100644 index b920b69..0000000 --- a/RFXtoRP_HsrAntRec_Created_LineMetadata.ftl +++ /dev/null @@ -1,10 +0,0 @@ -<#-- use protobuf of class HsrReceiptList to find HARDIS WMS fields names --> - -<#-- Best practices: - If the SK is of type: - - string: add ?json_string (e.g. "${stock.batch_1?json_string}") - - boolean: possible values: true and false - - datetime: expected format: 2025-10-30T10:12:10.000Z - - decimal number: the separator is a point (e.g. 10.5)--> - -"MetaData": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsrAntRec_Created_SegmentationKeys.ftl b/RFXtoRP_HsrAntRec_Created_SegmentationKeys.ftl deleted file mode 100644 index de24f8b..0000000 --- a/RFXtoRP_HsrAntRec_Created_SegmentationKeys.ftl +++ /dev/null @@ -1,47 +0,0 @@ -<#-- use protobuf of class HsrReceiptList to find HARDIS WMS fields names --> - -<#-- -<#-- Best practices: - If the SK is of type: - - string: add ?json_string (e.g. "${stock.batch_1?json_string}") - - boolean: possible values: true and false - - datetime: expected format: 2025-10-30T10:12:10.000Z - - decimal number: the separator is a point (e.g. 10.5) -"SegmentationKeys": [ - { - "Key": "Grade", - "Value": { "String" : "${line.grade_code}"} - }, - { - "Key": "Owner", - "Value": { "String" : "${line.owner_code}"} - }, - { - "Key": "BatchNumber", - <#if reflexMvtStockInterface.batch_1 == ""> - "Value": { "String" : "no batch"} - <#else> - "Value": { "String" : "${line_without_detail.batch_1}"} - - }, - { - "Key": "HeldForSpecificCode", - <#if line_without_detail.hold_for_specific_code == "true"> - "Value": { "Bool" : "True"} - <#else> - "Value": { "Bool" : "False"} - }, - - { - <#assign manufacturing_date = line_without_detail.ipg_date_of_manufacture_date?datetime(rfx_date_format_default)?iso_utc /> - "Key": "ManufacturingDate", - "Value": "Timestamp": { - "AuthorTimeZone": "${time_zone_rfx}", - "DateTime": "${manufacturing_date}" - } - } - - ] - ---> -"SegmentationKeys": [ ] \ No newline at end of file From 8e1d0e3a17490c2d5f7a0dc10202c878da5457ea Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Mon, 13 Apr 2026 15:10:17 +0200 Subject: [PATCH 74/87] SCPN1-10560 --- ...CarrierApt_BookingWMSUpdateAppointment.ftl | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl index 47eb211..f834ed9 100644 --- a/RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl @@ -116,6 +116,41 @@ }, "Reason": "", <#else> + <#if appointmentType == AppointmentType.APPOINTMENT_TYPE_LOADING> + "Loading" : + { + "Projects" : [ + { + "Commissions": [ + { + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", + "ProjectID": "${projectRP}", + "PartnerAppID": "${partnerApplicationRP}", + "OrganisationID": "${organisationRP}" + } + ], + "ProjectID" : "${projectRP}" + }] + }, + <#else> + <#if appointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING> + "Unloading" : + { + "Projects" : [ + { + "Commissions": [ + { + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", + "ProjectID": "${projectRP}", + "PartnerAppID": "${partnerApplicationRP}", + "OrganisationID": "${organisationRP}" + } + ], + "ProjectID" : "${projectRP}" + }] + }, + + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> "Reason": "UNLOADING AND LOADING / ${carrier_apt.appointment_designation?json_string}", <#else> From 8a810c8a142c211ed8a103316f81ca4ea9048b0e Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 14 Apr 2026 14:33:44 +0200 Subject: [PATCH 75/87] SCPN1-10586 --- RPtoRFX_CarrierAppointmentCreated.ftl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/RPtoRFX_CarrierAppointmentCreated.ftl b/RPtoRFX_CarrierAppointmentCreated.ftl index f936c07..005386f 100644 --- a/RPtoRFX_CarrierAppointmentCreated.ftl +++ b/RPtoRFX_CarrierAppointmentCreated.ftl @@ -36,9 +36,9 @@ <#include "RPtoRFX_CarrierAppointmentDefaultData.ftl"> <#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING > - <#if appointment.Unloading?? && appointment.Unloading.Projects?? && appointment.Unloading.Projects[0]?? && - appointment.Unloading.Projects[0].Commissions?? && - appointment.Unloading.Projects[0].Commissions[0]??> + <#if appointment.Unloading?? && appointment.Unloading.Projects?? && appointment.Unloading.Projects[0]?? && + appointment.Unloading.Projects[0].Commissions?? && + appointment.Unloading.Projects[0].Commissions[0]?? && appointment.Unloading.Projects[0].Commissions[0].OrderID?? > "physical_receipt_list": [ <#list appointment.Unloading.Projects[0].Commissions?filter(l ->l.ExecutionflowID?? && l.ExecutionflowID !="") as commission> <#list eventRP.executionflowCustomFields.entrySet()?filter(l ->l.key == commission.ExecutionflowID && l.value?? && l.value?has_content) as custom> @@ -52,7 +52,7 @@ <#sep>, <#sep>, - + ], <#else> "appointment_designation":"${(appointment.Reason!"")!?json_string}", From 10fa7309fa541b21dffd25eb017e7b5944a4bfde Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Tue, 14 Apr 2026 14:35:04 +0200 Subject: [PATCH 76/87] SCPN1-10579 (cherry picked from commit 6fac2a7a2cf03e0fa9fb1e962bed9d42c1d4e5ee) --- RFXtoRP_HsrCarrierApt.ftl | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/RFXtoRP_HsrCarrierApt.ftl b/RFXtoRP_HsrCarrierApt.ftl index a14f38b..69345e8 100644 --- a/RFXtoRP_HsrCarrierApt.ftl +++ b/RFXtoRP_HsrCarrierApt.ftl @@ -30,6 +30,34 @@ <#break> <#case "U"> <#-- *********************************************** Action = Update ********************--> + <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> + <#assign ID = "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}" /> + <#else> + <#assign ID = "${carrier_apt.year_number}-${carrier_apt.appointment_number}" /> + + <#else> + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> + <#assign ID = "${carrier_apt.appointment_reference?json_string}" /> + <#else> + <#assign ID = "${carrier_apt.year_number}-${carrier_apt.appointment_number}" /> + + + <#assign payload = '{"Header": {"ProjectID": "${projectRP}:${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"},"IDs": [{"RefID": "${ID}"}],"Options": {"Only": ["ID.RefID","Payload.WMSCreated"]}}'/> + <#assign queryApiReflexPlatformID = QueryApiReflexPlatformID.AppointmentGetByIds> + <#assign response = QueryApiReflexPlatformCall.call(queryApiReflexPlatformID,payload) /> + <#assign appointmentRP = JsonUtil.jsonToMap(response)> + + <#if !appointmentRP?? || !appointmentRP.Objects?? || !appointmentRP.Objects[0]?? || !appointmentRP.Objects[0].ID.RefID?? || !appointmentRP.Objects[0].Payload?? || !appointmentRP.Objects[0].Payload.WMSCreated?? || !appointmentRP.Objects[0].Payload.WMSCreated> + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.BookingForceBookAppointment> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl"> + } + ] + <#else> [ { <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCustomFieldsUpdated> @@ -125,6 +153,7 @@ ] + <#break> <#case "D"> <#-- *********************************************** Action = Delete ******************** --> From a37d43f50f6b5b699eaa9f6cfa235e02ee466ee7 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 14 Apr 2026 14:41:55 +0200 Subject: [PATCH 77/87] SCPN1-10579 --- RPtoRFX_CarrierAppointmentCreated.ftl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RPtoRFX_CarrierAppointmentCreated.ftl b/RPtoRFX_CarrierAppointmentCreated.ftl index 005386f..a81a0e9 100644 --- a/RPtoRFX_CarrierAppointmentCreated.ftl +++ b/RPtoRFX_CarrierAppointmentCreated.ftl @@ -37,8 +37,8 @@ <#include "RPtoRFX_CarrierAppointmentDefaultData.ftl"> <#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING > <#if appointment.Unloading?? && appointment.Unloading.Projects?? && appointment.Unloading.Projects[0]?? && - appointment.Unloading.Projects[0].Commissions?? && - appointment.Unloading.Projects[0].Commissions[0]?? && appointment.Unloading.Projects[0].Commissions[0].OrderID?? > + appointment.Unloading.Projects[0].Commissions?? && + appointment.Unloading.Projects[0].Commissions[0]?? && appointment.Unloading.Projects[0].Commissions[0].ExecutionflowID?? && appointment.Unloading.Projects[0].Commissions[0].ExecutionflowID!="" > "physical_receipt_list": [ <#list appointment.Unloading.Projects[0].Commissions?filter(l ->l.ExecutionflowID?? && l.ExecutionflowID !="") as commission> <#list eventRP.executionflowCustomFields.entrySet()?filter(l ->l.key == commission.ExecutionflowID && l.value?? && l.value?has_content) as custom> From 62984a07f4d80a58ebb78fb6f174755f6c7b159b Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 14 Apr 2026 14:54:55 +0200 Subject: [PATCH 78/87] SCPN1-10579 --- RPtoRFX_CarrierAppointmentCreated.ftl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/RPtoRFX_CarrierAppointmentCreated.ftl b/RPtoRFX_CarrierAppointmentCreated.ftl index a81a0e9..77752b4 100644 --- a/RPtoRFX_CarrierAppointmentCreated.ftl +++ b/RPtoRFX_CarrierAppointmentCreated.ftl @@ -36,9 +36,7 @@ <#include "RPtoRFX_CarrierAppointmentDefaultData.ftl"> <#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING > - <#if appointment.Unloading?? && appointment.Unloading.Projects?? && appointment.Unloading.Projects[0]?? && - appointment.Unloading.Projects[0].Commissions?? && - appointment.Unloading.Projects[0].Commissions[0]?? && appointment.Unloading.Projects[0].Commissions[0].ExecutionflowID?? && appointment.Unloading.Projects[0].Commissions[0].ExecutionflowID!="" > + <#if appointment.Unloading.Projects[0].Commissions[0].ExecutionflowID?? && appointment.Unloading.Projects[0].Commissions[0].ExecutionflowID!="" > "physical_receipt_list": [ <#list appointment.Unloading.Projects[0].Commissions?filter(l ->l.ExecutionflowID?? && l.ExecutionflowID !="") as commission> <#list eventRP.executionflowCustomFields.entrySet()?filter(l ->l.key == commission.ExecutionflowID && l.value?? && l.value?has_content) as custom> From 4f0874a7dc765d1f607d19b69b1ef53a8488aea8 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 14 Apr 2026 15:06:25 +0200 Subject: [PATCH 79/87] SCNP1-10579 --- RPtoRFX_CarrierAppointmentCreated.ftl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/RPtoRFX_CarrierAppointmentCreated.ftl b/RPtoRFX_CarrierAppointmentCreated.ftl index 77752b4..a81a0e9 100644 --- a/RPtoRFX_CarrierAppointmentCreated.ftl +++ b/RPtoRFX_CarrierAppointmentCreated.ftl @@ -36,7 +36,9 @@ <#include "RPtoRFX_CarrierAppointmentDefaultData.ftl"> <#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING > - <#if appointment.Unloading.Projects[0].Commissions[0].ExecutionflowID?? && appointment.Unloading.Projects[0].Commissions[0].ExecutionflowID!="" > + <#if appointment.Unloading?? && appointment.Unloading.Projects?? && appointment.Unloading.Projects[0]?? && + appointment.Unloading.Projects[0].Commissions?? && + appointment.Unloading.Projects[0].Commissions[0]?? && appointment.Unloading.Projects[0].Commissions[0].ExecutionflowID?? && appointment.Unloading.Projects[0].Commissions[0].ExecutionflowID!="" > "physical_receipt_list": [ <#list appointment.Unloading.Projects[0].Commissions?filter(l ->l.ExecutionflowID?? && l.ExecutionflowID !="") as commission> <#list eventRP.executionflowCustomFields.entrySet()?filter(l ->l.key == commission.ExecutionflowID && l.value?? && l.value?has_content) as custom> From 13fe55ae1a544c3af3a3a6cac1e27c683a7da87f Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Thu, 16 Apr 2026 17:17:35 +0200 Subject: [PATCH 80/87] SCPN1-10586 --- RPtoRFX_CarrierAppointmentReasonUpdatedByNumber.ftl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RPtoRFX_CarrierAppointmentReasonUpdatedByNumber.ftl b/RPtoRFX_CarrierAppointmentReasonUpdatedByNumber.ftl index a8c7598..f2ba79a 100644 --- a/RPtoRFX_CarrierAppointmentReasonUpdatedByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentReasonUpdatedByNumber.ftl @@ -9,8 +9,8 @@ }, "payload" : { - "unloading_appointment" : "${eventRP.appointmentCustomFields.unloading?json_string}", - "load_appointment" : "${eventRP.appointmentCustomFields.loading?json_string}", + "unloading_appointment" : "${eventRP.appointmentCustomFields.unloading!"false"?json_string}", + "load_appointment" : "${eventRP.appointmentCustomFields.loading!"false"?json_string}", <#switch appointment.AppointmentType> <#case AppointmentType.APPOINTMENT_TYPE_LOADING> <#if appointment.TimeZone?? && appointment.TimeZone!=""> From 68f99e143528ad13b094e36bff04894e6eb88154 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Thu, 16 Apr 2026 17:23:35 +0200 Subject: [PATCH 81/87] SCPN1-10586 --- RFXtoRP_HsrAntRec.ftl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/RFXtoRP_HsrAntRec.ftl b/RFXtoRP_HsrAntRec.ftl index 97ece4c..976149f 100644 --- a/RFXtoRP_HsrAntRec.ftl +++ b/RFXtoRP_HsrAntRec.ftl @@ -38,8 +38,7 @@ <#assign ancReceipt = JsonUtil.jsonToMap(dataRfx)> [ { - - <#stop "delete > + <#stop > } ] <#break> From 2bfb866dcc5586d3289ee3ad63dd6205067f377b Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Thu, 16 Apr 2026 17:35:48 +0200 Subject: [PATCH 82/87] SCPN1-10586 --- ...rierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl b/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl index 1c94ae1..5c8ff23 100644 --- a/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl @@ -10,8 +10,8 @@ "payload" : { <#include "RPtoRFX_CarrierAppointmentDataUpdated.ftl"> - "unloading_appointment" : "${eventRP.appointmentCustomFields.unloading?json_string}", - "load_appointment" : "${eventRP.appointmentCustomFields.loading?json_string}", + "unloading_appointment" : "${eventRP.appointmentCustomFields.unloading!"false"?json_string}", + "load_appointment" : "${eventRP.appointmentCustomFields.loading!"false"?json_string}", <#switch appointment.AppointmentType> <#case AppointmentType.APPOINTMENT_TYPE_LOADING> <#if appointment.TimeZone?? && appointment.TimeZone!=""> From e03a0171187b391ff9261c183a455e123843e660 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 17 Apr 2026 10:59:30 +0200 Subject: [PATCH 83/87] SCPN1-10586 --- RFXtoRP_HsrCarrierApt.ftl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/RFXtoRP_HsrCarrierApt.ftl b/RFXtoRP_HsrCarrierApt.ftl index 69345e8..76bfeca 100644 --- a/RFXtoRP_HsrCarrierApt.ftl +++ b/RFXtoRP_HsrCarrierApt.ftl @@ -114,6 +114,12 @@ "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsrCarrierApt_LoadingStarted.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierExpected> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsaLstCarSta_CarrierExpected.ftl"> } ] <#else> From 17263f024f11c90f7d4830788013c63653977e08 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 17 Apr 2026 14:16:56 +0200 Subject: [PATCH 84/87] SCPN1-10586 --- RFXtoRP_HsrCarrierApt.ftl | 2 +- RFXtoRP_HsrCarrierApt_CarrierExpected.ftl | 30 +++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 RFXtoRP_HsrCarrierApt_CarrierExpected.ftl diff --git a/RFXtoRP_HsrCarrierApt.ftl b/RFXtoRP_HsrCarrierApt.ftl index 76bfeca..3a1b64a 100644 --- a/RFXtoRP_HsrCarrierApt.ftl +++ b/RFXtoRP_HsrCarrierApt.ftl @@ -119,7 +119,7 @@ <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierExpected> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : - <#include "RFXtoRP_HsaLstCarSta_CarrierExpected.ftl"> + <#include "RFXtoRP_HsrCarrierApt_CarrierExpected.ftl"> } ] <#else> diff --git a/RFXtoRP_HsrCarrierApt_CarrierExpected.ftl b/RFXtoRP_HsrCarrierApt_CarrierExpected.ftl new file mode 100644 index 0000000..68dda4b --- /dev/null +++ b/RFXtoRP_HsrCarrierApt_CarrierExpected.ftl @@ -0,0 +1,30 @@ +[ + <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.creation_datetime,time_zone_rfx) /> + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> + "RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", + <#else> + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + + <#else> + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> + "RefID": "${carrier_apt.appointment_reference?json_string}", + <#else> + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + + + "RefDate": { + "DateTime": "${ref_datetime}", + "AuthorTimeZone": "${time_zone_rfx}" + } + }, + "Payload":{ + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" + } + } +] \ No newline at end of file From c67ca7169303b885f1eb9bfb95301c27b7a4da0b Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 17 Apr 2026 15:53:33 +0200 Subject: [PATCH 85/87] SCPN1-10586 --- RFXtoRP_HsrCarrierApt.ftl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/RFXtoRP_HsrCarrierApt.ftl b/RFXtoRP_HsrCarrierApt.ftl index 3a1b64a..b677988 100644 --- a/RFXtoRP_HsrCarrierApt.ftl +++ b/RFXtoRP_HsrCarrierApt.ftl @@ -25,6 +25,12 @@ "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierExpected> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrCarrierApt_CarrierExpected.ftl"> } ] <#break> From bf3f30190d9aa017aa7180610edb495b52cf327b Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 17 Apr 2026 17:12:39 +0200 Subject: [PATCH 86/87] SCPN1-10586 --- RFXtoRP_HsrCarrierApt_CarrierExpected.ftl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/RFXtoRP_HsrCarrierApt_CarrierExpected.ftl b/RFXtoRP_HsrCarrierApt_CarrierExpected.ftl index 68dda4b..b5df356 100644 --- a/RFXtoRP_HsrCarrierApt_CarrierExpected.ftl +++ b/RFXtoRP_HsrCarrierApt_CarrierExpected.ftl @@ -1,5 +1,6 @@ [ <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.creation_datetime,time_zone_rfx) /> + <#assign ref_datetime2 = AddSecondsToDatetime(ref_datetime?datetime.iso, 60)?iso_utc /> { "Header": { "ProjectID": "${projectRP}" @@ -19,7 +20,7 @@ "RefDate": { - "DateTime": "${ref_datetime}", + "DateTime": "${ref_datetime2}", "AuthorTimeZone": "${time_zone_rfx}" } }, From d8c87881f5021a1118a7b39a22340aed1301070b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20LE=20MA=C3=8ETRE?= Date: Mon, 20 Apr 2026 13:44:13 +0200 Subject: [PATCH 87/87] Release 2.0.21+1 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 9dabfb3..c2202f8 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.0.20+4 +2.0.21+1