I am trying to integrate CUBA and our using BPM engine (Camunda).
From CUBA, I can interact with BPM process application using BPM engine’s Java API such as start/stop/send message to the BPM engine.
My question is: can I use java API to work with CUBA entities or managed beans from Process Application which run in BPM engine? Of course I can call Rest API of CUBA, but it would be much better if Cuba Platform support Java API as well for faster development and better performance.
UPDATE: interacting with entities directly from external code is indeed a bad practice, try to interact only at a higher level, like managed beans or REST API. Another option is to write an alternative API based on Spring controller, and do whatever you want (for example use a binary protocol for higher speeds: http://www.baeldung.com/spring-rest-api-with-binary-data-formats )
Actually, I found a solution, sorry for late update:
I added bpm process application code into core module of CUBA project and configure web.xml to have one more listener for that. CUBA and process application now will be in a combined project, and app-core.war files will be deployed on Camunda Tomcat server (shared engine mode). From bpm process application beans, I can now work with CUBA using AppBeans.get() and skip user session using system authentication.