# No EVENT\_TYPE\_WORKFLOW\_TASK\_STARTED when Activity was started

**URL:** <https://community.temporal.io/t/no-event-type-workflow-task-started-when-activity-was-started/15177>\
**Category:** Community Support\
**Created:** [November 14, 2024, 3:34pm UTC](https://community.temporal.io/t/no-event-type-workflow-task-started-when-activity-was-started/15177 "2024-11-14T15:34:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![daleksan](https://avatars.discourse-cdn.com/v4/letter/d/9f8e36/32.png) [@daleksan](https://community.temporal.io/u/daleksan)\
**Post date:** [November 14, 2024, 3:34pm UTC](https://community.temporal.io/t/no-event-type-workflow-task-started-when-activity-was-started/15177/1 "2024-11-14T15:34:10Z")

</div>

I’m observing an unexpected (to me) behaviour. When simulating executing an activity, I do not see EVENT\_TYPE\_WORKFLOW\_TASK\_STARTED in the event history after the activity was started.

My activity impl looks like:

```auto
    @Override
    public void doStuff(String input) {
        System.out.println("### TestActivity2Impl invoked " + cntr++);
        try {
            for (int i=0;i<10;i++) {
                Activity.getExecutionContext().heartbeat("ping");
                System.out.println("### TestActivity2Impl sleeping");
                Thread.sleep(2000);
            }
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }

```

I have a poller implementation that gets the status and history of all executing workflows periodically (in tests executed every 5secs). I’d expect to see EVENT\_TYPE\_WORKFLOW\_TASK\_STARTED in the 20s windows the activity execution takes. Instead, once started there’s is only EVENT\_TYPE\_ACTIVITY\_TASK\_SCHEDULED (plus some WORKFLOW activity kinds) in the history. Once the activity completes, there are EVENT\_TYPE\_ACTIVITY\_TASK\_SCHEDULED, EVENT\_TYPE\_ACTIVITY\_TASK\_STARTED, EVENT\_TYPE\_ACTIVITY\_TASK\_COMPLETED (plus the WORKFLOW kinds). I can paste complete histories, if needed.

Isn’t the purpose of EVENT\_TYPE\_ACTIVITY\_TASK\_STARTED to be present on time in the history when an activity started to be executed? The chapter on error detection clearly distinguished scheduling and execution stages. What I want to do is propagate the execution snapshot to our UI.

I was suspecting this might be a matter of periodically checking the worker, and that during the 20s the state was not yet propagated into the history. This is the reason I added the heart beat calls, thinking that perhaps this message could help refresh the activity status too. But it din’t help.

Any suggestions please?

Thank you.

---

<div class="post-metadata">

**Author:** ![maxim](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/maxim/32/8_2.png) [@maxim](https://community.temporal.io/u/maxim)\
**Post date:** [November 14, 2024, 5:22pm UTC](https://community.temporal.io/t/no-event-type-workflow-task-started-when-activity-was-started/15177/2 "2024-11-14T17:22:18Z")

</div>

From the [documentation](https://docs.temporal.io/encyclopedia/retry-policies#event-history):

For an Activity Execution, the [ActivityTaskStarted](https://docs.temporal.io/references/events#activitytaskstarted) Event will not show up in the Workflow Execution Event History until the Activity Execution has completed or failed (having exhausted all retries). This is to avoid filling the Event History with noise. Use the Describe API to get a pending Activity Execution’s attempt count.
