Activity interceptor behavior

Hi Temporal team,

A couple questions regarding activity interceptors

  1. Is logic inside activity interceptors treated similar to logic inside an activity method? i.e. if an external API call fails, then retries can be triggered based on retry policy?

  2. I would like to increment a integer defined in the workflow class after every activity commit. Is it possible to be done in activity outbound interceptor? Or perhaps have a layer of indirection around activity method?


  1. Yes.
  2. The variable in the workflow class can be updated only from the workflow interceptor. Activity interceptors should never touch workflows.