# Can an activity execute another activity?

**URL:** <https://community.temporal.io/t/can-an-activity-execute-another-activity/3493>\
**Category:** Community Support\
**Tags:** general-impl\
**Created:** [November 29, 2021, 10:26pm UTC](https://community.temporal.io/t/can-an-activity-execute-another-activity/3493 "2021-11-29T22:26:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tmacx](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/tmacx/32/672_2.png) [@tmacx](https://community.temporal.io/u/tmacx)\
**Post date:** [November 29, 2021, 10:26pm UTC](https://community.temporal.io/t/can-an-activity-execute-another-activity/3493/1 "2021-11-29T22:26:46Z")

</div>

Hi. Is there a way for an activity to execute a local activity or must this always be done from a workflow?

Of course there is a way of just calling the activity as a method but it makes testing a bit harder since there is no way to override the activity return. It also makes it inconsistent with the other method of calling it with temporal elsewhere with the same activity/method.

---

<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 29, 2021, 10:53pm UTC](https://community.temporal.io/t/can-an-activity-execute-another-activity/3493/2 "2021-11-29T22:53:23Z")

</div>

Calling activity from an activity is not supported.

> it makes testing a bit harder since there is no way to override the activity return

You can inject any dependency into activity structure to simplify testing.
