Quickstart Tutorial - View an Existing BPEL File
Table of Contents
Chapter 2. Loading
an Existing BPEL Project and the Associated WSDL Files
2.1 Create a New Project In a Workspace
2.2 Import the Bpemdemo1 Sample
2.4 Import the Associated WSDL File
Chapter 3. Working
With Zenflow Windows and Views
Chapter 4. Working
With Activity Data
4.3 View "Assign" Activity Properties
4.4 View "While" Activity Properties
List of Figures
Figure 2‑1. “bpemdemo1.bpel” Node Display in the Main
Display Window
Figure 2‑2. WSDL File Information Dialog Box
Figure 3‑1. Display of BPEL Process in Graphical Form
Figure 3‑2. Graphical Display of Flow Activity
Figure 3‑3. Scheme Window Display of the Process as a
Tree.
Figure 3‑4. Source Code Window Display of BPEL Code
Figure 3‑5. Properties View Display of a Receive
Statement
Figure 4‑1. Global Variables Display in Source Code View
Figure 4‑2. Display of Global Variables for a Process
Figure 4‑3. Content Outline View
Figure 4‑4. Display of Local Variable in Properties
Window
Figure 4‑5. Variables Dialog for the Local Variable of a
Scope
Figure 4‑6. Display of “Assign” Activity Properties
Figure 4‑7. Special Custom Editor Dialog for “Assign
Definition” Property Line
Figure 4‑8. Display of “While” Activity in Properties
Preface
This tutorial is a guide for using the Zenflow plug-in to examine an existing BPEL process. The major features of Zenflow are emphasized in this tutorial and the user will become familiar with program operation. (The information in this document applies to the Eclipse plug-in version of Zenflow.)
This tutorial assumes that the user has the Zenflow plug-in installed in an appropriate version of Eclipse, and is familiar with basic Eclipse concepts. This tutorial will examine the bpemdemo1 Orchestra sample. No changes will be made to that sample.
The Zenflow plug-in works on BPEL files that are part of a project in a workspace. Perform the steps described in this chapter to create a new Eclipse project and import the existing BPEL file into that project.
1. Start Eclipse and select a workspace.
2.
Then use the
following menu sequence "File -> New -> Project" and choose
General‑>Project to create a new "Simple" project. The project name is user defined,
"bpel" will be used here as an example.
1. Right click on the "bpel" project folder in the package explorer view and select the "Import" menu item.
2. Then select the option for importing from the "File System".
3. Use the Browse button to go to the "bpemdemo1" samples folder that is part of the Orchestra installation. This will be in a location similar to:
"Orchestra
installation location"
\BPEL\samples\bpemdemo1
4. Expand this directory in the "File System Import" dialog and select the check box next to the "bpemdemo1.bpel" file. DO NOT import the WSDL file using this dialog.
In the package explorer, expand the "bpel" project node. Then double click on the "bpemdemo1.bpel" node to open it in the main display window. The display should look similar to the following.
Figure 2‑1. “bpemdemo1.bpel” Node Display in the Main Display Window
Notice the problems identified in the "Problems" window. These have occurred because the Zenflow syntactic analyzer cannot find definitions for all the data types used in the BPEL file. The definitions are not available because the WSDL file for the process has not been loaded yet. Go to the next step to load the WSDL file for the process.
Once the Zenflow plug-in has been referenced by opening a BPEL file, a new "Zenflow" main menu is added to the Eclipse menu bar.
1. Select "Zenflow -> Link WSDL FIles ..." to open the WSDL file information dialog box.
This dialog lists the namespaces referenced by the BPEL file and the WSDL files that contribute to that namespace. Notice that there is no associated file for the namespace "urn:bpemdemo1:bpel:bsoap". This is the cause of the problems identified in the "Problems" window.
2. Press the "Add local WSDL file" button to add the desired WSDL file.
In this case, browse to the same Orchestra directory that contained the original "bpemdemo1.bpel" file, such as:
"Orchestra installation location"\BPEL\samples\bpemdemo1
3. Select the file "bpemdemo1.wsdl". Note - the "partnerlinktype.wsdl" file is "imported" by the "bpemdemo1.wsdl" file. When a WSDL file is loaded into Zenflow, it will (recursively) process all additional WSDL files that are referenced on import statements.
The WSDL dialog should look similar to the following.
Figure 2‑2. WSDL File Information Dialog Box
Notice that there is now a file associated with the namespace. Press the "OK" button to close the dialog.
|
Note: A current program bug prevents the "Problems" window from being refreshed at this time. Closing and opening the project containing the BPEL file, and then double clicking on the BPEL file in the package explorer view will refresh the Problems view. |
The Zenflow plug-in maintains a "cache" of associations between namespaces and the files that contribute to that namespace. This cache is associated with the Eclipse workspace location. The cache eliminates the need to reload the WSDL files each time the BPEL process is opened.
Perform the following steps to see how this cache is used.
1. Close the project by right clicking on the "bpel" project in the package explorer and select "Close Project"
2. Reopen the project by right clicking on the "bpel" folder and select "Open Project".
|
Note: If the explorer window for the package being used has a filter option set to not show closed project folders, then it is necessary to right-click in the background of the project explorer window to bring up the "Open Project" menu. |
3. Double-click on the "bpemdemo1.bpel" file to reopen it.
Notice that the location of the WSDL file is retained and it is not necessary to reload the WSDL files.
This information is made visible by using the menu choice Zenflow ® Link Wsdl Files…
This section provides a description of the various views available in the Zenflow plug-in.
The graphics window displays the BPEL process in graphical form. Each BPEL statement is represented as a node (box) in the display. The display is oriented left to right to represent the logical sequencing of the process. Use the scroll bar to scroll through the window until the "flow" statement is displayed. The display will look like the following.
Figure 3‑1. Display of BPEL Process in Graphical Form
Notice the branching that takes place at the "flow" activity to indicate that at this point there are two parallel paths of execution.
The "+" and "-" icons just to the right of each complex node can be used to expand or contract that node. This eases navigation through large graphs. To see the use of this, collapse the first complex node in each path of the "flow" activity. Click on the "-" icons following the "sequence" statement in the top line, and the "scope" statement in the bottom line. This results in the following display.
Figure 3‑2. Graphical Display of Flow Activity
The scheme window displays the process as a tree. Select the "Scheme" tab in the main display area. The display will look like the following.
Figure 3‑3. Scheme Window Display of the Process as a Tree
Nodes can be expanded and collapsed as expected by using the "+" and "-" icons.
The source code window displays the actual BPEL code. Select the "Sourcecode" tab in the main display area. Your display will look like the following:
Figure 3‑4. Source Code Window Display of BPEL Code
The standard Eclipse properties view is used to display data associated with each activity. Switch back to the graphics display by selecting the "Process" tab in the main display area. Then, if the "Properties" view is not open, select the main menu "Window -> Show View -> Properties". This will display the properties view. Now select different nodes in the graphic (or scheme) display and note that the properties associated with that node are displayed. The "Properties" for the first "Receive" statement in the process are shown below:
Figure 3‑5. Properties View Display of a Receive Statement
This section discusses how to view data associated with the BPEL process and its activities.
Global variables in a BPEL process are defined in a "variables" statement at the beginning of the BPEL file. To see this statement block for the "bpeldemo1" process, switch to the source code view and see the five variable definitions inside the "variables" statement. This is shown below.
Figure 4‑1. Global Variables Display in Source Code View
Switch back to the "Process" view and select the menu "Zenflow -> Variables...". This will display the global variables for the process as shown below.
Figure 4‑2. Display of Global Variables for a Process
Any "Scope" activity in a BPEL process can define local variables. Local variables are viewed by using the "Properties" of the containing "Scope" activity.
To view local variables in this tutorial, use the content outline view to find the node "Path2_with_local_vars".
Figure 4‑3. Content Outline View
This defines a "Scope" that contains local variables. Select this node in the content window and notice that this also selects the node in the graphic display, as well as displaying the properties for the node. In the properties window, select the "local variables" line.
The local variables display should be as follows:
Figure 4‑4. Display of Local Variable in Properties Window
Press the "..." button at the end of this line to open the variables dialog for the local variables of this scope as shown below:
Figure 4‑5. Variables Dialog for the Local Variable of a Scope
In the graphic window, scroll to the left to display the beginning of the activities. Select the third activity. This is an "Assign" statement. The "Properties" window will display the properties for the assignment statement as shown:
Figure 4‑6. Display of “Assign” Activity Properties
Select the "Assign Definition" property line and note the "..." button at the end of the line. This indicates that there is a special custom editor dialog for this property. Press this button to open the assign dialog as shown:
Figure 4‑7. Special Custom Editor Dialog for “Assign Definition” Property Line
The assign dialog displays all the copy statements for the assign activity, and allows creation of new copy statements or deletion of existing copy statement.
In the graphic window, select the fourth activity. This is a "While" activity. The "Properties" window will display the properties for the while statement as shown:
Figure 4‑8. Display of “While” Activity in Properties
Select the "Condition" line and note that the "value" is highlighted. This is the value of the while statement. Since this is simple text, no custom editor dialog is needed to manage it.