getWorkflowStaticData() is not designed to be a reliable persistence layer
between production executions, especially in self-hosted or multi-worker setups.
In production mode, executions can run on different workers or processes,
so static data may not be shared or persisted consistently.
This is why previous_name keeps resolving to null.
Static data works best for:
Temporary state during active executions
Simple counters in single-instance setups
Non-critical metadata
It should not be used as a replacement for durable storage.
If you need reliable persistence between executions, the recommended approach is:
Use a database (Postgres, MySQL, etc.)
Use Redis or another external key-value store
Or store state in an external service
This behavior is documented but often misunderstood.
So what you’re seeing here is expected behavior in production environments.
I’m having the same issue.
I need getWorkflowStaticData since a long time, in the past it worked, but since I have the external runner logic it getWorkflowStaticData isn’t available anymore in a second run
Surprisingly, I see the same after updating to 2.7.0 despite the detailed changelog on Github not mentioning anything about static data (I checked yesterday before posting here)…