Quickstart Tutorial - View an Existing BPEL File

Table of Contents

 

Chapter 1.             Prerequisites 1

Chapter 2.             Loading an Existing BPEL Project and the Associated WSDL Files 3

2.1   Create a New Project In a Workspace. 3

2.2   Import the Bpemdemo1 Sample. 3

2.3   Open the File For Display. 4

2.4   Import the Associated WSDL File. 5

2.5   Zenflow WSDL Cache. 7

Chapter 3.             Working With Zenflow Windows and Views 9

3.1   Main Graphics Window.. 9

3.2   Scheme/Tree Window.. 11

3.3   Source Code Window.. 11

3.4   Properties View.. 12

Chapter 4.             Working With Activity Data. 13

4.1   View Global Variables 13

4.2   View Local Variables 14

4.3   View "Assign" Activity Properties 16

4.4   View "While" Activity Properties 18

 

List of Figures

 

Figure 2‑1.    “bpemdemo1.bpel” Node Display in the Main Display Window.. 4

Figure 2‑2.    WSDL File Information Dialog Box. 6

Figure 3‑1.    Display of BPEL Process in Graphical Form.. 9

Figure 3‑2.    Graphical Display of Flow Activity. 10

Figure 3‑3.    Scheme Window Display of the Process as a Tree. 11

Figure 3‑4.    Source Code Window Display of BPEL Code. 11

Figure 3‑5.    Properties View Display of a Receive Statement 12

Figure 4‑1.    Global Variables Display in Source Code View.. 13

Figure 4‑2.    Display of Global Variables for a Process 13

Figure 4‑3.    Content Outline View.. 14

Figure 4‑4.    Display of Local Variable in Properties Window.. 15

Figure 4‑5.    Variables Dialog for the Local Variable of a Scope. 15

Figure 4‑6.    Display of “Assign” Activity Properties 16

Figure 4‑7.    Special Custom Editor Dialog for “Assign Definition” Property Line. 17

Figure 4‑8.    Display of “While” Activity in Properties 18

 


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



Chapter 1.      Prerequisites

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.

 


Chapter 2.      Loading an Existing BPEL Project and the Associated WSDL Files

 

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.

 

2.1                       Create a New Project In a Workspace

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.

2.2                       Import the Bpemdemo1 Sample

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.

 


2.3                       Open the File for Display

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

 


2.4                       Import the Associated WSDL File

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

 


2.5                       Zenflow WSDL Cache

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…

 


Chapter 3.      Working With Zenflow Windows and Views

This section provides a description of the various views available in the Zenflow plug-in.

3.1                       Main Graphics Window

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 31.    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 32.    Graphical Display of Flow Activity

 


3.2                       Scheme/Tree Window

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 33.    Scheme Window Display of the Process as a Tree

 

Nodes can be expanded and collapsed as expected by using the "+" and "-" icons.

 

3.3                       Source Code Window

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 34.    Source Code Window Display of BPEL Code

 

3.4                       Properties View

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 35.    Properties View Display of a Receive Statement

 


Chapter 4.      Working With Activity Data

This section discusses how to view data associated with the BPEL process and its activities.

4.1                       View Global Variables

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 41.    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 42.    Display of Global Variables for a Process

 


4.2                       View Local Variables

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 43.    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 44.    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 45.    Variables Dialog for the Local Variable of a Scope

 


4.3                       View "Assign" Activity Properties

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


4.4                       View "While" Activity Properties

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