| The page Petals-SE-Activity does not exist. |
Table of contents Contributors
No contributors found for: authors on selected page(s)
|
Creating a service-unit for a process definition
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 wan 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 port type 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.
Identifying operations
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.
<wsdl:portType name="Order"> <wsdl:operation name="newOrder"> <psa:operationAttr xmlns:psa="http://petals.ow2.org/se/activity/1.0" operation="createProcInstOp" /> <wsdl:input message="NewOrderRequestMessage" /> <wsdl:output message="NewOrderResponseMessage" /> </wsdl:operation> </wsdl:portType>
If several operation are annotated by createProcInstOp, an error is thrown, and the deployment of the service unit is interrupted.
All parameters of the operation are used as parameter to create the instance of the process definition. Peut être ajouter un mapping pour indiquer nom de la variable coté process et type ? Comment gérer les arborescences ?
Complete the current task of a process instance
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.
<wsdl:portType name="Order"> <wsdl:operation name="validOrder"> <psa:operationAttr xmlns:psa="http://petals.ow2.org/se/activity/1.0" operation="completeTaskOp" /> <wsdl:input message="ValidOrderRequestMessage" /> <wsdl:output message="ValidOrderResponseMessage" /> </wsdl:operation> </wsdl:portType>
If several operation are annotated by completeTaskOp, an error is thrown, and the deployment of the service unit is interrupted.
Some parameters are expected for this operation:
- identifier of the process instance,
- identifier of the task to complete,
- completion status.
These parameters are also annotated into the WSDL, more precisely in the XSD part. 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 ?
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.
<wsdl:portType name="Order"> <wsdl:operation name="searchOrder"> <psa:operationAttr xmlns:psa="http://petals.ow2.org/se/activity/1.0" operation="createProcInstOp" /> <wsdl:input message="SearchOrderRequestMessage" /> <wsdl:output message="SearchOrderResponseMessage" /> </wsdl:operation> </wsdl:portType>
If several operation are annotated by retrieveProcInst, an error is thrown, and the deployment of the service unit is interrupted.
Some search criteria parameters are expected for this operation. These parameters are also annotated into the WSDL, more precisely in the XSD part. 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 ?