diff --git a/social-bot-manager/src/main/java/i5/las2peer/services/socialBotManagerService/model/Messenger.java b/social-bot-manager/src/main/java/i5/las2peer/services/socialBotManagerService/model/Messenger.java index 22859174..e609f792 100644 --- a/social-bot-manager/src/main/java/i5/las2peer/services/socialBotManagerService/model/Messenger.java +++ b/social-bot-manager/src/main/java/i5/las2peer/services/socialBotManagerService/model/Messenger.java @@ -403,18 +403,8 @@ public void handleMessages(ArrayList messageInfos, Bot bot) { remarks.put("user", encryptedUser); conversationId = this.determineConversationId(message.getChannel()); - remarks.put("in-service-context", this.triggeredFunction.containsKey(message.getChannel())); - this.l2pContext.monitorXESEvent(MonitoringEvent.SERVICE_CUSTOM_MESSAGE_1, remarks.toJSONString(), - conversationId.toString(), - intent.getKeyword(), - bot.getId(), "bot", "start", System.currentTimeMillis()); - this.l2pContext.monitorXESEvent(MonitoringEvent.SERVICE_CUSTOM_MESSAGE_1, remarks.toJSONString(), - conversationId.toString(), - intent.getKeyword(), - bot.getId(), "bot", "complete", System.currentTimeMillis()); - // ________________ start modification of state machine__________________ if (state == null && message.getText().startsWith("!") @@ -695,15 +685,6 @@ public void handleMessages(ArrayList messageInfos, Bot bot) { } } - String activityName = state.getIntentKeyword() + ":response"; - this.l2pContext.monitorXESEvent(MonitoringEvent.SERVICE_CUSTOM_MESSAGE_2, - remarks.toJSONString(), - conversationId.toString(), activityName, bot.getId(), "bot", "start", - System.currentTimeMillis()); - this.l2pContext.monitorXESEvent(MonitoringEvent.SERVICE_CUSTOM_MESSAGE_2, - remarks.toJSONString(), - conversationId.toString(), activityName, bot.getId(), "bot", "complete", - System.currentTimeMillis()); // check if message parses buttons or is simple text if (state.getType().equals("Interactive Message")) { this.chatMediator.sendBlocksMessageToChannel(message.getChannel(), split, @@ -853,7 +834,14 @@ public void handleMessages(ArrayList messageInfos, Bot bot) { conversationMap.put(message.getChannel(), conversation); } - + remarks.put("stateLabel", state != null ? state.getIntentLabel() : "null"); + remarks.put("intent", intent != null ? intent.getKeyword() : "null"); + String activityName = state == null ? intent.getKeyword() : state.getIntentLabel(); + this.l2pContext.monitorXESEvent(MonitoringEvent.SERVICE_CUSTOM_MESSAGE_1, + remarks.toJSONString(), + conversationId.toString(), + activityName, + bot.getId(), "bot", "complete", System.currentTimeMillis()); } catch (Exception e) { e.printStackTrace(); }