ActivityTaskStarted event versus WorkflowTaskStarted event

hi, in the Temporal forum, you said

  1. WorkflowTaskScheduled when it is created and added to the workflow task queue

  2. WorkflowTaskStarted when it is picked up by a workflow worker process

  3. WorkflowTaskCompleted when workflow cannot make any new progress and the list of commands to execute is sent to the service.

  4. ActivityTaskScheduled when activity execution is requested and a correspondent task is added to an activity task queue.

  5. ActivityTaskStarted when an activity worker received it.

  6. ActivityTaskCompleted when activity result is reported to the service.

However, when I ran the execution locally by setting debugger break points, I noticed that ActivityTaskStarted is not recorded back to Temporal UI until ActivityTaskCompleted is also reported. Is that expected? The above sounds like ActicityTaskStarted is recorded as soon as activity worker receives the task.

I noticed that WorkflowTaskStarted event is always recorded when workerflow implementation starts execution.

activity is marked as started once a poller receive the task, you can see the status by using

  • tctl --namespace <your namespace> workflow describe -w <your workflow ID>
  • web UI summary page

the ActivityTaskStarted event (the one you can see from UI, history section) will only be flushed once activity is finished, e.g. completed / timeout / failed / cancelled.

I filed an issue to record ActivityTaskStarted immediately if the retries are disabled by setting MaximumAttempts to 1.

got it… thank you!