What is the difference between a Local Activity and a Side Effect?

At least in the Java SDK, they both seem to be a locally executed function whose result becomes part of the event history. Is there any nuance to be aware of when choosing between one or the other?

@Greg_Haskins

There are not any major nuances to be aware of when deciding on which to choose. However, as listed here “A Side Effect does not re-execute upon replay, but instead returns the recorded result.” Also, in the document listed above it goes over what can go wrong when using a failed Side Effect.

Please review over this document going over the benefits of using Local Activities.

Let me know if this helps.

Also, please consider this response when trying to use local activities vs activities.

SideEffect doesn’t support any error handling and non static dependencies. It is also executed inline in the workflow thread, so it should be very fast. So use it only for very simple operations like reading configuration or environment variables that are not ever expected to fail.