Migrate Process Builder with Ant Migration Tool
What to put in package.xml
It took a bit of digging around but I figured out what content you need in your package.xml file to retrieve and deploy Process Builder.
If you look at Metadata Types in Workbench, you will see that there are two types - Flow and Flow Definition. Which one to use?
What you need in your package.xml is Flow in your <name> tag and you must append a dash and the version number that you want to the API name of your Process Builder:
With that, you get a definition that can then be deployed. The definition file starts like this:
Once you have deployed your Process Builder you will need to Activate it manually.
Out of curiosity I wanted to find out what FlowDefinition gives you. It is the ' parent of a set of flow versions
'. If you retrieve a FlowDefinition and do not provide a version number of the Process Builder:
You get the active version, but no definition content:
So, to take a Process Builder from one org to another, use 'Flow' in the <name> tag, append a dash and the version number to your API name in the <members> tag and activate the Process Builder once deployed.
Wildcarding works as well, i.e. <members>*</members> with <name>Flow</name>