Contributed by Bob May, maintained by Irina Filippova
December 2007
Developer Guide to the BPEL Designer
![]() |
This section explores the capabilities of the BPEL Designer, which enables you to visually author a process diagram that will be automatically generated into BPEL source code compliant with the WS-BPEL 2.0 specification. To fully support round-trip engineering and synchronize the visual diagram and code, the BPEL Designer has Design and Source views.
The Design view is a business processes designer where you can author a diagram of your business process. In the Design view, you add, edit, and delete diagram elements. The diagram constructed in the Design view is automatically generated into BPEL source code compliant with the WS-BPEL 2.0 specification with the exceptions listed in the BPEL 2.0 Language Constructs section of the BPEL Service Engine User's Guide.
The Design view opens by default when you double-click a BPEL source file from a BPEL Module project in the Projects window. To switch to the corresponding place in the Source view, right-click an element in the Design view and select Go to Source (Alt-O).
The Source view shows the underlying code for a business process diagram. The Source view is based on the IDE's XML Source view and provides access to conveniences such as code folding, XML syntax highlighting, and code completion.
You can perform source level editing as well as visual designing. The BPEL Designer will perform round-trip two-way engineering to ensure that the Design view and Source view remain synchronized with each other. The IDE will automatically re-parse the BPEL source file and rebuild the diagram every time you perform manual edits of the source file.
To switch to the corresponding place in the Design view, place a cursor at the line in the Source view, right-click and choose Go to Design (Alt-I).
The Navigator window is a companion of the BPEL Designer. If the Navigator window is not visible, you can manually invoke it by selecting Window > Navigating > Navigator from the main menu or pressing the Ctrl-7 key combination.
The Navigator window provides two distinct views of the BPEL process: BPEL Logical View and XML View. You can switch between the XML View and BPEL Logical View using the drop-down menu in the upper part of the Navigator window.
The XML View is identical to the Navigator view that is available for all XML documents opened in the IDE. The XML View is a companion to the BPEL Source view. Double-click any Navigator node and the Source view adjusts the current line of code to show the selected element.
The Navigator also provides the BPEL Logical View of BPEL processes. When you select BPEL constructs in the Design view, the BPEL Logical View shows the same element selected. Alternatively, when you select a node in the BPEL Logical View's tree, the corresponding element is selected on the diagram.
Right-clicking the nodes in the BPEL Logical View invokes pop-up menus with actions relevant to the particular node. For example, for the Assign element, the actions are Go to Source, Go to Design, Wrap With, Move Up and Move Down, Toggle Breakpoint, Delete, Show BPEL Mapper, and Properties. The Go to Source and Go to Design actions, available for most of the nodes, have associated keyboard shortcuts: Alt-O for Go to Source and Alt-D for Go to Design.
In general, the nodes in the Navigator window correspond to the elements on the diagram. In addition, there are nodes, such as Variables and Correlation Sets, that are related to functionality not directly accessible from the diagram. To view the variables used in the business process, expand the Variables node in the BPEL Logical View of the Navigator window. For variables, the following commands are available in the pop-up menu:
Of particular relevance is the Imports node, which lists XSD and WSDL files referenced with the help of the Import element in your BPEL file. Using the pop-up menu for the Imports node, you can add reference to an XSD or WSDL file. Note that only files located in the project folder may be referenced.
To add a resource file (.wsdl or .xsd) as an import:
You can add properties and property aliases to the WSDL files referenced in the BPEL document.
To add a property to a WSDL file:
To add a property alias to a WSDL file:
For more information on defining properties and property aliases with the WSDL Editor, refer to the Developer Guide to the WSDL Editor.
When the Design view is active, the BPEL Designer Palette is shown. If the Palette is not readily visible, choose Window > Palette from the main menu.
The Palette provides the set of visual elements you use to model business processes. The set of elements in the Palette corresponds to those BPEL elements which the business process author may wish to add to the diagram in a drag-and-drop fashion.
The Palette contains icons for most, but not all BPEL elements. The Palette does not contain icons for the BPEL elements that are only meaningful in the context of parent elements. The Design view supports the construction of these additional BPEL elements via different design idioms not based on the Palette drag-and-drop feature.
When working with large-scale diagrams, you can use the navigation features provided in the Design view.
In the Design view, you can perform the following operations on elements:
After you add BPEL activities to a diagram, you need to configure them. You can do this using either the Property Editor dialog boxes or the IDE's Properties window. Note that Property Editor dialog boxes are available only for some elements.
To open the Property Editor for an element, do one of the following:
To open the Properties window for an element, right-click the element and choose Properties. The properties for this element are displayed in the standard IDE's Properties window. If the IDE's Properties window is not open, choose Window > Properties from the main menu (Ctrl-Shift-7).
The BPEL Designer synchronizes the Design and Source views as follows:
To save changes in the Design or Source view, choose File > Save or press Ctrl-S.
You can print BPEL diagrams and source files and customize printing settings, including border, headers, footers, colors, line numbers, and zooming, to suit your preferences.
To preview and print a BPEL diagram:
To print a BPEL source file:
To customize print options:
You can use the BPEL Designer to edit the source file directly and to have those changes reflected in the Design view.
You might need to edit the source in the following cases:
Activities are diagram elements that represent BPEL activities involved in a message flow.
A message flow is the dashed line that connects a web service activity (Invoke, Receive, Reply) to its corresponding activity in a partner link. This relationship is called a message flow as it designates the flow of information to and from the process.
If you completely configure the Web Service activity by its Properties window, the IDE will render a message flow connector between an activity and a partner activity.
However, you can also directly draw a message flow. To do this:
Note that you cannot directly delete a message flow. You can indirectly delete a message flow by unsetting some of the properties in the the web service activity. Usually, however, you will change a message flow to create a different relationship.
Note also that the drawing tool works only in one direction: from a web service activity within the BPEL process to its corresponding activity in a partner link.
If you want to change an existing message flow connection and establish a new connection with a different target activity, proceed as if you are making the connection for the first time with the preferred pairing. Once you create the new pairing, the IDE automatically removes the old connection.
The following table lists the basic elements that appear on the Palette. Not all BPEL elements are on the Palette; some are created when you right-click the diagram and choose appropriate actions from the pop-up menus.
You can use the Palette Manager to enable, disable, and rearrange the Palette elements. To open the Palette Manager, right-click inside the Palette and choose Palette Manager.
Elements are of the following types:
Icon | Element | Definition |
---|---|---|
Web Service | ||
![]() |
Invoke | Enables the business process to invoke a one-way or request-response operation on a portType offered by a partner; enables this process to send messages to partners. The operation is defined in the partner's WSDL. |
![]() |
Receive | Allows the business process to perform a blocking wait for a particular message to arrive. |
![]() |
Partner Link |
Identifies those web services that will exchange messages with our business process. Each partner link will contain child elements that correspond to the available web service activities supported by that partner link's interface.
Note: You do not directly add elements to a partner link container. The Design view will introspect the partner's WSDL and automatically populate the partner link container with the appropriate child elements. If you need to modify a partner link, edit the partner WSDL files which will allow the Design view to re-render the partner link and thereby reflect the modified interface. |
![]() |
Reply | Enables the business process to send a message in reply to a message that was received through a Receive. |
Basic Activities | ||
![]() |
Empty | An activity that does nothing, useful when you need to catch and suppress a fault. |
![]() |
Wait | Waits until a given point in time or for a specified duration. |
![]() |
Throw | Generates a fault from inside the business process. |
![]() |
Assign | Updates the values of variables with new data. |
![]() |
Exit | Immediately terminates the execution of the business process instance. |
Structured Activities | ||
![]() |
Flow | Specifies one or more activities to be performed concurrently. |
![]() |
Sequence | Defines a collection of activities to be performed sequentially, in lexical order. |
![]() |
If | Selects one branch of activity from a set of choices. |
![]() |
Pick | Blocks and waits for a suitable message to arrive, or for a time-out to expire. When an event specified in the body of the Pick occurs, the Pick completes. Only one of the activities in the body of the Pick actually occurs. |
![]() |
Scope | Defines a nested activity with its own associated local variables, event and fault handlers, and message exchange. |
![]() |
While | Repeats an activity while a condition is true. The condition is checked before the execution of the activity. |
![]() |
Repeat Until | Repeats an activity until a condition is true. It is different from While in that the condition is checked after the execution. |
![]() |
For Each | Repeats an activity exactly N+1 times, where N equals the Final Counter Value minus the Start Counter Value. |