View Source

{section}
{column}
A BPEL croquis is an alternative to BPEL projects.
They should be used for the cases where you have an external BPEL to run in Petals, or when all or most of the services to orchestrate are not yet imported in Petals.
Once the croquis is completed, it can be exported as concrete Service-Unit (SU) and Service Assembly (SA) projects. The resulting projects are ready for packaging and deployment.

\\
Here is a table to compare BPEL projects and BPEL croquis.

|| Property || BPEL (Service-Unit) Project || BPEL Croquis ||
| Result of the export | A zipped archive to deploy in Petals. | A set of Petals projects (for the BPEL and SOAP components). |
| Constraints | The orchestrated services must be Petals services (e.g. provided through service-units). | \- |
| Scope | It targets the Petals BPEL component. | It indirectly targets both the BPEL and SOAP components. |
| Specific wizard / validation | No. | No (they have similar wizards and validation). |
| Interest | Gather resources for a BPEL service-unit. | Ease and speed up the creation of service-units to run a BPEL process in Petals. |
| Typical use-case | Orchestrate Petals services. | Orchestrate external Web Services. |

\\
From a concrete point of view, the export of a BPEL croquis will go through the BPEL process, find all the partners' WSDL definitions and propose a list of SU and SA projects to create.

{column}
{column:width=350px}
{panel:title=Table of contents}{toc}{panel}
{column}
{section}

h1. Creating a BPEL croquis

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

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

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

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

\\
In the scope of this page, we will use the version 1.0 of the component.
Click Next. A new page appears.

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

\\
This page, and the next ones, are similar to those that are shown in [the creation of a BPEL project|Creating a BPEL project].
Please, refer to [this page|Creating a BPEL project] for the remaining instructions.

\\
On wizard completion, the project is created under the *Croquis* (or *Sketches*) category.

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

h1. Editing a BPEL croquis

A BPEL croquis can be edited [like any other BPEL process|Editing a BPEL process].
One of the differences is that you are not required to orchestrate Petals services. You can work with any WSDL.
Another difference is a specialized export.

h1. Exporting a BPEL croquis

The export process is quite simple.
Once your BPEL croquis is finished, right-click it and select *Petals > Create concrete project(s)*.

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

\\
The BPEL process is introspected. A dialog then 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.
It is also possible to overwrite an existing project, by enabling the *Overwrite* property.
Click *Finish* to run the generation process.


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.
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.