Today while importing a solution which has workflows we got a below error.
“The workflow cannot be published or unpublished by someone who is not its owner“
Went ahead and checked the owners of the workflow and found that the owner of the activated process is not the same as the user who is importing the solution.
The fix can be applied by two ways.
a) Import the solution using the user who owns the activated process. This cannot be good solution if there are processes owned by different users which need to be updated by the solution import.
b) Verify the processes that are included in the solution, and then find them in the organization, if they are not owned by you then you must assign them to yourself. You can reassign them to the original user after you import the solution. However, you will have to ask the process owners to activate it after the import.
Hope this helps