Hi All,Thanks in advance. I am trying to capture the details of the tasks (ie. the entire lower portion of the workflow screen). I am having difficulty of capturing the past history of the tasks. In the attched image, how can I get the information of the task 3199 (which is active a couple of times). Any pointers would be appreciated.Thanks!Jenni
If you need the information enclosed within red box; you need to create a task object using the task ID and TeamSite::WFtask module.Use the method GetComments(\@list) of the created object.
foreach $task (@$tasks){my $eachTaskID = $task->GetId();my $taskName = $task->GetName();my $taskType = $task->GetType();my $taskOwner = $task->GetOwner();my $state = $task->GetState();my $taskDesc= $task->GetDescription();}
Hi,Thanks for the reply. Can you share any sample script relating to this feature?Here is my script.I am getting only the current state of task.Thanks!Jenni
my @taskComm; $task->GetComments(\@taskComm);foreach my $cmt_hash (reverse(@taskComm)) { $cmt_hash->{task}; $cmt_hash->{user}; $cmt_hash->{body}; $cmt_hash->{date}; }
my @taskComm; $task->GetComments(\@taskComm);foreach my $cmt_hash (reverse(@taskComm)) { $cmt_hash->{task}; $cmt_hash->{user}; $cmt_hash->{body}; $cmt_hash->{date}; } @taskComm will provide you all the info of the comments as a hash related to task id being passed at the time of creating the task object.HTH
Hi Achin,Thanks for the reply. I am not looking for the comments. I am trying to capture the details of the particular task. Let me explain,say we have a wf with tasks A,B,C,D,E.Task A can be active some 50 times depending on how the wf routes the flow. Is there a way we can say that the Task A has become active 50 times and retrieve the info. associated with the task for each time?Thanks!Jenni
Could you please explain a bit on what type of info you are hoping to see to be associated with the task, if not its comment, date and user?
Ok. Say task A has a comment (comment1). It transitions to task B. If the owner of task B rejects, it would transition to task A again. Now task A would have a new comment (comment 2) this time and would move to task B.My question is that is there a way I could get comment 1 and comment 2 as well?I am considering comments for example. I am also concerned about the time, when the task is getting activated each time.Thanks!Jenni
Try working on the code snippet .. i have posted earlier.
Hi,Thanks for the response. I tried using your script. It was returning the HASH array. How can I get the required data.Thanks!Jenni
my @taskComm; $task->GetComments(\@taskComm);foreach my $cmt_hash (reverse(@taskComm)) {$cmt_hash->{task};$cmt_hash->{user};$cmt_hash->{body};$cmt_hash->{date};}
Hi Achin,The above code does not capture the past history of the tasks. Any other idea?Thanks!Jenni
Please attach your code, so that we can look where you are doing something unexpectedly.
foreach my $cmt_hash (@taskComm) { $v1 = $cmt_hash->{task}; $v2 = $cmt_hash->{user}; $v3 = $cmt_hash->{body}; $v4 = $cmt_hash->{date};}