Update after insert but not flushed yet

Hi all,

I create a new camunda user and the DefaultAuthorizationProvider creates the ALL authorization for it. In some cases I want to limit the authorizations so I manually do an update operation afterwards. Problem is that it’s in the same transaction and the insert statement isn’t flushed. What are the clean options I have to solve this best?

Kind regards,

You could subclass the DefaultAuthorizationProvider and customize the behavior.
On the process engine configuration you can then set you custom implementation.

True, but I only want it in certain cases so it might not be the best solution. But ok than I will have to make due with my current workaround; providing a tasklistener on the next task so the data is flushed, or create a new wrapper bean with requires_new transaction where the user is created.