自定义工作流 Activity 未更新输入参数

Custom Workflow Activity not updating input parameters

我在尝试更新自定义工作流程时遇到问题 activity。一旦我对逻辑进行了更改,更新就会正常完成,但是当我添加新的输入参数时,更改不会反映出来。

更改程序集版本我无法再在 CRM 上更新程序集。

你是对的,你必须更改程序集版本才能看到你添加的新参数

增加(major/minor)版本号的程序集应该是 在 CRM 中注册为 new 程序集(而不是像您正在尝试做的那样注册为同一个程序集)。

用微软的话说:Upgrade a custom workflow activity

  1. Make necessary changes in the underlying code of the custom workflow activity.

  2. Change the values for <major_version> and/or <minor_version> in the assembly information of the custom workflow activity, and compile it. For example, change the value of your assembly from “1.0.0.0” to “2.0.0.0”.

  3. Register the upgraded custom workflow activity as a new assembly. Make sure that the new assembly has the same Name, PublicKeyToken, and Culture as the existing assembly to be considered as a different version of the same assembly.

    After you upgrade the custom workflow activity, existing running process instances that are using the custom workflow activity will continue to use the older version of the custom workflow activity assembly. This ensures that your existing running process instances do not break. If you want the process to use the new version of the custom workflow activity, you must modify the process definition to use the new version. Dynamics 365 displays all the <major_version> and <minor_version> combinations for an assembly in a drop-down list for you to select from.

我 运行 遇到了同样的问题。如果我不想要多个程序集(如@Henrik 所述),我将按照以下步骤操作:

  1. 设置 > 自定义 > 自定义系统
  2. 插件程序集
  3. Select 我的自定义程序集
  4. Select 我的自定义工作流步骤受升级影响
  5. 显示所有依赖项
  6. 停用所有相关工作流
  7. 从每个依赖的工作流中删除自定义工作流步骤(截取大量屏幕截图)
  8. 使用插件注册工具取消注册自定义工作流步骤
  9. 使用插件注册工具更新 工作流程序集
  10. 更新所有工作流程以使用新的自定义工作流程步骤,参考您的屏幕截图! :)
  11. 激活所有工作流

这会强制所有进程(工作流)使用最新版本的程序集。 如果您要删除自定义工作流输入参数或添加输出参数,则需要相同的步骤顺序

希望您没有太多受影响的工作流程。