Get Transaction Data from two Input sheets from two different process

Hi ,

I need to design the process where I have to merge two different bots into a single one.

Current Process is :Two different bots are there which process independently . But in the new design I need to merge the bots into a single one and process.

Each bot is reading data from two excel sheets .

After merging , the requirements is

It will read data from first excel sheet and process and when there are no more transactions of the first process it will go the next process and read the data from another excel sheet and complete the process.

How to design the process

Hi @dutta.marina

You can use this solution below:

  1. Initialization
  • Read Excel Sheet 1 and Excel Sheet 2 into two separate DataTables (dt_Sheet1, dt_Sheet2).
  • Add rows from dt_Sheet1 to Queue 1
  • Add rows from dt_Sheet2 to Queue 2
  1. Get Transaction Data
  • Set logic to fetch transactions from Queue 1 first.
  • If Queue 1 is empty, switch to Queue 2.
  1. Process Transaction
  • For each transaction:
    • Execute the processing logic specific to the data.
    • Log success or failure.
  1. End Process
  • The process ends when both Queue 1 and Queue 2 are empty.

Regards.

@tolga.kamci

If I dont want to use Queue and read the data from data table. Can I approach that way?

Yes of course. You can merge two datatable into one datatable at Initialization State. And you should get current datarow at Get Transaction Data State to process them at Process Transaction State.

@dutta.marina,

Are the birth input file going to have same columns?

If yes, merge both the excels into one and add one column as identifier of the row is from which file.

If no, add the column of both the files in a single datatable and again add identifier column.

Iterate this datatable in Get Transaction Data workflow.

@ashokkarale

two have different columns and also I have to filter each excel file based on some conditions and also two performs different process.

First process is different than second one.

@dutta.marina

Oh ok. In this case may I know the reason for complecting? It’s clearly two different process and combining them would make it more complex.

@dutta.marina

Any specific reason to merge?

You still have option to merge…may be what you can do is to create a new argument/variable which says if it is excel1 data or excel2…or we can add a new column after reading with the identifier and use it in the process xaml to see which excel file data came from and process accordingly

Cheers

@ashokkarale

Actually now there are two bots. the run one after another with an interval of 30 minutes. Business wants to reduce the time and merge the bots . Even I don’t see a logic of merging when the process is different

@Anil_G

Business feels time will be reduced if they merge the bots. Right now one bot runs after another with an interval of 30 minutes. But I feel merging will be un necessary complex since they are different process

@dutta.marina,

Reducing time could not be the justification to merge two different bot’s into one.
You can reduce the interval between two triggers

@ashokkarale

Agree with that. But Business wants entire flow should be in single bot instead of one after another

@dutta.marina

Even if you merge…if you are running seuqential then it would still run one after another only

If triggering in 30 min interval is a problem …then use start job activity in the end of first process to trigger second process immediately

Cheers

@Anil_G

I will try that but I dont know whether the client side is ok or they want to combine.

Suppose I am combining the bots and In Get Transaction Data I am trying to get Transaction data from Queue1 (after reading Excel1 form Process 1) and if there are no More Queue Items in Queue 1 from Process1, I am trying to get Transaction data from Queue2

How in Process Transaction it will be able to identify the data is from Queue1 or Queue2

@dutta.marina

Please check above

Cheers

1 Like

@dutta.marina , if time is the differentiator here, then you need to think about running the 2 processes in parallel. As long as the processes don’t need user interaction, develop them as background processes. Add another process to convert both excels to datatables and then call the 2 background process in a parallel activity each.

** Only works with Attended automation!

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