Hi Team,
We are trying to access the Reltio attributes in workflow via script based on which we need to call the corresponding tasks. could you please let me know how can we get the values of attributes in Reltio and set it in execution variable through Groovy script in workflow.
Respective task will be called based on the values set in Execution variable.
Please find the below script and let me know for correction.
def entity = execution.getVariable("entity")
def entityType = execution.getVariable("entityType")
def customerSegment = null
if (entity != null &&
entity.get("attributes") != null &&
entity.get("attributes").get("CustomerSegment") != null &&
entity.get("attributes").get("CustomerSegment").size() > 0) {
customerSegment = entity.get("attributes").get("CustomerSegment").get(0).get("value")
}
execution.setVariable("entityType", entityType)
execution.setVariable("customerSegment", customerSegment)
------------------------------
Swetha Soundarapandian
Mastech Infotrellis
------------------------------