I had asked AwareIM support a similar question some time ago. I can not find their response, so the following is from memory and I make to guarantee on its accuracy 🙂
Under most conditions, changes to the database are committed after all processes in a chain compelete. So in your example, the database changes would be committed only after endtransaction. If anything failed before that, all processing would stop and any changes would be rolled back.
Some exceptions to the above.
1) If any process does a FIND and uses IN BATCHES OF, a commit is performed after each batch.
For example, if your "do step 2" executes the following:
FIND ALL bo IN BATCHES OF 1
UPDATE bo
If there are 10 instances of bo, there will be 10 commits performed, once after updateing each instance of bo. Any changes from "start transaction" and "do step 1" would also be committed.
2) If any process executes a REPORT ERROR, all processes in the chain stop and any changes up to that point are rolled back UNLESS the process has Failure rules. If the process has Failure rules and REPORT ERROR is executed: the Failure rules execute, processing continues and nothing is rolled back UNLESS the Failure rules also execute a REPORT ERROR.