Skip to content

Commit

Permalink
Merge pull request #143 from ghkdwlgns612/cancled-task
Browse files Browse the repository at this point in the history
Fix Issue: notify cancelled task
  • Loading branch information
v1r3n authored May 12, 2024
2 parents 6aefcc0 + ca07ebe commit 30e555c
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1203,6 +1203,15 @@ List<String> cancelNonTerminalTasks(WorkflowModel workflow) {
if (!task.getStatus().isTerminal()) {
// Cancel the ones which are not completed yet....
task.setStatus(CANCELED);
try {
notifyTaskStatusListener(task);
} catch (Exception e) {
String errorMsg =
String.format(
"Error while notifying TaskStatusListener: %s for workflow: %s",
task.getTaskId(), task.getWorkflowInstanceId());
LOGGER.error(errorMsg, e);
}
if (systemTaskRegistry.isSystemTask(task.getTaskType())) {
WorkflowSystemTask workflowSystemTask =
systemTaskRegistry.get(task.getTaskType());
Expand Down

0 comments on commit 30e555c

Please sign in to comment.