changes agreement retrieval to the correct uri (it is the correspondingRemoteUri by definition, and not the proposal uri)
@@ -65,12 +65,11 @@ public class AnalyzeAction extends BaseEventBotAction {
Connection con = receivedOnConnectionEvent.getCon();
URI acceptedEventUri = WonRdfUtils.MessageUtils.getAcceptedEvent(receivedOnConnectionEvent.getWonMessage());
- if(acceptedEventUri != null){
+ if(WonRdfUtils.MessageUtils.isAccepts(receivedOnConnectionEvent.getWonMessage())){
logger.debug("ACCEPT MESSAGE FOUND "+acceptedEventUri);
//IF ACCEPTS MESSAGE -> ACCEPT AGREEMENT
Dataset fullConversationDataset = WonLinkedDataUtils.getConversationAndNeedsDataset(receivedOnConnectionEvent.getConnectionURI(), linkedDataSource);
- //Model agreementPayload = HighlevelProtocols.getAgreement(fullConversationDataset, acceptedEventUri.toString());
- Model agreementPayload = HighlevelProtocols.getAgreement(fullConversationDataset, acceptedEventUri.toString()); //TODO: RETRIEVE AGREEMENT, for whatever reason there is no agreement at this point only a proposal idk why
+ Model agreementPayload = HighlevelProtocols.getAgreement(fullConversationDataset, receivedOnConnectionEvent.getWonMessage().getCorrespondingRemoteMessageURI().toString()); //TODO: RETRIEVE AGREEMENT, for whatever reason there is no agreement at this point only a proposal idk why
bus.publish(new AgreementAcceptedEvent(con, agreementPayload));
}else {
//TODO: DETERMINE WHAT MESSAGE THIS ACTUALLY IS
