From 276ebbce3fc13466dbf284dda9bf344cc00b33a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=E1=BA=A7n=20V=C4=A9nh=20Thi=E1=BB=87n=20Ph=C3=BAc?= Date: Wed, 27 Nov 2024 16:24:16 +0700 Subject: [PATCH] MARP-1481 Handle Feedback --- .../demo/service/MattermostSlashCommandService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mattermost-connector-demo/src/com/axonivy/connector/mattermost/demo/service/MattermostSlashCommandService.java b/mattermost-connector-demo/src/com/axonivy/connector/mattermost/demo/service/MattermostSlashCommandService.java index 0227a26..7e9a5b1 100644 --- a/mattermost-connector-demo/src/com/axonivy/connector/mattermost/demo/service/MattermostSlashCommandService.java +++ b/mattermost-connector-demo/src/com/axonivy/connector/mattermost/demo/service/MattermostSlashCommandService.java @@ -12,7 +12,6 @@ import com.fasterxml.jackson.databind.ObjectMapper; import ch.ivyteam.ivy.environment.Ivy; -import ch.ivyteam.ivy.process.model.value.SignalCode; @Path("/mattermost/slashCommand") @PermitAll @@ -22,7 +21,8 @@ public String startProcess(@BeanParam SlashCommandGetRequestParameter parameter) SlashCommandResponse response = new SlashCommandResponse(); response.setResponseType("in_channel"); response.setText(String.format("Process CheckTeamAbsences has been started by %s", parameter.getUserName())); - Ivy.wf().signals().send(new SignalCode("CheckTeamAbsences"), parameter.getChannelId()); + Ivy.wf().signals().create().data(parameter.getChannelId()).makeCurrentTaskPersistent() + .send("CheckTeamAbsences"); ObjectMapper mapper = new ObjectMapper(); try { return mapper.writeValueAsString(response);