WSO2 Business Process Server v3.1.0 Documentation

##### Overview

- Home
- Release Note
- WS-BPEL Compliance
- License

##### Downloads

- Releases

##### Installation Guide

- Installing WSO2 BPS

##### Quick Start Guide

- Modeling the process
- Deploying the process
- Testing the process

##### User Guide

- Deploying BPEL Processes
- Deploying Human Tasks
- Managing BPEL processes
- Managing BPEL process instances
- QoS for BPEL processes
- Securing BPEL processes
- Invoking secured partner services
- Versioning
- Management API

##### Human Task Guide

- Human Tasks Quick Start Guide
- Deploying HumanTasks
- Managing Tasks
- Developing a Human Task Artifact
- Human Task Management and Configuration
- Human Task Concepts

##### Administrator Guide

- External data sources Configuration
- Registry Configuration
- Events
- Unified Endpoints
- BPEL Extensions
- Transaction Factory Configuration
- Message Exchange Interceptors
- OpenJPA specific properties
- JMS Transport Configuration
- Process Instance Cleanup Tasks
- Process Hydration and Dehydration
- Enabling Peer-to-Peer(P2P) Communication
- Setting up a BPS Cluster

##### Best Practices

- Process Deployment Best Practices

##### Concepts

- Process Versioning
- Process instance events
- Partner links

##### WS-BPEL Extensions

- Activity Failure and Recovery
- Extension Activities and Extensible Assign Operations
- XPath Extensions
- Iterable ForEach
- Flexible Assigns
- BPEL4People Extension

##### Samples

- HelloWorld
- If-Else
- ForEach
- While
- Repeat Until
- Flow and Links
- Pick
- Synchronous and Asynchronous Service Invocations
- Fault Handling
- Split
- XslTransform
- Compensation Handler
- Event Handler

##### Resources

- FAQ
- External Articles
- Library
- Source Code

##### Community

- Forum
- Mailing Lists

##### Project Information

- Issue Tracking

# Sample Guide - XslTransform

### Table of Content

- Objective
- Prerequisites
- Overall Idea

### Objective

`doXslTransform(string, node-set, (string, object)*)` function is used to perform XSLT transformations. So BPEL variable values can be transformed into different schemas.

For more details on input parameters, refer http://docs.oasis-open.org/wsbpel/2.0/CS01/wsbpel-v2.0-CS01.html#SA00039_table

Note : Required name spaces -

- `xmlns:bpws="http://docs.oasis-open.org/wsbpel/2.0/process/executable"`
- `queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"`
- `expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"`

`doXslTransform()` should be defined under `"http://docs.oasis-open.org/wsbpel/2.0/process/executable"` namespace.

### Prerequisites

- Log in into BPS server admin console.
- Under Business Processes -> Add BPEL.
- Upload the TestXslTransform.zip , (all samples are located at our sample repository.)
- Under the Business Processes -> Processes.
- Under the WSDL details widget -> Create instance

### Overall Idea

    <copy>
        <from>
            bpws:doXslTransform("HelloXslWorld.xsl", $myVar.TestPart, 'middle', $otherVar)
        </from>
        <to variable="myVar" part="TestPart"/>
    </copy>

In the above `doXslTransform()`, four parameters are passed.

- `HelloXslWorld.xsl` - Style sheet file
- `$myVar.TestPart` - Input source to be transformed
- `middle` - name of the object to be used in the transformation
- `$otherVar` - object which will be referred as 'middle'

Like this `doXslTransform()` accepts pairs of string and objects, so that they can be referred in the style sheet.

eg - in HelloXslWorld.xsl

    <xsl:value-of select="concat(*/content/text(), $middle, ' World')"/>