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)
Passing Variables from CGI to Workflow
sparc_69
Hi folks,
Haven't been working with WF for a while now.
I am using TS 5.5.2. SP3 for Solaris.
I am stuck with a problem:
How do I pass variables from my CGI Task back to the WFT?
Thanks a lot
Find more posts tagged with
Comments
Jeremy
Hi,
I think what you are looking for are Workflow and Task Variables.
Quite a bit of information in the Docs on this. Also I am sure there is a load of information here in the Devnet.
Hope this sets you on the right path.
Jeremy
Migrateduser
Tech Note 48747
, A Sample CGI Task, includes both an example and documentation.
Brinko Kobrin
Interwoven Staff Engineer
sparc_69
Maybe I should be more precise:
I am trying the following:
The user kicks off a Workflow for automatically submitting and deploying files.
A CGI Task parses the selected files to see whether the contain references to other files (i.e. embedded jsp pages).
The CGI presents a browser window where the user can check the files he now wants to submit.
The CGI then writes a fiellist and triggers a filelist deployment unto two targets, depending whether the files being deployed have to be sent to the Application Server.
That' fine so far, because everything was only one CGI Task.
Now the user will need the possibility to select whether he will submit and deploy teh files immediately or later (leaving him the piossibility to change the date). Fine.
This means that I have to split my CGI at the point where my filelist is written an put the rest of the code to an external task. No problem.
I can attach variables and atributes to my Workflow.
The only Problem that is left is the timeout.
I was trying to use the SetTimeout Method, just giving the CGI Task a Timeout but actually it did not work fine. The Successor Task starts immediately.
Now I think I will have to insert a Dummy Task.
How do I inject my Workflow Variable $timeout back to the Dummy Task?
Thanks in advance.
Regards
Juergen
jbonifaci
Use the iwsettasktimeout CLT.
Jeremy
Have a look at page 34 of 218 of the Workflow Developers Guide for 552.
It mentions the CLT iwsettasktimeout but does not include anymore about it. From the command prompt you can get the following help:
usage: iwsettasktimeout [-h] [-v] [-s servername] taskid timeout
-h Print this message
-v Print version
-s servername Use servername as TeamSite server
taskid ID of task to change
timeout New timeout value (format: '+HHHHMM' or 'MMDDYYYYHHMM')
Which can set the Timeout of the taskid - so you just need to get the Dummy Task id. I think there is a Module to do this.
JonathonG
Not 100% sure, but I think if you change your CGI code you may be able to avoid the Dummy Task. When the user clicks the final "Ok" button, you call Settimeout. Then, do *not* call the CallBack method. Of course, that ends up leaving the CGI task in the user's ToDo list until the timeout occurs. That may or may not be desirable depending on your requirements.
Jonathon
Independent Interwoven Contractor
Adam Stoller
Remember you can only use iwsettasktimeout on a task which already has a timeout defined in it. You cannot *add* a timeout to task dynamically, just change an existing one.
Also - depending on how much you want to do all of this in the workflow, you could offload some of it by using the OpenDeploy scheduler - at which point the deployment can be administered from the OpenDeploy Admin GUI (or via OpenDeploy CLTs).
Depending on how many jobs you expect to have lying around waiting, for how long, and how may overall tasks there are within the system as a whole, off-loading the delay into OpenDeploy is a good performance helper, since TeamSite [workflow] performance drops after something like 20,000 tasks are defined. It might seem like a large number, but if you have a 20-task workflow, you only need 1000 active jobs to reach that - and depending on the delay and the number of people you have working in your system - that could take a year, or it could take less than a day to achieve.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
invoice.dsc
Migrateduser
You can only change the timeout on a task before the task has been activated. Changing the timeout on a CGI task while the task is active will have no effect on the task unless it is reactivated later.
Brinko Kobrin
Interwoven Staff Engineer
JonathonG
Well, like I said, I wasn't 100% sure....now I'm 0% sure
Looks like the dummy task is the way to go.
Jonathon
Independent Interwoven Contractor
sparc_69
I think I have finally made it.
When I set the timout value of my dummy task to an initial value, say +000005 I can change it via my CGI.
All I have to do is to change the value before the task has gone active.
Thanks a lot.
Cheers
Juergen