Welcome!

Weblogic Authors: Yeshim Deniz, Elizabeth White, Michael Meiner, Michael Bushong, Avi Rosenthal

Related Topics: Weblogic

Weblogic: Article

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.

  • More Stories By 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.

    Comments (0)

    Share your thoughts on this story.

    Add your comment
    You must be signed in to add a comment. Sign-in | Register

    In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


    @ThingsExpo Stories
    SYS-CON Events announced today that Daiya Industry will exhibit at the Japanese Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Ruby Development Inc. builds new services in short period of time and provides a continuous support of those services based on Ruby on Rails. For more information, please visit https://github.com/RubyDevInc.
    As businesses evolve, they need technology that is simple to help them succeed today and flexible enough to help them build for tomorrow. Chrome is fit for the workplace of the future — providing a secure, consistent user experience across a range of devices that can be used anywhere. In her session at 21st Cloud Expo, Vidya Nagarajan, a Senior Product Manager at Google, will take a look at various options as to how ChromeOS can be leveraged to interact with people on the devices, and formats th...
    SYS-CON Events announced today that Yuasa System will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Yuasa System is introducing a multi-purpose endurance testing system for flexible displays, OLED devices, flexible substrates, flat cables, and films in smartphones, wearables, automobiles, and healthcare.
    SYS-CON Events announced today that Taica will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Taica manufacturers Alpha-GEL brand silicone components and materials, which maintain outstanding performance over a wide temperature range -40C to +200C. For more information, visit http://www.taica.co.jp/english/.
    As hybrid cloud becomes the de-facto standard mode of operation for most enterprises, new challenges arise on how to efficiently and economically share data across environments. In his session at 21st Cloud Expo, Dr. Allon Cohen, VP of Product at Elastifile, will explore new techniques and best practices that help enterprise IT benefit from the advantages of hybrid cloud environments by enabling data availability for both legacy enterprise and cloud-native mission critical applications. By rev...
    Organizations do not need a Big Data strategy; they need a business strategy that incorporates Big Data. Most organizations lack a road map for using Big Data to optimize key business processes, deliver a differentiated customer experience, or uncover new business opportunities. They do not understand what’s possible with respect to integrating Big Data into the business model.
    Recently, REAN Cloud built a digital concierge for a North Carolina hospital that had observed that most patient call button questions were repetitive. In addition, the paper-based process used to measure patient health metrics was laborious, not in real-time and sometimes error-prone. In their session at 21st Cloud Expo, Sean Finnerty, Executive Director, Practice Lead, Health Care & Life Science at REAN Cloud, and Dr. S.P.T. Krishnan, Principal Architect at REAN Cloud, will discuss how they b...
    Enterprises have taken advantage of IoT to achieve important revenue and cost advantages. What is less apparent is how incumbent enterprises operating at scale have, following success with IoT, built analytic, operations management and software development capabilities – ranging from autonomous vehicles to manageable robotics installations. They have embraced these capabilities as if they were Silicon Valley startups. As a result, many firms employ new business models that place enormous impor...
    SYS-CON Events announced today that Dasher Technologies will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Dasher Technologies, Inc. ® is a premier IT solution provider that delivers expert technical resources along with trusted account executives to architect and deliver complete IT solutions and services to help our clients execute their goals, plans and objectives. Since 1999, we'v...
    SYS-CON Events announced today that MIRAI Inc. will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. MIRAI Inc. are IT consultants from the public sector whose mission is to solve social issues by technology and innovation and to create a meaningful future for people.
    SYS-CON Events announced today that TidalScale, a leading provider of systems and services, will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. TidalScale has been involved in shaping the computing landscape. They've designed, developed and deployed some of the most important and successful systems and services in the history of the computing industry - internet, Ethernet, operating s...
    SYS-CON Events announced today that TidalScale will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. TidalScale is the leading provider of Software-Defined Servers that bring flexibility to modern data centers by right-sizing servers on the fly to fit any data set or workload. TidalScale’s award-winning inverse hypervisor technology combines multiple commodity servers (including their ass...
    Amazon is pursuing new markets and disrupting industries at an incredible pace. Almost every industry seems to be in its crosshairs. Companies and industries that once thought they were safe are now worried about being “Amazoned.”. The new watch word should be “Be afraid. Be very afraid.” In his session 21st Cloud Expo, Chris Kocher, a co-founder of Grey Heron, will address questions such as: What new areas is Amazon disrupting? How are they doing this? Where are they likely to go? What are th...
    SYS-CON Events announced today that IBM has been named “Diamond Sponsor” of SYS-CON's 21st Cloud Expo, which will take place on October 31 through November 2nd 2017 at the Santa Clara Convention Center in Santa Clara, California.
    Infoblox delivers Actionable Network Intelligence to enterprise, government, and service provider customers around the world. They are the industry leader in DNS, DHCP, and IP address management, the category known as DDI. We empower thousands of organizations to control and secure their networks from the core-enabling them to increase efficiency and visibility, improve customer service, and meet compliance requirements.
    Join IBM November 1 at 21st Cloud Expo at the Santa Clara Convention Center in Santa Clara, CA, and learn how IBM Watson can bring cognitive services and AI to intelligent, unmanned systems. Cognitive analysis impacts today’s systems with unparalleled ability that were previously available only to manned, back-end operations. Thanks to cloud processing, IBM Watson can bring cognitive services and AI to intelligent, unmanned systems. Imagine a robot vacuum that becomes your personal assistant tha...
    SYS-CON Events announced today that IBM has been named “Diamond Sponsor” of SYS-CON's 21st Cloud Expo, which will take place on October 31 through November 2nd 2017 at the Santa Clara Convention Center in Santa Clara, California.
    In his Opening Keynote at 21st Cloud Expo, John Considine, General Manager of IBM Cloud Infrastructure, will lead you through the exciting evolution of the cloud. He'll look at this major disruption from the perspective of technology, business models, and what this means for enterprises of all sizes. John Considine is General Manager of Cloud Infrastructure Services at IBM. In that role he is responsible for leading IBM’s public cloud infrastructure including strategy, development, and offering ...
    SYS-CON Events announced today that N3N will exhibit at SYS-CON's @ThingsExpo, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. N3N’s solutions increase the effectiveness of operations and control centers, increase the value of IoT investments, and facilitate real-time operational decision making. N3N enables operations teams with a four dimensional digital “big board” that consolidates real-time live video feeds alongside IoT sensor data a...
    In a recent survey, Sumo Logic surveyed 1,500 customers who employ cloud services such as Amazon Web Services (AWS), Microsoft Azure, and Google Cloud Platform (GCP). According to the survey, a quarter of the respondents have already deployed Docker containers and nearly as many (23 percent) are employing the AWS Lambda serverless computing framework. It’s clear: serverless is here to stay. The adoption does come with some needed changes, within both application development and operations. Tha...