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)
Modifiy User Task Description
neski
How van I modify a User Task Description from a previous external task?
I need to modifiy the revision task description to show file names an extra information. I've tried with Custom Variables, but it doesn't seem to work.
Thanks
Find more posts tagged with
Comments
Adam Stoller
Read the perldoc for TeamSite::WFtask
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
neski
Thanks Ghoti. I've already read the perldoc foe WFtask, I know how to use the $task->setDescription($desc) method to modify an external task description, however I can't see how can I use it to modify a user task which is has not yet been invoked.
Maybe If I use Custom Variables I can store the description there and use it after in the user task, I've tried with no success.
JonathonG
The key is to create a task object pertaining to the user task you want to modify. This can be accomplished via the WFworkflow method: GetTaskByName():
(Following is copied from
http://YourTSserver/iw/help/perldocs/wfworkflow.html
)
($success, $task) = GetTaskByName($taskname)
Returns task in the workflow with name $taskname. $task is a
possibly invalid TeamSite::WFtask object. $success is 0 if
successful.
So, you would need to have, in your external task, the name of the user task to modify. Then, you fetch that task from the WFworkflow object you have (typically $job). You can then use the WFtask methods on the newly fetched task to change the description.
Jonathon
Independent Interwoven Contractor
storage_drop error.JPG
Adam Stoller
To follow on to Jonathon's post - you could define your externaltask [script] to use a task-level variable that identifies the name of the task(s) you wish to chang the description on - then utilize that information within the task script to aquire the named task object, and then use that object to adjust its own description.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com