One suggestion over there is to have your Admin Notify failure as Group task...
The "Notify" task, as I understand it, is an external task and just sends an email or whatnot. If that's the case, this can't be a group task -- nor should it be. Also, if the environment has only one admin then of course the subsequent usertask should remain a usertask.Dave
Once the admin presses retry that usertask will transition to an external task, which will grab the job variable set earlier and transition back to the task of that value using the TeamSite::CGI_lite::iwcallback() function (which as I understand it will transition to a task based on its name/description).
Thanks guys,That really sucks about only being able to use the zero based index, I suppose I could increment a counter job variable for each successful task, so the transition task would be able to know which task had called it. What about the sub that returns all possible transitions, does it return which index you would transition to in order to get to that task?And those are really good ideas Fish, thanks for the input on those!
If you're doing this after a grouptask - you can use an iwat trigger to set the owner of the cgitask to the user who takes ownership of the grouptask -- through I believe Nipper found a bug with respect to this when using TS 6.7.1...
Nipper had a special case in that project, he was running 6.7.x on VMWare. That is not supported, see for example [thread=20023]here[/thread]There is no need IMO to feign CGI Task in this case. I did similar things before simply by passing job variablewith the successor number that indicated *return ordinal* for the particular task that have called Error Routine.That creates somewhat brittle WF structure in a sense that if you add a new task you have to remember to add it toError processing successors and set *return ordinal* accordingly. Other than that, it's Ok.
I agree that it can be done with an externaltask - I was simply saying that it could be done with a cgitask too if one were so inclined.
Previous Fish-Avatar was sooo much more charming
Well I'm thinking that at the end of every external task that completes successfully, I increment a job variable which is just an int which counts successful external tasks. If I reference this variable in my transition gateway task, I'll know that say 6 tasks have passed, and I'm at the failure point, so I must want to transition to the 7th successor.This SHOULD allow me to put tasks in anywhere I need, so the workflow should still be fairly flexible
Probably not too happily, does anyone know what the results of WFTask::GetPossibleTransitions() look like? Are they sorted in the same zero based index order?
I think it needs to be bigger. :-)
my @transitions = $task->GetPossibleTransitions();my %transitionHash;my $counter=0;foreach my $tran (@transitions) { $transitionHash{$tran}=$counter; $counter++;}$task->Callback($transitionHash{'Desired Successor Description'}, "Some Comment");