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)
TeamSite::WFtask($id) who approved
nipper
got an external task that runs right after an approval process.
I want to know who approved the transition. From the WF manual, I can get the owner, but can I get the name ?
Tips/Pointers/RTFms appreciated
Andy
Find more posts tagged with
Comments
Migrateduser
I'm not sure I understand what you mean by, "I can get the owner, but can I get the name?" The owner will be specified by as a user name, so I can think of two ways to interpret this question.
1. The user who approved -- or made the transition -- may not have been the same user who was assigned the task. This may be rare. To get the most reliable information you could go through the Comments and find the most recent comment whose task ID matches the review task. Then take the user from that comment.
2. You may be looking for the full name of the user, instead of the user name. (Example, "John Q. Smith" instead of "MYDOMAIN\jsmith".) This functionality is not built into TeamSite, but you should be able to do the mapping using your user database or LDAP.
Brinko Kobrin
Interwoven Staff Engineer
nipper
>1. The user who approved -- or made the transition -- may not have been the same user who was assigned the task.
> This may be rare. To get the most reliable information you could go through the Comments and find the most recent
> comment whose task ID matches the review task. Then take the user from that comment.
In this case tsadmin is the owner & it is a group approval task, so I am looking for who took the task & approved it.
If I do a $task->GetComments(\
@comments)
, can I use the last entry in \
@comments
to get the last task ?
Any easier ways ?
Andy
Migrateduser
If a user takes a group task and selects a transition, then you should be able to use TeamSite::WFtask::GetOwner. The user who took the task will become the owner.
If the external task follows immediately after the group task and has only one predecessor, then the last comment should be the one from the group task. However, in general it is more reliable if you make sure that the task ID is correct.
Brinko Kobrin
Interwoven Staff Engineer