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)
How to get the owner of a grouptask
Papi
Hi,
i'm trying to get the owner of a group task, so i can use it as the owner of a user task following the group task.
Find more posts tagged with
Comments
Adam Stoller
so i can use it as the owner of a user task following the group task
I assume you don't me
directly
following the
grouptask
, but rather you are working on an
externaltask
script that gets run
after
the grouptask but
before
the
usertask
- right?
Once the
grouptask
is claimed by a member of the
group
, you should be able to use the
$task->GetOwner()
method [
TeamSite::WFtask::GetOwner()
] to determine who the owner of the task is.
Are you using the grouptask attribute "
retainowner
" ? You might want to if the task gets iterated through a loop and you want it to continue to have the same owner.
Hope that helps
--fish
(Interwoven Senior Technical Consultant)
Papi
That's it. I'm using an external task after the grouptask. And I want the owner of the grouptask to be the owner of the external task. So, I tried to get the owner in the workflow script, but of course, it's blank when you start the workflow. Is there a way to start that piece of code on the moment the external task starts ?
Migrateduser
I think if you want the externaltask that's directly after the grouptask to be owned by the same user as whoever took ownership of the grouptask, you'll need another externaltask before your current externaltask that does nothing more than figure out who took ownership of the grouptask (using the method ghoti described) and then modifies the owner of the following externaltask.
Dave Smith
Sr. Software Engineer
Nike, Inc.
(503) 671-4238
DavidH.Smith@nike.com
Papi
Cool, but if i start an external task to get the owner, how do i get this back to the workflow ? Because you need to make an external script to find it, and then you have to send it back to the workflow. Is there a possibility with the callback function ?
Adam Stoller
Please read the workflow manuals and supplementary workflow documentation available on this site (do a search for "workflow tutorial" - if you still don't understand at that point, I'd
strongly
recommend that you go through formal training on workflow development that
Interwoven's Education
group provides.
--fish
(Interwoven Senior Technical Consultant)
Migrateduser
The way to do this is to use the WFtask:
etOwner method. As long as you know the Task ID of the externaltask you want to change the owner for, this is a piece of cake. In order to get that Task ID you can use the WFworkflow::GetTaskByName method, then use the WFtask::GetId on that task. Like ghoti said, you really need to understand these basic concepts in order to use them effectively.
Dave Smith
Sr. Software Engineer
Nike, Inc.
(503) 671-4238
DavidH.Smith@nike.com