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)
callback from external task
Uttara
Hi All,
Consider a scenario where I am doioing a call back from an external task in a workflow.
I'll write following line in my external script:
$task->CallBack(1, "Error in generating report");
I want to know, if I can capture the return comment "Error in generating report" in this case) back in my workflow.
i.e., how can I get this comment in workflow, when the task has done callback?
Thanks,
_Uttara
Find more posts tagged with
Comments
iwovGraduate
This is by default captured as Task Transition Comment.
Whats your TS version?
Uttara
TS 6.5
How do I get that in workflow script? Would be helpfull if I get some directions.
_Uttara
iwovGraduate
"workflow script" = ?
(external task scirpt perhaps?)
Uttara
No. my workflow file.
for eg. generate_report.wft.
All I want to do is return appropriate error mesg from external script and show it in a user task.
james1
The WFT does not, and cannot, have access to post-instantiation runtime data, since the WFT code is executed only prior to instantiating the job.
Despite that, there is probably a way to accomplish what you want to accomplish. Can you elaborate on your high-level goal?
Hope this made sense.
-- James
--
James H Koh
Interwoven Engineering
Migrateduser
in the "task details page" of a user task, users are able to see the last comment...when the previous task (presumably your external one doing the callback with the "Error in generating report" callback comment) transitions to the user task, that callback comment (e.g. "Error in generating report") will be visable as the last comment...
the Last Comment is in the middle of the task details page, in the "Description and Comments" section...both the CC Standard and CC Pro interfaces...
this is the out-of-box functionality, to include meaningful callback comments and to train your users to look there for the last comment...
cheers,
-Rori
Adam Stoller
One is a transition comment, the other is a task description / comment.
So - your exterrnaltask script could create a task object associated with the usertask, and then use *that* tasks' object to do a setComment() on - using the same message you are about to do a CallBack with. Loosly:
...
my $task = TeamSite::WFtask->new($taskid);
my $job = TeamSite::WFworkflow->new($jobid);
my($success, $utask) = $job->GetTaskByName($usertaskname);
...
my $msg = "Error ....";
$utask->SetComment($msg);
$task->CallBack(0, $msg);
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
nipper
Either way you will need to kick off an IPL as an external task, with that
you can get the information in the variable.
I have done before, on error, go to a cleanup task, send out an email (with all
error information), and end