我们已经为某种类型的内容设置了一个非常简单的审批工作流。但是,由于某些原因,第一个手动活动无法完成,因此工作流被阻塞。
任何试图完成该活动的尝试都会提示此错误:
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允许我保存组件,为什么不允许我继续使用工作流呢?
编辑:顺便说一下,这是事件日志中的错误:
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发布于 2012-08-15 13:45:32
THe问题是因为您的审核模板。您可能会使用旧的(2011年前) VBScript模板作为审核模板。尝试关闭审核,或更改出版物属性中的审核模板值。
https://stackoverflow.com/questions/11969528
复制相似问题