Hi Mav,I am calling this subroutine in the successor task of the user task (that is email task). I have a perl file which calls this function from the script and try to fetch the comment. I tried with log each task id and associated comment and it seems that the workflow shows the same comment given on the first time activation even though the WF might have activated that same task (and it has same task id) several times. I am sure there must be some way to fetch latest comment and I am not getting that?Thanks,Amit
Are you using perl or Java? Are you sure that the comment is being set on the right task? Are you sure that the comment is being retrieved from the right task? For each of these you may want to log the task id, task name and comment and validate that it is doing what you think it is doing.
Hi Viral,I am using perl. I have attached the code at the start of the thread. And yes, the comment is retrieved from correct task. I have log the taskid, name and comment in the email task(after each usertask). Is there any example where anyone has successfully implemented this?
Maybe it's just me, but I think you're making your code far more complex than it needs to be.If you have the current taskid (which you would in an externaltask script), you can create a TeamSite::WFtask object from it, and from there you can use the GetComments() method, to get an array of hashes which I believe is already provided in date-sorted order (if not, it would be easy to write such a sort routine) - and from that you should be able to find the most recent non-automated transition comment to use as you want.