63 lines
2.1 KiB
Java
63 lines
2.1 KiB
Java
<#-- **** input parameters ***** -->
|
|
<#-- input : message RFX -->
|
|
<#-- project : projectId in ReflexPlatform -->
|
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
|
|
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
|
<#assign projectRP = project>
|
|
<#assign organisationRP = organisation>
|
|
|
|
<#assign aDateTime = .now>
|
|
|
|
<#switch cloudEventMsg.action>
|
|
<#case "C">
|
|
<#case "U">
|
|
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
|
<#assign dispute = JsonUtil.jsonToMap(dataRfx)>
|
|
[
|
|
<#if dispute.dispute_closed == true >
|
|
{
|
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimCreated>
|
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
"datas" :
|
|
<#include "RFXtoRP_HsaDispute_Created.ftl">
|
|
},
|
|
{
|
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimMessageSent>
|
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
"datas" :
|
|
<#include "RFXtoRP_HsaDispute_MessageSent.ftl">
|
|
}
|
|
<#if dispute.dispute_item??>
|
|
,
|
|
{
|
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimMessageSent>
|
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
"datas" :
|
|
<#include "RFXtoRP_HsaDispute_MessageSent2.ftl">
|
|
}
|
|
</#if>,
|
|
{
|
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimMessageSent>
|
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
"datas" :
|
|
<#include "RFXtoRP_HsaDispute_MessageSent3.ftl">
|
|
}
|
|
<#else>
|
|
<#stop>
|
|
</#if>
|
|
]
|
|
<#break>
|
|
|
|
<#case "D">
|
|
<#-- *********************************************** Action = DELETE ******************** -->
|
|
<#stop "event not supported - Case D ">
|
|
<#break>
|
|
|
|
|
|
<#default>
|
|
<#stop "event not supported">
|
|
</#switch>
|
|
|