Asked by:
CRM 2011 workflows being duplicated

Question
-
I have a problem where CRM creates a duplicate identical workflow for every user created workflow. This is only noticeable when you do an advanced find on workflows so if you have created 5 workflows on the system you will see 10 workflows when you do an advanced find on workflows. I wonder if this is an issue from upgrading from version 4. There had previously been reports of users receiving workflows emails twice and I could not find a cause for this until now. Has anyone come across this before?Wednesday, June 6, 2012 8:48 PM
All replies
-
I've seen this before, but only where the workflow trigger was badly configured. For example, the workflow would update a field which triggered the same workflow again.
Neil Benson, CRM Addict and MVP at Slalom Consulting. Find me on Twitter. Join over 20,000 other CRM professionals on the Microsoft Dynamics CRM group on LinkedIn.
Wednesday, June 6, 2012 10:23 PMModerator -
do you see a duplicate workflow definition (entity "process/workflow") or a duplicate workflow instance (entity System Job) ?
Gonzalo | gonzaloruizcrm.blogspot.com
Thursday, June 7, 2012 11:00 AMModerator -
In CRM 2011, the deleted workflows are still there in the system so that if you search using Advenced Find, those deleted ones also showed up but if you open those ones, you will see it those records are read-only and you cannot do any modification.
In order to differentiate such deleted workflows with the current ones, you can get the value of "type" attribute in SQL.
SELECT type, typename, name, createdon FROM FilteredWorkflow
Those with type 2 are deleted ones and those with type 1 are the current ones which you can acually see on All Processes view.
So, I believe those duplicated ones in your system are deleted ones by the organization import wizard during upgarding from CRM 4.0.
If you want to identify the cause of the reports of users receiving workflows emails twice, you can check the workflow instances in the system jobs list of left navigation on the entity form as mentioned by Gonzalo.
Thursday, June 7, 2012 5:52 PM -
If you look at the schema for the Type attribute, there are three values:
- 1 = Definition
Definition of a Workflow that is displayed in the application in the "All Processes" view. When you make changes to a workflow, you are making a change to a Workflow definition (or template); if you delete a workflow, you are deleting a workflow definition (or template)
- 2 = Activation
Whenever you activate (or publish) a workflow, an Activation record is created. An activation represents a snapshot of the workflow definition taken at activation time. If a Workflow is triggered, the System Job (asyncoperation) links back to the Workflow Activation record. Imagine you activate a workflow, a workflow is triggered and is in the midst of running, when you deactivate the workflow and make a change. In order to not effect the currently running Workflow, it uses the Workflow Activation record. If the workflow is triggered again, it will use the new definition (or workflow activation).
- 3 = Template
If you mark a Workflow as a Workflow Template, it will show up on the new Workflow dialog. If you choose to use a template, a copy of the template will be used as a basis of the Workflow.
When a Workflow is deleted from the system, the definition is deleted. However, if the workflow was ever published the Activation will remain for a period of time. Once all of the System Jobs that reference a particular Workflow Activation have completed and have been cleaned up (occurs through a recurring daily bulk delete job), the Workflow Activation will also be deleted.
Hope that makes things a little clearer. Otherwise, please feel free to ask some another question.
- Proposed as answer by Michael B. Scott - MSFTMicrosoft employee Thursday, June 7, 2012 10:13 PM
Thursday, June 7, 2012 10:13 PM - 1 = Definition
-
Hi Michael,
I am new to this dynamics and i am working on CRM 2013(Action functionality in process),
the same issue i am also facing,
How can i delete the activation record or it will be deleted automatically,
and i am getting some error while importing the same solution 2nd time,
error message like solution with id={guid} doesn't exist,
Please help me to solve this.
Thanks,
Veeresh
Monday, March 24, 2014 9:15 AM