无法删除 MS CRM 2016 内部部署中的系统工作流步骤

Not able to delete the system workflow step in MS CRM 2016 on-premise

我已经创建了一个系统工作流程,很久以前就删除了该工作流程本身。但工作流程仍然是 运行。我在正常过程中找不到它。但是当我对流程实体进行高级查找时,我可以找到工作流。 当我打开它时,没有删除或停用它的按钮。

我尝试从工作流视图本身删除或停用它。但它不允许我这样做。将一般错误获取为 "Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support" 。 你能帮忙解决这个问题吗?由于这个作品发送邮件的步骤很少,所以触发了我想停止的邮件。

设置下找不到,全部处理

但是我在查找进程时可以找到它,使用“新建”视图并删除所有预定义条件。在下面的屏幕中,我单击能够找到工作流程的结果。

工作流程图片

工作流记录有两种类型 - DefinitionActivation(在这种情况下我忽略了 Template

对于每个工作流,都会有两个条目。 .

一个可以选择 Deactivate 而另一个没有。

您正在查看 Activation 用于执行 WF 的生命周期快照记录。处理那些已经触发的。

If you look at the schema for the Type attribute, there are three values:

1 = Definition
Definition of a Workflow that is displayed in the application in the "All Processes" view. When you make changes to a workflow, you are making a change to a Workflow definition (or template); if you delete a workflow, you are deleting a workflow definition (or template)

2 = Activation
Whenever you activate (or publish) a workflow, an Activation record is created. An activation represents a snapshot of the workflow definition taken at activation time. If a Workflow is triggered, the System Job (asyncoperation) links back to the Workflow Activation record. Imagine you activate a workflow, a workflow is triggered and is in the midst of running, when you deactivate the workflow and make a change. In order to not effect the currently running Workflow, it uses the Workflow Activation record. If the workflow is triggered again, it will use the new definition (or workflow activation).

3 = Template
If you mark a Workflow as a Workflow Template, it will show up on the new Workflow dialog. If you choose to use a template, a copy of the template will be used as a basis of the Workflow.

When a Workflow is deleted from the system, the definition is deleted. However, if the workflow was ever published the Activation will remain for a period of time. Once all of the System Jobs that reference a particular Workflow Activation have completed and have been cleaned up (occurs through a recurring daily bulk delete job), the Workflow Activation will also be deleted.

Reference

如以下博客中所述,无法从 UI 中删除那些激活类型的工作流程。 https://sachinbansal.blog/2018/05/02/error-while-deactivating-workflows-should-be-exactly-1-messageprocessingstep-registered-for-workflow-dynamics-365/

我们有本地 CRM,因此从 CRM 数据库中删除了工作流。现在工作正常。 在删除工作流之前进行了完整的数据库备份。 运行 select 通过证明工作流 GUID 查询。 找到匹配的工作流记录后,将它们从数据库中删除。在我的例子中,我从数据库中的以下表列表中找到了匹配的记录。

  1. WorkflowDependencyBase
  2. 工作流基础
  3. WorkflowBaseIds