Just wondering when does the Flowable BPM Engine start writing variables to the DB? Our workflows are mostly synchronous and there are input form variables that we do not want to saved into the DB. Unfortunately we can’t turn off the history auditing as the workflows rely on some variables set as output results.
As work around I was hoping that Flowable only saves the history variables when the synchronous process has completed. I was thinking of copying the values of these form variables to transient variables and remove them at the start. Will this work? Thanks.
Are you using the JSON form definition of Flowable to start the workflow or did you create your own form logic? If you use your own form logic you can use the ProcessInstanceBuilder to start the workflow with transient variables from the start http://www.flowable.org/docs/javadocs/org/flowable/engine/runtime/ProcessInstanceBuilder.html . Otherwise, your solution of copying the values of the form variables to transient variables and remove them would work as well.
Thanks for this. The transient variables solved the intput part. However we still have the ‘output’ variables for the consumers. Is there an alternative to return results without having to make these as global variables? If not - is there a way to automatically delete the process instance?
Is your process fully running from start to end? If so, if you use a pojo as transient variable, you can use it to set ‘result data’.