We set up a very simple approval workflow for a specific type of content. However, for some reason, the first manual action cannot be completed, and thus the workflow is blocked.
Any attempt to complete the action will cause this error:
An item with the same key has already been added.
Unable to finish the Workflow Activity (tcm:x-xxxxx-xxxxxx)
Here's the data I'm working with (truncated for readability):
<Content xmlns="uuid:fac33fb4-7b36-465a-af40-f3b80c4f3f65">
<contactlist>
<name>Lorem ipsum dolor</name>
<address>sit amet consectetur</address>
<photo xmlns:xlink="http://www.w3.org/1999/xlink"
xlink:type="simple" xlink:href="tcm:5-80196"
xlink:title="photo-1"></photo>
<email>email1@email.com</email>
<phone>interdu eget</phone>
<mailimage xmlns:xlink="http://www.w3.org/1999/xlink"
xlink:type="simple" xlink:href="tcm:5-80195"
xlink:title="email-icon"></mailimage>
</contactlist>
<contactlist>
<name>Lorem ipsum dolor</name>
<address>sit amet consectetur</address>
<photo xmlns:xlink="http://www.w3.org/1999/xlink"
xlink:type="simple" xlink:href="tcm:5-80197"
xlink:title="photo-2"></photo>
<email>email@email.com</email>
<phone>interdu eget</phone>
<mailimage xmlns:xlink="http://www.w3.org/1999/xlink"
xlink:type="simple" xlink:href="tcm:5-80195"
xlink:title="email-icon"></mailimage>
</contactlist>
</Content>
Note that I am reusing the same email image for the [mailImage] attribute. I tend to think that this is causing an error because this is the only link to the duplicated component in the list.
If I remove the links of the mail image component and complete the action, it will work, and I can continue the workflow. Odd ah?
, , . , CMS , Workflow?
EDIT: , :
Unable to finish the Workflow Activity (tcm:5-18430-131104)
An item with the same key has already been added.
Error Code:
0x80040000 (-2147221504)
Call stack:
System.ThrowHelper.ThrowArgumentException(ExceptionResource)
System.Collections.Generic.Dictionary`2.Insert(TKey,TValue,Boolean)
System.Collections.Generic.Dictionary`2.Add(TKey,TValue)
Tridion.ContentManager.Workflow.ActivityInstance.SaveBinariesAndGetBinaryIds(String,IDictionary`2)
Tridion.ContentManager.Workflow.ActivityInstance.OnFinishing(FinishActivityEventArgs)
Tridion.ContentManager.Workflow.ActivityInstance.Finish(ActivityFinish)
Tridion.ContentManager.BLFacade.Workflow.ActivityInstanceFacade.FinishActivity(UserContext,String,String,String,String,String,String)
ActivityInstance.FinishActivity