c# - How to handle failures in parallel activities -
i've workflow in windows workflow foundation. i've created parallel group, i've placed 4 activities extends nativeactivity.
the activities calling remote web service, , if goes wrong in call (maybe business rules), suspend activity creating bookmark on nativeactivitycontext. not doing well, if more 1 of activitites fails, using same bookmark name (suspendbookmark).
is possible extend parallel behavior in way, , maybe handling failures here instead of each activity inside parallel call?
another thing, if 1 activity success , fails, happen if resume suspended bookmark in failed activity? run each activity in parallel call again or rerun failed activity?
i need information on how implement these parallel calls in workflow , how handle failures in these.
if understood well, want cancel parallel activity if of branches goes wrong. way 1 bookmark created , can resume it.
you've available completioncondition property on parallel activity.
if property evaluates true, other scheduled elements in branches collection canceled. if property not set, activity objects in branches collection execute until completion.
just create bool variable @ parallel activity level , set true whenever goes wrong.
if doesn't work way want, nothing keeps creating own custom parallel activity.
ps: keep in mind parallel activity not parallel. waits in parallel branches execute execution sequential (although order-independent).
Comments
Post a Comment