Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
cgitask as a start task
Bowker
Has anyone successfully kicked off a CGI task as the first task in a workflow?
Windows environment running ts 5.0.2 or 5.5.2.
When I do that, a bunch of information job is not passed to the script.
Find more posts tagged with
Comments
Adam Stoller
I've done it many times - without any problems.
Can you be a bit more specific about what doesn't seem to be getting passed in? How you are looking for it, and how you are specifying the CGI script within the wft?
--fish
(Interwoven, Curriculum Development)
Bowker
Here is the workflow task:
<cgitask lock = "f" name = "contribute" owner = "__INSERT__($sOwner);" immediate="t" retry = "f" start = "t" description = "Contribute content step 1">
<areavpath v = "__INSERT__($cArea_VPath);"/>
<successors>
<successorset description = "Wait for more data">
<succ v = "Wait For Contribution"/>
</successorset>
<successorset description = "Start Approval Process">
<succ v = "startApproval"/>
</successorset>
</successors>
<command v="contribute_content.cgi" />
__INSERT__($iw_selected_files);
</cgitask>
Here is a snipit of the code I'm using:
use TeamSite::CGI_lite;
use TeamSite::WFtask;
use TeamSite::WFworkflow;
use TeamSite:
CRnode;
my ($cgi) = TeamSite::CGI_lite->new();
$cgi->parse_data();
my ($taskid) = $cgi->{form}{taskID};
$taskid = pop(
@$taskid)
if (ref($taskid) eq "ARRAY");
my ($task) = TeamSite::WFtask->new($taskid);
my ($taskName) = $task->GetName();
print "taskid: \t$taskid<br>";
print "taskname:\t $taskName<br>";
Here is a dump of the information passed with the CGI is the start task:
taskid:
taskname:
If I stick a usertask first then the CGI task, I get:
taskid: 63523
taskname: contribute
That is only a small portion of what's missing, from what I can tell, there are no parameters passed with the URL (aka GET method).
Adam Stoller
> my ($taskid) = $cgi->{form}{taskID};
> $taskid = pop(
@$taskid)
if (ref($taskid) eq "ARRAY");
I do not believe that 'taskID' is the correct form variable name.
Try either "iw_taskid" or "task_id"
--fish
(Interwoven, Curriculum Development)
Bowker
If I look at the properties of the CGI window that pops up right away - there are no parameters in the URL specified (sessionid, taskid,...) nothing. If I "start task" in the "to do" list It will give me a new CGI window with parameters on the URL line. (like sessionid etc..)
akshathp
From the perldoc on CGI_lite, try the following,
foreach $name (keys %{$cgi->{form}})
{
print "name: $name<br>\n".
"value: ", $cgi->{form}{$name} ,"<br><br>\n";
}
Then you should see all the keys and values available.
Akshat Pramod Sharma
Interwoven Inc.
Migrateduser
Another way to do this is use the CGI module instead of CGI_lite:
use CGI;
(%FORM) = ParseForm();
while (($key,$value) = each %FORM) {
print DEBUG "key: $key value: $value\n";
}
Dave Smith
Sr. Software Engineer
Nike, Inc.
(503) 671-4238
DavidH.Smith@nike.com
Migrateduser
With an HTTP GET request, input parameters are encoded into the URL.
However, a CGI task is handled as an HTTP POST request. With a POST, the input parameters may be specified in the body of the request, or in the URL, or both. That is why you don't see the parameters in the URL.
Brinko Kobrin
Interwoven Staff Engineer