SharePoint 2010 将带有工作流的模板移动到另一个站点集
HOWTO Move or Migrate SharePoint 2010 List-based Workflows between Sites and Site Collections
I’ve experienced this issue a lot when trying to migrate workflows between test SharePoint 2010 farms and production farms, in particular with workflows attached to lists. When moving a workflow to another site collection or server farm, the association to the list is broken and the workflow cannot be attached to the list. You also cannot use SharePoint designer to fix this via the standard methods as the unattached workflow cannot be reattached to the list.
List-based workflows are tied to three different lists – the “main” source list where the data is held (such as a Forms library or custom list), a task list, and a workflow history list. The latter in particular is tricky, because it is a hidden list and cannot be viewed via the normal interface.
The fix for this is to modify the source workflow files to force the workflow to reattach to the list. The following method assumes that your new site/location that you are moving the workflow too does not yet have any workflows already attached to any lists on the site. When a workflow is created in a site for the first time, a Tasks list and a Workflow History list are automatically created/used by the workflow. These lists must exist before you can force your migrated workflow to attach to the list.
Step 1 – Create a Blank Workflow
- Using SharePoint designer, connect to your destination site
- Create a new list-based workflow called “test” (or whatever), attaching it to your migrated list
- Create one condition (i.e. if 1 = 1)
- Create one action (i.e. add comment “hello”)
- Save and publish the workflow
After this step has been completed, your site will now have a Tasks list and Workflow History list.
Step 2 – Get the list ids for your new workflow
The list ids are required to configure your migrated workflow.
- Using SharePoint Designer, connect to your destination site
- in the left-hand side, in Site Objects, select All Files
- in the All Files list, select Workflows
- Select your new workflow that you just created (in this example, “test”)
- You should see (at least) four files:
text.xoml
test.xoml.rules
test.xoml.wfconfig.xml
test.xsn - Right-click on test.xoml.wfconfig.xml and select Open With, Notepad
- Look for the <Association…> tag in the xml:
<Association ListID=”{7DC232FD-4D0B-4F7B-AC72-3D4D6399147C}” StartManually=”true” TaskListID=”{CB551A8B-F1E1-49F9-A8F8-A2C8EDC241C7}” HistoryListID=”{04B19F9D-5A47-4E14-B85E-53FFF06CFA63}” StartOnCreate=”true” StartOnChange=”true”/> - Record the Guid entries for ListID, TaskListID, and HistoryListID
Step 3 – Update the migrated workflow
- Still using SharePoint Designer, All Files, Workflows, this time select your migrated workflow
- You should again see (at least) four files. Right-click on “your-workflow.xoml.wfconfig.xml” and select Open with SharePoint Designer (As XML)
- Find the Association tag and very carefully change the Guids so that your migrated List IDs are the same as the “test” workflow List IDs.
- Save the file
- Close SharePoint Designer
- Open SharePoint Designer again and open your site
- Instead of All Files, this time click on Workflows
- Select your workflow
- Save the workflow
- Publish the workflow
Your workflow should now be reassociated with your list on your new site.
最新文章
- SpringMvc的xml配置与annotation配置的例子的区别
- jQuery插件:jqGrid使用(一)
- Asp.net MVC 视图引擎
- c++引用小问题!
- 使用awstats分析iis站点的日志
- WGCNA算法研究笔记
- Struts2之OGNL表达式
- 求解释一个蛋疼的bug
- [Egret]长按图片分享、分享图片、本地存储
- nodeJS里面的模块
- 一起来搭简单的App框架
- Prometheus使用入门
- leetcode 153. Find Minimum in Rotated Sorted Array 、154. Find Minimum in Rotated Sorted Array II 、33. Search in Rotated Sorted Array 、81. Search in Rotated Sorted Array II 、704. Binary Search
- 设计服务类网站原型模板分享——Fortyseven
- kube-proxy源代码分析
- ASP.NET中的另类控件
- 20155225 实验四《Android程序设计》实验报告
- python学习笔记 - for循环: 遍历字典, 分别打印key, value, key:value
- ELNEC Programmer
- linux 下 安装go