RE Framework download multiple reports from a Web portal

Hi everyone,

I’ve created a basic workflow with five sequences:

  1. Login to the portal
  2. Read Data
  3. Calculate Business Day
  4. Report1
  5. Report2
  6. Report3

Each report (Report1, Report2, Report3) corresponds to a different interface, and I need to download all three reports for each DealName. I’m reading DealName values from an Excel file into a DataTable, and then using a For Each loop to iterate through them.
My Web portal interface is like it has got Report name table. If you click on the report name it Pops up another interface on the right hand side to pass report parameters. CSS Selectors are not stable.

In the current setup:

  • I download all Report1 files in Sequence1,
  • Then all Report2 files in Sequence2,
  • And finally all Report3 files in Sequence3.
  • I handle all exceptions at the end of the loop for each DealName.

Earlier I tried GlobalExceptionHandler but that did not work.

Now, I’m trying to convert this into the REFramework, but I’m facing a few issues.

In the REFramework:

  • I’ve added the same three sequences (Report1, Report2, Report3) one after another in the Process.xaml.
  • However, this approach adds an extra 10–12 seconds just to open the interface in each sequence for every DealName as I have to click on the report name that pops a another window to pass report parameter on the side panel.
  • More importantly, if a Business Exception occurs in the Report1 sequence, the framework logs the error and moves on to the next transaction (next DealName), skipping Report2 and Report3 for the current DealName.

For now I have decided to create 3 instances or interfaces (Report1, Report2, Report3) of Browser and use it in Process.xaml in respective sequences. This might help

My Questions:

  1. Is my approach of placing three sequences one after another in Process.xaml correct?
  2. How can I ensure that if a Business Exception occurs in Report1 or Report2, the process continues with the remaining reports (Report2 and Report3) for the same DealName instead of moving to the next transaction?**
  3. What will happen in case of System Exceptions in this scenario?

Any suggestions or best practices would be greatly appreciated!

Thanks in advance!

Regards,
Amol

@amol.wakchaure

Better you create 3 process one for each type of report as each one are independent this way there is no dependency

Or another viable way is along with dealname add the interface or based on report name decide which i terface to run so now your queue item is not only dealname but dealname plus report..so every transaction represents not 3 reports but only one..this way inter dependency is removed

Cheers

For this, I would suggest to open all 3 interfaces under initialization stage of reframework. This state has initallapplication workflow placeholder where in you can open all 3 interfaces.

Now under process, instead of opening these interfaces again, you simply attach to the already opened browser. When you have downloaded reports for 1 deal number, you then input 2nd deal number and then download those reports again. This placement of interface opening would also ensure that in case of system exception, these interfaces would be re-initialized/ reopened again and process would continue.

For this to ensure that control continues as it is, you don’t throw business exceptions right away. Just log them as error message and save in a business exception variable And then once all reports are done. You check if there is anything in that business exception variable, then throw business exception accordingly. This would mean you would delay the throw for business exception and will send those right after once processing for one deal number is done but before exiting from process workflow.

System exceptions should be thrown right away as these would correspond to interface related error may be not able to download or do some clicks because element was not found.
When system exception occurs, same deal number would be added to the back of queue for retrying later. If you are using queues in reframework, you would need to enable retry mechanism while creating queue on orchestrator, rest will be handled automatically.

Hope this answers all your queries!

Regards
Sonali

Hi Sonali Thanks for responding to my query. Really appreciate your help and support.

I am following your approach but it’s getting more complicated with multiple if conditions, multiple errFlags (reusable) and tempDataTables (reusable)

i am checking below conditions,
1- if DealName or ReportStartDate is blank
2-If error has occurred in TryCatch block during Deal selection in dropdown
3-if DownloadLink has appeared or not
and for each Else block i am updating log DataTable.

Now i am hoping it will not increase the process time.
Also if we have to handle all exceptions in Process.xaml then what is the use of RE Framework. A normal flow would have worked faster (only issue was system exceptions, i tried Global Exception handler but that did not work in TryCatch block. it goes to GEH instead of Catch block).

Please suggest any other alternate.

Thanks you again.

Hi @amol.wakchaure

You are using queues right?

And you are adding deal names to the queue and fetching them in process xaml for further processing?

If yes, to check whether deal name is blank or not, will/should be checked during adding to queue itself

Hi Sonali,

No, I am fetching Data from excel and storing into a DataTable.
My bad I forgot to mention that in my earlier post.

Blanks DealName and DealStartDate are checked at the start of each sequence.

Regards,
Amol

For this, refer below post, if you want you can change this behavior so exception is picked by your try catch block.

Hi Sonali, Thanks,

I guess I checked this post last time when I was working on GEH. But this post is related to user did not add GEH but it was giving an error related to GEH. By default GEH was added when project was created, So the user was asked to delete it manually from json file.

Anyways thanks

Regards,
Amol

@amol.wakchaure

In that case when you are storing the data in datatable, after that you can use filter datatable activity to remove the rows where dealname is blank.

You won’t have to check this in every sequence

@amol.wakchaure

Per my understanding this is about when global exception handler is enabled, exception doesn’t get caught by catch block. So in order to do that, geh needs to be removed so try catch can work as intended

Also, 1 question. How are accessing different data items from datatable? Are you making use of get transaction data or doing everything in process xaml?