Saturday, 27 April 2013

Dynamics CRM 2011 – Be careful while setting up an owner of workflow in production environments

Yesterday one of my customers had discussed about the functionality of uncomforting orders, which was stopped working unexpectedly. She said that everything was working well a week ago.

This customer works on Dynamics CRM 2011 online. So, being a system administrator on the same instance, I immediately tried to login to the production server, but unfortunately she had deactivated me as she wanted to assign the same license to one of their new sales team member. So, I asked her to invite me again and provide the admin rights to validate the problem. For, this functionality I had configured a workflow (process) to activate the fulfilled order. So, on very first step I did validate the System Jobs in Settings area. Over there, I found that the some of the workflow records were sitting in listening (waiting) mode, while some had executed successfully.

Upon further inspection, I had discovered that the waiting mode workflows were still owned by me. As she deactivated me on the production server, all the workflow jobs were waiting for me to be activated again. So, we instantly changed the owner of those workflows and resume the workflow jobs. Voila! Everything started working well then.

Hence, the learning is, we should not own the workflows in production environment of our customers, so that they do not face the above problem.

I hope this would be helpful.

8 comments:

  1. We use user id created specifically for running the workflows. Such user id is not owned by a person, rather the system owns it.

    ReplyDelete
  2. If I understood correctly then have you purchased a separate license to run workflows?

    ReplyDelete
  3. Hi Ankit, just out of curiosity what was the scope of the offending workflow? Just wondering if this would still be a problem with organization scope workflows?

    ReplyDelete
  4. One thing that makes this more complicated is that not even a sysadmin can modify or update a workflow process that is owned by another user. Therefore if you need to import a new solution package to production that contains any existing workflows, you'll first need to re-assign the processes to yourself, import the solution and the re-assign them back to the business user. Due to these limitations, I usually keep all workflows in a separate solution, so that the need to change their ownership is minimized.

    ReplyDelete
    Replies
    1. I agree,we do the same thing. On top of it, if we are using queues in our workflow then we create the queues with same GUIDs in all environments.

      Delete
  5. Hello Parvez,

    Yes, the scope of workflow was organization level(Global = 4).

    ReplyDelete
  6. Hello Ankith,

    I have the System Administrative privilege in the CRM. I need to change the owner of the workflows that are belongs to other account (that owner no more but account is enabled still). When I am trying to change the owner of that workflows I am getting the error message ie "Processor Error" (This process cannot be activated or deactivated by someone who is not its owner). I don't have that account log in credentials log into CRM and change. Please tell me any other options to change the owner of those workflows.


    ReplyDelete
  7. Hello Bujji Babu, Did you try to export the process and check the customisation? If the exported customisation has the owner field then from there it can also be changed and re-imported. I did not do it before but just thought for such workaround.

    ReplyDelete