func MyWorkflow(ctx, params) error {
config, _ := workflow.ExecuteActivity(ctx, getConfigActivity)
Logic: 100 lines of parsing config to find params for next activity
}
I provide the sudo-code here, my question is should I wrap the logic part in an activity? I have reasons to support or reject this idea.
-
Pro: so in the next replay of this workflow, this part will be static and not replayed, and if I changed the code here and has some inconsistency logic, it will not affect ongoing workflows with non-deterministic error;
-
Con: sending the message to temporal and asking the activity worker to handle this is too heavy for this if-else logic. Maybe local activity is a better choice?