Hello, guys!
I believe the problem is related and can be somewhat solved as in this thread:
I did this for the same error on my Main.xaml workflow and it worked.
However, the same error happened again in the already converted process on another workflow - empty workflow and built completely new (copy-paste from another workflow though).
Now I wonder if the conversion function works at all and maybe I will refrain from converting projects.
I don’t want to have to do this correction manually for each such error…
I can help explain this as so far there isn’t a clear reason or solution.
So each activity in a xaml workflow has an ‘id’. This id must be unique.
Certain circumstances cause the same id to be used in different activities, this results in the error you see when you try to run or invoke the workflow, presumably because all the activity ID’s are being added to a dictionary so you get the key error.
I personally regularly see this using mocked workflows when I mock more than one activity.
The consistent fix I see for mocks is to mock and another activity, then remove the mock I just added. This ‘resets’ all the ids and they are correctly unique again.
I expect the same in this scenario, add a log message, then remove it. I believe it will ‘reset’ the id’s.
If not you can look directly in the xaml itself and see if you find the duplicated ID.
This is a weird bug, I have only ever seen it in mocked workflows under the scenario given so I feel its quite niche, interesting to see it happen in ‘normal’ workflows.
If adding a log message to force a reset of the ID’s doesnt work, you need to go into the XAML directly by opening it in Notepad or Notepad++, search for all the IDs and find the ones that have the same value, change one of them to be unique.