Namespace in Invoked Workflow Files

namespace
error

#1

So we’re trying to implement some re-usable workflows.

One odd thing that we have encountered is that it seems that although you can create a xaml that includes a namespace (and uses it), that the CALLING xaml must also include that namespace or it will throw an error?

I would buy that if the arguments shared between the two used a type from that namespace (so both need it), but in this case they don’t. If the xaml that needs the namespace has it in its include list, why should I need to specify that in the main? Shouldn’t UiPath load all the namespaces in the calling tree? And if not, why are these specified at the workflow level instead of the project level?

Perhaps we are doing something wrong. But I would expect that if I specified an Include in a workflow, that it would be available to that workflow regardless of where it was called from.

Any thoughts?

Thank you.


#2

Are the reusable workflows in the project (and included in .nupkg) or outside?

If former, that looks like a bug.

If latter though, there might be a reason (speculation below):
When robot starts, it loads all needed references that are included in project.json (and possibly individual workflows in the .nupkg). If a workflow is called from outside the .nupkg, robot does not know about needed assemblies in the preparation phase and can have a situation like you described, because when it tries to load the workflow, assemblies/namespaces are missing (AFAIK there’s no hot reload).

Maybe @badita could add some insight into this.
If my speculation is correct, then there’s no easy solving of it from user perspective.