Hi, for the below data given i have to login to the application first then enter the job Number in the application (as the base ) followed by the FID. the problem i am facing is when faced with a system exception the bot logs out of the application and when it tries to open again it proceeds to the next FID number but here the job gets deactivated once the application closes. Here there are different scenarios if the data row of the FID contains a job number then it should pick that else it should pick the previous Job number mentioned(this could be on the first row of the column “Job Number”). i am not using orchestrator, can you help me solved this?
Book1.xlsx (10.1 KB)
@Anil_G No i did not
if you dont give it then when an exception occurs ideally REF would move to next transaction that is next row
cheers
@Anil_G yes thats right, i want it to go to the next transaction but i want to get the previous job number from the excel, how do i get that?
then transaction number can be used to know the current row count and then reduce a number from it to get the previous row from the datatable…
Sample - dt.Rows(in_TransactionNumber-2)("ColumnNmae").ToString
cheers
@Anil_G when a system exception is thrown the bot goes to initialization for the next transaction how and where should i code about if the previous transaction has a exception perform the above solution you mentioned. (the job number will not always be in the previous row it could be on the first row of the job number column)
- If you are looping on excel and processing one after other it should always be previous
- to do only when exception occurs you can set a variable to true when system exception occurs and set to false when successful or so
- Depending on that use the value when only variable is true
cheers
@Anil_G i want the data of the job number for the particular FID, if the current fid has a job number i want to enter that if it doesn’t i want to enter the previous job number where ever present. Job number is not always present for every FID
If I understood you correctly:
- Add a setting in the Excel config file - CurrentJobNum
- For each transaction check if there’s a job number; if yes, add the value to Config(“CurrentJobNum”)
- If current transaction doesn’t have a job number, then use the config variable Config("CurrentJobNum).ToString
If TransactionNumber = 1 doesn’t have a job number, then throw exception!
(post deleted by author)
That’s easy, just setup your own config dictionary or a standalone variable that is not reset at initialisation, like a global variable.
@sudster when the application opens i need to enter the job number (this is the foundation on which we enter the fids its mostly like environment set up) so it is not particular that every FID has a job number there can be many FIDS belonging to the same job number so when faced with a system exception the bot closes the application and tries to open again when this happens due to the application settings the job number gets deactivated, then we have to set up the environment again so i need the value of the previous job number. Example if the bot throws error at the second fid when it tries again it should enter NA-1. if the bot throws an error at the 6th fid when the bot tries again it should enter BOTS as the value.
Sounds like you need to wrap the “CloseAllApplications” process under the “SetTransactionStatus” process in a Boolean variable.
Also you would need to decrease the transaction number based on this boolean variable.
Basically, you have a lot of freedom to move things around and adjust your workflow under the RE framework.
then for every transaction save the job number to a variable if the current job number is not empty if not dont save so that when there is no job id it will take previous one
cheers
@Anil_G Where do i save it? I am reading the values in get transaction data, every time their is a new transaction data row read
@Anil_G , i have tried unable to do it. can you show me how to do that in re-framework?
@Anil_G cannot find scope-global on my studio

