View Source

{section}
{column}

h1. Introduction

To create a BPEL process to run in Petals, you can either [import a BPEL script|Running an external BPEL process in Petals ESB] or create a Petals BPEL project.

This is the second approach that is explained here.
Three creation modes are illustrated. They all show how to to start a BPEL project.
{column}
{column:width=350px}
{panel:title=Table of contents}{toc}{panel}
{column}
{section}


h1. Getting started

In the menu, select *File > New > Petals Service Provider*.
If you do not see it, go into *File > New > Other...* Then, select *Petals Service Provider* under the *Petals* category.

\\
A wizard opens, showing three drop-down lists.
In the *Use Case* list, select *Use a Petals technical service*.
In the *Petals Component* list, select *BPEL // petals-se-bpel*.
In the *Component Version* list, select the version of the Petals-SE-BPEL that you are using in Petals.

!petals-studio-create-bpel-2.jpg!

In the scope of this page, we will use the version 1.0 of the component.
Click *Next*. The next page gives you the choice between 2 creation ways.


h1. Creating a BPEL process from a Template

On the next page, select *Create a BPEL process from a Template*.

!petals-studio-create-bpel-tpl-1.jpg!

\\
Give the process a name and define the target namespace.

!petals-studio-create-bpel-tpl-2.jpg!

\\
Click *Next*.
The next page is about selecting the template you want and filling-in the properties of the selected template.

!petals-studio-create-bpel-tpl-3.jpg!

\\
Click *Next*.
The next page expects the project name.
The process name will be extracted from it.

!petals-studio-create-bpel-4.jpg!

Click *Finish*.

\\
The project is created.
It contains a basic BPEL process...

!petals-studio-create-bpel-sketch-6.jpg!

\\
... with a WSDL definition and an Artifacts WSDL.

!petals-studio-create-bpel-sketch-5.jpg!


h1. Generating a BPEL from a WSDL definition

On the next page, select *Generate a BPEL process from a service description*.
Give the process a name and define the target namespace.

!petals-studio-create-bpel-td-1.jpg!

\\
Click *Next*.
On the next page, specify the WSDL URI.

!petals-studio-create-bpel-td-2.jpg!

\\
You can use the helpers to select a WSDL in the workspace or on your local file system.

!petals-studio-create-bpel-td-3.jpg!

\\
Click *Next*.
The next page expects the project name.
This name will also act as the process name.
By default, it is generated from the WSDL name.

!petals-studio-create-bpel-4.jpg!

Click *Finish*.

\\
The project is created.
It contains a BPEL process that was generated from the WSDL definition...

!petals-studio-create-bpel-sketch-13.jpg!

\\
... with the imported WSDL definition and an Artifacts WSDL.

!petals-studio-create-bpel-sketch-14.jpg!

\\
{info}
The process on the last pictures may seem unusual.
In fact, the WSDL definition contains a lot of operations.
To make it readable, the BPEL designer switched to the horizontal layout.
{info}