I need to upload few transactions with business exception and few with New transactions as usual by Dispatcher BOT. How to perform that?
Say, I have Dispatcher BOT and while validating the input records, if the transaction is falling under business exception, I need to upload as Failed with business exception, Else it should be as New.
So that, I can avoid Performer taking the failed transaction.
Hi @vigneshnkv ,
After adding the queue item which have wrong data, use get transaction item with the reference number and set transaction status to Failed with Business Exception and reason.
You cannot add the transaction item as Failed-Business Exception. but there is a work around.
Add Queue Item - Status of Transaction will be ‘New’ Add Transaction Item - Status of Transaction will be ‘In Progress’
You can use Add Transaction Item activity to create the transaction and it will be in ‘In Progress’ state. So, there is no chance of performer picking this transaction.
From this Add Transaction Item activity you can create an output and pass it Set Transaction Status activity
From the Set Transaction Status activity, you can mark the transaction as Failed-Business Exception
If no Input validation error occurred, then you can use Add Queue Item activity to create the transaction item.
I think so it is not possible to add the quese item as bussiness exception in the start instead you can try these methods
Method 1:
As usual you do your verification part store the error rows in a datatable and take one main unique column and convert them in a array with this expression and use them as a contion in get transaction data
and if its true set transaction status to business exception
Method 2:
After seperating the error case remove those lines and add the remaining lines in the queue and process them and at the final step add all the error cases to queue and loop through it and change the transaction status for all
In Get Transaction Item, use the filter strategy as ‘Equals’
Note: There is a very small possibility of other robots picking this transaction Item when this queue is actively shared during this workflow execution. because it’s added in ‘New’ status.