1

Is there any other way to pass on variables between tasks beside using

process.var_name= value
process.save()
activation.done()

and then accessing it like,

activation.process.var_name

limitation with this approach is I have to declare a var_name member in model. I want to escape from declaring new members in model. So any approach for passing variables between tasks without using models.

1 Answers1

0

Viewflow is a thin workflow layer on top of django. So your question could be reformulated as "how to pass an object b/w views in django"

Except if your case is about one task executed immediately after another during single HTTP request processing. In that case, you should use just python functions and pass an object as a parameter as usual. On the viewflow layer - it would be a single task. So no inter-task communication would happen.

One of the goals of BPMN workflow automation is to provide an ability to build performance reports based on the workflow data. So, to report friendly saving workflow data in a process mode is mandatory.

In a very few cases, you can consider use redis or memcached to keep workflow data in it. But it's highly unrecommended.

Another rare case is to combine View and Gateway task in a single custom task node. So you can take a view data and pass it to activation.done to make a branching decision without data saving.

kmmbvnr
  • 5,863
  • 4
  • 35
  • 44