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

  1. Using SharePoint designer, connect to your destination site
  2. Create a new list-based workflow called “test” (or whatever), attaching it to your migrated list
  3. Create one condition (i.e. if 1 = 1)
  4. Create one action (i.e. add comment “hello”)
  5. 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.

  1. Using SharePoint Designer, connect to your destination site
  2. in the left-hand side, in Site Objects, select All Files
  3. in the All Files list, select Workflows
  4. Select your new workflow that you just created (in this example, “test”)
  5. You should see (at least) four files:
    text.xoml
    test.xoml.rules
    test.xoml.wfconfig.xml
    test.xsn
  6. Right-click on test.xoml.wfconfig.xml and select Open With, Notepad
  7. 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”/>
  8. Record the Guid entries for ListID, TaskListID, and HistoryListID

Step 3 – Update the migrated workflow

  1. Still using SharePoint Designer, All Files, Workflows, this time select your migrated workflow
  2. You should again see (at least) four files. Right-click on “your-workflow.xoml.wfconfig.xml” and select Open with SharePoint Designer (As XML)
  3. 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.
  4. Save the file
  5. Close SharePoint Designer
  6. Open SharePoint Designer again and open your site
  7. Instead of All Files, this time click on Workflows
  8. Select your workflow
  9. Save the workflow
  10. Publish the workflow

Your workflow should now be reassociated with your list on your new site.

SharePoint 2010 将带有工作流的模板移动到另一个站点集的更多相关文章

  1. SharePoint 2010 缺少站点保存为模板选项

    如果您尝试在SharePoint Server 2010中保存网站,并且没有看到"将网站另存为模板"选项,则可能是因为该网站已启用发布功能.如果使用站点发布功能,则有几个选项可将网 ...

  2. SharePoint 2010 最佳实践学习总结------第1章 SharePoint Foundation开发基础

    ----前言 这段时间项目出在验收阶段,不是很忙,就潜心把SharePoint学一下,不求有多深刻,初衷只是先入门再说.后续会发布一系列的学习总结.主要学习的书籍为<SharePoint2010 ...

  3. SharePoint 2013 缺少站点保存为模板选项

    如果您尝试在SharePoint Server 2013中保存站点,我们没有看到“将站点另存为模板”选项,则可能是因为该站点已启用站点发布功能.如 之前文章提到 “SharePoint 2010 缺少 ...

  4. SharePoint 2010 Pop-Up Dialogs SharePoint 2010 弹出对话框

    SharePoint 2010 Pop-Up Dialogs SharePoint 2010 弹出对话框         SharePoint 2010 使得往你的站点加入对话框内容变得出乎意料的简单 ...

  5. SharePoint 2010 安装教程

    SharePoint Server 2010作为MOSS 2007的升级版本,自从2009年底发布Beta版本以来就备受关注,网络上已经出现了很多相关的文章,其中也不乏中文的信息. 最近SharePo ...

  6. 在SharePoint 2010 母版页里添加自定义用户控件

    在SharePoint 2010 母版页里添加自定义用户控件(译) 使用自定义用户控件的好处: 1.容易部署:2.易于控制显示或隐藏. (在使用的过程中)可能要面对的问题是:如何在用户控件里使用Sha ...

  7. Sharepoint 2010 工作流启动时处理出错

    在Sharepoint 2010 中使用Sharepoint 2010 designer做了一个工作流: 运行工作流时,当主办工程师是“张三”的时候,工作流一启动就报错. -------------- ...

  8. Sharepoint 2010 工作流启动时处理表单出错

    问题: Shareoint 2010 列表工作流启动时,显示“处理表单时出现严重错误”. Error Message-1: Object doesn't support property or met ...

  9. SharePoint 2010 新列表模板列表

    SharePoint 2010 新列表模板列表 项目描述叙事 发展环境创造了良好的名单为模板.然后使用列表模板将其复制到生产环境. 脚步 1. 打开"列表设置",找到"将 ...

随机推荐

  1. mysql 查看或者修改数据库密码

    首先启动命令行 1.在命令行运行:taskkill /f /im mysqld-nt.exe 下面的操作是操作mysql中bin目录下的一些程序,如果没有配置环境变量的话,需要切换到mysql的bin ...

  2. MySQL——函数

    MySQL数据库提供了很多函数包括: (1)数学函数 (2)字符串函数 (3)日期和时间函数 (4)条件判断函数 (5)系统信息函数 (6)加密函数 (7)格式化函数 一.数学函数 数学函数主要用于处 ...

  3. Java 内存模型及GC原理

    一个优秀Java程序员,必须了解Java内存模型.GC工作原理,以及如何优化GC的性能.与GC进行有限的交互,有一些应用程序对性能要求较高,例如嵌入式系统.实时系统等,只有全面提升内存的管理效率,才能 ...

  4. JVM 什么时候会full gc

    除直接调用System.gc外,触发Full GC执行的情况有如下四种.1. 旧生代空间不足旧生代空间只有在新生代对象转入及创建为大对象.大数组时才会出现不足的现象,当执行Full GC后空间仍然不足 ...

  5. Ctags快速入门

    Ctags快速入门 在vim下阅读代码,特别是阅读不熟悉的代码时,ctags是一个提高效率的强大的工具. 1. ctags是什么? ctags可以将代码中的函数.方法.类.变量和其他的标识符进行索引, ...

  6. Android系统Gps分析(一)【转】

    本文转载自:http://blog.csdn.net/xnwyd/article/details/7198728 版权声明:本文为博主原创文章,未经博主允许不得转载.   目录(?)[+]   1 G ...

  7. java: new Date().getTime() 与 System.currentTimeMillis() 与 System.nanoTime()

    java使用new Date()和System.currentTimeMillis()获取当前时间戳   在开发过程中,通常很多人都习惯使用new Date()来获取当前时间,使用起来也比较方便,同时 ...

  8. Javascript类型转换的规则实例解析

    http://www.jb51.net/article/79916.htm 类型转换可以分为隐式转换和显式转换,所谓隐式转换即程序在运行时进行的自动转换,显式转换则是人为的对类型进行强制转换.Java ...

  9. macd背离的级别

    1分钟的背离可以忽略不看. 5分钟的背离可以预测未来5-6个小时的股价. 15分钟级别的背离可以预测未来24小时之内的股价. 30分钟级别的背离可以做中线. 周线背离可以影响1-2年的股价. 背离级别 ...

  10. 基于KD-Tree的最近邻搜索

    目标:查询目标点附近的10个最近邻邻居. load fisheriris x = meas(:,:); figure(); g1=gscatter(x(:,),x(:,),species); %spe ...