Hello Team, I am using reframework for automation. In that i need to delete some data from web by maintaining Del count. if sys exception has come it will go for retry. i want here to get previous Del count and continue by adding the present Del count to get Final Del count. Pls help me with some logic. Thanks in advance
You can achieve this by using set asset & get asset asset activity.
-
In the Initialization state:
Set the “DelCount” asset to 1 using the Set Asset activity. During the first run, initialize its value to 1. This code can be placed after reading the config file.
-
Process Transaction state
To update the “DelCount” asset after each successful transaction, use the Set Asset activity. Retrieve the current count using the Get Asset activity, increment it, and then reassign it. Place the Set Asset activity in the Set Transaction Status block for successful transactions to ensure it only updates on success.
Or
if you want to do it without using the assets. You can do it by using the global variable. Where 2nd step will be similar you will update & increment this variable only when the transaction is successful.
Hope this helps