In some scenarios, especially after doing an "export" of a workflow from one environment and "import" into another environment, it will not allow you to Publish the workflow until you go in and fix all the broken actions and forms that cannot find the connection or data source that may even already be there. The error will say, "You do not have permissions for data sources used in this workflow or data sources used in this workflow have been deleted."
It may take a long time to find all the possible missing data sources. Inside the "Assign a Task" action, you have to edit the form and look for data lookup controls or in the External Data tab and re-add them and re-configure them, even updating the variables that use them. This is time-consuming and makes it difficult to keep in sync the different environments (Production/Test/Development).
Can you please add a method to help identify all the broken data sources, or better yet, allow for a better export/import experience that will copy over all the necessary connections?