How to make a transaction Abandoned based on some condition?

Hi All

How can we make a transaction Abandoned based on some condition in the code ? Currently if its not processed for 24 hours automatically it changes to Abandoned.

@Palaniyappan @loginerror @lakshman

Hi @kkpatel
What is the business rule requirement (i.e. the condition) for your automation?

By definition, Abandoned status is a result of items stuck/left In Progress for a long duration.

If you want to disqualify an item based on a condition in the process, you can throw a BusinessRuleException when the condition is met.
This way, the exception will flow through the RE Framework’s SetTransactionStatus.xaml and the item is marked as Failed with Exception Type recorded as Business.

2 Likes

Not sure why you assumed RE Framework. To me, this is evidence of a big problem in UiPath RPA community - everyone uses RE Framework by default without considering if they should.

Anyway, @kkpatel you might be able to do it via the Orchestrator API but I am not aware of any way to do it via Activity.

1 Like

Your comment is fair enough, although the reason to assume RE Framework was nothing more than just to suggest that the existing framework will automatically handle it.
The original post doesn’t suggest anything specific so as to NOT assume it’s RE Framework, either. Besides, since the question is about using queues, there’s reason to assume (even recommend) that RE Framework is in use :slight_smile:

I won’t dispute the need to consider whether or not to use RE Framework in every project, but for someone just starting out, it can be really helpful to use it by default.

1 Like

I have to disagree there. RE Framework is an awful idea for new RPA developers. They should be learning by writing automations completely from scratch, and RE Framework is way too complicated for a new developer.

Okay, mate.

1 Like

Sorry, I’m just not a big fan of RE Framework - there are much better ways - and see it as a huge problem in this community where everyone uses it without thinking about it. It makes future support difficult because it’s like one big black box.

1 Like

I agree with @postwick .
When I started my adventure with UiPath, it was much easier and faster, I learned everything without using ReFramework.
Later, using it made my job much easier :slight_smile:

1 Like

Thanks everyone.

@RPAForEveryone yes we are using ReF and queue. We are currently handling it as a Biz exception. But I was told for that particular scenario we should not mark it as a Biz exception but to make it Abandoned.

So just asking if in the code there is a way to make it Abandoned.

It might be possible with the API.

https://docs.uipath.com/orchestrator/reference/api-references

1 Like

Hi @kkpatel ,
Abandoned is a status that cannot be controlled programmatically . That was not the reason to create this type of ‘Item Status’ (https://docs.uipath.com/orchestrator/docs/queue-item-statuses#section-item-statuses).

But we can for sure change the time within which the data is moved from ‘In-Progress’ to ‘Abdandoned’ state through Orchestrator web.config file changes

2 Likes

Thanks @Indrajit_Banerjee @postwick

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.