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 (29)

View Page History

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

{column}

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}} {{\{}}{{[http://petals.ow2.org/se/activity/1.0]}}{{}operation}} to the element operation of the binding. Its attribute *{{activityAction}}* {{{*}activityAction{*}}} 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 Activity 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/activity/1.0}inpu-parameter}}. {{\{}}{{[http://petals.ow2.org/se/activity/1.0]}}{{}input-parameter}}. This annotation takes also two attributes:
* the attribute *{{name}}* {{{*}name{*}}} defines a name of an expected input parameter of the Activity operation,
* the attribute *{{value}}* {{{*}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/activity/1.0}variable}}. {{\{}}{{[http://petals.ow2.org/se/activity/1.0]}}{{}variable}}. This annotation takes also two attributes:
* the attribute *{{name}}* {{{*}name{*}}} defines the variable name used in the process definition.
* the attribute *{{value}}* {{{*}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 Activity about the compliance of the variable with the process definition.

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

h3. Identifying output parameters of operations

Output parameters of the Activity 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/activity/1.0}output}}. {{\{}}{{[http://petals.ow2.org/se/activity/1.0]}}{{}output}}. The XSL style-sheet name is set into the attribute {{*xsl*}} {{{*}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 Activity 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}

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

h3. Operations
h4. Create an instance of a process definition

The operation creating instances of process definition is identified by the value *{{createProcInstOp}}* {{{*}createProcInstOp{*}}} set on the attribute {{activityAction}}:
{code}
<wsdl:binding name="Order" xmlns:activity="http://petals.ow2.org/se/activity/1.0">
h4. Complete task of a process instance

The operation completing a task of a process instance is identified by the value *{{completeTaskOp}}* {{{*}completeTaskOp{*}}} set on the attribute {{activityAction}}:
{code}
<wsdl:binding name="Order" xmlns:activity="http://petals.ow2.org/se/activity/1.0" >
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.

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

h4. Retrieve process instances

The operation retrieving process instances is identified by the value *{{retrieveProcInst}}* {{{*}retrieveProcInst{*}}} set on the attribute {{activityAction}}:
{code}
<wsdl:binding name="Order" xmlns:activity="http://petals.ow2.org/se/activity/1.0">
* *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" that are relative to the engine "Activity".

{color:red}{*}TODO: Mettre une copie en exemple d'un descripteur JBI du SE{*}{color}
{code:lang=xml}<?xml version="1.0" encoding="UTF-8"?>
<jbi

h2. CDK parameters

The component configuration includes the configuration of the CDK. The following parameters correspond to the CDK configuration.

h3. Database parameters

{center}{*}Configuration of the component, Specific parameter part, Database{*}{center}
{table-plus}

{table-plus}
|| {color:#333333}Parameter{color} || {color:#333333}Description{color} || {color:#333333}Default{color} || {color:#333333}Required{color} || Scope ||
| jdbc-url | URL of the database. The default database is an in-memory database | {center}jdbc:h2:mem:activiti;DB_CLOSE_DELAY=1000{center} | {center}Yes{center} | {center}Installation{center} |
| jdbc-password | Passwrd used for the database connection. | {center}""{center} | {center}Yes{center} | {center}Installation{center} |
| jdbc-max-active-connections | The number of idle connections that the database connection pool at maximum at any time can contain. | {center}10{center} | {center}No{center} | {center}Runtime{center} |
| jdbc-max-idle-connections | The number of active connections that the database connection pool at maximum at any time can contain. | {center}\-{center} | {center}No{center} | {center}Runtime{center} |
| jdbc-max-checkout-time | The amount of time in milliseconds a connection can be 'checked out' from the connection pool before it is forcefully returned. | {center}20000 (20 seconds){center} | {center}No{center} | {center}Runtime{center} |
| jdbc-max-wait-time | This is a low level setting that gives the pool a chance to print a log status and re-attempt the acquisition of a connection in the case that it’s taking unusually long (to avoid failing silently forever if the pool is misconfigured). | {center}20000 (20 seconds){center} | {center}No{center} | {center}Runtime{center} |
h2. Using metrics

Several probes providing metrics are included in the component, and are available through the JMX MBean '{{org.ow2.petals:type=custom,name=monitoring\_}}{{{}*<component-id>*}}', where {{*<component-id>*}} is the unique JBI identifier of the component.

h3. Common metrics
h2. Receiving alerts

Several alerts are notified by the component through notification of the JMX MBean '{{org.ow2.petals:type=custom,name=monitoring\_}}{{{}*<component-id>*}}', where {{*<component-id>*}} is the unique JBI identifier of the component.

{tip}To integrate these alerts with Nagios, see [petalsesbsnapshot:Receiving Petals ESB defects in Nagios].{tip}

{anchor:Unit_Testing}

h1. Unit testing

h2. Validating your WSDL

{color:red}*TODO*{color} {color:red}{*}TODO{*}{color}

h2. Unit-testing your XSD

{color:red}*TODO*{color} {color:red}{*}TODO{*}{color}

h1. Annex: Sample WSDL
</xs:complexType>
</xs:element>

<xs:element name="validOrderRequest">
<xs:complexType>