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);