How to package a single workflow using Migration tool?

January 26, 2012

Extracting a single workflow out of can be a little tricky. I am using ANT/JAVA migration tool to extract metadata. From the documentation it is clear that 'Workflow' tag should be used to extract workflow.


The above component in project manifest - package.xml will fetch all the workflows related to Opportunity. How to fetch a specific workflow? dot operator will not work in this case. One way to get around this limitation is specifying the following components related to a workflow as appropriate.
  • WorkflowAlert
  • WorkflowFieldUpdate
  • WorkflowOutboundMessage
  • WorkflowRule
  • WorkflowTask
For example, a workflow sends an email and does a field update upon meeting a certain criterion. In package.xml, the following components should be included. 

<members>Opportunity.Set_Date</members><name>WorkflowFieldUpdate</name></types><types><members>Opportunity.Request Email</members><name>WorkflowRule</name>
</types> <types> 

Make sure we don't miss any alert, field update, task or outbound message coupled with a rule. Upon packaging, we get the right metadata. And, upon deployment we see the workflow in the target environment. 

You Might Also Like


  1. Awesome... was looking for something like this....

  2. Hi, how do I package and then retrieve for app visibility and tab visibility for *all* profiles in our org? thanks.


Popular Posts