Comments
Richard Davies wrote: The UK has a good crop of technology pioneers in cloud computing - for example ElasticHosts, FlexiScale, Flexiant, OnApp - and also some strong government initiatives such as G-Cloud. We will have to see whether this kind of technical leadership converts into swift mass-market adoption or not.
Cloud Expo on Google News


2008 West
DIAMOND SPONSOR:
Data Direct
SOA, WOA and Cloud Computing: The New Frontier for Data Services
PLATINUM SPONSORS:
Red Hat
The Opening of Virtualization
GOLD SPONSORS:
Appsense
User Environment Management – The Third Layer of the Desktop
Cordys
Cloud Computing for Business Agility
EMC
CMIS: A Multi-Vendor Proposal for a Service-Based Content Management Interoperability Standard
Freedom OSS
Practical SOA” Max Yankelevich
Intel
Architecting an Enterprise Service Router (ESR) – A Cost-Effective Way to Scale SOA Across the Enterprise
Sensedia
Return on Assests: Bringing Visibility to your SOA Strategy
Symantec
Managing Hybrid Endpoint Environments
VMWare
Game-Changing Technology for Enterprise Clouds and Applications
Click For 2008 West
Event Webcasts

2008 West
PLATINUM SPONSORS:
Appcelerator
Get ‘Rich’ Quick: Rapid Prototyping for RIA with ZERO Server Code
Keynote Systems
Designing for and Managing Performance in the New Frontier of Rich Internet Applications
GOLD SPONSORS:
ICEsoft
How Can AJAX Improve Homeland Security?
Isomorphic
Beyond Widgets: What a RIA Platform Should Offer
Oracle
REAs: Rich Enterprise Applications
Click For 2008 Event Webcasts
SYS-CON.TV
Top Links You Must Click On


BPM Offline Viewer
A BEA WebLogic Integration 7 Tool

Developers of workflow-based applications with the Business Process Modeler (BPM) component of BEA WebLogic Integration Version 7 use a powerful, feature-rich, graphical editor, called Studio, to design workflow templates and to monitor the progress and state of runtime instances of templates.

As Figure 1 shows, Studio is an online tool: it calls the WebLogic Integration server application to retrieve information about workflows or to commit changes. This information is ultimately stored in a database; internally, much of what the WLI application does is converse with the database.

 

But what if the server goes down? Studio is rendered inoperative. Developers and other users can no longer monitor workflows; no such tools are provided with WebLogic Integration. The obvious solution is to look directly in the database for relevant workflow information. But the Integration database is unintelligible to most users: even if you understand the table structure, you still have to contend with the fact that most of the critical information in the tables is hidden in binary fields, which only WebLogic Integration knows how to interpret. You cannot glean much from exploring the database in your favorite SQL editor.

The solution is a new tool, called BPM Offline Viewer, which queries the database directly and unearths the critical information, thanks to its inside knowledge of the layout of WebLogic Integration data (see Figure 2).

 

Why Is an Offline Viewer Important?
When BPM is used in an enterprise project, it is often one of the most important pieces of the architecture. Workflow, the key entity of BPM, is often referred to as a "choreographer" of human and external system actors, coordinating their activities in a formal business process, and making something coherent from it all. There are plenty of stakeholders who care about, and want to be able to track, workflows in flight. If the server is down, the stakeholders still need to query workflows. The data is important because:
1.  The information is valuable in its own right from a business point of view, and should be visible whether or not the server is up.
2.  If the server has crashed, the information might provide clues to why, like a "black box" for a doomed aircraft.
3.  If the server is unstable and cannot be restarted, knowing the state of the workflows enables the business to continue the processes by alternate means, such as manually.

About BPM Data
Of the many tables that constitute the BEA WebLogic Integration data model, three hold all of the information pertinent to workflow templates and instances (see Figure 3).

 

The design of a workflow (i.e., the logical sequence of steps developed in BPM Studio) is held in the tables TEMPLATEDEFINITION and TEMPLATE. A template, identified by a unique name and ID (NAME and TEMPLATEID fields, respectively), can have zero or more template definitions. Normally a template has one definition, but having multiple definitions is useful for versioning. For example, a template might have two definitions, only one of which is active. If there are any instances of the inactive definition, they will run to completion under that version, but new instances will run against the active definition. The actual "source code" of the workflow is held in the DATA field of the template definition table, though it is entangled with other control data. The DATA field is a binary type (a LONG RAW type in Oracle) containing serialized Java objects, one of which is an XML document representing the source code.

Runtime instances of a workflow are captured in the INSTANCE table. Most of the important state information (such as the values of workflow variables and the state of workflow tasks) is contained in the DATA field, which again is a binary stream of serialized Java objects.

Knowing how to read and interpret the contents of these binary data fields requires knowing how they were assembled in the first place - in other words knowing how, in the bowels of WebLogic Integration data is persisted to the database. Without divulging any product secrets, Listing 1 shows how, generically, to read one of these fields.

The data, stored in memory as a byte array, is fed into a standard Java ObjectInputStream (Listing 1, line 9). Objects - representing template definition source code, instance variables, runtime task state and other information - are then read from the stream one by one (lines 12-15). Of course, the objects are of no use unless you know what they are and what they are for. You must know:

  1. How many objects are in the stream
  2. The order of objects in the stream
  3. What each object is

Code like this is at the heart of the BPM offline viewer tool.

Tools
The offline viewer consists of three tools:

  • Template Viewer: A command-line tool that retrieves and prints information about a workflow template and each of its definitions. The inputs are database connection parameters (JDBC driver name, URL, user name, and password) and either the template ID or template name. The output is an XML document, which can be fed through the report generator to create an HTML report.
  • Instance Viewer: A command-line tool that retrieves and prints information about an instance of a workflow template. The inputs are database connection parameters and the instance ID. The output, again, is an XML document, which is the basis for a report.
  • Report Generator: A command-line tool that generates an HTML report for one of the viewers above. The inputs are the file names of an XSL and XML document. The output is an HTML document, which can be shown in a browser.

    Template Viewer Tool
    The template viewer tool prints out information about a workflow template and each of its definitions. In BPM Studio, the equivalent information is presented on a design canvas, as shown in Figure 4.

     

    The XML generated by the tool is lengthy and tedious, but when fed through the report generator it is useful and informative (see Figure 5).

     

    The template viewer tool is called with the following command line:

    java com.bea.tools.OfflineTemplateDetail $DBDRIVER $DBURL $DBUID $DBPWD -t $TID $FILE

    The parameters are:

  • DBDRIVER: Class name of JDBC driver used to connect to WebLogic Integration database
  • DBURL: JDBC URL of WebLogic Integration database
  • DBUID: User ID to connect to the database
  • DBPWD: Password to connect to the database
  • TID: Template ID that you are interested in.
  • FILE: Name of output file to write XML document to

    For example, Listing 2 will gather information about template 101002 and output the results to 101002.xml.

    The XML document output by the tool contains the following information:

  • Template ID
  • Template Name
  • Template Definition ID
  • Effective and expiry dates of template definition
  • Template Definition XML, which is the source code of the definition in XML form

    Instance Viewer Tool
    The instance viewer tool prints out information about an instance of a workflow template, notably the values of its variables and the status of its tasks. Figure 6 shows BPM Studio's online view of a workflow instance:

     

    The tool generates XML that is, as in the case of the template viewer, overwhelmingly detailed. But the report generator saves the day with the HTML view shown in Figure 7.

     

    The instance viewer tool is called with the following command line:

    java com.bea.tools.OfflineWorkflowDetail $DBDRIVER $DBURL $DBUID $DBPWD $WFID $FILE

    The parameters are the following:

  • DBDRIVER: Class name of JDBC driver used to connect to the BEA WebLogic Integration database
  • DBURL: JDBC URL of the WebLogic Integration database
  • DBUID: User ID to connect to the database
  • DBPWD: Password to connect to the database
  • WFID: Workflow instance ID that you are interested in
  • FILE: Name of output file to write the XML document to

    For example, Listing 3 will gather information about workflow instance 1155003 and output the results to 1155003.xml.

    The XML document output by the tool contains the following information:

  • Template ID
  • Template Definition ID
  • Name of the template
  • Start and completion time/date of instance
  • Status of each task: Task ID, start and completion date/time, assignee, and other data
  • Workflow variable summary: Name, type, value, and other information, for each variable

    Report Generator
    The report generator takes the XML document created by the template or workflow tool and applies an XSL style sheet to it to produce an HTML document that can be viewed in the browser. Default style sheets are provided for template and workflow report types or users can substitute their own style sheet. The report generator is called as follows:

    java com.bea.tools.OfflineReportGenerator $XML $XSL $HTML

    The parameters are:

  • Name of XML file produced by the template or instance viewer tool
  • Name of the XSL file to generate the report. Use "WorkflowOffline.xsl" for instances, and "TemplateOffline.xsl" for templates
  • Name of the HTML file to be generated by applying the XSL to the XML

    For example, the following code snippet generates the HTML report "101002.html" for template 101002:

    java com.bea.tools.OfflineReportGenerator 101002.xml TemplateOffline.xsl 101002.html

    The snippet generates the HTML report "1155003.html" for instance 1155003:

    java com.bea.tools.OfflineReportGenerator 1155003.xml WorkflowOffline.xsl 1155003.html

    Limitations
    This offline tool has only been tested on BEA WebLogic Integration 7. Its magic is in its ability to read hidden binary data in the WebLogic Integration database, but the structure of this data changes from release to release. Minor modifications to the tool would allow it to run properly against earlier versions of WLI (1.x, 2.x), which are similar in implementation to release 7.

    WebLogic Integration 8.1
    As for the latest version of BEA WebLogic Integration (release 8.1), it is so dissimilar to release 7.0 that it is almost a different product. In WebLogic Integration 8.1, template definitions are designed in the offline BEA Weblogic Workshop design tool rather than the online BPM Studio. WebLogic Workshop eliminates the need for the offline template viewer tool. As for instance data, WebLogic Integration 8.1 introduces a new data model and the concept of runtime versus archived data, neither of which the current implementation of the instance viewer is designed to handle.

    Summary
    The BPM Offline Viewer is valuable to users of the BPM subsystem of BEA WebLogic Integration 7.0. It extends the capabilities of this popular product by providing offline viewing and monitoring. Considering the importance and centrality of BPM on most projects in which it is used, offline capabilities are critical.

  • About Michael Havey
    Michael Havey is a Chordiant consultant with 10 years of industry experience, mostly with application integration. Michael's book Essential Business Process Modeling was published by O'Reilly in August 2005.

    In order to post a comment you need to be registered and logged in.

    Register | Sign-in

    Reader Feedback: Page 1 of 1

    Enterprise Open Source Magazine Latest Stories . . .
    Apache Deltacloud, the Red Hat-contributed ReSTful API that abstracts differences between clouds so services on any cloud can be managed – provided of course there’s a driver – has graduated from the Apache Foundation’s incubator and is now a full-fledged Top-Level Project (TLP). The...
    With Cloud Expo 2012 New York (10th Cloud Expo) just four months away, what better time to start introducing you in greater detail to the distinguished individuals in our incredible Speaker Faculty for the technical and strategy sessions at the conference... We have technical and st...
    AMD said late Tuesday that its chief sales officer Emilio Ghilardi had left the company and that CEO and president Rory Read is going to do his job while a replacement is sought. AMD didn’t say why Ghilardi left but it’s assumed Read wants his own people. Read is relatively new to th...
    During the lifespan of M3 (Monitis Monitor Manager) there has always been something lacking – timers. M3 execution procedure was outlined in this previous article. The execution mentioned in the latter was a one-time-execution, whereas server monitoring requires periodic invocati...
    Red Hat is putting its bought-in Gluster scale-out NAS storage technology, acquired in October, on the Amazon cloud. It’s styled Red Hat Virtual Storage Appliance for Amazon Web Services and other clouds are supposed to follow in short order.
    A new episode of the screencast series is now available at the OpenNebula YouTube Channel. This screencast demonstrates the new easily-customizable self-service portal for cloud consumers. Its aim is to offer a simplified access to shared infrastructure for non-IT end users. The scree...
    Subscribe to the World's Most Powerful Newsletters
    Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
    Click to Add our RSS Feeds to the Service of Your Choice:
    Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
    myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
    Publish Your Article! Please send it to editorial(at)sys-con.com!

    Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021


    SYS-CON Featured Whitepapers
    ADS BY GOOGLE