如何使用自定义工作流程步骤查找所有工作流程

How Can I Find All Workflows Using a Custom Workflow Step

我在 Dynamics 365 CE 中注册了一个自定义工作流步骤。如何找到包含该工作流步骤的所有工作流?

归功于此 post:https://community.dynamics.com/365/f/dynamics-365-general-forum/366932/find-a-specific-step-in-workflow

答案的要点是编写 FetchXML 来检查 workflow 实体的 xaml 属性。

例如寻找插件 Example.WorkflowStep

<fetch distinct="true" >
  <entity name="workflow" >
    <attribute name="createdon" />
    <attribute name="primaryentity" />
    <attribute name="statecode" />
    <attribute name="workflowid" />
    <attribute name="ownerid" />
    <attribute name="type" />
    <attribute name="owningbusinessunit" />
    <attribute name="name" />
    <attribute name="category" />
    <attribute name="xaml" />
    <filter type="and" >
      <condition attribute="type" operator="eq" value="1" />
      <condition attribute="statecode" operator="eq" value="1" />
      <filter type="and" >
        <condition attribute="rendererobjecttypecode" operator="null" />
        <condition attribute="xaml" operator="like" value="%Example.WorkflowStep%" />
      </filter>
    </filter>
    <order attribute="primaryentity" />
  </entity>
</fetch>

一种免代码的方式是

  1. 导航到“设置”>“自定义”
  2. 点击"Customize the System"
  3. 展开Plugin Assemblies
  4. Select 包含自定义工作流步骤的程序集
  5. Select 自定义工作流程步骤(即选中复选框)
  6. 点击Show Dependencies