Search

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

Active

1
0
Sign in
to vote
Type: Suggestion
ID: 770743
Opened: 11/11/2012 5:29:08 PM
Access Restriction: Public
0
Workaround(s)
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
sequences.

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
                Checkpoint-Workflow
            }
            catch {
                Write-Warning -Message $_
                Suspend-Workflow
            }
        }
    ...
    }

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.
Details (expand)
How often does this happen?
Always Happens
Have you seen this problem before in this product?
No, this is new to the most recent version
Reproduction Steps
 
Expected Results
 
File Attachments
0 attachments
Sign in to post a comment.
Sign in to post a workaround.