Nova Bonita 4.0.1 can be deployed as an embedded library part of Java Standard Edition applications. To do that you need to follow the steps listed below:
- Take the
environment.xmlandenvironment-xml-history.xmlfound in the bonita-runtime-4.0.1/conf folder and include them in your application's folder. - Customize the Hibernate properties files (
hibernate.properties,hibernate-core.propertiesandhibernate-history.properties) according to your database settings (more details can be found on this post) and include them in the same folder you included the XML files mentioned in the previous step. - Add the folder that contains the configuration files provided in steps 2 and 3 to the classpath of your application.
- Add the database drivers necessary to support the selected database engine (configured in step 2) to your application's classpath.
- Add all the libraries (JAR files) found in the bonita-runtime-4.0.1/lib/server folder to your application's classpath.
- Include in your application a JAAS configuration file. The bonita-runtime-4.0.1 package includes a sample file called
jaas-standard.cfg(located in the bonita-runtime-4.0.1/conf folder) that can be use to get things up and running quickly, but it is not suitable for production use. - Set the system property
java.security.auth.login.configwith the path of thejaas-configuration.cfgfile. - Set the system property
org.ow2.bonita.api-typewith the valueStandardto signal the use of Bonita as an embedded engine. - Run the application!
Setting a security environment (steps 6 and 7) and performing a JAAS login in the application are necessary for the Bonita Engine to work properly. The default jaas-configuration.cfg file provided has a very simple implementation of security that lists the user names and passwords in the configuration file itself and must be replaced with a real login module for use with any production application.

hi,
ReplyDeletegreat work!
but can you specify how and where can i set the system properties 'java.security.auth.login.config' and 'org.ow2.bonita.api-type'?
regars
tony
Thanks, I am glad it helped!
ReplyDeleteThere are many ways to set up system properties in Java. The more simple way is to use the -D parameter in the command line, for example:
java -Dorg.ow2.bonita.api-type=Standard -Djava.security.auth.login.config ....
You can also define them in the JAVA_OPTS system variable. For example (in Windows):
set JAVA_OPTS=-Dorg.ow2.bonita.api-type=Standard
Or if you are using Ant, you can set them in the "sysproperty" subelement of the "java" task.
Hi Luis,
ReplyDeletethank you very much.
Antonio
Hi Luis,
ReplyDeleteThanks a lot....similar tutorials are birght and very good. We wait for others....
alis
Hi Alis!
ReplyDeleteI am glad you found them useful.
If there is a specific topic you would like to see discussed, please let me know. I cannot make any promises but I will consider it ;-)
Regards,
Luis!
Hi Alis,
ReplyDeleteAppreciate if you could provide a tutorial on deploy Bonita to IBM Websphere 7.0.
How to Replace Hibernet-core.properties with any DATASOURCE value in Bonita ??
ReplyDeleteIs there any way we can pass JNDI NAMe instead of this .properties file ?