Invoke Workflow at a specific point

I have a fairly complex Flow and after analyising it using UiPath, it suggested I use Invoke Workflow. Therefore I’m carrying out various tests and within the Main.xaml below, I wish to invoke 'Sequence.xaml

Sequence.xaml contains 2 message boxes and I wish this to come in at a specific point.

So…when Main.xaml is run and it comes to the part where ‘Sequence.xaml’ is run, I only wish to run it from the second activity within Sequence.xaml

How would I do this?

Main.xaml (6.5 KB)
project.json (1.7 KB)
Sequence.xaml (5.2 KB)

Hi @steve1977beyond

It is not possible to skip the activity if you are running from the begining
if you want to run from the specific activity the you can right click on the activity there you will find run from this activity


So if I have a sequence with 10 activities and I wish to run these from a different Main.xaml, it’s not possible to start it from the 5th activity (for example)?


assume you are running a sequence process which consists of 3 invoked xaml files you have completed the 1st xaml file and in second xaml file it is not possilble to skip the activity which is in the flow.


out of the box we dont have a skip activities functionality

But we can rewrite the origin XAML and implement a logic, that will jump directly to a particlular location, depending on an additional given input argument

That sounds good :slight_smile: Is there any documentation on how I could accomplish that?

it is about modelling anf also depends on the details

One of many Options

input: in_Skip | int32 - steps to ommit

For each Activity | stp in Enumerable.Range(1, 2).Skip(in_Skip) | DataType: int32

  • Switch Activity: stp | ArgumentType: int32
    • Case: 1
      • Log Message Activity: “Do Step1 Work”
    • Case: 2
      • Log Message Activity: “Do Step2 Work”

XAML:A calls / invoke XAML:B with in_Skip we control what to skip

Kindly note: there are a lot of variations / options and the complexitiy of the different steps will give us more criterias what to do / prefer

okay, I will halt my original intention but I have another question.

In my example Project, I have declared a variable in Main.xaml and I wish that variable to be referred to within Sequence.xaml…then when I run Main.xaml, it will show the relevant message box from Sequence.xaml

When I run it though, the message box is blank.

Please note, in this instance I have hard coded the variable but on my main automation it’s dynamic and placed within Main.xaml, hence why my example is the way it is.

What am I doing wrong?

Main.xaml (7.5 KB)
project.json (1.7 KB)
Sequence.xaml (5.8 KB)

To accomplish this you would need to change the Direction of your input argument to in, as you are sending in a value to the Sequence.xaml workflow.



1 Like

Main.xaml (7.2 KB)
project.json (1.7 KB)
Sequence.xaml (5.8 KB)

Thank you - Also when clicking ‘import arguments’, I needed to map the argument to the relevant variable also.

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