none
sharepoint 2010,文档审批结束后,一部分工作流丢失 RRS feed

  • 问题

  • 用户自定义的审批工作流,全局发布;

    运行一段时间以后,发现一部分的工作流丢失(文档上原来附加的审批完成工作流现在没有了)(工作流中间有修改过,因为审批人的变更,或权限的变更)

    现在也不知道是什么原因引起的?

    平时谁遇到这样的问题嘛?

    什么原因会造成工作流丢失呢?



    张杰

    2012年4月18日 23:59

答案

  • workflow默认会在60天后被自动清理掉。你可以看看是不是这个原因

    可以禁用这个功能

    http://social.msdn.microsoft.com/Forums/en-US/sharepointworkflow/thread/4ca5dd5c-bce7-43fd-af29-7379227ca6fb/

    http://msdn.microsoft.com/en-us/library/dd441390(v=office.12).aspx

    Workflow AutoCleanUpDays

    Although the AutoCleanUpDays setting is not directly related to performance, it is important enough to the overall workflow environment to warrant discussion. It is also largely misunderstood and, depending on whom you ask, either does too much or not nearly enough.

    The purpose of the AutoCleanUpDays setting is to remove the association between a workflow instance and its history entries and to clear out the workflow instances and tasks. It does not actually remove the entries from the History List. By default, this cleanup happens 60 days after a workflow instance has completed, but that timeframe is configurable.

    The primary impact that cleanup has on performance is that the workflow status page loads faster when users browse to it because it has fewer items to query against from the task list. As mentioned previously, cleanup does not actually remove the items from the History List, so it has no impact on the 2000-item limit. A side effect of this process is that the SharePoint content database becomes less cluttered (specifically some of the workflow tables), which may help with performance in very large workflow environments where hundreds of thousands of workflow instances may be or may have been running.

    You can set the AutoCleanUpDays value for a particular workflow template by adding the following nodes to the element manifest (typically workflow.xml). Replace xxxx with the appropriate number of days.

    <Elements ...>
      <Workflow ...>
        <MetaData ...>
          <AutoCleanUpDays>xxxx</AutoCleanUpDays>
        </MetaData>
      </Workflow>
    </Elements>
    

    Every new association based on this template now uses the specified AutoCleanUpDays value. Naturally, this change does not affect existing workflows, the built-in workflows, or SharePoint Designer workflows (which do not use an element manifest file). In these cases, you must run code to change the AutoCleanUpDays property of the SPWorkflowAssociation object. The challenge is that you need to run this code periodically to properly update associations that were added after you ran the code initially.

    One final point on this subject is that you should not consider the Workflow History list to be an audit log. If you need that capability, there are other options.


    上善若水
    Lambert Qin [秦磊] | 博客(Blog): SharePoint in My Eyes 中文 / LinkedIn
    Posting is provided "AS IS" with no warranties, and confers no rights.

    2012年4月20日 4:51

全部回复

  • workflow默认会在60天后被自动清理掉。你可以看看是不是这个原因

    可以禁用这个功能

    http://social.msdn.microsoft.com/Forums/en-US/sharepointworkflow/thread/4ca5dd5c-bce7-43fd-af29-7379227ca6fb/

    http://msdn.microsoft.com/en-us/library/dd441390(v=office.12).aspx

    Workflow AutoCleanUpDays

    Although the AutoCleanUpDays setting is not directly related to performance, it is important enough to the overall workflow environment to warrant discussion. It is also largely misunderstood and, depending on whom you ask, either does too much or not nearly enough.

    The purpose of the AutoCleanUpDays setting is to remove the association between a workflow instance and its history entries and to clear out the workflow instances and tasks. It does not actually remove the entries from the History List. By default, this cleanup happens 60 days after a workflow instance has completed, but that timeframe is configurable.

    The primary impact that cleanup has on performance is that the workflow status page loads faster when users browse to it because it has fewer items to query against from the task list. As mentioned previously, cleanup does not actually remove the items from the History List, so it has no impact on the 2000-item limit. A side effect of this process is that the SharePoint content database becomes less cluttered (specifically some of the workflow tables), which may help with performance in very large workflow environments where hundreds of thousands of workflow instances may be or may have been running.

    You can set the AutoCleanUpDays value for a particular workflow template by adding the following nodes to the element manifest (typically workflow.xml). Replace xxxx with the appropriate number of days.

    <Elements ...>
      <Workflow ...>
        <MetaData ...>
          <AutoCleanUpDays>xxxx</AutoCleanUpDays>
        </MetaData>
      </Workflow>
    </Elements>
    

    Every new association based on this template now uses the specified AutoCleanUpDays value. Naturally, this change does not affect existing workflows, the built-in workflows, or SharePoint Designer workflows (which do not use an element manifest file). In these cases, you must run code to change the AutoCleanUpDays property of the SPWorkflowAssociation object. The challenge is that you need to run this code periodically to properly update associations that were added after you ran the code initially.

    One final point on this subject is that you should not consider the Workflow History list to be an audit log. If you need that capability, there are other options.


    上善若水
    Lambert Qin [秦磊] | 博客(Blog): SharePoint in My Eyes 中文 / LinkedIn
    Posting is provided "AS IS" with no warranties, and confers no rights.

    2012年4月20日 4:51
  • 那清除掉的workflow如何找回来呢?

    清除的是文档和工作流之间的关联?还是清除的是工作流实例本身?

    如何重新在文档和工作流之间进行关联?

    谢谢!


    张杰


    2012年4月20日 4:57
  • 应该是找不回来了。

    按照文档The purpose of the AutoCleanUpDays setting is to remove the association between a workflow instance and its history entries and to clear out the workflow instances and tasks

    工作流相关都清楚掉了,实例和关联。不过只清理完成的工作流。

    既然完成了,那你干嘛还要再关联呢?要不你重新执行工作流?


    上善若水
    Lambert Qin [秦磊] | 博客(Blog): SharePoint in My Eyes 中文 / LinkedIn
    Posting is provided "AS IS" with no warranties, and confers no rights.

    2012年4月23日 7:35
  • 工作流是关于审批流的;

    肯定要以后查看相关审批节点的拉


    张杰

    2012年4月23日 8:12
  • 那你最好修改现有工作流,保存你所需要的信息。

    丢的了,就找不回来了。


    上善若水
    Lambert Qin [秦磊] | 博客(Blog): SharePoint in My Eyes 中文 / LinkedIn
    Posting is provided "AS IS" with no warranties, and confers no rights.

    2012年4月26日 9:05
  • 嗯,看来只能这样了。

    谢谢了!


    张杰

    2012年4月27日 0:38