<#ftl output_format="JSON"> <#-- The macro for generating common trigger properties of source for handling the update of recipe object --> <#macro selectObject recipeObjectId objectType> "source": { "actions": ["SELECT_OBJECT"], "recipeObjectId": "${recipeObjectId}", "objectType": "${objectType}", "fieldName": "uuid", "isArray": "false", "statuses": ["NEW", "EXISTING", "EXISTING_UPDATED"] }, <#-- The macro for generating common trigger properties of source for handling the visibility of recipe object --> <#macro selectVisibility recipeObjectId objectType> "source": { "actions": ["SELECT_OBJECT"], "recipeObjectId": "${recipeObjectId}", "objectType": "${objectType}", "fieldName": "objectStatus", "isArray": "false", "statuses": ["NEW", "EXISTING", "EXISTING_UPDATED"] }, <#-- The macro for generating common trigger properties of source for handling updating the field of recipe object --> <#macro sourceUpdate recipeObjectId objectType fieldName> "source": { "actions": ["UPDATE_FIELD"], "recipeObjectId": "${recipeObjectId}", "objectType": "${objectType}", "fieldName": "${fieldName}", "isArray": "false", "statuses": ["NEW", "EXISTING", "EXISTING_UPDATED"] }, <#-- The macro for generating trigger to update the specified field in the object metadata --> <#macro updateField recipeObjectId objectType fieldName isArray="false" hasNext=false> { "actions": ["UPDATE_FIELD"], "recipeObjectId": "${recipeObjectId}", "objectType": "${objectType}", "fieldName": "${fieldName}", "isArray": "${isArray}", "statuses": ["NEW"] }<#if hasNext>, <#-- The macro for generating trigger to normalize the specified field in the object metadata --> <#macro normalizeField recipeObjectId objectType refPathToField isArray="false" hasNext=false> { "actions": ["NORMALIZE_FIELD"], "recipeObjectId": "${recipeObjectId}", "objectType": "${objectType}", "fieldName": "${refPathToField}", "isArray": "${isArray}", "statuses": ["NEW", "EXISTING"] }<#if hasNext>, <#-- The macro for generating trigger to update the visibility flag in the object metadata --> <#macro updateVisibility recipeObjectId objectType> { "actions": ["UPDATE_VISIBILITY"], "recipeObjectId": "${recipeObjectId}", "objectType": "${objectType}", "fieldName": "isVisible", "isArray": "false", "statuses": ["NEW", "EXISTING"] }