The Nova Bonita package contains a complete workflow example. This sample is located under examples directory:
The Bonita Simple Project Ever: a simple Approval Workflow process defintion and execution
The build.xml in the root directory contains required targets to complie and launch the example in both standard (JSE) and enterprise (JEE) environments:
The Approval Workflow sample can be run using the 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-db
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" with "bonita" 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 leverage 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 task:
>ant aw-eb
*Note that the enterprise version requires Nova Bonita (bonita.ear file) to be deployed in an application server (i.e Easybeans by default)
Nova Bonita milestone 4 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 test