This sets the Retry policy for failed opeations.

Operations that inherit from BasicOperation are retried if the SuccessResult property is set to false after execution or an exception is thrown. Lamda functions are retried following an exception.

The below snippet will attempt the operation again if it fails
                  _workflow.Do(_operation).Retry();

This will attempt the operation twice
                  _workflow.Do(_operation).Retry().Twice();

Whereas this will make 3 attempts with an interval of 30 seconds between each attempt
                  _workflow.Do(_operation).Retry().Attempts(3).With.Interval.Of.Seconds(30);

Last edited Jan 8, 2011 at 8:59 PM by djnz_gea, version 5

Comments

No comments yet.