tridion - 完成工作流事件会出现 "An item with the same key has already been added"错误

标签 tridion tridion-2011

我们为某种类型的内容设置了一个非常简单的审批工作流程。但是,由于某种原因,第一个手动事件无法完成,因此工作流被阻止。

任何尝试完成事件都会提示此错误:

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

最佳答案

您遇到的问题是因为您的审计模板。可能是您使用旧的(2011 年之前)VBScript 模板作为审核模板。尝试关闭审核,或更改出版物属性中的审核模板值

关于tridion - 完成工作流事件会出现 "An item with the same key has already been added"错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11969528/

相关文章:

Tridion RTF 文本选择

tridion - 在 Tridion 2011 SP1 中访问文件夹时出现问题

tridion - 如何从 DataExtender 中检索当前用户?

tridion - 防止插入组件和模板的相同组合 :

tridion - 更改 Rich Text Schema Field Tridion 2009 中的文档类型

tridion - 在 SDL Tridion 2011 中运行 VBScript 自定义页面

tridion - 如何为 View 子集配置 SDL Tridion CME 扩展?

tridion - 我应该如何通过核心服务获取和设置文件夹的组和用户权限设置?

tridion - 使用核心服务创建具有元数据字段的多媒体组件

tridion - 如何在 Tridion 中搜索富文本字段的源选项卡内的内容