temporal icon indicating copy to clipboard operation
temporal copied to clipboard

Do not record activity input in the workflow history

Open mfateev opened this issue 2 years ago • 2 comments

Is your feature request related to a problem? Please describe. Activity inputs consume history space and are not used when recovering workflow state through the replay.

Describe the solution you'd like Do not persist activity inputs; in case of failures, reconstruct them by querying or replaying workflow. Assuming that workflow code is deterministic, the inputs can be reconstructed at any time. The same mechanism also can be used to show inputs in UI.

Describe alternatives you've considered Store inputs separately from the history and don't return them by default when replaying workflows.

Additional context Customer using query called by each activity as a workaround:

We have a workflow where we pass the JSON (Object) in all those activities (assume 20) to perform operations. It increases the DB size as well as the history cache. If in the activities we can get it using the stub query it will not be the part of the every activity registered with workflow and inside activity we can query from workflow. Is that the right approach to go with ?

mfateev avatar May 24 '23 14:05 mfateev

I'm not sure how the UI would be able to derive the inputs, it cannot see or run the workflow code.

robholland avatar Jun 12 '23 14:06 robholland

Workflow can implement a special query to produce these inputs through replay.

mfateev avatar Nov 08 '23 00:11 mfateev