View Source

{section}
{column}
As explained in the previous pages, when you work with BPEL in the studio, you must first create a [BPEL Sketch project|Creating a BPEL Sketch project].

Such a project abstracts the BPEL process from Petals constraints.
This page explains how to obtain a deployable archive containing the BPEL process to run in Petals.

{info}
*Level:* Easy
*Estimated time:* 3 minutes
*Expected skills:* -
{info}
{column}
{column:width=350px}
{panel:title=Table of contents}{toc}{panel}
{column}
{section}


h1. Creating concrete Petals projects

In fact, the process is quite simple.
Once your BPEL Sketch project is done, right-click it and select *Petals > Create concrete project(s)*.

!petals-studio-tuto-export-bpel-1.jpg!

\\
The BPEL process is introspected. Eventually, a dialog shows up and lists projects to create.
This list is built in the following way:
* Each partner link is considered to be an external Web service (not in Petals).
** Therefore, each one should be imported in the bus.
** Therefore, each one result in a Service-Unit project for the SOAP component.

* The BPEL process can only run on the Petals component.
** Therefore, there is a Service-Unit project for the BPEL component.

* There is also a Service-Unit project for the SOAP component, that expose the BPEL process as a Web service outside Petals ESB.

* Eventually, there is a Service Assembly project that gathers all the Service-Unit projects together.

!petals-studio-tuto-export-bpel-2.jpg!

\\
For each project, you can decide to create it or not.
The value of this property is defined in the "*\!*" column.
It is also possible to overwrite an existing project, by setting the "*Overwrite*" property.

\\
For each Service-Unit project, it is possible to edit additional properties.
You only have to select one of these projects and update the associated fields.

!petals-studio-tuto-export-bpel-3.jpg!

Click *Finish*.


h1. Packaging the result

The export result in a set of Service-Unit (SU) and Service Assembly (SA) projects.

!petals-studio-tuto-export-bpel-4.jpg!

\\
This phase created Petals artifacts from your BPEL project. Each created artifact is involved in the fact that the BPEL process can now run in Petals ESB.
The export and the sketching approach hid the constraints that apply to a BPEL process to run in Petals ESB.

These projects can be exported for deployment as any [other SU|Working with Service-Unit projects#Export for Petals] and [SA projects|Working with Service Assembly projects#Export for Petals].
Obviously, it is also possible to edit or change things in the exported projects prior to package them.