Activiti is a workflow and Business Process Management (BPM) platform. Its core is a super-fast and rock-solid BPMN 2 process engine for Java. It's extremely lightweight and based on simple concepts.
The Tapestry-Activiti module allows you to interact with your Activiti instance and its key process entities from Tapestry. You can also call Tapestry services from within your process definition.
In order to start using Tapestry-Activiti, you need to meet the following requirements:
- Some basic knowledge of Activiti, check out their User Manual if you haven't already.
- Have a working BPMN2 process (which can be created using the Eclipse Designer or any other Activit designer tool).
You need the following module in order to use Activiti in your Tapestry application:
These artifacts are available in the maven main repository. No need to configure any additional repositories.
For the module to work, you first need to tell tapestry-activiti what processes need to be deployed:
There are various configuration options that may be set, for example if you want to use a different database other than the default H2 database:
Make sure to check the Tapestry-Activiti Javadocs and the Activiti User Manual for a list of the configuration options that may be set.
How to use Tapestry Activiti
Tapestry-Activiti defines various Activiti services, including:
These can be used throughout your Tapestry application to manipulate the Activiti process.
Initiating a Process Instance
You may use the Activiti services throughout your application using Tapestry injection, for example:
Calling a service method from a process
You may at one point need to call a method defined in a Tapestry service from an Activiti process.
Suppose we have the following service defined:
We could then call this service method from a process by using an Activiti expression:
The service's service-id is always used to reference a service from an Activiti process.