Merge branch 'develop' into version-1.7

# Conflicts:
#	RFXtoRP_HfDtlStockLs_StockSnapshotted.ftl
#	RFXtoRP_HfLvTypeList.ftl
#	RFXtoRP_HsaIpgMove.ftl
#	RFXtoRP_HsaIpgMove_GoodsReceived.ftl
#	RFXtoRP_HsaIpgMove_StockMoved.ftl
#	RFXtoRP_HsaItmLv_LogisticVariantUpdated.ftl
#	RFXtoRP_HsaItm_ItemCreated.ftl
#	RFXtoRP_HsaProStatus.ftl
#	RFXtoRP_HsrPrepa.ftl
#	RFXtoRP_HsrPrepa_CarrierUpdated.ftl
#	RFXtoRP_HsrPrepa_GoodsPrepared.ftl
#	RFXtoRP_HsrPrepa_OrderCarrierUpdated.ftl
#	RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl
#	RFXtoRP_HsrPro.ftl
#	RFXtoRP_HsrPro_ExecutionflowDetected.ftl
#	RFXtoRP_HsrReceiptList.ftl
#	RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl
#	ReflexUtils.ftl
#	VERSION
This commit is contained in:
Francis REAT 2024-03-12 08:11:21 +01:00
commit 16c7d6b686
47 changed files with 801 additions and 618 deletions

View File

@ -26,7 +26,7 @@
<#list reflexStockPicturesInterface.detailled_stock_list as stock> <#list reflexStockPicturesInterface.detailled_stock_list as stock>
<#if stock.stock_type_code != "200"> <#if stock.stock_type_code != "200">
<#stop "stock type different from 200"> <#stop>
<#break> <#break>
</#if> </#if>
</#list> </#list>

View File

@ -38,28 +38,28 @@
} }
] ]
<#else> <#else>
<#-- IPG moves translated into goods received (all type of receipt) --> <#-- IPG moves translated into goods received (all type of receipt) -->
<#if reflexMvtStockInterface.ipg_move_type == "100" || <#if reflexMvtStockInterface.ipg_move_type == "100" ||
reflexMvtStockInterface.ipg_move_type == "110" || reflexMvtStockInterface.ipg_move_type == "110" ||
reflexMvtStockInterface.ipg_move_type == "120" reflexMvtStockInterface.ipg_move_type == "120"
> >
[ [
{ {
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsReceived> <#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsReceived>
"apiReflexPlatformID" : "${apiReflexPlatformID}", "apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" : "datas" :
<#include "RFXtoRP_HsaIpgMove_GoodsReceived.ftl"> <#include "RFXtoRP_HsaIpgMove_GoodsReceived.ftl">
} }
] ]
<#else> <#else>
<#-- Case of IPG move type volontarilly ignored--> <#-- Case of IPG move type volontarilly ignored-->
<#stop> <#stop>
</#if> </#if>
</#if>
<#else>
<#-- cases of an IPG move with quantity = 0 (weight modification)-->
<#stop>
</#if> </#if>
<#else>
<#-- cases of an IPG move with quantity = 0 (weight modification)-->
<#stop>
</#if>
<#break> <#break>
<#case "D"> <#case "D">

View File

@ -30,9 +30,9 @@
<#else> <#else>
"ExecutionflowID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.ipg_move_year_number}${reflexMvtStockInterface.extended_ipg_move_number}", "ExecutionflowID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.ipg_move_year_number}${reflexMvtStockInterface.extended_ipg_move_number}",
</#if> </#if>
"LineID": "${reflexMvtStockInterface.receipt_line_number}", "LineID": "${reflexMvtStockInterface.receipt_line_number}",
"ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}", "ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}",
"Quantity": { "Quantity": {
"LVID": "${quantity_in_base_lv_RP_Cst}", "LVID": "${quantity_in_base_lv_RP_Cst}",
"Value": ${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs} "Value": ${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs}
} }

View File

@ -49,7 +49,9 @@
<#-- LV Metadata inclusion --> <#-- LV Metadata inclusion -->
<#include "RFXtoRP_HsaItm_ItemCreated_LogisticVariantMetadata.ftl">, <#include "RFXtoRP_HsaItm_ItemCreated_LogisticVariantMetadata.ftl">,
"IsBaseLogisticVariant": ${logistical_variant.base_lv}, <#if logistical_variant.base_lv?? && logistical_variant.base_lv!="">
"IsBaseLogisticVariant": ${logistical_variant.base_lv},
</#if>
<#if logistical_variant.base_lv != "true"> <#if logistical_variant.base_lv != "true">
"RefLV": "${logistical_variant.subpackaging_lv_code?json_string}", "RefLV": "${logistical_variant.subpackaging_lv_code?json_string}",

View File

@ -34,35 +34,31 @@
<#include "RFXtoRP_HsaProStatus_PreparationStarted.ftl"> <#include "RFXtoRP_HsaProStatus_PreparationStarted.ftl">
} }
<#else> <#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)** --> <#-- ****Preparation dispatched (600)** -->
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "600" > <#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "600" >
{ {
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowTransportStarted> <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationCompleted>
"apiReflexPlatformID" : "${apiReflexPlatformID}", "apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" : "datas" :
<#include "RFXtoRP_HsaProStatus_TransportStarted.ftl"> <#include "RFXtoRP_HsaProStatus_PreparationCompleted.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowTransportStarted>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaProStatus_TransportStarted.ftl">
} }
<#else> <#else>
<#-- ****Preparation cancelled (650)**** --> <#-- ****Preparation cancelled (650)**** -->
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "650" > <#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "650" >
{ {
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled> <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
"apiReflexPlatformID" : "${apiReflexPlatformID}", "apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" : "datas" :
<#include "RFXtoRP_HsaProStatus_ExecutionflowCancelled.ftl"> <#include "RFXtoRP_HsaProStatus_ExecutionflowCancelled.ftl">
} }
<#else> <#else>
<#stop> <#stop>
</#if>
</#if> </#if>
</#if> </#if>
</#if> </#if>

View File

@ -22,7 +22,7 @@
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsPrepared> <#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsPrepared>
"apiReflexPlatformID" : "${apiReflexPlatformID}", "apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" : "datas" :
<#include "RFXtoRP_HsrPrepa_GoodsPrepared.ftl"> <#include "RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl">
}, },
{ {
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched> <#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched>
@ -30,21 +30,57 @@
"datas" : "datas" :
<#include "RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl"> <#include "RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl">
} }
<#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="" >
,
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCarrierUpdated>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPrepa_CarrierUpdated.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.OrderCarrierUpdated>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPrepa_OrderCarrierUpdated.ftl">
}
</#if>
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list??) as preparation_line> <#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list??) as preparation_line>
<#list preparation_line.despatched_ipg_list as despatched_ipg> <#list preparation_line.despatched_ipg_list as despatched_ipg>
<#if despatched_ipg.consignment_unit_id != ""> <#if despatched_ipg.consignment_unit_id!="">
, ,
{ {
<#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled> <#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled>
"apiReflexPlatformID" : "${apiReflexPlatformID}", "apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" : "datas" :
<#include "RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl"> <#include "RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl">
} }
</#if> </#if>
<#if despatched_ipg.carton_number != "000000000000000000" && despatched_ipg.carton_number!=despatched_ipg.hd_number >
,
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitHUsAdded>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPrepa_HandlingunitHUsAdded.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl">
}
</#if>
</#list> </#list>
<#-- <#sep>,</#sep> -->
</#list> </#list>
] ]
<#else> <#else>
<#stop "no confirmed quantity for the preparation - preparation closed"> <#stop "no confirmed quantity for the preparation - preparation closed">
</#if> </#if>

View File

@ -0,0 +1,23 @@
<#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl">
[
{
"Header": {
"ProjectID": "${projectRP}"
},
"ID":{
"RefID": "${preparationOrder.preparation_line_lst[0].preparation_order_originator_reference?trim?json_string}"
},
"Payload":{
"Carrier": {
"ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}"
}
<#-- Add transport grade code
<#if preparationOrder.transport_grade_code!="">
,
"CarrierService":"${preparationOrder.transport_grade_code?trim?json_string}"
</#if> -->
}
}
]

View File

@ -1,89 +0,0 @@
<#include "HfRpConfig.ftl">
[
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list??) as preparation_line>
<#list preparation_line.despatched_ipg_list as despatched_ipg>
{
"Header": {
"ProjectID": "${projectRP}"
},
"ID": {
<#if despatched_ipg.carton_number != "000000000000000000">
"RefID": "${despatched_ipg.carton_number}"
<#else>
"RefID": "${despatched_ipg.hd_number}"
</#if>
},
"Payload": {
"Information" :{
<#if despatched_ipg.carton_number != "000000000000000000">
"ContainerType": "${despatched_ipg.carton_type_code}"
<#else>
"ContainerType": "${despatched_ipg.hd_type_code}"
</#if>
},
<#-- HU Metadata inclusin inclusion -->
<#include "RFXtoRP_HsrPrepa_GoodsPrepared_HandlingUnitMetadata.ftl">
,
"PreparedContents" :[
{
"Goods": {
"ItemID": "${preparation_line.item_code?trim?json_string}",
"LVBranchID": "${preparation_line.item_lv_code?json_string}",
<#if (despatched_ipg.ipg_manufacture_date?length != 0) && (despatched_ipg.ipg_manufacture_date?starts_with("00") == false)>
<#assign priority_date = despatched_ipg.ipg_manufacture_date?datetime(rfx_date_format_default)?iso_utc />
"PriorityDate": "${priority_date}",
<#else>
<#if (despatched_ipg.ipg_receipt_date?length != 0) && (despatched_ipg.ipg_receipt_date?starts_with("00")== false)>
<#assign priority_date = despatched_ipg.ipg_receipt_date?datetime(rfx_date_format_default)?iso_utc />
"PriorityDate": "${priority_date}",
<#else>
<#if (despatched_ipg.ipg_best_before_date?length != 0) && (despatched_ipg.ipg_best_before_date?starts_with("00")== false)>
<#assign priority_date = despatched_ipg.ipg_best_before_date?datetime(rfx_date_format_default)?iso_utc />
"PriorityDate": "${priority_date}",
<#else>
<#if (despatched_ipg.ipg_sell_by_date?length != 0) && (despatched_ipg.ipg_sell_by_date?starts_with("00")== false)>
<#assign priority_date = despatched_ipg.ipg_sell_by_date?datetime(rfx_date_format_default)?iso_utc />
"PriorityDate": "${priority_date}",
<#else>
<#if (despatched_ipg.ipg_use_by_date?length != 0) && (despatched_ipg.ipg_use_by_date?starts_with("00")== false)>
<#assign priority_date = despatched_ipg.ipg_use_by_date?datetime(rfx_date_format_default)?iso_utc />
"PriorityDate": "${priority_date}",
<#else>
<#if (preparationOrder.stock_despatch_at_preparation_datetime?length != 0) && (preparationOrder.stock_despatch_at_preparation_datetime?starts_with("00")== false)>
<#assign priority_date = preparationOrder.stock_despatch_at_preparation_datetime?datetime(rfx_date_format_default)?iso_utc />
"PriorityDate": "${priority_date}",
<#else>
"PriorityDate": "1970-01-01T00:00:00Z",
</#if>
</#if>
</#if>
</#if>
</#if>
</#if>
<#-- Segmentation Keys inclusion -->
<#include "RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl">
},
"ExecutionflowID": "${preparation_line.preparation_order_originator_reference?trim?json_string}",
<#if (preparation_line.pro_originator_reference_line_number!0) != 0>
"LineID": "${preparation_line.pro_originator_reference_line_number}",
<#else>
"LineID": "${preparation_line.pro_line_number!0}",
</#if>
"ActorID": "${preparationOrder.physical_depot_code?trim?json_string}",
"Quantity": {
"LVID": "${quantity_in_base_lv_RP_Cst}",
"Value": ${despatched_ipg.quantity_lvs}
}
}
]
}
}<#sep>,</#sep>
</#list>
<#sep>,</#sep>
</#list>
]

View File

@ -0,0 +1,23 @@
<#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl">
[
<#assign dispatched_datetime = RfxDateTimetoUTC(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_offset_rfx) />
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list??) as preparation_line>
<#list preparation_line.despatched_ipg_list as despatched_ipg>
{
"Header": {
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${despatched_ipg.carton_number}",
"RefDate": {
"DateTime": "${dispatched_datetime}",
"AuthorTimeZone": "${time_zone_rfx}"
}
},
"Payload": { }
}<#sep>,</#sep>
</#list>
<#sep>,</#sep>
</#list>
]

View File

@ -9,11 +9,7 @@
"ProjectID": "${projectRP}" "ProjectID": "${projectRP}"
}, },
"ID": { "ID": {
<#if despatched_ipg.carton_number != "000000000000000000">
"RefID": "${despatched_ipg.carton_number}",
<#else>
"RefID": "${despatched_ipg.hd_number}", "RefID": "${despatched_ipg.hd_number}",
</#if>
"RefDate": { "RefDate": {
"DateTime": "${dispatched_datetime}", "DateTime": "${dispatched_datetime}",
"AuthorTimeZone": "${time_zone_rfx}" "AuthorTimeZone": "${time_zone_rfx}"

View File

@ -0,0 +1,128 @@
<#include "HfRpConfig.ftl">
[
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list??) as preparation_line>
<#list preparation_line.despatched_ipg_list as despatched_ipg>
{
"Header": {
"ProjectID": "${projectRP}"
},
"ID": {
<#if despatched_ipg.carton_number != "000000000000000000">
"RefID": "${despatched_ipg.carton_number}"
<#else>
"RefID": "${despatched_ipg.hd_number}"
</#if>
},
"Payload": {
"Information" :{
<#if despatched_ipg.carton_number != "000000000000000000">
"ContainerType": "${despatched_ipg.carton_type_code}"
<#if preparation_line.despatched_cartons_list?? >
<#list preparation_line.despatched_cartons_list?filter(l ->l.carton_number==despatched_ipg.carton_number) as dimensionCarton>
,
"Length": {
"Unit": "${length_unit_rfx}",
"Value": "${dimensionCarton.overall_depth}"
},
"Weight": {
"Unit": "${weight_unit_rfx}",
"Value": "${dimensionCarton.carton_gross_weight}"
},
"Height": {
"Unit": "${length_unit_rfx}",
"Value": "${dimensionCarton.overall_height}"
},
"Width": {
"Unit": "${length_unit_rfx}",
"Value": "${dimensionCarton.overall_width}"
}
</#list>
</#if>
<#else>
"ContainerType": "${despatched_ipg.hd_type_code?json_string}"
<#if preparation_line.despatched_hds_list??>
<#list preparation_line.despatched_hds_list?filter(j ->j.handling_device_number==despatched_ipg.hd_number) as dimensionHU>
,
"Length": {
"Unit": "${length_unit_rfx}",
"Value": "${dimensionHU.hd_type_depth}"
},
"Weight": {
"Unit": "${weight_unit_rfx}",
"Value": "${dimensionHU.hd_gross_weight}"
},
"Width": {
"Unit": "${length_unit_rfx}",
"Value": "${dimensionHU.hd_type_width}"
}
</#list>
</#if>
</#if>
},
<#-- HU Metadata inclusin inclusion -->
<#include "RFXtoRP_HsrPrepa_GoodsPrepared_HandlingUnitMetadata.ftl">
,
"PreparedContents" :[
{
"Goods": {
"ItemID": "${preparation_line.item_code?trim?json_string}",
"LVBranchID": "${preparation_line.item_lv_code?json_string}",
<#if (despatched_ipg.ipg_manufacture_date?length != 0) && (despatched_ipg.ipg_manufacture_date?starts_with("00") == false)>
<#assign priority_date = despatched_ipg.ipg_manufacture_date?datetime(rfx_date_format_default)?iso_utc />
"PriorityDate": "${priority_date}",
<#else>
<#if (despatched_ipg.ipg_receipt_date?length != 0) && (despatched_ipg.ipg_receipt_date?starts_with("00")== false)>
<#assign priority_date = despatched_ipg.ipg_receipt_date?datetime(rfx_date_format_default)?iso_utc />
"PriorityDate": "${priority_date}",
<#else>
<#if (despatched_ipg.ipg_best_before_date?length != 0) && (despatched_ipg.ipg_best_before_date?starts_with("00")== false)>
<#assign priority_date = despatched_ipg.ipg_best_before_date?datetime(rfx_date_format_default)?iso_utc />
"PriorityDate": "${priority_date}",
<#else>
<#if (despatched_ipg.ipg_sell_by_date?length != 0) && (despatched_ipg.ipg_sell_by_date?starts_with("00")== false)>
<#assign priority_date = despatched_ipg.ipg_sell_by_date?datetime(rfx_date_format_default)?iso_utc />
"PriorityDate": "${priority_date}",
<#else>
<#if (despatched_ipg.ipg_use_by_date?length != 0) && (despatched_ipg.ipg_use_by_date?starts_with("00")== false)>
<#assign priority_date = despatched_ipg.ipg_use_by_date?datetime(rfx_date_format_default)?iso_utc />
"PriorityDate": "${priority_date}",
<#else>
<#if (preparationOrder.stock_despatch_at_preparation_datetime?length != 0) && (preparationOrder.stock_despatch_at_preparation_datetime?starts_with("00")== false)>
<#assign priority_date = preparationOrder.stock_despatch_at_preparation_datetime?datetime(rfx_date_format_default)?iso_utc />
"PriorityDate": "${priority_date}",
<#else>
"PriorityDate": "1970-01-01T00:00:00Z",
</#if>
</#if>
</#if>
</#if>
</#if>
</#if>
<#-- Segmentation Keys inclusion -->
<#include "RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl">
},
"ExecutionflowID": "${preparation_line.preparation_order_originator_reference?trim?json_string}",
<#if (preparation_line.pro_originator_reference_line_number!0) != 0>
"LineID": "${preparation_line.pro_originator_reference_line_number}",
<#else>
"LineID": "${preparation_line.pro_line_number!0}",
</#if>
"ActorID": "${preparationOrder.physical_depot_code?trim?json_string}",
"Quantity": {
"LVID": "${quantity_in_base_lv_RP_Cst}",
"Value": ${despatched_ipg.quantity_lvs}
}
}
]
}
}<#sep>,</#sep>
</#list>
<#sep>,</#sep>
</#list>
]

View File

@ -0,0 +1,18 @@
<#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl">
[
{
"Header": {
"ProjectID": "${projectRP}"
},
"ID":{
"RefID": "${preparationOrder.preparation_line_lst[0].preparation_order_originator_reference?trim?json_string}"
},
"Payload":{
"Carrier": {
"ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}"
}
}
}
]

View File

@ -15,6 +15,13 @@
<#else> <#else>
"HandlingunitID": "${despatched_ipg.hd_number}" "HandlingunitID": "${despatched_ipg.hd_number}"
</#if> </#if>
<#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="" >
,
"HUCarrier":{
"ActorID": "${preparationOrder.load_data.carrier_code?json_string}"
}
</#if>
} }
} }
] ]

View File

@ -18,21 +18,21 @@
[ [
{ {
<#if preparation_order.originator_reference?? && preparation_order.originator_reference!=""> <#if preparation_order.originator_reference?? && preparation_order.originator_reference!="">
<#-- check preparation type code (internal order and reservation are ignored) --> <#-- check preparation type code (internal order and reservation are ignored) -->
<#if preparation_order.preparation_type_code == "010" || preparation_order.preparation_type_code == "030"> <#if preparation_order.preparation_type_code == "010" || preparation_order.preparation_type_code == "030">
<#-- Only if preparation order not confirmed --> <#-- Only if preparation order not confirmed -->
<#if preparation_order.preparation_order_confirmed == "false" > <#if preparation_order.preparation_order_confirmed == "false" >
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected> <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
"apiReflexPlatformID" : "${apiReflexPlatformID}", "apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" : "datas" :
<#include "RFXtoRP_HsrPro_ExecutionflowDetected.ftl"> <#include "RFXtoRP_HsrPro_ExecutionflowDetected.ftl">
<#else> <#else>
<#stop "preparation order already confirmed"> <#stop "preparation order already confirmed">
</#if> </#if>
<#else> <#else>
<#stop "preparation order type not supported"> <#stop "preparation order type not supported">
</#if> </#if>
<#else> <#else>
<#stop "PRO reference is empty"> <#stop "PRO reference is empty">
</#if> </#if>

View File

@ -16,29 +16,29 @@
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign receipt = JsonUtil.jsonToMap(dataRfx)> <#assign receipt = JsonUtil.jsonToMap(dataRfx)>
<#if receipt.receipt_reference ?? && receipt.receipt_reference!=""> <#if receipt.receipt_reference ?? && receipt.receipt_reference!="">
<#if receipt.receipt_type = "030"> <#if receipt.receipt_type = "030">
<#stop "ignored message because receipt type = transfert"> <#stop "ignored message because receipt type = transfert">
<#else>
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
}
]
</#if>
<#else> <#else>
<#stop "Receipt reference is empty"> [
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
}
]
</#if> </#if>
<#else>
<#stop "Receipt reference is empty">
</#if>
<#break> <#break>
<#case "U"> <#case "U">
<#-- *********************************************** Action = UPDATE ******************** --> <#-- *********************************************** Action = UPDATE ******************** -->
@ -47,10 +47,10 @@
[ [
<#if receipt.receipt_confirmed == "true" > <#if receipt.receipt_confirmed == "true" >
{ {
<#assign apiReflexPlatformID = ApiReflexPlatformID.ReceiptCompleted> <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted>
"apiReflexPlatformID" : "${apiReflexPlatformID}", "apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" : "datas" :
<#include "RFXtoRP_HsrReceiptList_ReceiptCompleted.ftl"> <#include "RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl">
} }
<#else> <#else>
<#if receipt.receipt_type = "030"> <#if receipt.receipt_type = "030">

View File

@ -35,7 +35,7 @@
"ContextPayload": "rfxresponse", "ContextPayload": "rfxresponse",
"Type": "RP_EXECUTIONFLOW_EVENT", "Type": "RP_EXECUTIONFLOW_EVENT",
"Task": "${id.apiRestReflexID}", "Task": "${id.apiRestReflexID}",
"OriginalID": "${id.refid}", "OriginalID": "${id.refid?trim?json_string}",
"StackTrace": "" "StackTrace": ""
} }
} }

View File

@ -36,6 +36,12 @@
"apiReflexPlatformID" : "${apiReflexPlatformID}", "apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" : "datas" :
<#include "RFXtoRP_PlatformLogCreate.ftl"> <#include "RFXtoRP_PlatformLogCreate.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_RestResponseAllocationError.ftl">
} }
] ]
</#if> </#if>
@ -52,6 +58,12 @@
"apiReflexPlatformID" : "${apiReflexPlatformID}", "apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" : "datas" :
<#include "RFXtoRP_PlatformLogCreate.ftl"> <#include "RFXtoRP_PlatformLogCreate.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_RestResponseAllocationError.ftl">
} }
] ]
</#switch> </#switch>
@ -81,7 +93,13 @@
"apiReflexPlatformID" : "${apiReflexPlatformID}", "apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" : "datas" :
<#include "RFXtoRP_PlatformLogCreate.ftl"> <#include "RFXtoRP_PlatformLogCreate.ftl">
} },
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_RestResponseAllocationError.ftl">
}
] ]
</#if> </#if>
@ -98,6 +116,12 @@
"apiReflexPlatformID" : "${apiReflexPlatformID}", "apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" : "datas" :
<#include "RFXtoRP_PlatformLogCreate.ftl"> <#include "RFXtoRP_PlatformLogCreate.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_RestResponseAllocationError.ftl">
} }
] ]
</#switch> </#switch>

View File

@ -0,0 +1,20 @@
<#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl">
[
{
"Header": {
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${id.refid?trim?json_string}",
"RefDate": {
"DateTime": "${aDateTime?iso_utc}",
"AuthorTimeZone": "${time_zone_rfx}"
}
},
"Payload": {}
}
]

View File

@ -2,8 +2,7 @@
<#-- Concat reflex timestamp with reflex time zone and format this date in ISO UTC format --> <#-- Concat reflex timestamp with reflex time zone and format this date in ISO UTC format -->
<#-- --------------------------------------------------------------------------------------- --> <#-- --------------------------------------------------------------------------------------- -->
<#function RfxDateTimetoUTC rfxdatetime offset > <#function RfxDateTimetoUTC rfxdatetime offset >
<#assign datetimeUTC = JsonUtil.createUTCDateTime(rfxdatetime,time_zone_rfx , "yyyy-MM-dd'T'HH:mm:ss") /> <#return ((rfxdatetime + offset)?datetime.iso?iso_utc)>
<#return (datetimeUTC)>
</#function> </#function>
<#-- --------------------------------------------------------------------------------------- --> <#-- --------------------------------------------------------------------------------------- -->
@ -13,7 +12,7 @@
<#-- --------------------------------------------------------------------------------------- --> <#-- --------------------------------------------------------------------------------------- -->
<#function splitEmailsIntoArray emails > <#function splitEmailsIntoArray emails >
<#local str = "["> <#local str = "[">
<#list emails?split(";|,| |à|/","r")?filter(l -> l != "") as email> <#list emails?split(";|,| |à|/","r")?filter(l -> l != "") as email>
<#if email?matches("^[\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4}$")> <#if email?matches("^[\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4}$")>
<#if str != "["> <#if str != "[">
<#local str += ","> <#local str += ",">

View File

@ -1 +1 @@
1.2.13+1 1.2.12+3