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)
Taskid Order
disco
Is a task id always equal to the previous task's id + 1? I want to have an email script tell the email recipient which task ran previous to the external task that is sending the mail. (The email script is used to notify the TeamSite administrators that a workflow task has failed.)
Thanks,
David
Find more posts tagged with
Comments
Migrateduser
I wouldn't count on that. I think the Job or Task XML will tell you the ID of the task that activated the task that is sending email, but I don't know the exact syntax offhand.
james1
If two jobs are instantiated simultaneously, then the two jobs' tasks' ids will be intermingled with each other, e.g.:
1 - job A
2 - job B
3 - job A, task 1
4 - job A, task 2
5 - job B, task 1
6 - job A, task 3
7 - job B, task 2
(etc.)
Usually when an external task needs to know about other tasks in a job, then the names of those other tasks are provided to the external task program on its command line. Given the task name, an external task program can get the task's id, and given the task id, it can get any information it needs.
-- James
--
James H Koh
Interwoven Engineering
Hazzie
As far as i see it, the task id's are handed out in a sequential order based on their position in the WFT file. So you could look in there and find out the position of the task you wanted and work it out based on Jobid but that is such a horrible way fo doing things.
Personally i would use something like
($success, $task) = $Job->GetTaskByName($taskname) ;
Returns task in the workflow with name $taskname. $task is a possibly invalid TeamSite::WFtask object. $success is 1 if successful.
Hope that helps
Hazzie
TS 5.5.2 on NT.