For each transaction:
- Store which step was completed last (Step 1, 2, 3…).
- On every run, read that value and start from the next step.
- Make each step idempotent (safe to run again if needed).
So for your case:
- 10 transactions.
- For transaction #6, bot failed after finishing Step 3.
- You want to restart only transaction #6 from Step 4.
You do this by saving “LastCompletedStep = 3” somewhere and, when you re-run, your logic says:
If LastCompletedStep = 3 → start at Step 4.
- Design your queue item
In the Queue item’s SpecificContent (or separate table), have fields like:
{
“BusinessData”: “…”,
“LastCompletedStep”: 0,
“Status”: “New”
}
- After each business step, update the checkpoint Inside Process.xaml:
Example pseudo-code
Select Case CInt(in_TransactionItem.SpecificContent(“LastCompletedStep”).ToString)
Case 0
’ Step 1
Step1()
UpdateLastCompletedStep(1)
Case 1
’ Step 2
Step2()
UpdateLastCompletedStep(2)
Case 2
’ Step 3
Step3()
UpdateLastCompletedStep(3)
Case 3
’ Step 4
Step4()
UpdateLastCompletedStep(4)
…and so on
End Select
Where UpdateLastCompletedStep(stepNo) does something like:
- Use Set Transaction Progress or Update Queue Item (through Orchestrator API)
OR
- Write LastCompletedStep in some external storage (SQL, Excel, Data Service, etc.).
Important: Do this update immediately after each step succeeds.
- What happens when transaction #6 fails at Step 3?
- Steps 1–3 run.
- After Step 3, you set LastCompletedStep = 3.
- Suppose the bot throws an error in Step 3 after the checkpoint or in Step 4 before updating.
- Transaction #6 ends in Failed (or gets retried).
Now, when you want to re-run:
First Option – Use retry
If you use Auto-Retry on the queue:
- On retry, the same transaction item comes back to Process.xaml.
- You read LastCompletedStep = 3.
- Your Select Case block jumps directly to Step 4.
Second Option – Create a new queue item with resume point
If you don’t want auto-retry:
- Create another queue item with same business key + LastCompletedStep = 3.
- When that item comes to processing, code starts from Step 4.
Either way – you are not resuming the job, you are re-processing the transaction from a saved checkpoint.