7.3. Running the examples

The Nova Bonita package contains some complete workflow examples. Those examples can be easily compiled, deployed and executed (in both JSE and JEE modes), thanks to a set of "ant" tasks available under examples directory. Hereafter you will find some information about how to play with one of those examples. For others, you can just replace the workflow name on the "ant" tasks:

The build.xml in the root directory contains required targets to compile and launch the example in both standard (JSE) and enterprise (JEE) environments:

The Approval Workflow sample is configured to run together with the default hibernate persistence service. Core Process Virtual Machine entities, XPDL extension as well as execution related data will be persisted in a relational database. By default Nova Bonita embeeds HSQL database and uses it as a default database. You can easily change this default configuration and use your favorite database by modifiying the hibernate.properties file located under "conf" directory.

>ant aw-standalone

This sample application leverages the Security and Identity services so you must provide a right user login/passwd to run the sample. The default identity module (based on a properties file) is provided with three users ("John", "Jack" and "James" logins with "bonita", "jackpass" and "jamespass" as password). All three can login into to system but only John and Jack are able to play in the Approval Workflow sample. This behaviour is due to the users - role mapping defined in the previous workflow sample.

The java example simply deploy the xpdl file as well as advanced java entities such hooks and mappers in the engine (deployBar method in ManagementAPI), then creates a workflow instance and calls getTasksList, startTask and finishTask methods from the RuntimeAPI

This sample application can be launched in both standard and enterprise modes. In the enterprise mode Nova Bonita APIs are available as Stateless Session Beans. Enterprise sample version can easily be executed with the following ant tasks:

>ant aw-jonas4 (for a deployment in JOnAS application server version 4)
>ant aw-jboss4 (for a deployment in JBoss AS version 4)
>ant aw-eb (for a deployment in EasyBeans EJB3 container)

*Note that the enterprise version requires Nova Bonita (bonita.ear file) to be deployed in an application server

Nova Bonita RC2 unit test suite can also be launched from the installation directory (this operation is a good way to check that Nova Bonita was propertly configured)

ant tests