Open ESB Tip : Getting Started With The Back In Black Monitor

Read the original article at The Crooked Stick

Now that I have complete switched over to the "Back In Black" format of the monitor I thought it was about time I put together a new "Getting Started" blog entry to match the new screens and explain the exteneded functionality. The previous entry still exist for those using the older style Monitoring application but as mentioned I will not be updating the old style because the main driver, so far, for the development of the Monitoring UI have been the UK Pre-Sales group. 

<script type="text/javascript"> $(document).ready(function(){ $("#traildiv").load("../resource/bpel-monitor/MonitorTrail.html"); $("#resourcediv").load("../resource/bpel-monitor/MonitorResources.html"); }); </script>

Overview


The Open ESB BPEL Monitoring tool is built upon the standard Open ESB Management and Monitoring API and provides a simple interface to view the running BPEL Processes and their instances. When the Monitor is first displayed, or refresh with the browser, the user will be presented with the Dashboard Tab displaying a summary of the currently deployed / monitored BPEL Processes. Selecting on of these processes will display the selected process with the Process Monitor tab.

Dashboard

Provides the user with a summary of all BPEL Processes that have been deployed and have run to the application server. You may not see all your BPEL processes because the Dashboard only shows processes that have been executed at least once and the monitoring data exists in the database (see Archive and Purge). The Business processes are displayed in Alphabetical order and as can be seen show the following summary information:

  • Running : Count of the currently running processes.
  • Complete : Count of the completed processes.
  • Suspended : Number of currently suspended processes.
  • Faulted : Number of Faulted processes.
  • Terminated : Number of Terminated processes.
  • Last Updated : Last time anything happened to any instance of this processes.
These figures are based on the data in the Monitoring Database so Archiving / Purging the data will affect these values. On the Dashboard tab you will see a small refresh icon that will cause the data to be reloaded which is useful when you do not have the automatic refresh set.

Dashboard

Process Monitor

The Process Monitor is the main Tab that will be used and contains a number of accordion-tabs that display process specific information. The information displayed within this tab is that associated with the select Business Process. When initially selected the Summary information will be displayed this repeats the information displayed within the dashboard row for the selected Business Process. Again the Process Monitor Tab contains a small refresh icon that can be used to manually refresh the displayed data.

Summary Accordion

The summary tab displays the overall aggregated information for all instances of this process that exist in the database since the last Archived / Purged date. In addition if the Show Management Buttons configuration option is selected then the user will also see the following buttons :

  • Suspend All
  • Resume All
  • Terminate All

The affect all instances of the selected process that are currently Running or Suspended.

Process Monitor

Instances Accordion

The Instances tab displays a Filtered list of all instances for the process and are colour coded, based on their status, as follows:

  • Green : Completed.
  • Blue : Running.
  • Red : Terminated / Faulted.
  • Yellow : Selected.

The Filter fields that can be used to restrict and order the displayed instances based on :

  • Staus
  • Max Number Records
  • Sort Column / Order

Once the Refresh button has been pressed the data will be redisplayed appropriately. These settings will be saved as cookies on the users browser and used as the default next time.

In addition if the "Show Management Buttons" has been selected the user will see the Suspend All / Resume All  / Terminated All buttons under the filter fields and for any processes currently Running / Suspended the appropriate Suspend / Resume / Terminate buttons next to the process in the table.

Instances

Process Accordion

Displays the business process in a graphical format that is defined by the configuration properties. If the user would link to see the process as the developer did then selecting a Vertical Orientation and the Open ESB icon will do so. Personally I like the horizontal layout because it uses less screen real-estate. The exact representation displayed depends on what options the user selects in the Configuration tab (see below). In addition to the SVG representation of the Business Process the use has a slider that provides zoom functionality thus allowing the user to fit even large Processes onto the screen.

The image below is displayed with Collapse Composites and User Business Icons set. When Composites are collapsed the user has the ability to click and expand or for those already expanded to collapse using the small blue collapse icon. Thus the user can be very specific about what the view.

Process SVG

When the user selects and instance the displayed Business Process will be updated to indicate the status of the individual Activities within the Business Process thus highlighting where the business process is in its processes and any activities where it is either waiting or broken.

Selected Instance

In addition to this if the Business Process Invokes another, Sub-Process, within the same deployment the user will be able to click on the Invoke and drill down to the Sub-Process. Once you have drilled down you will notice that the Breadcrumb above the scroll bar will be updated to indicate the current drill-down level.

Sub Process

Statistics Accordion

The Statistics Tab will display simple processing Statistics for the Select BPEL Process Instances displayed in the Instance Table and the data is controlled by the same filter criteria. If a specific instance is selected in the instance table the Statistics Accordion will display the processing information for each activity within the selected instance.

Statistics

Activities Accordion

For any selected Instance the user can select the Activities Tab and a table of all the activities within the Process will be displayed along with their associated statistics.

Activities

Variable Accordion

This Accordion allows the user to view and edit, if the instance is suspended, the variables associated with a selected BPEL Instance. Both the Simple and Process Variables are displayed within a simple table.
Variables

If the Variable can be edited then its name will ba a Hyperlink that when click will dynamically generate and edit from above the Variable list.
Edit frame

All fields are created as simple text input with no specific validation (because I am working from an XML with no additional information) and hence the user is responsible for adding the correctly formatted information. When the user has completed the changed selecting Update will write these to the process and this can take a long time for large process variables. Whilst the variable is being updated an indeterminate progress bar will be displayed. On completion the screen will be refreshed and the status displayed.
UpdatingUpdated

BPEL Source Accordion

The Accordion simply displays the Source BPEL Directly to the user. The exact functionality available within the Source Accordion will depend on your browser.

Source

Search

The search tab provides the user with the ability to search either simple BPEL variables or the complex (XML) variables and is only available when the user has selected a BPEL Process. This allows the Monitor to restrict the amount of work done by the search when the user selects the Full search option. At present the user is able to enter a simple search string that will be used as an exact match on the simple search or an contains type match on the full search.
Search

Simple Search

Simple Search

Full Search

Full Search

Configuration

The Configuration Tab allows the user to specify a number of optional parameters that will affect the way that the monitor will be displayed. The configuration parameters available in the present release are as follows and have the functionality described below:

  • Refresh Period : Defines the Refresh period for the data displayed within the Monitor. If this is set to "Manual Refresh" then the monitor data will only be refreshed when the user selects the Browsers Refresh button.
  • Process Layout : Simply defines the display layout for the business process. This allows you to switch between standard OpenESB Vertical layout to a more browser friendly horizontal layout.
  • Icon Set : Defines the Icon Set to be used within the display of the Business Process. At present you can select between the standard Open ESB Icons and an alternative set.
  • Icon Size : Allow the user to select the size of the icons to be displayed. This can be useful for large business processes that do not fit easily on the page.
  • Layout : Additional BPEL Process Layout functions:
    • Show Sequence Names : Display the Sequence Name for all Sequences in the process.
    • Show Scope Names : Display the Scope Name for all scopes within the process.
    • Hide Assigns : Flag to indicate if the Assigns should be displayed within the Business Process. Useful for large business processes.
    • Collapse Composite Activities : Flag to indicate if the Composite Activities (Sequence and Scope) should be collapsed. If this flag is set the user will be able to click the collapsed Activity to expand it and see the contained Activities.
    • Show Management Button : Displays the Suspend / Resume / Terminate buttons on the Instances / Summary screens
    • Show Business Icons : Replaces the standard collapsed Icons with user defined business specific Icons.
    • Bright Activity Colours : Switches to brighter colours for identifying the activity status (useful for projecting the monitor).
  • Theme Switcher : Switches the UI Theme to one of a number of pre-defined colour schemes.

Once the properties have been chosen the "Update" button will apply the settings and redisplay the Process Monitor tab.

Configuration

Archive & Purge

The Archive & Purge Tab allows the user to maintain the data within the BPEL Monitor database. The user has the option of selecting a date before which the records in the Database will be either Archived and Purged or Purged. If the user selects Archive then the record within the Database tables will first be written to archive table:

  • ARCHIVEMONITORBPELACTIVITY
  • ARCHIVEMONITORBPELACTIVITYVARIABLE
  • ARCHIVEMONITORBPELINSTANCE
  • ARCHIVEMONITORBPELVARIABLE
  • ARCHIVEMONITORNMPROPERTY
  • ARCHIVEMONITORNMSIMPLEPROPERTY
  • ARCHIVEMONITORSIMPLEVARIABLE
  • ARCHIVEMONITORVARIABLEATTACHMENT
Once this has been done the purge process is executed and the records removed from the Database tables.
purge
purge
purge

Once the Archive & Purge / Purge has completed the Monitor will display the results of the process indicating how many records were Archived and how many Purged.

Adding New Icon Sets

With the latest release of the Monitor we are able to customise the Monitor Web Application by adding additional Icon Sets. Once added these Icons can be used instead of the standard shipped Icons. The following step show you how to this can be done:

  1. Create an Icon Set of type .png and with the specific names used in the existing Icon Sets. To check you have this correct look in <glassfish domain>/applications/j2ee-modules/BpelMonitor/resources/icons/openesb.
  2. Create a sub directory of <glassfish domain>/applications/j2ee-modules/BpelMonitor/resources/icons to contain your icons (myicons) and copy the icons into it.
  3. Edit the <glassfish domain>/applications/j2ee-modules/BpelMonitor/iconsets.properties file and add the following:

    myicons=My Icons Display Name (This is what will appear in the drop down)

  4. Refresh the monitor page and choose your Icon Set.

Performance Tweaks

If you are seeing some performance degradation when their is a large number of instances within the BPELSE monitoring database we can improve query performance by adding the following indexes to the database.

CREATE INDEX idx_BPELID ON MONITORBPELINSTANCE(BPELID);
CREATE INDEX idx_CRMPINVOKEID ON MONITORBPELACTIVITY(CRMPINVOKEID);
CREATE INDEX idx_CRMPRECEIVEID ON MONITORBPELACTIVITY(CRMPRECEIVEID);

This can be achieved by opening / creating a connection the the bpelseDB within NetBeans and executing the commands against the connection.

Comments:

Hi.
Thanks. This is great work. I like it.
Sometimes I have to refresh dashboard page many times till show list of processes.
Ordering variable could help too.

Posted by Ed Nick on February 19, 2010 at 04:19 AM GMT #

This is excellent stuff. Just two things:

When I try the 'back in black' 20091218 bpel monitor, I get name 'null' in the 'BPEL Process Summary' table under the 'Dashboard' tab. If I try the 'simple bpel monitor' 20091125 I can see my process on the 'Dashboard' tab, but nothing under the 'Process Monitor' tab appears to work, except the 'Summary'. My bpel XML certainly has a name attribute for the root process element. I'm using GlassfishESBv22.

There is a link to the source of the 20091125 bpel monitor under what appears to be CDDL licence. Will the source of the 'back in black' 20091218 bpel monitor become available?

Posted by marnold on March 31, 2010 at 07:43 AM GMT #

Marnold,

I have tried to repro this but unfortunately can't, although I am now running GlassFishESB 2.2, I will attempt a base install from the OpenESB Site and take another look. Does it always say null in the Summary table or only before you have executed any monitor processes. Just to check you have redeployed the BPEL processes since turning on Monitoring.

As far are the source code is concerned I am not planning on distributing the Back in Black version at present because I need to clarify a few things around this.

Posted by Andrew on April 01, 2010 at 01:57 AM GMT #

Andrew,

Thank you for your response and taking the time to look into my problem.

The summary table is empty when there are no BPEL instances. With BPEL instances it always says 'null' under 'Name', but the counts for the 'Running', 'Complete', 'Suspended'... etc and 'Last Updated' are accurate.

I did a little investigation today, and I've found the MONITORBPELPROCESS table is stays empty - which doesn't seem right to me.

This is what I did:

1. Changed the JNDI to an Oracle connection pool. (We run everything on Oracle, so this task had to be completed as part of our evaluation.) This obviously cleared everything out.
2. Made sure 'Monitoring Enabled' and 'Monitor Variable Enabled' checked on the sun-bpel-engine SE
3. Re-deployed my composite application. Command line BPEL monitor now shows my SU and BPEL process, but obviously no instances yet.
4. Kick off an instance of the process. Now get a row in MONITORBPELINSTANCE table. Process shows up in command line BPEL monitor. Your 'Back in Black' 20091218 webapp, under 'Dashboard' shows a single row with 'Name' = null, but other columns look ok (outer join?). This is accompanied with the following exception:

StandardWrapperValve[AjaxGetProcessDashboardSummaryServlet]: PWC1406: Servlet.service() for servlet AjaxGetProcessDashboardSummaryServlet threw exception
java.lang.NullPointerException
at com.tox.web.servlet.AjaxGetProcessDashboardSummaryServlet.getInstanceSummaryList(AjaxGetProcessDashboardSummaryServlet.java:174)
at com.tox.web.servlet.AjaxGetProcessDashboardSummaryServlet.processRequest(AjaxGetProcessDashboardSummaryServlet.java:106)
at com.tox.web.servlet.AjaxGetProcessDashboardSummaryServlet.doGet(AjaxGetProcessDashboardSummaryServlet.java:238)

5. I tried inserting a row into MONITORBPELPROCESS, copying SUNAME from SERVICENAME table and BPELID from MONITORBPELINSTANCE table. (No foreign key constraints!) Now I don't get the NullPointerException, but the 'Dashboard' page is uncahnged: single row, with 'null' as the 'Name', other columns ok.

Another general comment: the BPEL monitoring webapps you've developed seem to use a combination of calls to the monitoring API (BPELManagementService), but also straight SQL. I would like to develop a monitoring webapp similar to yours, but I would much prefer to solely use the API, since hopefully this is protected from changes as OpenESB develops, but the database schema may not. Are there plans to incorporate everything into the monitoring API?

Thanks.

Posted by marnold on April 01, 2010 at 06:08 AM GMT #

Marnold,

I've uploaded a new version that I have built this morning, you mat notice the update icon at the top of your monitor, the actual name is derived from the information in the SERVICEUNIT table. No I have a very simple cache, well you could call it stupid, that simply loads the data from the SERVICE UNIT table the first time you try to access a BPEL process with a SUNAME. Now it maybe that this is an issue and a restart of the GF domain may resolve the problem. Alternatively is could be because I am not decoding the name correctly. Can you tell me what the name of your bpel process is.

The reason I use a conbination of API and SQL is because the API is missing some functionality and also some of the cross linking can be done alot quicker using a simple SQL Query. At the moment I am not sure what will be happening with the API but can I suggest that you pose the question to the users@open-esb.dev.java.net email group and you should get a response from the engineering people.

Posted by Andrew on April 01, 2010 at 08:23 AM GMT #

Are you not going to release the source for back in black?

Posted by Björn on July 09, 2010 at 08:08 AM GMT #

At the moment I don't think I will be able to release the source code for this monitor but I'm still looking into this.

Posted by Andrew on July 12, 2010 at 01:42 AM GMT #

That's a fantastic job!
But how can I get this war file? It seems mediacast.sun.com has been removed..
I'll be appreciate if you can send me the back in black monitor war file.
Thanks a lot.

Posted by Nicholas on September 01, 2010 at 10:16 AM GMT #

Hi I was not aware that mediacast had been removed I will need to look at locating the wars and videos elsewhere. Once done I'll add another comment.

Posted by Andrew on September 07, 2010 at 02:10 AM GMT #

Hello Andrew.
Thank you very much for you work. But, since Nicholas asked you, more than month passed... Please, could you share any kind of sources (white/black), like was there:
http://mediacast.sun.com/users/Toxophily/media/BPELMonitorWebApplication-20091125.zip
thank you

Posted by Pavel on October 13, 2010 at 04:39 AM GMT #

Hi,

I've placed a zipped copy of the Black monitor in an accessible location and updated the link in resource point 2. I'll sort out the rest of the links as soon as I can.

Posted by Andrew on October 25, 2010 at 09:08 AM GMT #

Post a Comment:
Comments are closed for this entry.
About

As a member of the Oracle A-Team we specialise in enabling and supporting the Oracle Fusion Middleware communities.

Search

Archives
« April 2014
MonTueWedThuFriSatSun
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    
       
Today