Orchestrator job having always success status

Hello Guys,

I am using Orchestrator to Trigger/Scheduled process. Every time i am get success status even if process failed due to some exception.

I have used Try/Catch to handle all the exception. Is there is any solution to set Orchestrator job status to failed if process having failed status.

@Pablito

Hi @sandipauti,
Normally Try/Catch activity is useful here. Can you show how you are using it?

Hi, Generally , whenever the bot executes until the end of the code with out any obstruction irrespective of the exception has been caught or bypassed , the job will be marked as Success in the orchestrator
If your concern is about transaction (not clear with your question) then there again 2 scenarios comes in to the picture
1)If you are using Reframework , you need to check set transaction status.xaml file’s code
2) If you are not using Reframework , pls check that somewhere in the code you might be suppressing the Exception instead of throwing towards the set transaction status

@vinay_reddy - . I am not using reframework as well as queue item. I have simple workflow where i am processing datatable, I have used try catch activity to handle exception.

My Scenario as follow:

Process is scheduled through orchestrator, it running fine but in orchestrator job status it always showing in successful status even if the process failed due to some thing.

@Palaniyappan - Can you please help me here. I’m stuck with the above scenario

1 Like

Fine
You were almost done
—inside the TRY BLOCK of if any exception occurs it will go to CATCH block where we need to use a Boolean variable
Like use a assign activity like this
Bool_failure = True
Where Bool_failure is a Boolean variable with default value as false defined in the variable panel
—Now in the FINAL BLOCK of TRY CATCH ACTIVITY we can use a
IF condition like this
Bool_failure = True
If true it will go to THEN apart where we can use THROW Activity with a business exception mentioned like this
New BusinessException(“Process Failed”)
So this will raise a exception the orchestrator will fail
Or if not in FINAL block we can use a IF and the same THROW activity next to this TRY CATCH BLOCK…

Kindly try this and let know for any queries or clarification
Cheers @sandipauti

2 Likes

Hi I am having same issue, i tried your solution, i added If condition in finally state, and when i add throw and tried to enter New BusinessException(“Process Failed”) it throws an error Bussiness Exception not defined

@michelle02 - Instead of throw use re-throw .

1 Like

Hi, I tried with re throw option, its not working.

1 Like

Is it throwing exception or not ?

1 Like

Its working now, after using new BusinessRuleException(“Process failed”).

1 Like

Please check Config.xlsx file , Check if FailJobOnSystem Exception = TRUE. it should be TRUE.