Petals-SE-BPMN2 1.0.0-SNAPSHOT

compared with
Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (7)

View Page History
The SE BPMN2 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 mandatory parameters of the operation *are annotated* to retrieve the right values.
* 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 pur WSDL point of view, but also in a SE BPMN2 point of view. See chapter "[Unit testing|#Unit_Testing]".{tip}
{tip}For a unit test purpose, an extension of JUnit is available to test your XSL. See chapter "[Unit testing|#Unit_Testing]".{tip}

{color:red}*What about fault ?*{color}
h4. Identifying faults of operations

When an error occurs on the BPMN engine side, this error can be returned as business fault or technical error. The business fault are declared into the WSDL of the service.

The mapping of an error of the BPMN engine to a business fault is defined using the annotation {{\{http://petals.ow2.org/se/bpmn2.0/1.0}fault}} set as child element of the WSDL fault. The attribute {{name}} will contain a key word identifying the error on the BPMN engine. And the content value is the name of the XSLT style-sheet to use to generate the business fault. The XSL style-sheet is read from the classloader or through a file relative to the root directory of the service unit. The XSL style-sheets are mainly located in the service-units, they can also be packaged as a shared library.

See operation details to known the errors thrown that can be mapped to a business fault.

{tip}For a unit test purpose, an extension of JUnit is available to test your XSL. See chapter "[Unit testing|#Unit_Testing]".{tip}

{anchor:associating_startEvent}
h4. Associating an operation to the creation of an process definition instance
| \{http://petals.ow2.org/se/bpmn/output-params/1.0/process-instance}variable-name | String | Process instance variables. <variable-name> is the name of a process instance variable. |

On this operation, no error thrown by the BPMN engine can be mapped to business fault.

It is possible to map several operations of the WSDL to the creation of process instances, but this has perhaps no sens.

| \{http://petals.ow2.org/se/bpmn/output-params/1.0/task}variable-name | String | Task local variables. <variable-name> is the name of a task local variable. |

The following errors thrown by the BPMN engine can be mapped to business fault:
|| Error || Description || XSL parameters ||
| {{TaskCompletedException}} | The associated user task is already completed | * process instance identifier: \{http://petals.ow2.org/se/bpmn/faults/1.0}processInstanceId
* task identifier: \{http://petals.ow2.org/se/bpmn/faults/1.0}taskId |
| {{ProcessInstanceNotFoundException}} | No active process instance found for the given process instance identifier | process instance identifier: \{http://petals.ow2.org/se/bpmn/faults/1.0}processInstanceId |
| {{UnexpectedUserException}} | The task to complete is assigned to another user identifier | * process instance identifier: \{http://petals.ow2.org/se/bpmn/faults/1.0}processInstanceId
* task identifier: \{http://petals.ow2.org/se/bpmn/faults/1.0}taskId
* task identifier: \{http://petals.ow2.org/se/bpmn/faults/1.0}userId |

A such operation is defined for each task of the process definition to complete. {color:red}*C'est le cas d'un service par tache à terminer. Essayer de mieux expliquer.*{color}.