I'm wondering if someone has a best practice / blueprint which works better than the following scenario that I've got myself into:
- Created a managed package in a D.E. org which contains a Flow
- Deployed managed beta to Test Org
- Attempted to delete managed beta so I can install new version of beta
- Cannot for 12 hours. Why?
Well, the Flow must be i) deactivated then ii) must wait 12 hours to delete a flow then iii) I can finally delete the managed package to iv) finally update the managed beta
As such, I removed the Flow from the managed package and I now deploy Flows manually from Eclipse IDE to Test Org after the managed beta package.
PROBLEM: The Flow works fine in the DE Org where the managed package is first created. It can reference custom objects like this "ObjectName__c". But when the Flow is deployed into the Test Org with the managed package, it no longer "sees" any objects until I manually go into the XML (in Eclipse IDE) and modify all field, Apex CLass and Object references to "Namespace__ObjectName__c", then redeploy the Flow to the Test Org.
FURTHER PROBLEM: When I try to save the Flow to the DE Org ("save to server") using the IDE (where the managed package is originally created), the IDE automatically removes all the "Namespace__" prefixes I just hand entered. To be clear — I did not "refresh from server", but rather "save to server" and it seems to happily modify all the *.flow contents on my behalf.
I know I must be making a newbie mistake somewhere and there's gotta be a better way than waiting 12 hours between Test Org updates.
Emilio
Best Answer
Indeed an interesting problem, I was not aware Flows deactivation and deletion had this requirement, seems strange. However sure enough it is documented, though the reasoning still seems weak, especially considering, unlike Workflow, there is no scheduled aspect to Flow.
If I am understanding correctly here, I am assuming you still desire to include it in your package eventually, just not during the Beta package testing phase. During this time you obviously want to be able to develop your Flow, ideally in place where the namespace qualifications are maintained. So you don't have to keep re-editing your file each time you pass it over for testing with your Beta package.
Some thoughts then...
Thats about it for ideas. Speaking of which I would raise this Flow Dev Life Cycle issue on Ideas, its far from ideal and I am sure it's something that could be addressed easily. Even if for example the platform would say bypass the 12hr wait for Flows that it knows are from a Beta package.
Hope this helps.