Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
How to activate a task from an external task
meikel
Hi,
each of my tasks has a <timeout>.
When a timeout occurs my special task "ups" is activated.
the owner can decide to end the workflow or to try it again.
For the retry i though about an external task which "knows", the timed-out task and "jumps" to it.
Now my question.
How can i activate a arbitrarily task from that workflow?
meikel
Find more posts tagged with
Comments
ProfessorX
Hmm-
I havnt done it but you have to try and find out what task has called your "ups" task on the time out.
In you external task you would need to get a handle on the task that called your "ups" task.
I know how you get a handle on a new wf task my $task = TeamSite::WFtask->new($taskID);
But I am unsure of how to get a handle on the task previous to it.
I remember I tried something like this once ( I had to try different increments to get the right task)
$taskID = $taskID -1;
my $task = TeamSite::WFtask->new($taskID);
This grabs a handle on on the task previous to your ups task then in your external task you could do something like this
my $taskname = $task->GetName();
if ($taskname eq "Add content")
{
$task->CallBack(1, "Call add content again");
}
elsif ($taskname eq "Update content")
{
$task->CallBack(2, "Call update content again");
}
...
I'm interested in what others have to say
The Professor-
Migrateduser
The numbered ordering of your tasks is based on where they reside in your job spec, not the order in which they are executed. So you can't really use that scheme. You would have to parse the output of
iwgetwfobj
in order to try and figure out which task preceeded the current active task. A pain in the ****, but doable I think.
Dave Smith
Sr. Software Engineer
Nike, Inc.
(503) 671-4238
DavidH.Smith@nike.com