Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
get task id
lucifer
In a external task how to get the task-id of the other tasks.
Only the task id of the current task(external task) is passed to the external task?
pls help me?
Find more posts tagged with
Comments
Migrateduser
Since an external task also gets the job id, the CLT iwgettaskbyname will get you the task id of another task.
$IWHOME/bin/iwgettaskbyname 4565 MyTaskName
usage: /usr/iw-home/bin/iwgettaskbyname [-h] [-v] [-s servername] workflowID taskName
-h Print this message
-v Print version
-s servername Use servername as TeamSite server
workflowID Job in which to lookup task
taskName Name of task to lookup
--
Interwoven Consultant
Bowker
You can also do something like this (I'm typing this in off the top of my head, so forgive me if there are any syntax errors)
use TeamSite::WFworkflow;
use TeamSite::WFtask;
$taskObject = TeamSite::WFtask->new($taskid);
$jobId = $taskObject->GetWorkflowId();
$jobObject = TeamSite::WFworkflow->new($jobId);
@taskList
= $jobObject->GetTasks(); #The doc says it returns a
#reference to a list containing
#TeamSite::WFtask objects.
#my syntax may be wrong here.
foreach $task (
@taskList)
{
print $task->GetName() . "\n";
}
If you want a specific task, you can use:
($status, $task) = $jobObject->GetTaskByName("xxxxx"); # replace xxxxx with task name