Petals-SE-Activiti 0.5.0-SNAPSHOT

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

Changes (22)

View Page History
The XSL parameters available to generate the service output reply are:
|| XSL parameter name || Type || Description ||
| {{\{http://petals.ow2.org/se/bpmn/output-params/1.0/special}processInstanceId}} | String | Identifier of the process instance created |
| {{\{http://petals.ow2.org/se/bpmn/output-params/1.0/special}userId}} | String | The user identifier used to create the process 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.
h4. Associating an operation to the completion of a process instance task

The operation completing a task of a process instance is identified by the value *{{userTask}}* set on the attribute {{action}} of the annotation {{\{http://petals.ow2.org/se/bpmn2.0/1.0}operation}}. To guarantee that the expect user task is the right one, the identifier of the expected user task is clarified with the attribute *{{actionId}}*.
The operation completing a task of a process instance is identified by the value *{{userTask}}* set on the attribute {{action}} of the annotation {{\{http://petals.ow2.org/se/bpmn/annotations/1.0}operation}}. To guarantee that the expected user task is the right one, its identifier is clarified with the attribute *{{actionId}}*.

This operation accepts variables and requires the following input parameters:
* process instance identifier, declared using the annotation {{\{http://petals.ow2.org/se/bpmn2.0/1.0}processId}} {{\{http://petals.ow2.org/se/bpmn/annotations/1.0}processId}} containing an XPath expression that is applied on incoming XML payload to get the value of the process instance identifier to use on the BPMN engine side.
* user identifier, declared using the annotation {{\{http://petals.ow2.org/se/bpmn2.0/1.0}userId}} {{\{http://petals.ow2.org/se/bpmn/annotations/1.0}userId}} containing an XPath expression that is applied on incoming XML payload to get the value of the user identifier to use on the BPMN engine side.

Note: The completion status of the task is a variable and so it takes any form.
The XSL parameters available to generate the service output reply are:
|| XSL parameter name || Type || Description ||
| {{\{http://petals.ow2.org/se/bpmn/output-params/1.0/special}processInstanceId}} | String | Identifier of the process instance created |
| {{\{http://petals.ow2.org/se/bpmn/output-params/1.0/special}userId}} | String | The user identifier used to create the process 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. |
| {{\{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 |
* user 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}.

{code:title=WSDL mapping sample}
<wsdl:binding name="Order" xmlns:bpmn="http://petals.ow2.org/se/bpmn2.0/1.0" xmlns:bpmn="http://petals.ow2.org/se/bpmn/annotations/1.0" >
<wsdl:operation name="validOrder">
<bpmn:operation processDefinitionId="order" action="userTask" actionId="validOrder"/>
The operation retrieving process instances is identified by the value *{{retrieveProcInst}}* set on the attribute {{action}}:
{code}
<wsdl:binding name="Order" xmlns:bpmn="http://petals.ow2.org/se/bpmn2.0/1.0"> xmlns:bpmn="http://petals.ow2.org/se/bpmn/annotations/1.0">
<wsdl:operation name="searchOrder" type="...">
<bpmn:operation action="retrieveProcInst" />
h2. Undeploying a service unit

When undeploying a service unit from the SE Activiti, the embedded process definition is deregistered from the BPMN 2.0 engine, and the assocaited associated services are unregistered.
{color:red}Que faire si il y a encore de process instances en cours ?{color}

{color:red}*A completer avec Bertrand*{color}

For this version of the SE Activiti, see [the WSDL of the service|https://github.com/petalslink/petals-se-activiti/blob/petals-se-activiti-0.5.0/src/main/resources/component.wsdl] 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}