diff --git a/RFXtoRP_HfGrade.ftl b/RFXtoRP_HfGrade.ftl new file mode 100644 index 0000000..b23f046 --- /dev/null +++ b/RFXtoRP_HfGrade.ftl @@ -0,0 +1,28 @@ +<#-- *********************************************** Parameter global ******************** --> +<#assign cloudEventMsg = JsonUtil.jsonToMap(input)> +<#assign projectRP = project> +<#assign organisationRP = organisation> + +<#assign aDateTime = .now> + +<#switch cloudEventMsg.action> + <#case "C"> + <#case "U"> + <#-- *********************************************** Action = CREATE or UPDATE ******************** --> + <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> + <#assign file = JsonUtil.jsonToMap(dataRfx)> + <#noparse><#--TODO RFXtoRP_HfGrade.ftl --> + <#--<#include "RFXtoRP_RfxConfigurationRp.ftl"> --> + + <#break> + + <#case "D"> + <#-- *********************************************** Action = DELETE ******************** --> + <#stop "en attente de FTL"> + <#break> + + + <#default> + <#stop> + + diff --git a/RFXtoRP_HfOwner.ftl b/RFXtoRP_HfOwner.ftl new file mode 100644 index 0000000..b9c7bc7 --- /dev/null +++ b/RFXtoRP_HfOwner.ftl @@ -0,0 +1,28 @@ +<#-- *********************************************** Parameter global ******************** --> +<#assign cloudEventMsg = JsonUtil.jsonToMap(input)> +<#assign projectRP = project> +<#assign organisationRP = organisation> + +<#assign aDateTime = .now> + +<#switch cloudEventMsg.action> + <#case "C"> + <#case "U"> + <#-- *********************************************** Action = CREATE or UPDATE ******************** --> + <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> + <#assign file = JsonUtil.jsonToMap(dataRfx)> + <#noparse><#--TODO RFXtoRP_HfOwner.ftl --> + <#--<#include "RFXtoRP_RfxConfigurationRp.ftl"> --> + + <#break> + + <#case "D"> + <#-- *********************************************** Action = DELETE ******************** --> + <#stop "en attente de FTL"> + <#break> + + + <#default> + <#stop> + + diff --git a/RFXtoRP_HsaProStatus.ftl b/RFXtoRP_HsaProStatus.ftl index 974cfe3..63f96df 100644 --- a/RFXtoRP_HsaProStatus.ftl +++ b/RFXtoRP_HsaProStatus.ftl @@ -10,85 +10,72 @@ <#assign aDateTime = .now> <#switch cloudEventMsg.action> - <#case "C"> - <#case "U"> - <#-- *********************************************** Action = CREATE or UPDATE ******************** --> + <#case "C"> + <#case "U"> + <#-- Action = CREATE or UPDATE --> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> - <#assign preparationStatusInterface = JsonUtil.jsonToMap(dataRfx)> - [ - - <#--**Pick batch runned (100) **--> - <#if preparationStatusInterface.preparation_status_type == "100" && - preparationStatusInterface.preparation_status_code == "200" > - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationExpected> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : + <#assign preparationStatusInterface = JsonUtil.jsonToMap(dataRfx) /> + [ + <#--**Pick batch runned (100) **--> + <#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "200" > + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationExpected> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : <#include "RFXtoRP_HsaProStatus_PreparationExpected.ftl"> - } - <#else> - - <#-- ** Collection started (300) and Preparation in progress (400)** --> - <#if preparationStatusInterface.preparation_status_type == "100" && - (preparationStatusInterface.preparation_status_code == "300" || - preparationStatusInterface.preparation_status_code == "400") > - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationStarted> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsaProStatus_PreparationStarted.ftl"> - } - <#else> - <#-- **Preparation to package (500) and preparation completed (550)** --> - <#if preparationStatusInterface.preparation_status_type == "100" && - (preparationStatusInterface.preparation_status_code == "500" || - preparationStatusInterface.preparation_status_code == "550")> - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationCompleted> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsaProStatus_PreparationCompleted.ftl"> - } - <#else> - <#-- ****Preparation dispatched (600)** --> - <#if preparationStatusInterface.preparation_status_type == "100" && - preparationStatusInterface.preparation_status_code == "600" > - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowTransportStarted> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsaProStatus_TransportStarted.ftl"> - } - <#else> - <#-- ****Preparation cancelled (650)**** --> - <#if preparationStatusInterface.preparation_status_type == "100" && - preparationStatusInterface.preparation_status_code == "650" > - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsaProStatus_ExecutionflowCancelled.ftl"> - } - <#else> - - <#stop "Reflex WMS status not supported on Reflex Platform"> - + } + <#else> + <#-- ** Collection started (300) and Preparation in progress (400)** --> + <#if preparationStatusInterface.preparation_status_type == "100" && (preparationStatusInterface.preparation_status_code == "300" || preparationStatusInterface.preparation_status_code == "400") > + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationStarted> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsaProStatus_PreparationStarted.ftl"> + } + <#else> + <#-- **Preparation to package (500) and preparation completed (550)** --> + <#if preparationStatusInterface.preparation_status_type == "100" && (preparationStatusInterface.preparation_status_code == "500" || preparationStatusInterface.preparation_status_code == "550")> + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationCompleted> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsaProStatus_PreparationCompleted.ftl"> + } + <#else> + <#-- ****Preparation dispatched (600)** --> + <#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "600" > + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowTransportStarted> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsaProStatus_TransportStarted.ftl"> + } + <#else> + <#-- ****Preparation cancelled (650)**** --> + <#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "650" > + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsaProStatus_ExecutionflowCancelled.ftl"> + } + <#else> + <#stop "Reflex WMS status not supported on Reflex Platform"> + + + + - - - - - - ] + ] <#break> - <#case "D"> + <#case "D"> <#-- *********************************************** Action = DELETE ******************** --> <#stop "event not supported (case D)"> <#break> - - - <#default> - <#stop "event not supported"> + + <#default> + <#stop "event not supported">