Throw stops workflow, trying to create a business rule exception that is catched and initiates another state

Good day

I am trying to learn to use state machines & more specifically how to use throws to create a business rule exception which would initiate another state.

However, my throw just stops the workflow. I have but it into a try catch, and created a business rule exception catch, and assign the exception to a BRE variable.Capture2

Any assistance is appreciated.

Capture4

Capture3

In the throw I have the following code: New BusinessRuleException

New BusinessRuleException(“Force BRE”)

The error message I get is

Error: Throw: Force BRE

It also does this in the REFramework when I put a throw in the Process File. It stops that workflow at the throw.

I’m having the same problem. Did you figure it out?

If there is an UiPath professional available to answer this question it would much appreciated!

hI @Regan_Williamson , can you share a screenshot of your workflow and the code you’re using in Throw activity?

Yeah, definitely having this same issue from the ‘Building a REFramework Project with Tabular Data’ lesson on Academy in the ‘Build an Execution Report’ module. I follow along, building it, and it ran properly in the previous module. Frustrating again to see things from Academy that just flat out don’t work.

I’m not sure about your situation, but in the original post it’s stopping because he’s running it in Debug mode. It’s supposed to stop at any exception when you use Debug mode. Just press the Continue button in Studio. You might have to press it more than once as the exception will “bubble up” to the container activities.