This is the top of my process builder metadata file. I read here and here that you can set the status to 'Draft' and it will appear as inactive on the UI. Then I read here that you have to set 'activeVersionNumber' to 0 and that 'FlowDefinition' element will override 'Flow' element's status field. But our process builder.flow file does not have a 'FlowDefinition' element. So what do I do ?

<?xml version="1.0" encoding="UTF-8"?>
<Flow xmlns="http://soap.sforce.com/2006/04/metadata">

... Also we don't have any FlowDefinition files. Why would that be?

Found FlowDefinition file:

<?xml version="1.0" encoding="UTF-8"?>
<FlowDefinition xmlns="http://soap.sforce.com/2006/04/metadata"/>

1 Answer 1


You are looking at the .flow file inside flows folder. There will be another file with extension .flowDefinition inside flowDefinitions folder.

The .flowDefinition file has details about which version is active for a given flow.


Force IDE or Force migration tool will retrieve flowDefinition files only if package.xml contains the below elements:



  • flowDefinition files are deprecated in v44.0 and above.
  • Before v44.0, active flow version number is stored in flowDefinition files and with v44.0, we can control active version inside the .flow file itself.
  • To get the status tag in .flow files make sure to use version number 44.0 or greater in package.xml file. I tried this in my developer edition org and it worked.

As part of this upgrade, flow definitions are no longer necessary when you deploy or retrieve via Metadata API. If you deploy with flow definitions, the active version numbers in the flow definitions override the status fields in the flows. For example, the active version number in the flow definition is version 3, and the latest version of the flow is version 4 with the status field as Active. After you deploy your flow, the active version is version 3.

  • We really don't have that folder in source. Nor is there one in the metadata available in the app connected with force.com IDE.
    – MadMax
    Dec 21, 2018 at 20:27
  • @SallyRothroat check the updated answer
    – javanoob
    Dec 21, 2018 at 20:45
  • I'm still confused, I now have a FlowDefinition file(see its contents in the edit) there is nothing here that would prevent the <status> field mentioned above from deactivating the PB.
    – MadMax
    Dec 21, 2018 at 20:54
  • And FlowDefinitions are deprecated in v44 so where does that leave us ?
    – MadMax
    Dec 21, 2018 at 21:03
  • @SallyRothroat let me know if you still have questions.
    – javanoob
    Dec 21, 2018 at 21:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .