The community members are discussing the differences between using the Context and setting instance properties in a workflow. The main points are:
- The Context does not persist through multiple runs, while setting an instance property would persist the data.
- The advantage of using Context is that in the future it will be able to persist across runs and be stored in a database.
- The Context is not shared between nested workflows, so the community members suggest using the StartEvent to pass data between nested workflows instead.
- The intention behind the design is to promote more modular and reusable workflows, as sharing the Context would make workflows too coupled.
Hi guys, I'm starting to study Workflows so I migrate a current Query Pipeline I have for this new way the framework made available.
I'm seeing I can pass data between steps through Context. But what's the difference of doing that and setting a instance property to my workflow? The only guess I have is that a single instance of Workflow is supposed to be used for many different users. Is that the case? Thanks!
ok, i'm going to pass data to nested workflows using the StartEvent then.
Just asking, is that something that makes sense this context to be shared? It would save some assignements in my code, but it probably has a reason to be designed like this.