This question already has an answer here:

Duplicated: Please see Flows/Processes, Version Control and CI

Using CI for deploying flows/processes to the same environment results in error if existing version has been already activated:

flows/YYYY-1.flow -- Error: The version of the flow you're updating is active and can't be overwritten.

What is the best practice to use CI for flows deployment?

marked as duplicate by Boris Bachovski, Eric, Jenny B, metadaddy Oct 15 '15 at 4:56

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

up vote 2 down vote accepted

Unfortunately, the metadata API will not let you deploy a flow or process to overwrite an active one. If you are in sandboxes and can use changesets, that's the best way to resolve this.

What CI tool are you using? You might be able to write a pre-deploy hook to deactivate any active flows/processes first.

  • Using deployment automation (jenkins, for example) you can create ANT scripts which could solve this kind of problems. Might be worth checking out. There are more metadata types which are not default supported through the metadata APi (like Entitlement Processes) – westerforce Jul 20 '15 at 10:50

Not the answer you're looking for? Browse other questions tagged or ask your own question.