Nova Bonita Workflow APIs for handling workflow definition, deployment, execution and history.
Nova Bonita is the name of new version of Bonita v4.
“Nova” technology is based on the “Process Virtual Machine”
conceptual model for processes. The Process Virtual Machine defines a
generic process engine enabling support for multiple process languages
(such BPEL, XPDL…).
Nova Bonita M3 is an extensible and embeddable workflow solution that can be
easily deployed in both standard (JSE) and Enterprise (JEE) environments.
- Nova Bonita can be easily integrated in your application as a workflow library. In that
case your application can directly reach the workflow APIs as POJOs.
- Nova Bonita can also be deployed in a JEE application server and so leverage it remotely
thanks to the Workflow Session Beans APIs.
As a example of this, Nova Bonita provides a default JEE integration with a EJB3 lightweight container
such Easybeans
. You can easily deploy Nova Bonita in another JEE application server by just deploying the bonita.ear file in your
favorite application server.
Nova Bonita APIs are divided into 5 different areas:
- {@link
org.ow2.bonita.facade.DefinitionAPI}: to get definition
workflow data for packages,
processes, activities, role mappers, .....
- {@link
org.ow2.bonita.facade.RuntimeReadOnlyAPI}: to get tasks (aka manual activities)
for the authenticated user as well to
get/list variables in a particular or a set of workflow instances.
- {@link
org.ow2.bonita.facade.RuntimeAPI}: to manage process,
instance and task life cycle operations as well as to set/updates variables.
- {@link
org.ow2.bonita.facade.QueryAPI}: to get recorded/runtime
informations for packages,
processes, instances, activities, tasks (will add support for dynamic queries
in the future).
- {@link
org.ow2.bonita.facade.DeployerAPI}: to deploy workflow processes into the engine. XPDL files and advanced entities
such hooks, mappers and performer assignments can be deployed individually or in one shot.
Nova Bonita Use Case 1: Bonita used as a java library inside your application
The java APIs can be accessed thru
an API accessor object as described in the above example.
APIAccessorImpl
accessor = new APIAccessorImpl();
RuntimeAPI
runtimeAPI = accessor.getRuntimeAPI();
ReadOnlyAPIAccessorImpl accessorRO = new ReadOnlyAPIAccessorImpl();
RuntimeReadOnlyAPI
RuntimeReadOnlyAPI = accessorRO.getRuntimeAPI();
There are 2 different accessor interfaces available:
- {@link
org.ow2.bonita.facade.ReadOnlyAPIAccessor}: to get access to
DefinitionAPI, RuntimeReadOnlyAPI, QueryAPI interfaces.
- {@link
org.ow2.bonita.facade.APIAccessor}: to get access to RuntimeAPI,
DeployerAPI interfaces.
APIAccessorImpl and ReadOnlyAPIAccessorImpl classes implements
those interfaces.
Instantiation of these classes gives access to the expected bonita API.
Nova Bonita Use Case 2: Bonita used as a server
application
The session Bean APIs can be accessed by simply executing a
lookup on the
expected API interface. The jndi name is the name
of the java interface.
RuntimeAPI
runtimeAPI = (RuntimeAPI) initialContext.lookup("runtimeAPI");
RuntimeReadOnlyAPI runtimeReadOnlyAPI =
(RuntimeReadOnlyAPI) initialContext.lookup("RuntimeReadOnlyAPI");
Note:
- Authentication action has to be performed before getting the API
interface.
- To package and deploy Bonita within the Easybeans EJB 3 container, see the
documentation into the package (you could extrapolate those instructions to any other JEE application server).
- A complete example (Approval Workflow) illustrating both standard and enterprise deployments is
provided into the delivered package (available under
Nova_Bonita_Install_Directory/examples/approvalWorkflow).