i want to send final report in Excel after processing all the transactions in a queue using the ReFramework how to build that logic step by step
Perform below steps in End State
Check If all transaction are completed.
- Queue Input: check if no queue items with “New” or “In Progress” present in queue.
- Excel input transaction + 1 number equals total row count
Build your report base on your logic
Generate report on using UI or power BI, database export.
After every transaction in Process Transaction
State Finally
state add logic to add that queue item details in a centralized excel file, preferably on a SharePoint to avoid any data loss.
In End
State of the ReFramework, add Get Queue Items
activity to check if there are any New Status queue items or not. If New Queue items there don’t send the report file else, just download the SharePoint report file if saved over there and send it.
i have excel where i have to update one by one transaction how it has be build can u guide me step by step
Update the status in Process Transaction
State Finally
part of try catch. Here you will have the status of that transaction if it was faulted or successfull.
in the finally i see the set transaction status XAML which is encapsulated in try catch so are you saying to build the report part in finally of the set transaction Please clarify
you can modify the settransactionstatus xaml directly…inside that you have sequences for sucess and failures…add append range activity in each of the sequence so that in any case data is appended to file you need
before append range build a datatable and add only single row as you need…which would be the latest transaction info
no other changes are needed
cheers
ok but can where do i have to use build datatable activty
Everything in settransactionstatus only…first build datatable ,next add data row next append range
Cheers
for success, business rule and system error… i have to build the datatable can u clarify…if u have any same code or screenshot plz provide
in each of those 3 sequences add build, add and append
this is how it looks in each sequence
cheers
ok great in i have build the datatable with headers iam confused what to added in add datarow
build datatable - headers
add data row in arrayrow field add what data you want to add in each column {"val1",val2"}
cheers
iam adding the values to the Q
boss from queue get the data and add to excel
{in_Transactionitem.SpecificContent("Key").ToString,"Success"}
like this
cheers
ok there 6 items aim adding to the Queue like ID, Account, type…iam adding all the items to the add data row as
{in_Transactionitem.SpecificContent(“ID”).ToString,
in_Transactionitem.SpecificContent(“Account”).ToString,
in_Transactionitem.SpecificContent(“type”).ToString} like this iam not adding any success word in this will this work?
yes it would work
make sure you have same number of values as the number of columns in build datatable
also success and all if we do not add how would you know the status for each transaction? if you dont need it then dont add
as per above statement 3 column related values would be added
cheers
ok i will add success here i have doubt when i building the datatable with headers and i saved ad DT taken add data row activity and append range activity but when append range is done only data is written on excel…but headers are not coming Actually i trying topaste in new excel sheet do i have to use write range here if used in the next iteration again write range will be executed
Better just have a empty excel with headers in it already
Else in initialization state use a write range in if first run …which will create a file with headers
Cheers
ok thank you let me check