Throw activity in reframework

Hello guys! When I use throw activity in reframework I have error…why?


hi,
You have set the Throw to a BusinessRuleException because of this there will be a error throw when the workflow reaches this activitie.
What are you trying to do in the workflow?

Throw activity will throw the exception.
From your screenshots it is working as expected.

Regards,
Karthik Byggari

1 Like

Ok, If I want to change status queue item in orchestrator I need to use set transaction status?

Yes.
If you are using RE-Framework, when business exception occurs in the process xaml, then it will go to set transaction status and will set the transaction item to failed and then proceed to the next transaction item.

When application exception occurs, it will re-try depending on your settings.

Regards,]
Karthik Byggari

1 Like

Thanks for help, but status in orchestrator did not change. Status is In Progress

Because you are not handing the exception and your workflow is terminated when exception occurred.

You need to make sure the exception is handled in your Re-Framework.
Might be you deleted the handling part of exception.
Please check the actual Re-Framework if you had deleted any part of the framework in your workflow.

Regards,
Karthik Byggari

I did not delete anything from Set Transaction Status.
Should an exception be passed automatically or manually by me?

May be the place where you are throwing the exception is wrong.
When you throw the exception, it has to be handled. In your case it is not.

Move throw activity inside the invoke workflow and then check.

Regards,
Karthik Byggari

1 Like

Usually in REF exceptions in the Process.xaml are caught, beause Process.xaml is invoked in the Try section of the Try-Catch-Block in the Process state.

@Olek1 Did you add this Throw activity in question within the Process.xaml?

I use Throw activity in process.xaml
It Should be read automatically from a process.xaml?

Yes, I have

It has to be inside the Invoke workflow activity, not after that.
From your screenshot it is outside the Invoke workflow.

Please refer to the @lukasziebold screenshot.

1 Like

Ok, so usually the robot should handle the exception thrown in the Process.xaml and move on to the next transaction.

Did you start the process in Debug mode (now default)? Studio will pause the execution if any exceptions occur, even if they are “normal” BusinessExceptions in your process. If you run the process, it will automatically continue and handle the exception.

1 Like

Hi, you are throwing business exception. But are you catching in catch block? if yes then you can set transaction status to failed using set transaction status activity. You can also set the transaction status while transitioning to next state. Both way it works fine.

Yes, but It is a process.xaml. I have Throw activity in process.xaml

I try to add to workflow activity in process file, but without changes…((

status in orchestrator did not change. Status is In Progress

Please confirm that you are running the process, not debugging. :wink:

Your first screenshot suggests you are debugging…

Studio will pause the execution if any exceptions occur, when you are debugging. Even if they are “normal” BusinessExceptions in your process. If you run the process, it will automatically continue and handle the exception.

Yes I Running, I cleck here but status in orchestrator is in progress: