# What is difference between ActivityInboundInterceptor and WorkflowOutboundInterceptor?

**URL:** <https://community.temporal.io/t/what-is-difference-between-activityinboundinterceptor-and-workflowoutboundinterceptor/10832>\
**Category:** Community Support\
**Created:** [January 29, 2024, 12:05pm UTC](https://community.temporal.io/t/what-is-difference-between-activityinboundinterceptor-and-workflowoutboundinterceptor/10832 "2024-01-29T12:05:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yicheng\_Zhu](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/yicheng_zhu/32/4877_2.png) [@Yicheng\_Zhu](https://community.temporal.io/u/Yicheng_Zhu)\
**Post date:** [January 29, 2024, 12:05pm UTC](https://community.temporal.io/t/what-is-difference-between-activityinboundinterceptor-and-workflowoutboundinterceptor/10832/1 "2024-01-29T12:05:50Z")

</div>

Their interfaces both have a method naming `ExecuteActivity`. Could anyone provide some examples to illustrate their triggering time?

---

<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:** [January 29, 2024, 6:51pm UTC](https://community.temporal.io/t/what-is-difference-between-activityinboundinterceptor-and-workflowoutboundinterceptor/10832/2 "2024-01-29T18:51:43Z")

</div>

ActivityInboundInterceptor is executed in the context of the activity worker and intercepts each attempt (retry) of the activity execution.

WorkflowOutboundInterceptor intercepts an invocation of the activity by the workflow and is executed in the context of a workflow. So, it has to obey all the rules that other workflow code must follow.

---

<div class="post-metadata">

**Author:** ![Yicheng\_Zhu](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/yicheng_zhu/32/4877_2.png) [@Yicheng\_Zhu](https://community.temporal.io/u/Yicheng_Zhu)\
**Post date:** [January 30, 2024, 2:43am UTC](https://community.temporal.io/t/what-is-difference-between-activityinboundinterceptor-and-workflowoutboundinterceptor/10832/3 "2024-01-30T02:43:29Z")

</div>

Thanks for your detailed reply.
