我们为某种类型的内容设置了一个非常简单的审批工作流程。但是,由于某种原因,第一个手动活动无法完成,因此工作流被阻止。
任何完成活动的尝试都会提示此错误:
An item with the same key has already been added.
Unable to finish the Workflow Activity (tcm:x-xxxxx-xxxxxx)
这是我正在使用的数据(为了便于阅读而截断):
<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>
请注意,我正在为[mailImage]属性重用相同的电子邮件图标图像。我倾向于认为这是导致错误的原因,因为它是列表中唯一重复的组件链接。
如果我删除邮件图像组件链接并完成活动,它会起作用,我可以继续工作流程。奇怪吧?
对于能够继续进行的工作流,我看不出为什么我不能在同一组件中重用组件链接。我的意思是,CMS 允许我保存组件,为什么不允许我继续 Workflow?
编辑:顺便说一句,这是来自事件日志的错误:
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