Subject: Re: [jade-develop] AchieveREResponder in FSMBehaviour
From: Cinzia S (cinzia.s@ntlworld.com)
Date: Mon Sep 02 2002 - 12:51:36 MET DST
ooops! yes I meant AchieveREInitiator all the way through.
Throwing the exception was just a means to know how far the
AchieveREInitiator did go within the outer FSMBehaviour, so I've passed the
number returned by the onEnd() of the agree handler behaviour to see if it
did get there. Like this:
synchGuideAgent.registerTransition( "STATE_1", "STATE_2",
drawRoute.onEnd() );
synchGuideAgent.registerTransition( "STATE_2", "STATE_3",
messageOperator.onEnd() );
synchGuideAgent.registerTransition( "STATE_3", "STATE_4", 31 );
the last line was: synchGuideAgent.registerTransition( "STATE_3", "STATE_4",
requestInitiator.onEnd() );
I expected the AchieveREInitiator to fire onEnd() only when the full
protocol request-response-result notification was completed, but I'm making
some mistake here, as it quits as soon as the request is sent, if it is sent
at all.
Basically I hoped I could keep the outer FSMBehaviour on STATE_4 (the
AchieveREInitiator behaviour) until messages: request sent, agree received,
inform received.
Should I instead use SenderBehaviour and ReceiverBehaviour?
Thank you
Cinzia
----- Original Message -----
From: "Caire Giovanni" <Giovanni.Caire@TILAB.COM>
To: "Cinzia S" <cinzia.s@ntlworld.com>
Sent: Monday, September 02, 2002 11:16 AM
Subject: RE: [jade-develop] AchieveREResponder in FSMBehaviour
Hi Cinzia,
The problem is that the behaviour that you have registered as STATE_3 in you
FSM exits with code 0 (i.e. its onEnd() method returns 0) and you haven't
defined any transition from STATE_3 that is fired when STATE_3 exits with
code 0.
Check the definition of the transition table of your FSM (i.e. the part of
the code where the calls to registerTransition() occur).
Note that 0 is the default exit value for whatever behaviour --> unless you
override the onEnd() method a behaviour exits with code 0.
Finally I think you are making some confusion between Responder and
Initiator. Note that an AchieveREREsponder sends responses and
result-notifications; it does not wait for them.
Bye
Giovanni
-----Original Message-----
From: Cinzia S [mailto:cinzia.s@ntlworld.com]
Sent: luned́ 2 settembre 2002 12.10
To: Caire Giovanni; jade-develop@sharon.cselt.it
Subject: Re: [jade-develop] AchieveREResponder in FSMBehaviour
This is where things don't go quite right:
MessageOperator, onEnd()
PrepareRequests, onEnd()
RequestInitiator, onEnd(): last state executed: 0
*** Uncaught Exception for agent ppp ***
java.lang.RuntimeException: Inconsistent FSM. State: STATE_3 event: 0
Event 0 must be an event of the AchieveREResponder (RequestInitiator) other
than the registered handler behaviours (request, agree, inform, failure), as
I'm overriding their onEnds() with different values, and the onEnd of
AchieveREResponder is also overridden to return the getLastExitValue().
How can I get the AchieveREResponder to wait for a response message + result
notification message before its onEnd() is fired?
Thanks
Cinzia
----- Original Message -----
From: "Caire Giovanni" <Giovanni.Caire@TILAB.COM>
To: "Cinzia S" <cinzia.s@ntlworld.com>; <jade-develop@sharon.cselt.it>
Sent: Monday, September 02, 2002 9:36 AM
Subject: RE: [jade-develop] AchieveREResponder in FSMBehaviour
Hi Cinzia,
Yes it is possible to nest FSMBehaviours. If the AchieveREResponder is never
triggered probably the transition that leads to it is never fired.
Bye
Giovanni
-----Original Message-----
From: Cinzia S [mailto:cinzia.s@ntlworld.com]
Sent: domenica 1 settembre 2002 2.59
To: jade-develop@sharon.cselt.it
Subject: [jade-develop] AchieveREResponder in FSMBehaviour
Hi Jaders!
I've placed an AchieveREResponder as a sub-behaviour of an FSMBehaviour, but
it doesn't seem to be triggered at all. The AchieveREResponder has its own
registered behaviours which handles agree, inform and failure.
Am I doing something wrong? Is it possible to nest FSMBehaviours?
Thanks for you help
Cinzia
_______________________________________________
jade-develop mailing list
jade-develop@sharon.cselt.it
http://sharon.cselt.it/mailman/listinfo/jade-develop
UNSUBSCRIBE INSTRUCTIONS AT http://jade.cselt.it/mailing.htm#unsubscribe
====================================================================
CONFIDENTIALITY NOTICE
This message and its attachments are addressed solely to the persons
above and may contain confidential information. If you have received
the message in error, be informed that any use of the content hereof
is prohibited. Please return it immediately to the sender and delete
the message. Should you have any questions, please contact us by
replying to MailAdmin@tilab.com. Thank you
====================================================================
====================================================================
CONFIDENTIALITY NOTICE
This message and its attachments are addressed solely to the persons
above and may contain confidential information. If you have received
the message in error, be informed that any use of the content hereof
is prohibited. Please return it immediately to the sender and delete
the message. Should you have any questions, please contact us by
replying to MailAdmin@tilab.com. Thank you
====================================================================
This archive was generated by hypermail 2a22 : Mon Sep 02 2002 - 12:45:48 MET DST