dhiaayachi / temporal

Temporal service
https://docs.temporal.io
MIT License
0 stars 0 forks source link

cancel mutil activity by single workflow #344

Open dhiaayachi opened 2 months ago

dhiaayachi commented 2 months ago

Expected Behavior

Hope that the currently running Xworkflow can be canceled through CancelWorkflow or RequestCancelWorkflowExecution

Actual Behavior

Define a DownloadWorkflow in which there are two activities DumpActivity and LoadActivity. When CancelWorkflow(ctx, req.WorkflowId, req.RunId) is used to cancel, the following activities will still be executed. Is there any way to cancel the currently running workflow task?

Steps to Reproduce the Problem

`2023/06/16 10:19:29 Started Workflow Execution WorkflowID 02029f6f-d4bb-4eef-b94c-035222ee06f0 RunID c3ee77e9-27cc-44b2-8728-8ed4f42a0a9e 2023/06/16 10:19:29 INFO cancel workflow started Namespace test TaskQueue test WorkerID 10041@essun.com@ WorkflowType CannelDumplingWorkflow WorkflowID 02029f6f-d4bb-4eef-b94c-035222ee06f0 RunID c3ee77e9-27cc-44b2-8728-8ed4f42a0a9e Attempt 1 2023/06/16 10:19:29 DEBUG ExecuteActivity Namespace test TaskQueue test WorkerID 10041@essun.com@ WorkflowType CannelDumplingWorkflow WorkflowID 02029f6f-d4bb-4eef-b94c-035222ee06f0 RunID c3ee77e9-27cc-44b2-8728-8ed4f42a0a9e Attempt 1 ActivityID 5 ActivityType DumperActivity

2023/06/16 10:20:11 DEBUG RequestCancelActivity Namespace test TaskQueue test WorkerID 10041@essun.com@ WorkflowType CannelDumplingWorkflow WorkflowID 02029f6f-d4bb-4eef-b94c-035222ee06f0 RunID c3ee77e9-27cc-44b2-8728-8ed4f42a0a9e Attempt 1 ActivityID 11 ...... 2023/06/16 10:20:39 INFO Namespace test TaskQueue test WorkerID 10041@essun.com@ WorkflowType CannelDumplingWorkflow WorkflowID 02029f6f-d4bb-4eef-b94c-035222ee06f0 RunID c3ee77e9-27cc-44b2-8728-8ed4f42a0a9e Attempt 1 2023/06/16 10:20:39 DEBUG ExecuteActivity Namespace test TaskQueue test WorkerID 10041@essun.com@ WorkflowType CannelDumplingWorkflow WorkflowID 02029f6f-d4bb-4eef-b94c-035222ee06f0 RunID c3ee77e9-27cc-44b2-8728-8ed4f42a0a9e Attempt 1 ActivityID 22 ActivityType CleanMigrateActivity

`

Specifications