[Stackoverflow] [Progress OpenEdge ABL] Progress-4gl: How does transaction scope apply to external program calling?

Status
Not open for further replies.
S

SJaka

Guest
I need some help understanding transaction scoping for procedures/programs outside the current program.

Suppose I've three program, program A, program B and program C. Inside program A, I've a procedure that has some lines in it wrapped inside a do transaction (not strongly typed) block. Within that do transaction block, it calls another Program B. Upon return from program B there is an undo, leave command. Within the same transaction block, it calls program C and has an undo, leave after this call too.

My question is, if within the transaction block, program B executes without errors, but program c returned an error, will the undo,leave after program C call will also undo transactions that happened inside program B?

Code:
Procedure do_something:
  some processing....
  do transaction:
    error-message = "".
    {run programB.p}
    if error-message <> "" then undo, leave.
  
    some further processing...
  
    error-message = "".
    {run programC.p}
    if error-message <> "" then undo, leave.
  end. /* end of do transaction */
end procedure.

Continue reading...
 
Status
Not open for further replies.
Top