Add ability to resume failed workflows at failed activities (say, Resume-Job as is or with -Retry). - by Roman Kuzmin

Status : 


Sign in
to vote
ID 770743 Comments
Status Active Workarounds
Type Suggestion Repros 0
Opened 11/11/2012 5:29:08 PM
Access Restriction Public


In a sequence of long running tasks it is useful to be able to resume the
failed sequence exactly at the beginning of the failed task, after fixing
transient errors causing a failure. This scenario would be especially useful in
workflows because they are designed for long running and reliable task

A workaround exists but it is difficult and ugly to code for every activity.
E.g. (after a failure Resume-Job repeats the failed task):

    Workflow WorkflowWithPossibleFailures
        # wrap an activity by a retry-able loop
        for($go = 1; $go;) {
            try {
                #<activity that can fail>
                $go = 0
            catch {
                Write-Warning -Message $_

Right now Resume-Job can be invoked on failed workflow jobs but apparently
nothing happens (an error would be less confusing, perhaps).

If I miss something and the proposed ability to resume failed workflows exists
or if there is a more elegant workaround please let me know.
Sign in to post a comment.