locked
Type field on process (workflow) entity RRS feed

  • Question

  • I was investigating some issues I have with workflows when I decided to create an advanced search on the processes entity. I filtered on the Category field to only show “workflow” processes. To my surprise the result returned more records than the normal filters on workflows!!

    Most of my workflows were listed several times in the list. After further investigation it turns out that the “Type” field on these workflows either contains “Activation” or “Definition”. There only exist one record of the type “Definition” - which is the one that is shown in the standard workflow filters. But there were many of the type “Activation”. When you open these records the command bar does not include the normal buttons for activation, deletion, etc. You can’t do anything on these records other than view the data.

    My question is… Does anyone know the logic behind this?

    My theory is that each time you activate a workflow a new record of the type “Activation” is created and the previous record is deactivated. The active records contains the most recent logic. This could be used for instances where a workflow instance was started but not yet fully executed before you deactivated the workflow to change its logic. This workflow instance triggered before the logic change must execute using the old logic which is fetched from the deactivated workflow of the type “Activation”.


    Kind regards, Thomas Rath


    • Edited by ThomasRath Wednesday, July 2, 2014 8:31 PM
    Wednesday, July 2, 2014 8:29 PM

All replies

  • Your theory is correct. If there are any incomplete workflow instances (i.e. an active system job for the workflow) when you deactivate then reactivate a workflow, then CRM will retain the previous workflow definition as an 'activation', so that the incomplete workflow instances will continue to work using the original definition

    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    Wednesday, July 2, 2014 8:47 PM
    Moderator