Access to Bonita Engine using local API
I have a web application that running in the same server (Tomcat Server) that bonita.war running (I'm using BOS 5.9). Now I want to migrate this webapp to BonitaBPM 7.0 but I have a problem.
I'm wanting to access to Bonita Engine from this web application (war) deployed in the same tomcat where it is bonita.war. I'm setting the engine access through local API
In my war, I include dependencies bonita-common.jar and bonita-client.jar, but when I run the test (a servlet trying to login to the engine) tells me that there is no ServerAPI class (which is in bonita-server.jar). If I included bonita-server.jar in my war, I get the error that the platform is not initialized/started (it is as if to start another engine)
One option is to do as in version 5.x, where the bonita's jars was in tomcat lib directly. is possible to do that?
or, is possible deploy a war in the same server and it access through the local API?
yes, if you want to use the local mode you need to embed the bonita-server in your application and handle all the platform life cycle (creation, start - see http://documentation.bonitasoft.com/create-your-first-project-engine-api...).
If you want to re-use the engine embeded by the bonita.war, in this case you can use the Bonita BPM Portal to manage the platform lifecycle and use the HTTP mode to access the engine (http://documentation.bonitasoft.com/development-overview-2#L365)
Then If I can re-use the engine, the only option to use is HTTP mode access. This being so, the local api can not be used, it is for the exclusive use of the portal and as much as my 2 war (bonita.war and myapp.war) are on the same container, I must use HTTP api and make calls through access remote.