Seeing Activity Task Started After WorkflowExecutionCompleted?

Hi,

I’m noticing something strange. When the WorkflowExecutionComplete is completed, I see a ActivityTaskStarted after it. I was under the impression that once the workflow execution is complete that is the last thing that can happen. It’s strange to see an ActivityTaskStarted to be appear on the history.

In my code, there is the ability to try to signal the workflow to cancel an activity, but by this time the workflowExceution should be completed. I figured that the signaled request would be dropped and not tracked

Thanks for reporting, seems like a bug
Will check this

@Ruslan On the same note I do see the following in my logs. I’m trying to figure out where this exception gets thrown. Is it some background process in the SDK that is still trying to start the Activity?

"io.grpc.StatusRuntimeException: NOT_FOUND: workflow execution already completed
	at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:262)
	at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:243)
	at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:156)
	at io.temporal.api.workflowservice.v1.WorkflowServiceGrpc$WorkflowServiceBlockingStub.respondActivityTaskFailed(WorkflowServiceGrpc.java:2757)
	at io.temporal.internal.worker.ActivityWorker$TaskHandlerImpl.lambda$sendReply$1(ActivityWorker.java:305)
	at io.temporal.internal.common.GrpcRetryer.lambda$retry$0(GrpcRetryer.java:79)
	at io.temporal.internal.common.GrpcRetryer.retryWithResult(GrpcRetryer.java:97)
	at io.temporal.internal.common.GrpcRetryer.retry(GrpcRetryer.java:76)
	at io.temporal.internal.worker.ActivityWorker$TaskHandlerImpl.sendReply(ActivityWorker.java:299)
	at io.temporal.internal.worker.ActivityWorker$TaskHandlerImpl.handle(ActivityWorker.java:196)
	at io.temporal.internal.worker.ActivityWorker$TaskHandlerImpl.handle(ActivityWorker.java:154)
	at io.temporal.internal.worker.PollTaskExecutor.lambda$process$0(PollTaskExecutor.java:73)
	... 3 common frames omitted
Wrapped by: java.lang.RuntimeException: Failure processing activity response. WorkflowId=6887dc26-f4d2-442f-aad3-628b2fbb30b4, RunId=2958f530-25f6-4162-bb5c-cbeb0576fafe, ActivityType=ReleaserActivityStart, ActivityId=8a9528ac-ccc1-309e-8cd1-19a6e0a30a1c
	at io.temporal.internal.worker.ActivityWorker$TaskHandlerImpl.wrapFailure(ActivityWorker.java:259)
	at io.temporal.internal.worker.ActivityWorker$TaskHandlerImpl.wrapFailure(ActivityWorker.java:154)
	at io.temporal.internal.worker.PollTaskExecutor.lambda$process$0(PollTaskExecutor.java:79)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
"

This happens when activity tries to report its completion after the workflow execution already completed.