Skip to content

Commit

Permalink
Merge pull request #226 from rwth-acis/releases/1.7.0
Browse files Browse the repository at this point in the history
Releases/1.7.0
  • Loading branch information
samuelvkwong authored Oct 10, 2023
2 parents 88cceab + fe27119 commit 04f592b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, ServiceFunctionAttribute> attlist = new HashMap<String, ServiceFunctionAttribute>();
Expand Down Expand Up @@ -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<String, ServiceFunctionAttribute> attlist = new HashMap<String, ServiceFunctionAttribute>();
for (ServiceFunction bsf : bot.getBotServiceFunctions().values()) {
Expand Down Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,8 @@ public void parseNodesAndEdges(BotConfiguration config, HashMap<String, BotAgent
ServiceFunctionAttribute sfaChild = sfaList.get(target);
sfaParent.addChildAttribute(sfaChild);
//sfaChild.setParent(sfaParent);
//System.out.println("PARENT ATTRIBUTE");
//System.out.println(sfaParent);
}
// Incoming Message has...
} else if (incomingMessages.get(source) != null) {
Expand Down Expand Up @@ -811,6 +813,7 @@ private JSONArray swaggerHelperFunction(Bot b) {
if (b.getServiceInformation().get(s.getServiceName()) != null && s.getFunctionName() != null) {
addServiceInformation(s, b.getServiceInformation().get(s.getServiceName()));
}


if (s.getOnStart().containsKey(b.getId())){
MiniClient client = new MiniClient();
Expand Down

0 comments on commit 04f592b

Please sign in to comment.