Invoking ProcessB from within ProcessA - dependencies

Hi there,
I am running a Process_A (with Dependencies_1) from which I am starting Process_B (with Dependencies_2).
Dependencies_1 (of Process_A) are not the same versions as Dependencies_2 (of Process_B).

So the question: Which packages versions will be used when executing/invoking Process_B?

Thx,
Josef

Hi @J0ska

when a process is running it uses its own dependencies listed in the project.json file like below

So a call for another process with its own dependencies will be separate from the dependencies of the caller.

Hi @reda
Are you confident it’s like this also in case I am invoking the Process_B by “Invoke Workflow File” activity with “Process_B_Main.xaml” as argument? Is robot in such case evaluating project.json file of the Process_B? I have some doubts…

Cheers

Hi @J0ska

you’re right I’ve tried to use common sense but this is true, I’ve created two Processes : ProcessA and ProcessB.

I used an invoke workflow file in ProcessA to call ProcessB.

In ProcessB I installed PDF Package and used Read PDF and created a variable as an output fo this activity, after that I uninstalled the PDF Package to make sure I have a problem of dependencies like the image below :

So in ProcessA I installed the PDF Package to see if the invoke for ProcessB is going to work even if we have a problem in this ProcessB.

And it worked, and I even added an out argument with the pdf content and it has been assigned perfectly.

So the conclusion is that every process invoked is using the root dependencies and not its own.

1 Like

Great job @reda!
Perfect demonstration!
I should have invented such a test case myself!

Thx!

1 Like

This is interesting. I tested it a bit more in a reversed situation. If your Process A doesn’t have the PDF package installed but the Process B does, it will then throw an error when executing the Process A.

2 Likes

Yes I’ve noticed this too when I did it.

The question now if we have an invoke of ProcessC inside ProcessB what dependencies will Process C use, is it going to be ProcessB dependencies or the root dependencies from ProcessA?

I suppose it will be always the root ProcessA dependencies. I am pretty sure the robot is processing dependencies (project.json file) only once when launching the ProcessA.

Yes @J0ska I felt lazy to do it at first but I did it anyway,

I’ve added a ProcessC with the same way and it has worked as you expected.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.