diff --git a/RFXtoRP_HsrPro.ftl b/RFXtoRP_HsrPro.ftl index 23ab2fb..1eee43f 100644 --- a/RFXtoRP_HsrPro.ftl +++ b/RFXtoRP_HsrPro.ftl @@ -24,6 +24,12 @@ "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsrPro_ExecutionflowDetected.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCustomFieldsUpdated> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrPro_ExecutionflowCustomFieldsUpdated.ftl"> } <#else> <#-- No line --> diff --git a/RFXtoRP_HsrPro_ExecutionflowCustomFieldsUpdated.ftl b/RFXtoRP_HsrPro_ExecutionflowCustomFieldsUpdated.ftl new file mode 100644 index 0000000..54750e3 --- /dev/null +++ b/RFXtoRP_HsrPro_ExecutionflowCustomFieldsUpdated.ftl @@ -0,0 +1,43 @@ +<#include "HfRpConfig.ftl"> +<#include "ReflexUtils.ftl"> +<#include "ActorPrefix.ftl"> +[ + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID":{ + "CustomFields": [ + { + "Key": "depot_code", + "Value": "${preparation_order.physical_depot_code?trim?json_string}" + }, + { + "Key": "activity_code", + "Value": "${preparation_order.activity_code?trim?json_string}" + }, + { + "Key": "originator_code", + "Value": "${preparation_order.originator_code?trim?json_string}" + }, + { + "Key": "reference", + "Value": "${preparation_order.originator_reference?trim?json_string}" + }, + { + "Key": "order_year", + "Value": "${preparation_order.preparation_order_year}" + }, + { + "Key": "order_number", + "Value": "${preparation_order.preparation_order_number}" + } + ], + <#if preparation_order.originator_reference?? && preparation_order.originator_reference!=""> + "RefID": "${preparation_order.physical_depot_code?trim?json_string}${preparation_order.activity_code?trim?json_string}${preparation_order.originator_code?trim?json_string}${preparation_order.originator_reference?trim?json_string}" + <#else> + "RefID": "O${preparation_order.physical_depot_code?trim?json_string}${preparation_order.activity_code?trim?json_string}${preparation_order.originator_code?trim?json_string}${preparation_order.preparation_order_year}${preparation_order.preparation_order_number}" + + } + } +] \ No newline at end of file