Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

AAE-22831 Fix status is changed to 'Cancelled' when deleting process instance #1543

Merged
merged 18 commits into from
Oct 3, 2024

Conversation

igdianov
Copy link
Contributor

@igdianov igdianov commented Sep 18, 2024

The client is chaining two api calls for Process Instance DELETE which cancels the process followed by DESTROY, which sends a PROCESS_DELETED event to Query servicd.

After that, the client is trying to refresh the list of the processes, and if the DESTROY event is lagging, so it will get an intermediate CANCELLED status, but after refreshing the list again, the process will disappear from the Query database.

https://hyland.atlassian.net/browse/AAE-22831

This PR extends the destroy process instance REST api call to actually cancel the process execution in the Runtime in one transaction which will send the delete process instance cloud event to the Query service in one message.

The extended Runtime Admin API call will support a new force=true parameter to be able to destroy the process in one command:

DELETE /admin/v1/process-instances/{id}/destroy?force=true

The existing destroy process api command without force parameter will work as before by declining to destroy if the status of the process is not CANCELLED or COMPLETED.

@igdianov igdianov self-assigned this Sep 18, 2024
@igdianov igdianov added the bug Something isn't working label Sep 18, 2024
@igdianov igdianov changed the title AAE-22831 Fix status is changed to 'Cancelled' when deleting proc\ss instance AAE-22831 Fix status is changed to 'Cancelled' when deleting process instance Sep 18, 2024
@igdianov igdianov force-pushed the bug/AAE-22831-igdianov-fix-destroy-process-instance branch 5 times, most recently from 46f03b4 to b27a469 Compare October 1, 2024 13:23
@igdianov igdianov force-pushed the bug/AAE-22831-igdianov-fix-destroy-process-instance branch from b27a469 to 57014a3 Compare October 2, 2024 06:04
@igdianov igdianov force-pushed the bug/AAE-22831-igdianov-fix-destroy-process-instance branch from 57014a3 to db33b4c Compare October 2, 2024 14:18
@igdianov igdianov force-pushed the bug/AAE-22831-igdianov-fix-destroy-process-instance branch from 195a723 to 12d950a Compare October 3, 2024 02:07
Copy link

sonarqubecloud bot commented Oct 3, 2024

@igdianov igdianov requested a review from erdemedeiros October 3, 2024 03:17
Copy link
Member

@erdemedeiros erdemedeiros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@igdianov igdianov merged commit 0060905 into develop Oct 3, 2024
17 checks passed
@igdianov igdianov deleted the bug/AAE-22831-igdianov-fix-destroy-process-instance branch October 3, 2024 15:13
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants