diff --git a/ExpiryGroupList.ftl b/ExpiryGroupList.ftl new file mode 100644 index 0000000..79fffe8 --- /dev/null +++ b/ExpiryGroupList.ftl @@ -0,0 +1,4 @@ +<#assign ExpiryGroupList = {}/> +<#assign ExpiryGroupList64 = ""/> + + \ No newline at end of file diff --git a/RFXtoRP_HfExpGrpList.ftl b/RFXtoRP_HfExpGrpList.ftl new file mode 100644 index 0000000..4c31349 --- /dev/null +++ b/RFXtoRP_HfExpGrpList.ftl @@ -0,0 +1,28 @@ +<#-- *********************************************** Parameter global ******************** --> +<#assign cloudEventMsg = JsonUtil.jsonToMap(input)> +<#assign projectRP = project> +<#assign organisationRP = organisation> +<#include "ExpiryGroupList.ftl"> +<#assign aDateTime = .now> + + +<#switch cloudEventMsg.action> + <#case "C"> + <#case "U"> + <#case "D"> + <#-- *********************************************** Action = CREATE or UPDATE ******************** --> + <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> + <#assign file = JsonUtil.jsonToMap(dataRfx)> + + <#assign temp = ExpiryGroupList64> + <#list file.expiry_group_list as expiry_group> + <#assign temp = JsonUtil.update(temp,cloudEventMsg.action,expiry_group.exipiry_group_code,expiry_group.priority_date_type_code)> + + <#assign output = JsonUtil.print(temp)> +${output} + <#break> + + <#default> + <#stop> + +