Hi John,

an element is not reinitialized when continuations are used, you continue using the same instance of the element. To get data from the slave to the master, simply provide it as an argument to the answer() method and it with be available as the return value of the master's call() method.

Hope this helps.

Geert

On 24 Oct 2006, at 00:33, John Lukar wrote:


Hi there all..

I have a problem pertaining to call() and answer(). I have the following:

MasterElement{

 initialize() {
     localVar = getInput("someVarFromExternalUrlLinkCaller");
     getDBStuffUsingVar (localVar );
}

processElement() {
    if ( hasSubmission("form1") {
         setOutput("passVar1" , MasterElement.getLocalVar() );
         call("slaveElement1");
    }
}


My problem is that once "answer" comes back from "slaveElement1", the initizlie() method does not have the input variable: someVarFromExternalUrlLinkCaller.

I tried defining output parameters in the slaveElement1 processing forms: <output name="someVarFromExternalUrlLinkCaller"/> and then inside slaveElement1 I setOutput ("someVarFromExternalUrlLinkCaller", .....)

but it seems that this does not work. The MasterElement.initialize () does not get back any definined input parameter from the callback slaveElement1.

Even moving the code from MasterElement.initialize() to MasterElement.processElement() still leaves me with the problem of not having the Input: someVarFromExternalUrlLinkCaller.

I played around with Object obj = call("slaveElment1") .... but I am still left with a problem of not being to maintian the value of someVarFromExternalUrlLinkCaller across one invocation of MasterElement to the next.

any ideas how to tackle this ?


_______________________________________________
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users

--
Geert Bevin
Uwyn "Use what you need" - http://uwyn.com
RIFE Java application framework - http://rifers.org
Music and words - http://gbevin.com


_______________________________________________
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users

Reply via email to