In Dynamics CRM 2011 workflows are one of the supported Solution components. Workflows are owned by a specific user that doesn’t have to be the one working with the solution. One of the questions I got recently was around how ownership was handled during import of a managed solution into a new organization.
For the purpose of this blog post, let’s assume User A, created Workflow 1 and activated it. In this case, User A would be the owner of the workflow.
Next, the System Admin user created a new solution and did an add existing component on the workflow to associate it with the solution. The solution is then exported and imported into a new organization. The question is who is the owner of the workflow after the import?
The answer is whoever ran the import will become the owner in the new organization by default. It is possible even though the workflow is a managed component to de-activate it in the new organization and assign it to another user but that must be done post import.
Keep in mind that for security purposes the workflow when activated and run as a result of any triggering event will run in the context of the owning user. In many cases for solution level workflows this isn’t a problem, but it is something to be aware of. If configured for On Demand, the workflow will run in the context of the user that starts it.