无法将自定义 SharePoint 工作流与 SharePoint Server 2010 中的内容类型关联
首先,我正在使用 SharePoint Server 2010 Beta 2、Visual Studio 2010 Ultimate RC。
我已经基于项目类型和一些自定义网站栏构建了自定义内容类型。我还使用 Visual Studio 2010 构建了一个自定义顺序工作流。这是一个相对简单的工作流,它创建任务、等待任务完成、设置工作流完成。我可以通过 VS 2010 部署将此工作流程部署到网站集(顺便说一句,这非常好)。我遇到的问题是,当我尝试将自定义内容类型与自定义工作流程关联时,该工作流程未在可供选择的工作流程模板中列出。只能选择 OOTB SharePoint 工作流。更重要的是,如果我创建一个列表并将工作流程关联到该列表,我的自定义工作流程就会出现在工作流程模板列表中。这是有道理的,因为在 VS2010 中开始构建自定义工作流程时,第一个问题是该工作流程是“站点”工作流程还是“列表”工作流程,而我选择了“列表”。问题是列表工作流不允许与内容类型关联吗?!? 谢谢。
To preface, I am working with SharePoint Server 2010 Beta 2, Visual Studio 2010 Ultimate RC.
I have built a custom Content Type based on the Item type with a few custom site columns. I also have built a custom Sequential Workflow using Visual Studio 2010. This is a relatively simple workflow that creates a task, waits for the task to complete, sets the workflow to complete. I am able to deploy this workflow to the site collection through VS 2010 deploy (which is pretty nice, btw). The problem I have is that when I try to associate the custom Content Type with my custom workflow, that workflow is not listed in the workflow templates to choose from. There are only the OOTB SharePoint workflows to choose. The kicker is that if I create a list and associate a workflow to that list, my custom workflow is in the workflow template list. This makes sense since at the start of building a custom workflow in VS2010, one of the first questions is whether the workflow is a Site or a List workflow and I selected List. Is the issue that List workflows are not allowed to be associated with Content Types?!?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在工作流程的 elements.xml 中,查找 AssociationCategories 并将其更改为 ContentType,如下所示:
非常感谢我的同事 Yves 指出了这一点:)
In your workflow's elements.xml, look for AssociationCategories and change it to ContentType like so:
Big thanks to my co-worker, Yves for pointing this out :)