While testing an upgrade on my dev server, I began getting a bunch of errors from Flow like the following:
/wiki/Talk:Main_Page Flow\Exception\UnknownWorkflowIdException from line 127 of .../extensions/Flow/includes/WorkflowLoaderFactory.php: The requested workflow does not exist on this wiki.
This came from a mis-match between the results of wfWikiID() and what was stored in the database.
If we replace the calls to the global wfWikiID() with a wiki_id from Flow's dependency injection, it is easy to work-around this problem for testing scenarios like mine.