Petals-SE-Activiti 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
{column}

{multi-excerpt-include:Petals-SE-Activityi|name=features|nopanel=true}

{column}


The SE Activityi 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 (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.

{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 Activityi point of view. See chapter "[Unit testing|#Unit_Testing]".{tip}

h3. Identifying operations

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

h3. Identifying input parameters of operations

In the same way, input parameters of operations are mapped through an annotation placed inside the message of the binding operation. Two natures of input parameters exists: the expected input parameters and variables. Each Activityi operation can require mandatory or optional input parameter and can accept to set several variables in the same time.

Input parameters are identified by the annotation adding the element {{\{http://petals.ow2.org/se/activityi/1.0}input-parameter}}. This annotation takes also two attributes:
* the attribute *{{name}}* defines a name of an expected input parameter of the Activityi operation,
* the attribute *{{value}}* defines the value to set to the expected input parameter using an XPath expression.
See operation details to know the expected input parameters.

Variables are identified by the annotation adding the element {{\{http://petals.ow2.org/se/activityi/1.0}variable}}. This annotation takes also two attributes:
* the attribute *{{name}}* defines the variable name used in the process definition.
* the attribute *{{value}}* defines the value to set to the variable using an XPath expression.
See operation details to know if variables can be set.
No extra check is done by the SE Activityi about the compliance of the variable with the process definition.

{color:red}*TODO. Les types ?; les arborescences*{color}
h3. Identifying output parameters of operations

Output parameters of the Activityi operation can not be set into the output reply of the service operation using a simple XPath expression as for input parameters. An XSL style-sheet is required to generated the full output reply. It is identified using the annotation adding the element {{\{http://petals.ow2.org/se/activityi/1.0}output}}. The XSL style-sheet name is set into the attribute {{*xsl*}} and loaded from the classloader. The XSL style-sheets are mainly located in the service-units, they can also be packaged as a shared library.

According to the Activityi operation executed, its output parameters are transmitted to the XSL style-sheet through XSL parameters. You will use these XSL parameters to generate your service reply from your service request payload. See operation details to know the available XSL parameters.

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

The operation creating instances of process definition is identified by the value *{{createProcInstOp}}* set on the attribute {{activityiAction}}:
{code}
<wsdl:binding name="Order" xmlns:activity="http://petals.ow2.org/se/activity/1.0"> xmlns:activiti="http://petals.ow2.org/se/activiti/1.0">
<wsdl:operation name="newOrder" type="...">
<activity:operation activityAction="createProcInstOp" <activiti:operation activitiAction="createProcInstOp" />
<activityi:variable name="customerName" value="/newOrderRequest/customerName" />
<activityi:variable name="address" value="/newOrderRequest/address" />
<activityi:output xsl="newOrderOutput.xsl" />
<wsdl:input/>
<wsdl:output/>
h4. Complete task of a process instance

The operation completing a task of a process instance is identified by the value *{{completeTaskOp}}* set on the attribute {{activityiAction}}:
{code}
<wsdl:binding name="Order" xmlns:activity="http://petals.ow2.org/se/activity/1.0" xmlns:activiti="http://petals.ow2.org/se/activiti/1.0" >
<wsdl:operation name="validOrder">
<activity:operation activityAction="completeTaskOp" <activiti:operation activitiAction="completeTaskOp" />
<activityi:input-parameter name="processInstanceId" value="/validOrderRequest/orderId" />
<activityi:input-parameter name="taskId" value="/validOrderRequest/validationStepId" />
<activityi:variable name="validationApproved" value="/validOrderRequest/isValidated" />
<activityi:variable name="creditCardNumber" value="/validOrderRequest/creditCardNumber" />
<activityi:output xsl="validOrderOutput.xsl" />
<wsdl:input/>
<wsdl:output/>
h4. Retrieve process instances

The operation retrieving process instances is identified by the value *{{retrieveProcInst}}* set on the attribute {{activityiAction}}:
{code}
<wsdl:binding name="Order" xmlns:activity="http://petals.ow2.org/se/activity/1.0"> xmlns:activiti="http://petals.ow2.org/se/activiti/1.0">
<wsdl:operation name="searchOrder" type="...">
<activity:operation activityAction="retrieveProcInst" <activiti:operation activitiAction="retrieveProcInst" />
<activityi:input-parameter name="processInstanceId" value="/searchOrderRequest/orderId" />
<activityi:input-parameter name="isActive" value="/searchOrderRequest/isInProgress" />
<activityi:input-parameter name="responsibleUser" value="/searchOrderRequest/responsibleUser" />
<activityi:input-parameter name="responsibleGroup" value="/searchOrderRequest/responsibleGroup" />
<activityi:output xsl="searchOrderOutput.xsl" />
<wsdl:input/>
<wsdl:output/>
* *JBI parameters* that have not to be changed otherwise the component will not work,
* *CDK parameters* that are parameters driving the processing of the CDK layer,
* and *Activity parametrs" *Activiti parameters" that are relative to the engine "Activityi".

{color:red}*TODO: Mettre une copie en exemple d'un descripteur JBI du SE*{color}
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xmlns:petalsCDK="http://petals.ow2.org/components/extensions/version-5"
xmlns:xslt="http://petals.ow2.org/components/activityi/version-1">

<component type="service-engine">
<identification>
<name>petals-se-activityi</name>
<description>An Activityi Service Engine</description>
</identification>

<component-class-name description="Activity Component class">org.ow2.petals.se.activity.ActivitySe</component-class-name>
<component-class-name description="Activiti Component class">org.ow2.petals.se.activiti.ActivitiSe</component-class-name>
<component-class-path><path-element/></component-class-path>
<bootstrap-class-name>org.ow2.petals.component.framework.DefaultBootstrap</bootstrap-class-name>
<petalsCDK:processor-max-pool-size>50</petalsCDK:processor-max-pool-size>
<petalsCDK:properties-file></petalsCDK:properties-file>
<petalsCDK:jbi-listener-class-name>org.ow2.petals.se.activity.ActivityJBIListener</petalsCDK:jbi-listener-class-name> <petalsCDK:jbi-listener-class-name>org.ow2.petals.se.activiti.ActivitiJBIListener</petalsCDK:jbi-listener-class-name>
</component>
</jbi>{code}
h2. Component specific parameters

These parameters are extracted from parameters available for Activityi 5.1.3:
* 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 Activityi highly available.

h3. Database parameters
h1. Logging

To enable traces of the Activityi engine, you add in the logging configuration file of Petals ESB the following logger with the right level: {{xxxx}}

h1. Monitoring the component
h2. Unit-testing your XSD

A framework is available to unit-test the service unit deployed on the SE Activityi. 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.