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)
Forget $cgi_lite->iwcallback(), use transitiontask
RonaldV
Hi,
if you want to start an immediate-cgitask directly after another cgi-task the Iwov docs advise you to use the $cgi_lite->iwcallback() function.
DON'T!
The iwcallback-function writes a hidden-form to your client-browser, followed by a js-post. This way it completely messes up your carefully crafted cgi-gui. :-) I think a backend-function like callback should NEVER write anything to YOUR frontend.
Second the iwcallback-function does not pass the your cgi-values on to the next cgi-task-script. This is specially a probleem for the done-page with is used internally by teamsite to define what needs to be done when the flow is done. F.i. if you use the iwcheckconflicts.ipl as the second cgi-task you'll be redirected to a page that not exists (any more) :-( Funny , that nobody has ever tested this.
Any way, the solution is simple:
- do a backend-callback yourself, via iwcallback.exe or the equivalent $task->callback
- when done, redirect the browser to the url-command transitiontask (cgi_transition: false, done_page: your done page)
- this will open the cgitask-script just teh way you want it
This will give you all the controle you want. :-)
Cheers, Ronald
TS65 Sp1
Win2k Sp4
OD602
Find more posts tagged with
Comments
Adam Stoller
Hmm - maybe it depends on what you're trying to do with the cgitask scripts and/or the version of the product.
In the 5.x days - I used TeamSite::CGI_lite's iwcallback to string two immediate cgitask scripts together without running into any problems.
More recently - I tend to try to avoid back-to-back cgitask's as I think it's generally better to write a single cgitask script and have it perform all the various bits of functionality required (with proper use of callbacks to transition according to success / failure of the purpose of the script) - but perhaps that's just me.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
gzevin
I also do agree with you - IMO, if someone has a few immediate CGI tasks one after another, they should sit down and rethink why they are doing this....
Greg Zevin, Ph.D. Comp. Sc.
Independent Interwoven Consultant/Architect
Sydney, AU
RonaldV
I agree with you. However in my case I wanted to re-use the iwov-supplied iwcheckconflicts.cgi script so I wrote my own cgi to do what ever I wanted to do and then call the check-conflict thingy.
Sounds like a reasonable business-case to me?
TS65 Sp1
Win2k Sp4
OD602