I am sending a message containing a concept from my ontology, between two agents. The Concept object is encapsulated inside an action, and encoded like so:
SendAction sendObject = new SendAction ("action info", conceptObject);
Action action = new Action();
action.setAction(sendObject);
action.setActor(getAID());
getContentManager().fillContent(message, action);
However, upon decoding the message content in the recipient agent like so:
ContentElement content = getContentManager().extractContent(message);
The concept object's default constructor is called, thus a 'SendAction' containing an empty concept object is extracted rather than the object I encoded.
Interestingly, the 'Send Action' itself is encoded and decoded properly, as the "action info" string remains. Only the conceptObject is default.
Why is this happening, and how can I prevent it?