Regarding Queue

Hi Everyone,

First let me explain the process. My process is like, there are two folders . You have to open first folder and inside that there would be multiple documents and you have to work on each document. Now after completing the first folder it will move to the second and same work will happen.

Query is, shall I create two queues for it ? What will be my transaction ? Can anyone please suggest me the framework for that.

Thans in advance.

You could have 1 queue with 2 folder paths as specific content. If the two folders are to be treated as the same transaction, this is the way it should be done. If there is a reason you could have the folders processed separately by separate bots at different times, you could treat each folder as its own transaction.

It sounds like you’ll want the latter moreso than the former.

1 Like

@hemal
without knowing all details lets think in this direction:

  • when is a transaction complete (processed both folder, processed only 1)?
  • is folder B action depended to folder A actions?
  • about the granualarity: is it folder level or document level

About the technique you can play with several building blocks:

So with playing of design and mapping to the technics you will find an approach

Let us know your open questions

1 Like

Hi @ppr,

The process is like - access the folder -> inside that multiple pdf files are there . Work on all the pdf files then again come to the other folder
So here I was thinking for having transaction of all pdf files.
One thing is, I have fix 2 folders and that will never get increased or decreased.

-> So yes, Transaction will get completed after processing both the folders.
-> No there is no dependency of folders.
-> Actually it is folder level

Regards,
Hemal

@hemal
Perfect. Now for transaction decision. What should be done / it be handled e.g. Bot processed 3 of 5 files from Folder A and failed (exception killed Bot)? Can the Bot continue with the rest or are other things are to take into account.

These are the typical Analysis questions for collecting the requirements for the Bot/Process design activity

Thank You @ppr

Yes. It will continue. It will log the exception for the particular file . Skip it. And start working for the next file. But my question, how would be the scenario? can I use two queues ? One for the folder and inside that another queue for file details ?

Regards,
Hemal

@hemal
have patience, a bit longer. Onc e all facts are collected then design will be done. With your inputs. Bot can continue with file 4/5 from Folder A and then will go to process files from Folder B. There are no dependencies between the folder you told.

What about this idea:

  • a dispatcher Job looks for new files in Folder A/B and writes a QueueItem for each File with Folder A, filename information into one Queue.
  • A Process Job process all open files/new Workqueueitems.

So with this first approach we moved close to REFramework. Variations of this patterns are available as well (we worked with control Workqueues, BatchJob Parent WorkQueueItems… in some scenarios…)

1 Like

You can store the individual details in the queue within a single transaction item. For example, a queue transaction item can contain the folder path, the room number, the login username, password (recommend that this be a SecureString type if stored here), etc.

I also agree with ppr. To set this data up, it’s best to have a separate REFramework process for loading this data into the queue, and another process to read from the queue. You will only need 1 queue to work with in this scenario.

1 Like

Thank You @ppr.

It means, transaction happens that time we will store the folder name and all internal file details. In short transaction will be for each file inside the folder. Once all will be done then the transaction is on going for the next folder files. Right ?

Thanks got it. Go it how RE Framewrok will work and how transaction with queue items will work.

Thanks.

Thank you @Anthony_Humphries.

  • will separate that both in RE-Framework only with having one queue of transaction containing different files.

Thanks. :slight_smile:

@hemal
Not Sure If I Gott you right. maybe i am Just repeating what you Said with following.

With the ideas from above.

  • WE define that the Processing of a File from a particular folder is a Transaction

  • The Dispatcher is looking for new Files in the folders and Uploads for each File a Workqueue Item

  • Once the Workqueue Item is taken to get processed, the transaction is started

    • Transaction, the Processing of the File, will suceed or failed
  • As Long there are more Workqueue items in the queue the ne ext Workqueue Item will get taken and Processing will be started

Just to simplify IT a little bit