Post how and where you are defining the variable in the WFT (or the whole wft)
Dont you think you had initiated the iw_mailheader_pt as task variable and fetching it as job variable. It is better if you set the value of your variable as job variable using wfvarstartop or wfvarfinishop.Moreover using the value as task variable, the value would be lost after the task gets inactivated.
Is this a correct way of declaring the *global* job variables outside the externaltask tag?Thanks!Jenni
Thanks for the reply guys. Yes you are right. I was trying to fetch a task variable instead of a job variable. I am trying to get a job variable. I am encountering errors while I mention the job variables in the following format.[html]....code.......definitions.......code...[/html]Is this a correct way of declaring the *global* job variables outside the externaltask tag?Thanks!Jenni
As far as I understood your code, you need to set up the value of one particular value after each external task... then you can use wfvarstartop or wfvarfinishop.Please confirm... if your requirement differs from my understanding.
It should be something like this[html] owner="__INSERT__($varApprover3);" creator="__INSERT__($varApprover3);">value="foo"/>value="bar"/>[/html]
Hi Nipper,Your code worked for me. I am able to invoke my wf successfully. But the wf just hangs at the external task. Here is the code for the invoking external ipl. I had defined a global variable (Deploymentvariable) at the beginning of the workflow as suggested by you.Is there any errors in my code? Feel it is perfect.Thanks!Jenni
use strict;use TeamSite::WFworkflow;use TeamSite::WFtask;my $trans_msg = "Invalid Job";my($wfid, $taskid, $workarea) = (shift, shift, shift);my $job = TeamSite::WFworkflow->new($wfid);my $task = TeamSite::WFtask->new($taskid);if ($job->IsValid()){ $trans_msg = "Retries are Over"; if (open(FILE, ">D:/iw-home/tmp/plcdatadepl334.txt")) { my $deploymentvar = $job->GetVariable('Deploymentvariable'); print FILE "\t a=\[$deploymentvar\]\n"; close(FILE); } else { $trans_msg = "Error, Can not open File - $!"; }}$task->CallBack(0, $trans_msg);exit 0;
Hi Nipper,Your code worked for me. I am able to invoke my wf successfully. But the wf just hangs at the external task. Here is the code for the invoking external ipl. I had defined a global variable (Deploymentvariable) at the beginning of the workflow as suggested by you.use TeamSite::WFtask;use TeamSite::WFworkflow;use TeamSite::XMLparser;use TeamSite::WFworkflow;my($wfid, $taskid, $workarea) = (shift, shift, shift);open(FILE, ">D:/iw-home/tmp/plcdatadepl334.txt");if ($wfid->IsValid()){my $deploymentvar = $wfid->GetVariable('Deploymentvariable');print FILE "\t a=[", $deploymentvar , "]\n";}close(FILE);$task->CallBack(0,"Retries are Over");Is there any errors in my code? Feel it is perfect.Thanks!Jenni
Nothing is perfect. Your mistake is that you use $wfid as an object. In reality it's just a number (an ID), you have to instantiate TeamSite::WFworkflow object first. For the External Task sample code, take a look here.use strict;use TeamSite::WFworkflow;use TeamSite::WFtask;my $trans_msg = "Invalid Job";my($wfid, $taskid, $workarea) = (shift, shift, shift);my $job = TeamSite::WFworkflow->new($wfid);my $task = TeamSite::WFtask->new($taskid);if ($job->IsValid()){ $trans_msg = "Retries are Over"; if (open(FILE, ">D:/iw-home/tmp/plcdatadepl334.txt")) { my $deploymentvar = $job->GetVariable('Deploymentvariable'); print FILE "\t a=\[$deploymentvar\]\n"; close(FILE); } else { $trans_msg = "Error, Can not open File - $!"; }}$task->CallBack(0, $trans_msg);exit 0;
Thanks a bunch. It works now. I appreciate your time and helpful nature.Thanks!Jenni