Reltio Connect

 View Only
  • 1.  Access attributes in workflow through Groovy script

    Posted 20 days ago

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



  • 2.  RE: Access attributes in workflow through Groovy script

    Reltio Employee
    Posted 4 days ago

    Hi Shwetha,

    You're on the right track with the routing logic. The main adjustment is that the workflow engine does not inject the full entity object as a process variable - execution.getVariable("entity") won't return what you expect. Instead, you need to fetch the entity via the Reltio API using the context variables the engine does provide.



    ------------------------------
    Uttam Somani
    Sr. Product Manager
    ------------------------------