BPM start process issue: duplicate ProcInstance

I added code into AfterInsert listener of my entity to autostart an assosiated process and it works well but BPM subsystem created a duplicate ProcInstance too so I cannot even open an entity edit form getting an error “NonUniqueResultException: More than one result was returned from Query.getSingleResult()”.
How can I prevent a creation of duplicate ProcInstance?

please provide a demo project that demonstrates your case. You can create an archive using the ‘zipProject’ gradle task.

I’ve already solved the problem, just switched off initialization of ProcActionsFrame on my create entity form.

1 Like