AnsweredAssumed Answered

Accessing Spring managed objects from groovy script task

Question asked by araghuraman on Jun 6, 2014
Can I access a Spring managed object from a Groovy Script task?
I want to explore this in order to avoid splitting my logic between an Expression based Service task (to access the spring managed object)
and a script task to manipulate the value returned by calling methods on the spring managed object.

Example, how to combine the following into a single groovy script task:

1) Expression based Java Service task:

Expression: dao.getTableData("x")
result: tableData

2) Groovy scipt task

def a=tableData.find{ it.name="a" }
def b=tableData.find{ it.name="b"}

Outcomes