Recently I tried to debug a custom activity workflow and I was facing below error.

Unhandled Exception: System.Activities.InvalidWorkflowException: The following errors were encountered while processing the workflow tree:

‘DynamicActivity’: The private implementation of activity ‘1: DynamicActivity’ has the following validation error:   Compiler error(s) encountered processing expression “DirectCast(CustomActivityStep3: Get Url_1_converted, System.String)”.

Basically, I am using two input parameters in my custom activity workflow.


So for debugging after above error I have figured out two options to solve my problem.

  1. Remove Input parameters when you are debugging your activity workflow, later you will add for dynamic values.
  2. Or add default values for input parameters.
after trying one of the above options I am able to debug my workflow.
For debugging custom activity workflow please refer below links
Hope it’ll help someone.