a.cayzer
a.cayzer

Reputation: 289

Mule Dataweave : There is no variable named 'lookup'

I am trying to use the lookup function in a dataweave script but I am getting the error from the question "There is no variable named 'lookup'". Has anyone come across this and know how to fix it?

I am using Mule 3.7.1

Update This works at runtime, but won't give a preview, is there a way to make a preview work when using lookup?

Upvotes: 1

Views: 740

Answers (1)

JoostD
JoostD

Reputation: 744

This is not possible during designtime in the current versions of Mule 3.7.x / 3.8.x and the current versions of Studio.

The invocation of the flow you are calling via DataWeave's lookup function only happens at execution time. I had a look in latest 3.8.5, you won't see the error but null as a value for the lookup.

Metadata population via DataSense from the flow that will be called doesn't come through via this function in Dataweave.

Debugging may also gave you a hard time in 3.7.x but improved in 3.8.x, so you can see the behaviour and values to and from the flow you execute the lookup to.

Upvotes: 3

Related Questions