← Prev in month ← Prev in thread

Issue 6.2 - What about compensation handlers?

From
Yaron Y. Goland <>
Date
2005-05-02T17:46:50+00:00
ID
Thread
Issue 6.2 - What about compensation handlers?
Imagine the following sample code:

flow
    completionCondition ...
       ...
    while
       scope
          compensationHandler
             ...
          ...
    sequence name="done"
       ...

Now imagine that the "done" sequence completes triggering the completion 
condition and terminated the while. But the while had already completed 
a few iterations and instantiated a number of compensation handlers. 
What happens to those handlers?

Using the current termination language those handlers would be lost when 
the parent scope is terminated. I suspect most programmers would find 
this behavior to be surprising.

		Yaron
← Prev in month ← Prev in thread