diff --git a/RFXtoRP_HsrPro.ftl b/RFXtoRP_HsrPro.ftl index cfa3721..3258db3 100644 --- a/RFXtoRP_HsrPro.ftl +++ b/RFXtoRP_HsrPro.ftl @@ -16,16 +16,18 @@ <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign preparation_order = JsonUtil.jsonToMap(dataRfx)> [ - { + <#if preparation_order.originator_reference?? && preparation_order.originator_reference!=""> <#-- check preparation type code (internal order and reservation are ignored) --> <#if preparation_order.preparation_type_code == "010" || preparation_order.preparation_type_code == "030"> <#-- Only if preparation order not confirmed --> <#if preparation_order.preparation_order_confirmed == "false" > + { <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsrPro_ExecutionflowDetected.ftl"> + } <#else> <#stop "preparation order already confirmed"> @@ -36,7 +38,7 @@ <#else> <#stop "PRO reference is empty"> - } + ] <#break> @@ -46,18 +48,16 @@ <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign preparation_order = JsonUtil.jsonToMap(dataRfx)> [ - { <#if preparation_order.originator_reference?? && preparation_order.originator_reference!=""> - { + { <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsrPro_ExecutionflowCancelled.ftl"> - } + } <#else> <#stop "PRO reference is empty"> - } ] <#break>