Greetings. I’ve been experimenting, trying to figure out the interaction between (i) cancellation-scopes and (ii) external cancellation of the workflow (i.e. with untypedWorkflowStub(…).cancel()). I’ve come across something odd. Following is with server 1.3.2 and Java SDK 1.0.3.
So have a parent-workflow that creates a child-workflow. The child workflow is coded to not complete (i.e. await(() -> false), to wait for a cancellation – just so I can see what happens.
Once a the parent/child workflows have been instantiated, I externally issue a cancel, based on the workflowId. If I look at the history of the parent-workflow instance, you see the following sequence of events:
- WorkflowExecutionCancelRequested
- WorkflowTaskScheduled
- WorkflowTaskStarted
- WorkflowTaskCompleted
Except . . . that the parent-workflow entrypoint is never called (from a debugger), which means the workflow is not actually cancelled, as it stays running. Now, I did notice that the cancellation event is sent into a sticky task-queue.
Any idea why this is happening? Many thanks!
Sean