QueueItem status of remaining new status queue items when there is a system exception

Hi,

Can some one suggest please?

  1. In Init state (Dispatcher) downloading a file (based on record status in application) from an application and writing records to a Queue , say 10 queue items.

  2. Processed first 2 queueitems successfully and also updates status in application.

  3. While processing 3rd queuitem, due to system exception, 3 queueitem status updated to failed and 8 more queuitems left with new status.

  4. Now when it goes to init state again due to system exception of 3rd queueitem, dispatcher again downloads the file (remaing 8 records) where were left out durign first run before system exception) and adding to queue (which were already added and in new status in first run before system exception).

  • Here, how to avoid writing the same records again with new status?
  • Shall we make all the new status queueitems to failed during first run itself, if there is any system exception?

Thanks.

Hi @krishbcd

Keep the entire process in First run of InitState instead of keeping it in InitAll Application xaml. This will avoid adding queue items again when an system exception occurs.

Regards

@vrdabberu

Could you please elaborate, Please?

I am opening the application inside initAll applications, downloading the file and then writing to a Queue.

If I open the application initState, download the file and then writing to a Queue, then how do I open the application again when system exception? Could you please confirm the right place?

Thanks,

Hi @krishbcd

->Keep the entire process of dispatcher in the first run.
->When the process gets started then all the data in the first run will be added into the Queue.
->If a system exception is occurred in any of the Transaction Item then the Init state will be running again but the first run will not be executed because the first run will be executed only when the Config is empty. So when a system exception comes there will be some data already present in the Config. So, that’s the reason the first run won’t get executed again and in that way the adding of data again into Queue can be avoided.

Regards

1 Like

Hi @krishbcd

→ Open the application in the first run and add the data into the queue. So, that even the system exception occurs the data won’t get added into the queue.
->In the init all applications state again use the opening of applications steps but in that xaml don’t use the downloading steps and adding the data into the queue. Just use the steps for opening of application in init all applications and give the option as If not open in the properties panel of the init all applications state. So that even the system exception occurs then it will try to open the application but it won’t add any data into the queue.

Regards

1 Like

@vrdabberu ,

adding the dispatcher piece after killallprocesses in first run?

HI @krishbcd

Yes you are right. Please add the dispatcher steps over there.

Regards

@vrdabberu

Thank you very much let me please try this.

Does the system exception closes the opened application, How?

Hi @krishbcd

If a system application occurs do you want to close the application ?

Regards

my current flow is closing when system exception occurs and opening again as going to initall applicaitons (currently my dispatcher is also in this block). below snap under settransactionstatus of system exception.

image

Hi @krishbcd

If you want to close the application then you can leave the steps in the same manner. If you don’t to close the application even the exception occurs then please give the option as close never in the properties panel of the Use Application/ Browser activity.

Close = NAppCloseMode.Never

Regards

yeah… for my scenario… I have to close and open again as I need to get the next queuitem again and search for that queuitem caseid in application to proceed further.

Hi @krishbcd

If you want to close the application then please open the system exception as highlighted in the first screenshot and then add the killProcess activity in the place as highlighted in the second screenshot


In the killprocess activity in the place of chrome pass the browser type that you are using

Regards

Here I am usign a bat file inside start process to start the application. Then How can i check if its opened or not?

Hi @krishbcd

You can avoid this step as you are trying to close the application and reopen that please follow the steps in below thread:

Regards

You should combine the 10 queue items into a datatable, then use Bulk Add Queue Items to add them to the queue. You can set Bulk Add Queue Items to “all or nothing” so that if any item fails the whole batch is discarded and no queue items are created.

@krishbcd

Simple for your case would be if you are not able to move the add queue items into if first run

then use if condition around the add queue items part and check tansactionnumber=1 …on then side use add queue items and on else side do nothing…so queue items are added only once

Remember as you are adding items in initallapplications you need to create one more argument transationumber and link it with transactionumber in the invoke workflow file

cheers

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