how to restart a method from its last failure point
<p>I have a method like this:</p>

<pre><code>    public void runMethod()
    {
    method1();
    method2();
    method3();
    }
</code></pre>

<p>I want to call this runMethod multiple times based on an id. However, if say method2() fails for some reason, then when I call the runMethod, it should execute method3() and not try to execute method1() again (which has already run successfully for this id).</p>

<p>What would be the best way to achieve this?</p>

<p>Thanks a lot for the help</p>
