Reputation: 169
I am facing an issue with my custom workflow activity when I try to update it. Once I do a change on the logic the update is done normally, but when I add new input parameters the changes are not reflected.
Changing the assembly version I am no longer able to update the assembly on CRM.
Upvotes: 4
Views: 2652
Reputation: 6170
I've run into the same issue. If I don't want multiple assemblies (as @Henrik describes) I follow these steps:
This forces all processes (workflows) to use the latest version of the assembly. The same sequence of steps is required if you're removing custom workflow input arguments or adding output arguments
Hopefully you don't have too many affected workflows.
Upvotes: 2
Reputation: 5787
You are right that you have to change the assembly version to be able to see the new parameters you have added
The assembly with the increased (major/minor) version number should be registered as a new assembly in CRM (instead of as the same one, as it seems you are trying to do).
In the words of Microsoft: Upgrade a custom workflow activity
Make necessary changes in the underlying code of the custom workflow activity.
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”.Register the upgraded custom workflow activity as a new assembly. Make sure that the new assembly has the same
Name
,PublicKeyToken
, andCulture
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.
Upvotes: 4