<#-- **** input parameters ***** --> <#-- input : message RFX --> <#-- project : projectId in ReflexPlatform --> <#-- organisation : organisationtId in ReflexPlatform --> <#-- site : siteID in ReflexPlatform --> <#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> <#assign organisationRP = organisation> <#assign aDateTime = .now> <#switch cloudEventMsg.action> <#case "C"> <#case "U"> <#-- *********************************************** Action = Update ******************** --> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign carrier_apt_status = JsonUtil.jsonToMap(dataRfx)> [ { <#switch carrier_apt_status.status.carrier_status_code> <#case "010"> <#-- Transporteur attendu --> <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierExpected> <#-- à revoir --> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsaCarrierAptStatus_CarrierExpected.ftl"> <#break> <#case "020"> <#-- Transporteur arrivé sur site--> <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierArrived> <#-- à revoir --> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsaCarrierAptStatus_CarrierArrived.ftl"> <#break> <#case "040"> <#-- Déchargement commencé --> <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentReceptionStarted> <#-- à revoir --> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsaCarrierAptStatus_ReceptionStarted.ftl"> <#break> <#case "050"> <#-- Déchargement terminé--> <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentReceptionStarted> <#-- à revoir --> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsaCarrierAptStatus_ReceptionStarted.ftl"> <#break> <#default> <#stop 'this updated appointment Status not implemented'> } ] <#break> <#case "D"> <#-- *********************************************** Action = Delete ******************** --> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign carrier_apt_status = JsonUtil.jsonToMap(dataRfx)> <#stop 'Delete Appointment Status not implemented' > <#break> <#default> <#stop >