如何升级已投入生产的长期运行的 SharePoint 工作流 [英] How to upgrade a long running SharePoint Workflow already in production

查看:29
本文介绍了如何升级已投入生产的长期运行的 SharePoint 工作流的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的任务是帮助部署之前 SharePoint 部署的第 2 阶段.

I have been tasked with helping the deployment of a Phase 2 of a previous SharePoint deployment.

原始部署具有已在第 2 阶段更新的自定义工作流.
是否有操作方法"?对于这种情况?

The original deployment has custom workflows that have been updated in phase 2.
Is there a "How-To" for this type of situation?

我们看到的一些陷阱要求您将原始工作流标记为不接受任何新实例,然后将其更新部署为新工作流.这将允许之前的项目在旧代码下完成处理,并允许任何新流程启动新的工作流程.

Some of the pitfalls we have seen requires you to mark the original workflow to not accept any new instances, then deploy its update as a new worflow. This would allow the previous items to finish processing under the old code and any new processes to spin up the new workflow.

这样做的一个问题是,我们必须访问附加原始工作流的每个站点并附加新的工作流V2.现在我们在文档库中有两个工作流状态列.

One problem with this is we would then have to visit each site where the original workflow was attached and attach the new workflowV2. Now we have two workflow status columns in the doc library.

我刚刚进入这个项目,这些是开发人员注意到的问题.

I am just getting into the project and these are problems the devs have noticed.

您可以向我提供的任何资源或提示将不胜感激,因为我正在学习这一切.

以下是另一位开发人员的一些笔记,他向我介绍了他所看到的内容:

Here are some notes up from another dev who is giving me some background as to what he has seen:

如果工作流的某个版本已经存在,则将其重新部署为功能会导致现有工作流的状态设置为无新实例".这可以通过转到已附加工作流的文档库来查看,选择设置 ->文档库设置 ->工作流设置 ->删除工作流并注意工作流的单选按钮设置.任何当前工作中的工作流实例仍将正常完成,但此设置将阻止工作流的任何新实例.

If a version of a workflow already exists, then redeploying it as a feature will cause the existing workflow to have its status set to "No New Instances". This can be seen by going to a document library where the workflow has been attached, select Settings -> Document Library Settings -> Workflow settings -> Remove a workflow and noting the radio button setting for the workflow. Any current, in work, workflows instances will still complete as normal, but this setting will prevent any new instances of the workflow.

部署同一工作流的第二个版本"后,您需要重新访问您希望将其关联的每个文档库,并将其重新添加,就好像它是一个新的工作流一样.您必须为其指定一个唯一名称,例如MyWorkflow_v2".另一个副作用是,现在您将在文档库中拥有 2 个工作流状态列.一旦第一个实例的所有实例都完成并且不再需要该状态,您就可以删除/隐藏它.

Once the 2nd ‘version’ of the same workflow has been deployed, you’ll need to revisit each document library where you want it to be associated and re-add it as if it were a new workflow. You’ll have to give it a unique name, like ‘MyWorkflow_v2’. The other side-effect is that now you’ll have 2 workflow status columns in the document library. You can remove/hide the first one once all instances of it have completed and the status is no longer needed.

如果您使用相同的功能和清单 XML 文件重新部署工作流,则内部 GUID 将与第一次部署中使用的相同.SharePoint 会将其识别为同一工作流的第二个版本",并自动将第一个版本设置为无新实例"状态.但是,如果您选择在 XML 文件中使用不同的 GUID,则 SharePoint 会将其视为全新工作流的部署,并且不会对现有实例执行任何操作.您需要手动将每个文档库中的每个实例设置为无新实例"设置.

If you redeploy the workflow using the same feature and manifest XML files, then the internal GUID will be the same one as was used in the first deploy. SharePoint will recognize this as a second ‘version’ of the same workflow and automatically set the first version to the "No New Instances" status. If however, you choose to use a different GUID in the XML files, then SharePoint will see this as a deployment of a brand new workflow and do nothing with the existing instances. You will need to manually set each instance in each document library to the "No New Instances" setting.

重新部署工作流的第二个版本"后,您仍需要手动访问您希望使用的每个文档库并将其添加到文档库中.请记住,它的工作流模板名称将出现在工作流模板列表中,因为它在 XML 文件中命名(这是可以的),但是一旦添加它,您将需要为工作流输入一个唯一的工作流名称.这是您必须选择Workflow_v2"之类的名称作为新名称的点.

After re-deploying the second ‘version’ of the workflow, you will still need to manually visit each document library where you want it used and add it to the document library. Keep in mind that its workflow template name will appear in the list of workflow templates as it is named in the XML files (which is OK), but once you add it you’ll be required to enter a unique workflow name for the workflow. This is the point you must choose something like ‘Workflow_v2" as a new name.

撤回操作会删除解决方案中功能的所有实例,特别是对于我的工作流应用程序,它会从与其关联的所有文档库中删除工作流的所有实例.但是,在 的情况下,任务是由工作流创建的,一旦解决方案被撤回,如果用户单击希望获得签名页面的任务项,他们将获得一个 SharePoint未知错误"页面.原因是撤回过程从数据库中删除了工作流,不再有与​​任务关联的工作流.

The retract action removes all instances of the features within the solution, specifically for my workflow application, it removes all instances of the workflow from all document libraries that it was associated with. However, in the case of , where a task is created by the workflow, once the solution is retracted if a user clicks on a task item expecting to get the signature page, they’ll instead get a SharePoint "Unknown error" page. The reason is because the retract process removed the workflow from the database and there is no longer a workflow associated with the task.

推荐答案

我想您已经阅读了 Chris O'brien 关于此主题的评论.所以这是第二个链接:http://msmvps.com/blogs/theproblemsolver/archive/2008/09/10/versioning-long-running-workfows.aspx

I think you already read Chris O'brien's comments on this topic. so here is the second link : http://msmvps.com/blogs/theproblemsolver/archive/2008/09/10/versioning-long-running-workfows.aspx

这篇关于如何升级已投入生产的长期运行的 SharePoint 工作流的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆