Is there a way to auto-generate a Mule mflow file based upon the xml?

1.1k views Asked by At

I want to know if there's a way to do this, to auto-generate from zero an mflow file based upon the xml files.

If not, how do you guys manage to merge with SVN those mflow files? its basically impossible! you need to manually merge them from the IDE Mule UI using drag-and-drop or going into the xml and adding that manually as well.

Thanks.

2

There are 2 answers

8
Nikos On

Using mule studio those files are mirrored real-time on saves (file deletes or edits). So if you want to do this outside of MS then you will need an automation tool to do it like ant. In general its better to work with the files in the /flow folder.

0
Rondo On

As noted elsewhere in stackoverflow, the flows directory and any .mflow files should not be committed to version control systems like git.[1]

The mflow files are generated by studio based on the XML file for your app that is stored in src/main/app/

So, after cloning a git project, for example, that does not have mflow files, running mvn studio:studio (to generate the Studio meta data), and then double clicking on that xml file, the .mflow file will be regerated (and the flows directory created, if nec.)

I just verified this with Anypoint Studio May 2014 Release (new name)

[1] http://www.mulesoft.org/documentation/display/current/Preparing+a+gitignore+File