cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simone Gianni <>
Subject Re: Flowscript continuation from external reply
Date Tue, 21 Feb 2006 16:42:55 GMT
Hi Andrew,
I supposed you was not going to call a webservice (which is server to 
server comunication) but send the user to another site, and then receive 
back (thru the user browser) the result of the transaction. This is what 
i asked in the first few lines of my first answer. If you have to call a 
webservice (your server connects to the other server, the user notices 
nothing) then the aproach is radically different.


Andrew Madu wrote:

> Hi Simone,
>> 1) Instead of using redirectTo, set up a page with a link to the 
>> external site (like a jx page), then use sendPageAndWait to send this 
>> page to the user, he will click on the link, go to the external site 
>> and all the rest, while your flow will be suspended until the 
>> external site will redirect him to your continuation and the flow 
>> will restart. This is a clean solution, but involves one more step 
>> for the user.
>> 2) Create a webContinuation in your flow (you can do this in 
>> javascript flow), before the redirectTo. This way you have a 
>> "bookmark" in your flow the user can be redirected to, even if you 
>> haven't stopped the flow directly. This is quite a dirtier solution, 
>> but avoids the extra click. Here is the pseudocode:
> wouldn't a nicer way to be to call a webservice? So for example:
> *var webServiceVal = cocoon.callWebservice(bizData.fname etc etc etc)*
> try {
> if (webServiceVal == true) {
> }else{
> }
> } catch (e) {
> //Some problem has occured
> msg2 = e.toString();
> }
> How do I call a webservice and pass it parameters in flowscript?
> Andrew

View raw message