1
votes

I'm starting out with mule and I noticed that the mflow files tend to get rather large and even if you use the visual view in Mule Studio it's hard to take it all in. I read somewhere that you could put each flow in a different file and then all the flows get deployed together and can call each other.

The problem now is I created my own custom transformer that I want to use in two different flows. But if I declare a global custom transformer in each file I get an error saying that the name already exists.

So now I tried and placed the custom transformer in its own mflow file and it works in runtime but the problem is Mule Studio doesn't seem to understand it at "compile time" and my mflow files are riddled with errors stating "Reference to unknown global element". How can I import global elements from one mflow file to another so that Mule Studio stops complaining.

Maybe this isn't the correct way to do it at all. If so I'd be happy to know how to achieve my goal in any other way.

Thanks in advance

2

2 Answers

2
votes

This was a known issue with Studio whereby it doesn't recognise global elements in other config files but still runs the application fine: https://www.mulesoft.org/jira/browse/STUDIO-1881

This should be fixed in version 3.4 of Studio. What version of Studio are you using?

And yes, centralising reusable config elements is a common approach. More info on sustainable development with Mule here: http://www.mulesoft.org/documentation/display/current/Team+Development+with+Mule

-1
votes

Global Elements are accessible among all the mule flows, since Mule Studio 3.4