Log Info Message

Hello @private_matter
If you have implemented the RE Framework then try implementing the Try catch logic like below

Invoke Main.xaml
	Invoke InitAllSettings.xaml //Initialization Part
		Read Config file
		Create dictionary
	End Invoke InitAllSettings.xaml
		Invoke Process.xaml //Transaction/Non Transaction Flow
			//Try catch logic starts here
			Try
			{
				Invoke First_Entry_Point_of_Your_Process.xaml
					Invoke Child1.xaml
					Invoke Child2.xaml
						If Emp_Status = "NotActive" then
							Terminate Workflow activity here
						End If
					//Happy flow no error continue to next step
			}
			Catch ex as Exception
				Log Message = exception.Message
			End Try
			//Try catch logic ends here
		End Invoke Process.xaml
	End Invoke Process
	
End Invoke Main.xaml

Hello @moosh

I have a question for you. The idea you proposed works but my current project contains several Retry Scopes in which even if I have an IF and ELSE in the action panel, the bot will continue to the Condition panel and execute whatever is shown. And I cannot leave those blank in my project. For instance, in one of my retry scopes, the page needs to be refreshed if the element does not appear and needs to be retried for 10 times. And if after 10 times fail, then the entire process will begin all over again. So in fact, I need to stop the execution process without reaching the Condition panel of some of the Retry scopes. Which is why the idea of nesting with IF activity will not always work. That is why I am proposing for UiPath developers to take my concern seriously. Currently, I’m forced to set a Terminate Workflow activity on some of my retry scopes even though this generates a Faulted state in Orchestrator when it should in reality be stated as Successful. If you need me to clarify a diagram demo to show you what I really mean, then I would be happy to. @loginerror can you also check my concern about this? I’m still honestly not convinced at all and I still believe that the log message activity should have a feature to stop the process completely instead of only showing the string outcome in the output panel. It’s not cool to have your status show as Faulted when it shouldn’t.

Herein lies the trouble with trying to do it all in a sequence. More and more “creative” methods will be needed to do what should otherwise be the simplest of tasks. I say this to try and help, but this is probably why you’re not getting the traction you want, or having this concern taken more seriously. You are looking for a solution to a self-imposed problem. A problem that doesn’t really need to exist. You choose to restrict yourself to a sequence, when there are better and more appropriate flow controls available and I think you’ll be doing yourself a great disservice if you limit yourself this way.

However, if I were in your shoes and had no other option, then maybe I would try something like this:

Place all of your code inside a While activity with the condition set to True.

Place a Break activity the end of your code and immediately after any log messages in your code where you need to stop your process.

This should cause your code to run inside the While loop like normal. Placing the break at the end of your code will prevent the While loop from executing more than once, and using the Break activity after your log messages should cause the While loop to terminate early; ending the process without a fault.

For the record, I consider this a terrible idea, but it might just achieve what you want. If you’re already using multiple or nested loops though, then I would say don’t even consider this.

I strong disagree with your statement.

It is actually a simple yet critical feature that must be added in the Terminate Workflow activity where there should be a log level dropdown to choose just like the Log Message activity, but instead of showing a system error exception, it should show an informative message with a success outcome in orchestrator such as if running the bot in Production (Unattended) runtime.

What you’re saying in here is that you’re forcing me to choose another design layout for my canvas whish I simply dislike and not accustomed to it when both sequences and flowcharts must have the exact same features to begin with. And again, no I’ll never be using flowcharts and don’t try to convince me that I have no other option.

As for the below, please share a small demo.xaml to examine and testify if what you’re saying truly works in my case scenario.

I don’t think it’s a terrible idea but its actually a great idea. I’m not quite sure if you still understood what I’m trying to do here.

To provide you with a better explanation, I’ve created an illustration that clarifies more of what I’m trying to do here.