Best Tool for Invoking Workflows in Coded Workflows

In coded workflows, is it better to invoke other workflows via the dynamic workflows object, or through the IWorkflowInvocationService that can be accessed via the services container?

Not really sure when one is better than the other, or if one is better for writing automated tests. Thank you.

Hi @edevries

As per my understanding use workflows object for coded workflows because it is recommended, type‑safe, refactor friendly invocation method (workflows.MyWorkflow). It updates automatically when workflows change.
Might be helpful-
skills/skills/uipath-coded-workflows/references/codedworkflow-reference.md at main · UiPath/skills · GitHub

Happy Automation

That was what I was thinking too. The only benefit of the IWorkflowInvocationService I can think of is that if you really wanted to mock it for testing you could.