Get name of current sequence

Hello,

I’m trying to get the name of the sequence that is currently executed but couldn’t find a way to do that so far. Does anyone know how to get the name of the current sequence?

Many thanks and best regards!

So if i understand your issue correctly, you have a workflow that is running. This workflow has multiple sequences inside it and you want to know what sequence is running at a given moment.

Is this correct? If yes, could you tell me what exactly are we trying to do here?

The simple option that i can see here is put a message box activity at the start of every sequence which will tell you what activity is about to start.

You’re right. I’ve got a Flowchart with several sequences and if an error occurs I want to write the name of the sequence in which the error occured in an excel report but I don’t know which command to use.

I already use exception.Message to get the error message and exception.GetType to get the error type and it works perfectly fine in my Try catch, but how can I get the name of the sequence in which the error was thrown?

Many thanks.

You should also include

Exception.Source

That will provide more information

1 Like

Hi @juka

You can try the Global Handler
image

This is also a error handling process which can be applied to the entire solution. So you just need one of these. You can specify how many types the error occurred activity should be retried and what types of information you want as the output of the error that occurred.

1 Like

Hi @Lahiru.Fernando,

thanks for your suggestion, sounds like this is what I needed. But when I click on new I cannot see the Global Handler. Do I need to install a special package first?
image

Best regards!

Hi @juka

What is the version you are using?

Hi @Lahiru.Fernando,

I’m using 2018.3.2
image

@juka

Please update to the latest version. It has this feature. Since you are using the community edition, you can do the upgrade simply without any hassle :slight_smile:

It will work for you!!

Hi @Lahiru.Fernando,

thanks for your help. I just don’t get how I can update to the latest version. I thought that the community edition updates automatically:

Community Edition

The Community Edition is always up to date, as it automatically updates itself as soon as a new version is available, be it Stable or Beta.

You can choose between the two update channels, Stable or Beta, from the Start Backstage view, in the Help tab.

How can I do that manually?

@juka

Yes… it should update automatically. However, If you are connected to the orchestrator, it sometimes do not update automatically. I had experienced it.

So what you can do is:
https://www.uipath.com/developers/community-edition-download
Download your setup from here.

  1. Uninstall the already available version manually.
  2. Install the downloaded setup and you are good to go :slight_smile:

Let know how it goes

1 Like

Hi @juka

Did it work out for you?

The best way to do this would be to use log message with level set to “Trace” whenever the bot enters a sequence. You can use “Info” level whenever you wish to print any custom message.

1 Like

Hi @Lahiru.Fernando,

I’ve just updated my Community Edition and now I’m playing around with the Global Handler. I’ll let you know if it works. Thanks for your help!

1 Like

Hi @Jagdish2593,

could you give me some more information about this? How do I exactly need to set the log message to save the name of the currently executed sequence in a variable?

HI @juka

He is referring to the Log Message activity. In that, you can set the log level.

Hi @Lahiru.Fernando,

thanks, I just don’t really get how I can get the name of the sequence out of this and store it in a variable. Do you have any suggestions?

Hi @juka

With the Global Handler, it is quite easy to get the activity name and store in a variable

So, As it says, you only need one global handler and it will apply for the entire project. So it is much easier to manage.

You can easily do it with Alphabet activities :

4 Likes