Randomly change/run workflow file after added

I’ve used in my workflow: Get Processes (Output into a collection variable).
In order to use For Each (item) and access property called “ProcessName” (item.ProcessName) I’ve installed from Browse for Namespaces:

  • first: System.Collection.ObjectModel.Collection

  • second: System.Diagnostic.Process

After these steps, my worflow / xaml file (Studio, Community License) start to randomly change / run ignoring steps:

  • sometime System.Collection… is hidden from TypeArgument list in Properties (For Each activity).

  • though I’ve set Breakpoints, when workflow run jump over ignoring those breakpoints.

  • logging item.ProcessName do not provide only the processes names but alternative results:

07/25/2022 10:19:20 => [Info] System.Collections.ObjectModel.Collection`1[System.Diagnostics.Process]
07/25/2022 10:19:20 => [Info] System.Collections.ObjectModel.Collection`1[System.Diagnostics.Process]
07/25/2022 10:19:20 => [Info] WhatsApp
  • property ProcessName is randomly available for those 2 typeArguments.

  • even changes made to the workflow disapear after a serie of open/close sequences then return to that specific sequence where I’ve made made and Save changes.

I’ve tried to create a new file in order to work with Get Processes activity and to use item.ProcessName property.
Here, I encounter another bug - cannot see being available (not even in Browse):

System.Collection.ObjectModel.Collection

but only System.Diagnostic.Process which allow me to use the property item.ProcessName (which, as I know, it’s owned by the System.Collection… property). This second test file I can provided here:
test.xaml (6.9 KB)

Tried to delete System.Collection.ObjectModel from Imports, but got this error (I’ve carefully eliminated all references to it from my workflow, save then close file then reopen multiple times):

22.4.3+Branch.master.Sha.926b4e643842c0bd04601053628fabcad850b6c3

Some of the namespaces are in use and cannot be deleted!

'System.Collections.ObjectModel'


I’ve tried to delete it even from a new created file with nothing in the workflow.

On the other hand, I’ve tried also to delete: System.Diagnostic.Process
but in Imports I can found System.Diagnostics only and this also cannot be deleted (same error: …in use and cannot be deleted).

Some more details from test.xaml file uploaded before:

If selected this, it’s own property ProcessName cannot be used / through errors along the workflow:

If selected this, it’s successfull using not owing property ProcessName:

Tried this:
in the same workflow, created a new Sequence then add Get Processes activity then ForEach.
Testing only this Sequence, got this error (may help to figure out what’s going on):

07/25/2022 11:55:16 => [Debug] Test started for activity: Sequence
07/25/2022 11:55:17 => [Info] robot execution started
07/25/2022 11:55:18 => [Error] For Each: Unable to cast object of type 'System.Diagnostics.Process' to type 'System.Collections.ObjectModel.Collection`1[System.Diagnostics.Process]'.

TypeArgument selected is: System.Diagnostic.Process.
If I change to System.Collections.ObjectModel.Collection trough exactly the same error:

07/25/2022 12:01:20 => [Debug] Test started for activity: Sequence
07/25/2022 12:01:22 => [Info] robot execution started
07/25/2022 12:01:23 => [Error] For Each: Unable to cast object of type 'System.Diagnostics.Process' to type 'System.Collections.ObjectModel.Collection`1[System.Diagnostics.Process]'.

Thank you for all the above information, I saved it in our issue tracker. Although I cannot provide any timeline around the fix, it will be considered in the future.