# Problem with AsyncCompletionClient (can't find a valid activityId)

**URL:** <https://community.temporal.io/t/problem-with-asynccompletionclient-cant-find-a-valid-activityid/8251>\
**Category:** Community Support\
**Tags:** java-sdk\
**Created:** [May 16, 2023, 12:23am UTC](https://community.temporal.io/t/problem-with-asynccompletionclient-cant-find-a-valid-activityid/8251 "2023-05-16T00:23:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sdonovan](https://avatars.discourse-cdn.com/v4/letter/s/35a633/32.png) [@sdonovan](https://community.temporal.io/u/sdonovan)\
**Post date:** [May 16, 2023, 12:23am UTC](https://community.temporal.io/t/problem-with-asynccompletionclient-cant-find-a-valid-activityid/8251/1 "2023-05-16T00:23:13Z")

</div>

Greetings. Alas, need to ask a question.

Imagine two workflows, no parent/child relationship, `A` and `B`. `B` acts as a queue. `A` calls `B` with a signal to enqueue a task (and setting `doNotCompleteOnReturn`). When `B` has processed the task it does a callback to to `A` using the `ActivityCompletionClient`, passing the token issued from `A`’s activity.

However, when `B`’s activity tries to complete the activity on `A`: it’s throwing an `ActivityNotExistsException`. But, `A` is still running (i.e. it hasn’t timed out yet). The time elapsed between `A` enqueuing the task, and `B` attempting to callback/complete the activity is ~19m.

We cracked the token and the `ActivityId`, `RunId`, etc., _look_ correct.

I’ve tried with simple examples (though using Postgres on docker, same versions of Temporal & SDK) and it works as expected. Which makes this very strange.

Note - prior to upgrading the server to Temporal 1.20.2, this worked great. We were on 1.15.2.

Using:

- Temporal Java SDK 1.19.1
- Temporal Server 1.20.2
- AWS RDS MySQL 5.7.37

Any ideas? Thank you!

Sean

PS. I am aware the “Workflow Update (alpha)” exists in V1.20.0+. My understanding is that eventually we can switch to that pattern to manage queues.

---

<div class="post-metadata">

**Author:** ![taonic](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/taonic/32/5556_2.png) [@taonic](https://community.temporal.io/u/taonic)\
**Post date:** [May 22, 2023, 5:02am UTC](https://community.temporal.io/t/problem-with-asynccompletionclient-cant-find-a-valid-activityid/8251/2 "2023-05-22T05:02:56Z")

</div>

Hi Sean,

Have you tried to verify the pending activity via `tctl`? e.g.

```auto
tctl workflow desc -w <replace-with-your-workflow-id> | jq .pendingActivities

```
