|
Key
This line was removed.
This word was removed. This word was added.
This line was added.
|
Changes (14)
View Page History{column}
{multi-excerpt-include:Petals-SE-BPMN2|name=features|nopanel=true} {multi-excerpt-include:Petals-SE-Activiti|name=features|nopanel=true}
{column}
h1. Introduction
The version 1.0.0 0.5.0 of the component embeds the BPMN 2.0 engine "Activiti". So, Activiti extensions can be used at the runtime level.
h1. Using the mode "service"
h3. Creating the service contract
The SE BPMN2 Activiti provides a service with several operation for a process definition. A WSDL is associated to this service. This WSDL can be written freely. The user can use its own namespace, its own names, ... It is only constraint by the following rules:
* the operations of the binding section *are annotated* to link them to the supported operations of the process definition (create an instance of the process definition, complete the current task of the process instance, ...)
* the parameters of the operation *are annotated* to retrieve the right values to transmit to the BPMN engine,
* the output and fault of the operations *are annotated* to build the service output from the result of the operation on the BPMN engine side.
* the parameters of the operation *are annotated* to retrieve the right values to transmit to the BPMN engine,
* the output and fault of the operations *are annotated* to build the service output from the result of the operation on the BPMN engine side.
{tip}For a unit test purpose, an extension of JUnit is available to validate your WSDL not only in a pour WSDL point of view, but also in a SE BPMN2 Activiti point of view. See chapter "[Unit testing|#Unit_Testing]".{tip}
h4. Identifying operations
The mapping between operations of the WSDL and operations supported by the BPMN 2.0 embedded in the SE BPMN2 Activiti is declared using a dedicated binding. The binding "BPMN2" is done adding the element {{\{http://petals.ow2.org/se/bpmn2.0/1.0}operation}} to the element operation of the binding. Its attribute *{{action}}* defines the operation that will be executed on the process engine according to the following values:
|| Value of {{action}} || Operation executed on the process engine ||
| {{startEvent}} | Create a new instance of the process. See [Associating an operation to the creation of an process definition instance|#associating_startEvent] for more information on this operation. |
| {{startEvent}} | Create a new instance of the process. See [Associating an operation to the creation of an process definition instance|#associating_startEvent] for more information on this operation. |
See operation details to know if variables can be set.
No extra check is done by the SE BPMN2 Activiti about the compliance of the variable with the process definition.
{color:red}*TODO. Les types ?; les arborescences*{color}
h2. Deploying a service unit
When deploying the service unit on the SE BPMN2, Activiti, the embedded process definition is automatically deployed into the BPMN 2.0 engine, and the associated services are registered.
{note}When a Petals ESB node restarts, all service units previously deployed are redeployed. So if a process definition is already registered in the BPMN 2.0 engine, its registration is skipped without any message.{note}
h2. Undeploying a service unit
When undeploying a service unit from the SE BPMN2, Activiti, the embedded process definition is deregistered from the BPMN 2.0 engine, and the assocaited services are unregistered.
{color:red}Que faire si il y a encore de process instances en cours ?{color}
h1. Using the mode "integration"
h1. Using the mode "integration"
The mode "integration" provides different services to interact directly with the BPMN 2.0 engine embedded in the SE BPMN 2.0. Activiti. It goes back over the BPMN 2.0 engine API. Available services are:
|| Interface name || Service name || Description ||
| {{Runtime}} | {{RuntimeService}} | To manage process instances |
| {{Runtime}} | {{RuntimeService}} | To manage process instances |
{color:red}*A completer avec Bertrand*{color}
For this version of the SE BPMN 2.0, Activiti, see the WSDL of the service and the Activiti Java API documentation to get more information.
{tip}The namespace of interface name and service name is {{http://petals.ow2.org/components/activiti/generic/1.0}}{tip}
These parameters drive features proposed by the component and configure the BPMN 2.0 engine "Activiti 5.14" embedded in the SE:
* activation of the mode 'integration',
* activation of the mode 'integration',
* database parameters. Your are responsible to provide this database according to your needs. And especially, you must assume that the database is highly available to have a SE BPMN2 Activiti highly available.
{center}*Configuration of the component, Specific parameter part, Database*{center}
h2. Unit-testing your XSD
A framework is available to unit-test the service unit deployed on the SE BPMN2. Activiti. It provides facilities for:
* check the compliance of the WSDL with the attendees of the component,
* verify easily the XSL used to generate output replies.
* verify easily the XSL used to generate output replies.
.getResourceAsStream("myService.wsdl");
assertNotNull("WSDL not found as resource !", isWsdl);
assertNotNull("WSDL not found as resource !", isWsdl);
assertIsCompliant("WSDL not compliant with SE BPMN2 Activiti attendes !", isWsdl);
}
namespace="http://petals.ow2.org/se/bpmn2/sample/order" />
<!-- Port bindings to SE BPMN2 Activiti -->
<wsdl:binding name="OrderBinding" type="tns:Order">
<wsdl:operation name="newOrder">
<wsdl:operation name="newOrder">