This commit is contained in:
Laurie MONTANT 2025-12-09 10:33:39 +01:00
parent c635353b69
commit 92eecba160
5 changed files with 416 additions and 403 deletions

View File

@ -15,346 +15,410 @@
<#switch id.apiRestReflexID!no_apiRestReflexID> <#switch id.apiRestReflexID!no_apiRestReflexID>
<#case no_apiRestReflexID> <#case no_apiRestReflexID>
[ [
{ {
<#if restResponsetMsg.body?? > <#if restResponsetMsg.body?? >
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
<#else> <#else>
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
</#if> </#if>
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
"apiReflexPlatformID" : "${apiReflexPlatformID}", "apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" : "datas" :
<#include "RFXtoRP_PlatformLogCreate.ftl"> <#include "RFXtoRP_PlatformLogCreate.ftl">
} }
] ]
<#break> <#break>
<#-- *********************************************** Order ******************** --> <#-- *********************************************** ApiRestID = preparation_orders_post ******************** -->
<#case "preparation_orders_post"> <#case "preparation_orders_post">
<#switch restResponsetMsg.status!no_status> <#switch restResponsetMsg.status!no_status>
<#case no_status> <#case no_status>
[ [
{ {
<#if restResponsetMsg.body?? > <#if restResponsetMsg.body?? >
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
<#else>
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
</#if>
<#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>
<#-- *********************************************** ApiRestID = preparation_orders_post ******************** -->
<#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> <#else>
<#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "WARN"> <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
[
{
<#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">
}
]
</#if>
</#if>
<#break>
<#default>
[
{
<#if restResponsetMsg.body?? >
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
<#else>
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
</#if>
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_PlatformLogCreate.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_RestResponseAllocationError.ftl">
}
]
</#switch>
<#break>
<#-- *********************************************** Receipt ******************** -->
<#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}" />
</#if>
<#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>
<#-- *********************************************** ApiRestID = receipts_post ******************** -->
<#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">
}
]
</#if>
<#break>
<#default>
[
{
<#if restResponsetMsg.body?? >
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
<#else>
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
</#if>
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_PlatformLogCreate.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_RestResponseAllocationError.ftl">
}
]
</#switch>
<#break>
<#-- *********************************************** Appointment ******************** -->
<#case "appointment_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}" />
</#if>
<#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>
<#-- *********************************************** ApiRestID = "appointment_post"******************** -->
<#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.ExecutionflowAllocationError>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_RestResponseAllocationError.ftl">
}
]
</#if> </#if>
<#break> <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
<#default> "apiReflexPlatformID" : "${apiReflexPlatformID}",
[ "datas" :
{ <#include "RFXtoRP_PlatformLogCreate.ftl">
<#if restResponsetMsg.body?? > },
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> {
<#else> <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> "apiReflexPlatformID" : "${apiReflexPlatformID}",
</#if> "datas" :
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> <#include "RFXtoRP_RestResponseAllocationError.ftl">
"apiReflexPlatformID" : "${apiReflexPlatformID}", }
"datas" : ]
<#include "RFXtoRP_PlatformLogCreate.ftl"> <#break>
}, <#case 200>
{ <#case 201>
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
"apiReflexPlatformID" : "${apiReflexPlatformID}", <#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)>
"datas" : <#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "SUCCESS" >
<#include "RFXtoRP_RestResponseAllocationError.ftl"> [
} {
] <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipFromAcked>
</#switch> "apiReflexPlatformID" : "${apiReflexPlatformID}",
<#break> "datas" :
<#case "appointment_put"> <#include "RFXtoRP_PrepOrder_ShipFromAcked.ftl">
<#switch restResponsetMsg.status!no_status> }
<#case no_status> ]
[ <#else>
{ <#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "WARN">
<#if restResponsetMsg.body?? > [
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> {
<#else> <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipFromAcked>
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> "apiReflexPlatformID" : "${apiReflexPlatformID}",
</#if> "datas" :
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> <#include "RFXtoRP_PrepOrder_ShipFromAcked.ftl">
"apiReflexPlatformID" : "${apiReflexPlatformID}", }
"datas" : ]
<#include "RFXtoRP_PlatformLogCreate.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_RestResponseAllocationError.ftl">
}
]
<#break>
<#case 200>
<#case 201>
<#-- *********************************************** ApiRestID = appointment_put ******************** -->
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
<#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)>
<#if preparationOrderPostResponse.status?? && (preparationOrderPostResponse.status == "SUCCESS" || preparationOrderPostResponse.status == "WARN") >
[
{
<#stop >
}
]
<#else> <#else>
[ [
{ {
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
"apiReflexPlatformID" : "${apiReflexPlatformID}", "apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" : "datas" :
<#include "RFXtoRP_PlatformLogCreate.ftl"> <#include "RFXtoRP_PlatformLogCreate.ftl">
}, },
{ {
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
"apiReflexPlatformID" : "${apiReflexPlatformID}", "apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" : "datas" :
<#include "RFXtoRP_RestResponseAllocationError.ftl"> <#include "RFXtoRP_RestResponseAllocationError.ftl">
} }
] ]
</#if>
</#if> </#if>
<#break> <#break>
<#default>
[
{
<#if restResponsetMsg.body?? >
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
<#else>
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
</#if>
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_PlatformLogCreate.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_RestResponseAllocationError.ftl">
}
]
</#switch>
<#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}" />
</#if>
<#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">
}
]
</#if>
<#break>
<#default> <#default>
[ [
{ {
<#if restResponsetMsg.body?? > <#if restResponsetMsg.body?? >
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
<#else> <#else>
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
</#if> </#if>
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
"apiReflexPlatformID" : "${apiReflexPlatformID}", "apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" : "datas" :
<#include "RFXtoRP_PlatformLogCreate.ftl"> <#include "RFXtoRP_PlatformLogCreate.ftl">
}, },
{ {
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
"apiReflexPlatformID" : "${apiReflexPlatformID}", "apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" : "datas" :
<#include "RFXtoRP_RestResponseAllocationError.ftl"> <#include "RFXtoRP_RestResponseAllocationError.ftl">
} }
] ]
</#switch> </#switch>
<#break> <#break>
<#-- *********************************************** Appointment_post_create ******************** -->
<#case "appointment_post_create">
<#default> <#switch restResponsetMsg.status!no_status>
<#stop> <#case no_status>
[
{
<#if restResponsetMsg.body?? >
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
<#else>
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
</#if>
<#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") >
[
{
<#stop >
}
]
<#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">
}
]
</#if>
<#break>
<#default>
[
{
<#if restResponsetMsg.body?? >
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
<#else>
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
</#if>
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_PlatformLogCreate.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_RestResponseAllocationError.ftl">
}
]
</#switch>
<#break>
<#-- *********************************************** ApiRestID = appointment_put_update ******************** -->
<#case "appointment_put_update">
<#switch restResponsetMsg.status!no_status>
<#case no_status>
[
{
<#if restResponsetMsg.body?? >
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
<#else>
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
</#if>
<#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") >
[
{
<#stop >
}
]
<#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">
}
]
</#if>
<#break>
<#default>
[
{
<#if restResponsetMsg.body?? >
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
<#else>
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
</#if>
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_PlatformLogCreate.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_RestResponseAllocationError.ftl">
}
]
</#switch>
<#break>
<#-- *********************************************** ApiRestID = appointment_post_physical_receipt_association ******************** -->
<#case "appointment_post_physical_receipt_association">
<#switch restResponsetMsg.status!no_status>
<#case no_status>
[
{
<#if restResponsetMsg.body?? >
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
<#else>
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
</#if>
<#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") >
[
{
<#stop >
}
]
<#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">
}
]
</#if>
<#break>
<#default>
[
{
<#if restResponsetMsg.body?? >
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
<#else>
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
</#if>
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_PlatformLogCreate.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_RestResponseAllocationError.ftl">
}
]
</#switch>
<#break>
<#-- *********************************************** default ******************** -->
<#default>
<#stop>
</#switch> </#switch>

View File

@ -16,18 +16,11 @@
<#assign appointment = eventRP.data /> <#assign appointment = eventRP.data />
[ [
{ {
<#assign apiRestReflexID = ApiRestReflexID.appointment_post> <#assign apiRestReflexID = ApiRestReflexID.appointment_post_create>
"apiRestReflexID" : "${apiRestReflexID}", "apiRestReflexID" : "${apiRestReflexID}",
"datas" : "datas" :
<#include "RPtoRFX_CarrierAppointmentCreated.ftl"> <#include "RPtoRFX_CarrierAppointmentCreated.ftl">
} }
<#--{
<#assign apiRestReflexID = ApiRestReflexID.appointment_put>
"apiRestReflexID" : "${apiRestReflexID}",
"datas" :
<#include "RPtoRFX_CarrierAppointmentUpdated.ftl">
}-->
] ]
<#break> <#break>
<#-- *********************************************** Action = CommissionsUpdated ******************** --> <#-- *********************************************** Action = CommissionsUpdated ******************** -->
@ -35,10 +28,10 @@
<#assign appointment = eventRP.data /> <#assign appointment = eventRP.data />
[ [
{ {
<#assign apiRestReflexID = ApiRestReflexID.physical_receipt_associations_post> <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_association>
"apiRestReflexID" : "${apiRestReflexID}", "apiRestReflexID" : "${apiRestReflexID}",
"datas" : "datas" :
<#include "RPtoRFX_CarrierAppointmentAssociationPhysicalReceipt.ftl"> <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl">
} }
] ]
<#break> <#break>
@ -47,7 +40,7 @@
<#assign appointment = eventRP.data /> <#assign appointment = eventRP.data />
[ [
{ {
<#assign apiRestReflexID = ApiRestReflexID.appointment_put> <#assign apiRestReflexID = ApiRestReflexID.appointment_put_update>
"apiRestReflexID" : "${apiRestReflexID}", "apiRestReflexID" : "${apiRestReflexID}",
"datas" : "datas" :
<#include "RPtoRFX_CarrierAppointmentSlotUpdated.ftl"> <#include "RPtoRFX_CarrierAppointmentSlotUpdated.ftl">

View File

@ -8,20 +8,24 @@
}, },
"payload" : "payload" :
{ {
<#switch appointment.AppointmentType>
<#case "APPOINTMENT_TYPE_LOADING">
<#if appointment.Commissions??> "unloading_appointment" : "false",
"physical_receipt_list": [ "load_appointment" : "true",
<#list appointment.Commissions as commission> "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime,time_zone_rfx)}",
{ "planned_load_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime?datetime.iso,appointment.Slot.DurationInSeconds?number)?iso_nz(time_zone_rfx)}",
"receipt_activity": "${eventRP.executionflowCustomFields.activity_code?json_string}",
"originator_code": "${eventRP.executionflowCustomFields.originator_code?json_string}", <#break>
"physical_receipt_reference": "${eventRP.executionflowCustomFields.reference?json_string}",
"receipt_year": "${eventRP.executionflowCustomFields.order_year?json_string}", <#case "APPOINTMENT_TYPE_UNLOADING">
"receipt_number": "${eventRP.executionflowCustomFields.order_number?json_string}" "unloading_appointment" : "true",
} "load_appointment" : "false",
<#sep>,</#sep> "planned_unloading_start_datetime" : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime,time_zone_rfx)}",
</#list> "planned_unloading_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime?datetime.iso,appointment.Slot.DurationInSeconds?number)?iso_nz(time_zone_rfx)}",
] <#break>
</#if> <#default>
<#stop "appointment.AppointmentType not implemented" >
</#switch>
} }
} }

View File

@ -1,48 +0,0 @@
{
"id" : {"refid" : "${eventRP.refid?json_string}"},
"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",
"planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime,time_zone_rfx)}",
"planned_load_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime?datetime.iso,appointment.Slot.DurationInSeconds?number)?iso_nz(time_zone_rfx)}",
<#break>
<#case "APPOINTMENT_TYPE_UNLOADING">
"unloading_appointment" : "true",
"load_appointment" : "false",
"planned_unloading_start_datetime" : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime,time_zone_rfx)}",
"planned_unloading_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime?datetime.iso,appointment.Slot.DurationInSeconds?number)?iso_nz(time_zone_rfx)}",
<#break>
<#default>
<#stop "appointment.AppointmentType not implemented" >
</#switch>
"planned_carrier" : "ABAN", <#-- "${appointment.CarrierName?json_string}", -->
<#if appointment.Commissions??>
"physical_receipt_list": [
<#list appointment.Commissions as commission>
{
"receipt_activity": "${eventRP.executionflowCustomFields.activity_code?json_string}",
"originator_code": "${eventRP.executionflowCustomFields.originator_code?json_string}",
"physical_receipt_reference": "${eventRP.executionflowCustomFields.reference?json_string}",
"receipt_year": "${eventRP.executionflowCustomFields.order_year?json_string}",
"receipt_number": "${eventRP.executionflowCustomFields.order_number?json_string}"
}
<#sep>,</#sep>
</#list>
]
</#if>
}
}