Editing a BPEL process

compared with
Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (18)

View Page History

The BPEL Designer embedded in the studio is a modified version of the official Eclipse BPEL Designer.
The layout is a little bit different, and some bugs were fixed as well.
The layout is a little bit different, and some internal mechanisms were changed too.

!petals-studio-edit-bpel-1.jpg!
\\
The designer is made up of two tabs: one displays a graphical view of the process, while the second one shows the source code of the BPEL.
The graphical tab is divided into three parts:
* The *palette* can be used to select activities to insert on the diagram, or to change UI settings (e.g. the zoom or the mouse icon).
* The *diagram area* is the main area and shows the processing flows.
* The *dashboard* lists non-visual elements of the BPEL process, such as variables and partner links (the BPEL Designer does not make them visible in the diagram itself).

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

A partner link represents a service to invoke. It is associated with a PortType (a WSDL interface) and with roles in the process.
To create a partner link, click the "+" symbol located next to the *Partner Links* category in the dashboard.
Give the new partner link a name. A convention may be to taking the port type (interface) name with "Partner" as the suffix.
Give the new partner link a name. A convention may be taking the port type (interface) name and suffixed by the word "Partner".

!petals-studio-edit-bpel-9.jpg!

\\
Now, import the WSDL of the service / partner link to invoke in the project.
You can either try a manual copy, or use the [import wizard available in the studio|Importing a WSDL Definition].
Because WSDL definitions may draw several file dependencies, it is better to create a sub-directory to place the imported files.
This WSDL must be the definition of the service to invoke. It will be associated with the new partner link.

\\
Select this new port type and click *OK.*
A wizard is opens up and asks for the properties of the partner link.
The first page asks for the name of the partner link type. Generally, it is the port type name, followed by "PT".


To create the invocation, [create a new _Invoke_ activity|Editing a BPEL process#Adding activites in the process].
Give the invocation a name (generally, *invoke_<partner link name>_*) and go into the *Properties* view of this activity.

!petals-studio-edit-bpel-16.jpg!
\\
An invocation needs the following elements:
* The partner link to invoke (this (a partner link is identified by a qualified name).
* The operation to invoke (also identified by a qualified name, as described in the WSDL of the partner link).
* An input variable: which XML message will be sent to the partner link?
* Optionally, an output variable. It depends on the message exchange pattern (is the operation supposed to return something?).
h1. Making assignations

Assignations are BPEL activities to assign elements and attribute values from one variable to another one.
They are created like [any other activity|Editing a BPEL process#Adding activites in the process].
Then, go in the *Properties* view, in the *Details* section.
Assignations are in fact a sequence of field-to-field assignations.
Affecting the value of one element/attribute to another one is one step of the sequence.
There are are many steps as required to have completed the second variable.
There are are many steps as required to have the variable's content complete.

\\
Here is an example of assignation.
First, the variable to assign is initialized with a XML content that matches its XML type.

!petals-studio-edit-bpel-18.jpg!
{tip}
To ensure the portability of your BPEL process, and to avoid issues at runtime, you should always initialize your variables.
This is in particular true for optional elements, taht that cannot always be created automatically.
{tip}