# Child Workflows in pending state

**URL:** <https://community.temporal.io/t/child-workflows-in-pending-state/11097>\
**Category:** Community Support\
**Created:** [February 21, 2024, 5:58pm UTC](https://community.temporal.io/t/child-workflows-in-pending-state/11097 "2024-02-21T17:58:01Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mohammed](https://avatars.discourse-cdn.com/v4/letter/m/13edae/32.png) [@Mohammed](https://community.temporal.io/u/Mohammed)\
**Post date:** [February 21, 2024, 5:58pm UTC](https://community.temporal.io/t/child-workflows-in-pending-state/11097/1 "2024-02-21T17:58:01Z")

</div>

Hi,

My child Workflows are stuck in pending state when I’m using Async.procedure to call them.

I’m calling my child workflow like this.

Async.procedure(childWorkflow::childWorkfloMethod, “Hello World”);

---

<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:** [February 21, 2024, 6:05pm UTC](https://community.temporal.io/t/child-workflows-in-pending-state/11097/2 "2024-02-21T18:05:19Z")

</div>

> [@Best way to create an async child workflow](https://community.temporal.io/t/best-way-to-create-an-async-child-workflow/114/2):
>
> Currently, it is not straightforward. We have plans to improve the experience ([relevant issue](https://github.com/temporalio/temporal-java-sdk/issues/74)), but in the meantime, the following should be done. Java SDK Set ChildWorkflowOptions.ParentClosePolicy to ABANDON when creating a child workflow stub. Start child workflow asynchronously using Async.function or Async.procedure. Call Workflow.getWorkflowExecution(…) on the child stub Wait for the Promise returned by getWorkflowExecution to complete. This indicates that the child successfully started …

---

<div class="post-metadata">

**Author:** ![Mohammed](https://avatars.discourse-cdn.com/v4/letter/m/13edae/32.png) [@Mohammed](https://community.temporal.io/u/Mohammed)\
**Post date:** [February 21, 2024, 6:32pm UTC](https://community.temporal.io/t/child-workflows-in-pending-state/11097/3 "2024-02-21T18:32:14Z")

</div>

Can you please explain  
what does parentClosePolicy abandon mean?

---

<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:** [February 21, 2024, 6:34pm UTC](https://community.temporal.io/t/child-workflows-in-pending-state/11097/4 "2024-02-21T18:34:08Z")

</div>

Does the parent workflow start the child asynchronously and then complete it in your case? Or does it wait for the child to complete first?

---

<div class="post-metadata">

**Author:** ![Mohammed](https://avatars.discourse-cdn.com/v4/letter/m/13edae/32.png) [@Mohammed](https://community.temporal.io/u/Mohammed)\
**Post date:** [February 21, 2024, 6:45pm UTC](https://community.temporal.io/t/child-workflows-in-pending-state/11097/5 "2024-02-21T18:45:37Z")

</div>

It doesn’t wait for the child to complete.

---

<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:** [February 21, 2024, 7:18pm UTC](https://community.temporal.io/t/child-workflows-in-pending-state/11097/6 "2024-02-21T19:18:09Z")

</div>

When the parent completes, all its children behave according to the ParentClosePolicy. The default policy is TERMINATE. So, all children with this policy are immediately terminated when the parent completes. The ABANDON policy tells that children can continue executing after the parent completion.

The linked post explains the additional complication. The parent must wait for a child to start before completing. Otherwise, the child might never start even if it specified the ABANDON policy.

---

<div class="post-metadata">

**Author:** ![Mohammed](https://avatars.discourse-cdn.com/v4/letter/m/13edae/32.png) [@Mohammed](https://community.temporal.io/u/Mohammed)\
**Post date:** [February 21, 2024, 7:36pm UTC](https://community.temporal.io/t/child-workflows-in-pending-state/11097/7 "2024-02-21T19:36:03Z")

</div>

Thanks for the explanation.
