You've already forked reflex-wms-connector
mise en forme
This commit is contained in:
@@ -10,88 +10,88 @@
|
||||
<#assign aDateTime = .now>
|
||||
|
||||
<#switch cloudEventMsg.action>
|
||||
<#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.PreparationStarted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaProStatus_PreparationExpecteded.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.PreparationStarted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaProStatus_PreparationStarted.ftl">
|
||||
}
|
||||
<#else>
|
||||
<#-- **Preparation to package (500) and preparationcompleted (550)** -->
|
||||
<#if preparationStatusInterface.preparation_status_type == "100" &&
|
||||
(preparationStatusInterface.preparation_status_code == "500" ||
|
||||
preparationStatusInterface.preparation_status_code == "550")>
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PreparationCompleted>
|
||||
"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">
|
||||
<#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.PreparationStarted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaProStatus_PreparationExpecteded.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.PreparationStarted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaProStatus_PreparationStarted.ftl">
|
||||
}
|
||||
<#else>
|
||||
<#-- **Preparation to package (500) and preparationcompleted (550)** -->
|
||||
<#if preparationStatusInterface.preparation_status_type == "100" &&
|
||||
(preparationStatusInterface.preparation_status_code == "500" ||
|
||||
preparationStatusInterface.preparation_status_code == "550")>
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PreparationCompleted>
|
||||
"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">
|
||||
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
<#--
|
||||
</#if>
|
||||
-->
|
||||
]
|
||||
<#break>
|
||||
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
<#--
|
||||
</#if>
|
||||
-->
|
||||
]
|
||||
<#break>
|
||||
|
||||
<#case "D">
|
||||
<#-- *********************************************** Action = DELETE ******************** -->
|
||||
<#stop "event not supported (case D)">
|
||||
<#break>
|
||||
|
||||
|
||||
<#default>
|
||||
<#stop "event not supported">
|
||||
<#-- *********************************************** Action = DELETE ******************** -->
|
||||
<#stop "event not supported (case D)">
|
||||
<#break>
|
||||
|
||||
|
||||
<#default>
|
||||
<#stop "event not supported">
|
||||
</#switch>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user