Skip to content

Deleted workflow still attempting to run #48185

@leannebriffa

Description

@leannebriffa

Before reporting an issue

  • I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.

Area

workflows

Describe the bug

After testing the Tracking of user activity and taking actions workflow in the documentation which creates a scheduled task, this workflow was deleted from the UI before being explicitly disabled.

After deletion, server logs show that the scheduled task associated with the workflow continues to execute and fails because the referenced workflow no longer exists:

ERROR [org.keycloak.services.scheduled.ScheduledTaskRunner] (Timer-0) Failed to run scheduled task workflow-032b10ae-dfc2-41be-996a-d3dc0e868282: jakarta.ws.rs.BadRequestException: Not a valid workflow resource: 032b10ae-dfc2-41be-996a-d3dc0e868282

This results in repeated error logs from ScheduledTaskRunner.

Version

26.6.0

Regression

  • The issue is a regression

Expected behavior

Deleting a workflow should also unregister or cancel any associated scheduled tasks, or prevent further execution attempts.

Actual behavior

The scheduled task continues to run and attempts to execute a workflow that has been deleted, resulting in repeated errors.

How to Reproduce?

Create a workflow as in the example in the documentation, delete without disabling and observe the logs.

Anything else?

No response

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions