Discussion:
[jade-develop] handleCfp invoked by inform performative
15490289 at sun.ac.za (Claassen, M, Mnr )
2014-08-03 12:25:31 UTC
Permalink
Hello all,

I have a funny behaviour in my program..

I have a Task Agent which implements a class that extends the ContractNetResponder Class to handle communication with a Product Agent. This class obviously implement a handleCfp callback function in my program.

The Task Agent also implements a 'ServiceNotifier' class that extends the DFSubscriber class. This class implements the standard onRegister and onDeregister functions so that my Task Agent can be notified immediately when a certain service (supplied by some Resource Agents) becomes available in the Directory Facilitator.

So...when I launch a Resource agent with a certain service....it indeed sends a message with the INFORM performative to my Task Agent. (Checked this through the sniffer). This is where the problem comes in...the onRegister function of the ServiceNotifier class is not invoked....instead the handleCfp function of the ContractNetResponder class is invoked. I checked through the sniffer that no cfp is sent to the Task Agent.

The funny thing though is that when I launch another Resource Agent with the same service.....the onRegister function is invoked?

I am clearly doing something wrong. Any help from the experts out there would greatly be appreciated!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jade.tilab.com/pipermail/jade-develop/attachments/20140803/cdeeceb4/attachment.html>
15490289 at sun.ac.za (Claassen, M, Mnr )
2014-08-03 14:15:11 UTC
Permalink
Hello All again,

No need to reply to my silly question :)

I have solved the problem by defining a message template and sending that to the constructor.

Have a brilliant day!

Marius
________________________________
From: Claassen, M, Mnr <15490289 at sun.ac.za>
Sent: 03 August 2014 02:25 PM
To: jade-develop at avalon.tilab.com
Subject: handleCfp invoked by inform performative

Hello all,

I have a funny behaviour in my program..

I have a Task Agent which implements a class that extends the ContractNetResponder Class to handle communication with a Product Agent. This class obviously implement a handleCfp callback function in my program.

The Task Agent also implements a 'ServiceNotifier' class that extends the DFSubscriber class. This class implements the standard onRegister and onDeregister functions so that my Task Agent can be notified immediately when a certain service (supplied by some Resource Agents) becomes available in the Directory Facilitator.

So...when I launch a Resource agent with a certain service....it indeed sends a message with the INFORM performative to my Task Agent. (Checked this through the sniffer). This is where the problem comes in...the onRegister function of the ServiceNotifier class is not invoked....instead the handleCfp function of the ContractNetResponder class is invoked. I checked through the sniffer that no cfp is sent to the Task Agent.

The funny thing though is that when I launch another Resource Agent with the same service.....the onRegister function is invoked?

I am clearly doing something wrong. Any help from the experts out there would greatly be appreciated!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jade.tilab.com/pipermail/jade-develop/attachments/20140803/b907990f/attachment.html>
Loading...