This repository has been archived by the owner on Dec 13, 2023. It is now read-only.
How can I cancel/terminate a running workflow with related resources destoryed as well via the API? #3720
Unanswered
wang-xander
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, there.
I am fresh to use Confuctor. I create a workflow to automate some security check work. And at the beginning of the workflow, some related computing resources like VMs, network settings etc are also created. I'd like to cancel a running workflow via the API. I want the computing resources destroyed as well by the cancellation of workflow. With the purpose, I used to send a POST request ro API "/conductor/api/tasks" with the body updating the running task status to "FAILED" or "FAILED_WITH_TERMINAL_ERROR", which is likely able to stop this running task and workflow, and resources can be destoryed in linked failure worflow. But I found this API HARDLY stop a running task. After the task and workflow were both showed “FAILED” for a short time, it turned to "COMPLETED" finally and the workflow went through still. It is also found the linked failure workflow ran twice after the task status set to "FAILED" via http API no matter the workflow really stopped or not. The probable reason I researched is http API doesn't communicate to workflow core engine and task instances (WorkflowSystemTask sub classes) about the task status changes. And task instances keep running till they finish.
Could any export point out which settings should be done if I insist the above method? Or is there other experience to actually cancel/terminate a running task with blocking task retries via Condutor API?
I am also expecting the an offical solution for this issue.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions