Reltio Connect

 View Only

Access attributes in workflow through Groovy script

  • 1.  Access attributes in workflow through Groovy script

    Posted 2 hours ago

    Hi Team,

    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.

    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
    ------------------------------