my($wfid, $taskid, $workarea) = (shift, shift, shift);my $task;# Create a task object from the work flow taskid.$task = new TeamSite::WFtask($taskid);# Create a workflow object from the workflow idmy $wf = new TeamSite::WFworkflow($wfid);$workarea =~ m!(/default/main/.*)/(WORKAREA|STAGING|EDITION)!;my $branch = $1;# Get task filesmy @files = $task->GetFiles(); # Get the retry_count from job variablemy $retry_count = $wf->GetVariable('retry_count');# Get the task variablesmy $max_retries = $task->GetVariable('max_retries');# If number of retries reached max limitif ($retry_count == $max_retries) {$task->CallBack(0,"Retries are Over");}# If the retry is less than max limit$retry_count++;$wf->SetVariable('retry_count',$retry_count);$task->CallBack(1,"Retry OD Again");
hi how to read the set variable? Let say I want it pass to back to .wft and value will be pass to next task .ipl file. In wft file i have . Getting nul value.[html] ... use TeamSite::WFworkflow; my($job) = new TeamSite::WFworkflow($ARGV[0]); my($lk1) = $job->GetVariable('retry_count'); ...]]>
[html] owner="__TAG__('iw_user');" creator="__TAG__('iw_user');" description="__TAG__('iw_desc');"> ... __INSERT__(""); ...[/html]thanks.
So if you change a workflow variable in an external task using the setvariable() function how do you use that changed variable in the workflow template?
You don't.The workflow template runs before the workflow runs. Variables changed by external tasks can only be used by external tasks.