Petals-SE-Activity 1.0.0-SNAPSHOT

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

Changes (44)

View Page History
h2. Creating the service contract

The SE Activity provides a service with several operation for a process definition. A WSDL is associated to this service. This WSDL wcan 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 (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.
h3. Identifying operations

The mapping between operations of the WSDL and operations supported by the SE Activity is declared using a dedicated binding. The binding "Activity" is done adding the element {{{http://petals.ow2.org/se/activity/1.0}operation}} to the element operation of the binding. Its attribute *{{activityAction}}* defines the operation that will be executed.

In the same way, parameters of operations are mapped through an annotation placed inside the message of the binding operation. This annotation is done adding the element {{{http://petals.ow2.org/se/activity/1.0}parameter}} to the input and output messages. This annotation takes two attributes:
* the attribute *{{activityParamName}}* defines the variable name used in the process definition,
* the attribute *{{activityParamValue}}* defines the value to set to the variable using an XPath expression.

{colore:red}*What about fault ?*{color}

h4. Create an instance of a process definition

Because operation in WSDL 1.1 does not allow attribute extensibility, an operation is annotated by adding an {{operationAttr}} element as a child of the operation element. The {{operation}} attribute of {{operationAttr}} specifies the annotation. The value {{createProcInstOp}} identifies the operation creating a new instance of the process definition. An example of such an annotation is shown below.
h5. Operation

The operation creating instances of process definition is identified by the value *{{createProcInstOp}}* set on the attribute {{activityAction}}:
{code}
<wsdl:portType <wsdl:binding name="Order">
<wsdl:operation name="newOrder" type="...">
<psa:operationAttr <activity:operation xmlns:psa="http://petals.ow2.org/se/activity/1.0"
operation="createProcInstOp" activityAction="createProcInstOp" />
<wsdl:input message="NewOrderRequestMessage" />
<wsdl:output message="NewOrderResponseMessage" />
</wsdl:operation>
</wsdl:portType> </wsdl:binding>
{code}

If several operation are annotated by {{createProcInstOp}}, an error is thrown, and the deployment of the service unit is interrupted.
It is possible to map several operations of the WSDL to the creation of process instances, but its has perhaps no sens.

All parameters of the operation are used as parameter to create the instance of the process definition. {color:red}*Peut être ajouter un mapping pour indiquer nom de la variable coté process et type ? Comment gérer les arborescences ?*{color}
h5. Input parameters

h4. Complete the current task of a process instance
{color:red}*TODO. Les types ?; les arborescences*{color}

Because operation in WSDL 1.1 does not allow attribute extensibility, an operation is annotated by adding an {{operationAttr}} element as a child of the operation element. The {{operation}} attribute of {{operationAttr}} specifies the annotation. The value {{completeTaskOp}} identifies the operation creating a new instance of the process definition. An example of such an annotation is shown below.
h5. Output parameters

{color:red}*TODO{color}

h4. Complete task of a process instance

h5. Operation

The operation completing a task of a process instance is identified by the value *{{completeTaskOp}}* set on the attribute {{activityAction}}:
{code}
<wsdl:portType <wsdl:binding name="Order">
<wsdl:operation name="validOrder" type="...">
<psa:operationAttr <activity:operation xmlns:psa="http://petals.ow2.org/se/activity/1.0"
operation="completeTaskOp" activityAction="completeTaskOp" />
<wsdl:input message="ValidOrderRequestMessage" />
<wsdl:output message="ValidOrderResponseMessage" />
</wsdl:operation>
</wsdl:portType> </wsdl:binding>
{code}

If several operation are annotated by {{completeTaskOp}}, an error is thrown, and the deployment of the service unit is interrupted.
It is possible to map several operations of the WSDL to complete tasks, for example when a process can have several task in progress concurrently.

Some parameters are expected for this operation:
* identifier of the task to complete,
* completion status.
These parameters are also annotated into the WSDL, more precisely in the XSD part. {color:red}*Est ce mieux dans le XSD ou dans la definition de l'operation ? Ne serait-il pas mieux d'utiliser l'annotation au niveau de l'operation et de donner les paramètres par une expression XPath ? Même question pour les valeurs OK, KO de completaion de la tache ?*{color}

{color:red}*Mapping des parametres à faire*{color}

h5. Input parameters

{color:red}*TODO. Les types ?; les arborescences*{color}

h5. Output parameters

{color:red}*TODO{color}

h4. Retrieve process instances

Because operation in WSDL 1.1 does not allow attribute extensibility, an operation is annotated by adding an {{operationAttr}} element as a child of the operation element. The {{operation}} attribute of {{operationAttr}} specifies the annotation. The value {{retrieveProcInst}} identifies the operation creating a new instance of the process definition. An example of such an annotation is shown below.
h5. Operation

The operation retrieving process instances is identified by the value *{{retrieveProcInst}}* set on the attribute {{activityAction}}:
{code}
<wsdl:portType <wsdl:binding name="Order">
<wsdl:operation name="searchOrder" type="...">
<psa:operationAttr <activity:operation xmlns:psa="http://petals.ow2.org/se/activity/1.0"
operation="createProcInstOp" activityAction="retrieveProcInst" />
<wsdl:input message="SearchOrderRequestMessage" />
<wsdl:output message="SearchOrderResponseMessage" />
</wsdl:operation>
</wsdl:portType> </wsdl:binding>
{code}

If several operation are annotated by {{retrieveProcInst}}, an error is thrown, and the deployment of the service unit is interrupted.
It is possible to map several operations of the WSDL to search process instance, for example with different search criteria.

Some search criteria parameters are expected for this operation. These parameters are also annotated into the WSDL, more precisely in the XSD part. {color:red}*Est ce mieux dans le XSD ou dans la definition de l'operation ? Ne serait-il pas mieux d'utiliser l'annotation au niveau de l'operation et de donner les paramètres par une expression XPath ?*{color}
h5. Input parameters

{color:red}*TODO. Les types ?; les arborescences*{color}

h5. Output parameters

{color:red}*TODO{color}

h1. Configuring the component