diff --git a/gradle.properties b/gradle.properties index 989bb17d..d0c135dd 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ core.version=1.3.1 service.name=i5.las2peer.services.socialBotManagerService service.class=SocialBotManagerService -service.version=1.7.0 +service.version=.2.1.0 java.version=17 las2peer_user1.name=alice diff --git a/social-bot-manager/src/main/java/i5/las2peer/services/socialBotManagerService/SocialBotManagerService.java b/social-bot-manager/src/main/java/i5/las2peer/services/socialBotManagerService/SocialBotManagerService.java index 7cbd1a28..26a063b8 100644 --- a/social-bot-manager/src/main/java/i5/las2peer/services/socialBotManagerService/SocialBotManagerService.java +++ b/social-bot-manager/src/main/java/i5/las2peer/services/socialBotManagerService/SocialBotManagerService.java @@ -1343,7 +1343,7 @@ public void performIntentTrigger(BotConfiguration botConfig, BotAgent botAgent, if (botFunction.getActionType().equals(ActionType.SERVICE)) { functionPath = botFunction.getFunctionPath(); } else if (botFunction.getActionType().equals(ActionType.OPENAPI)) { - functionPath = botFunction.getFunctionPath(); + functionPath = botFunction.getFunctionPath(); } JSONObject body = new JSONObject(); HashMap attlist = new HashMap(); @@ -1520,8 +1520,9 @@ public void checkTriggerBot(BotConfiguration botConfig, JSONObject body, BotAgen String functionPath = ""; // add path if the triggered function is a service function - if (triggeredFunction.getActionType().equals(ActionType.SERVICE)) + if (triggeredFunction.getActionType().equals(ActionType.SERVICE) || triggeredFunction.getActionType().equals(ActionType.OPENAPI)){ functionPath = triggeredFunction.getFunctionPath(); + } JSONObject triggeredBody = new JSONObject(); HashMap attlist = new HashMap(); for (ServiceFunction bsf : bot.getBotServiceFunctions().values()) { @@ -2073,6 +2074,10 @@ private void performTrigger(BotConfiguration botConfig, ServiceFunction sf, BotA JSONObject triggerAttributes = new JSONObject(); triggeredBody.put("attributes", triggerAttributes); + //Set the endpoint to the base url for the SBFManager + if (sf.getActionType().equals(ActionType.OPENAPI)){ + client.setConnectorEndpoint(webconnectorUrl); + } try { ClientResponse result = client.sendRequest("POST", diff --git a/social-bot-manager/src/main/java/i5/las2peer/services/socialBotManagerService/parser/BotParser.java b/social-bot-manager/src/main/java/i5/las2peer/services/socialBotManagerService/parser/BotParser.java index bc3dee07..d9464f25 100644 --- a/social-bot-manager/src/main/java/i5/las2peer/services/socialBotManagerService/parser/BotParser.java +++ b/social-bot-manager/src/main/java/i5/las2peer/services/socialBotManagerService/parser/BotParser.java @@ -201,6 +201,8 @@ public void parseNodesAndEdges(BotConfiguration config, HashMap