Return Activity Runs in Parent Workflow for Libraries

Hi team,

I will explain this with an example.

Example Situation
MyPackage is using MyLibrary which uses a Return activity to break out of a loop.

Expected Behaviour
The expected behaviour is shown in the below diagram, where LibraryWorkflow.xaml hits a Return activity and returns up into Workflow1.xaml (the workflow that invoked it).

Actual Behaviour
This is not what actually happens however.
The workflow runs the Return activity as if it had been run inline in Workflow1.xaml and instead returns into Main.xaml as shown below.

@matt.theisen

Can you please tell what return activity it is and howis it configured

Also mention the version and if a sample can be provided that would help or a series of logs

Cheers

Hi @Anil_G,

This occurs across multiple versions, one being 24.10.5

The activity is UiPath.Core.Activities.Return.

Pressed for time so not going to create a sample package but hopefully my diagrams are sufficient to understand the bug.

I have a workaround which (in the context of the example in the diagrams) is invoking a ‘wrapper’ workflow which then invokes LibraryWorkflow.xaml. That way LibraryWorkflow.xaml skips the wrapper workflow instead and continues execution in Workflow1.xaml

@matt.theisen

it is already mentioned

cheers

As indicated in the documentation, we are aware of this limitation.

We documented it after hearing the same feedback a few times, and we are exploring ways to improve this. It is a bit tricky technically, but we’ll do our best. I agree with you that your requirements as completely reasonable.

1 Like

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