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
    DXWorldEXPO LLC announced today that ICC-USA, a computer systems integrator and server manufacturing company focused on developing products and product appliances, will exhibit at the 22nd International CloudEXPO | DXWorldEXPO. DXWordEXPO New York 2018, colocated with CloudEXPO New York 2018 will be held November 11-13, 2018, in New York City. ICC is a computer systems integrator and server manufacturing company focused on developing products and product appliances to meet a wide range of ...
    Coca-Cola’s Google powered digital signage system lays the groundwork for a more valuable connection between Coke and its customers. Digital signs pair software with high-resolution displays so that a message can be changed instantly based on what the operator wants to communicate or sell. In their Day 3 Keynote at 21st Cloud Expo, Greg Chambers, Global Group Director, Digital Innovation, Coca-Cola, and Vidya Nagarajan, a Senior Product Manager at Google, discussed how from store operations and ...
    We are seeing a major migration of enterprises applications to the cloud. As cloud and business use of real time applications accelerate, legacy networks are no longer able to architecturally support cloud adoption and deliver the performance and security required by highly distributed enterprises. These outdated solutions have become more costly and complicated to implement, install, manage, and maintain.SD-WAN offers unlimited capabilities for accessing the benefits of the cloud and Internet. ...
    Headquartered in Plainsboro, NJ, Synametrics Technologies has provided IT professionals and computer systems developers since 1997. Based on the success of their initial product offerings (WinSQL and DeltaCopy), the company continues to create and hone innovative products that help its customers get more from their computer applications, databases and infrastructure. To date, over one million users around the world have chosen Synametrics solutions to help power their accelerated business or per...
    Dion Hinchcliffe is an internationally recognized digital expert, bestselling book author, frequent keynote speaker, analyst, futurist, and transformation expert based in Washington, DC. He is currently Chief Strategy Officer at the industry-leading digital strategy and online community solutions firm, 7Summits.
    In an era of historic innovation fueled by unprecedented access to data and technology, the low cost and risk of entering new markets has leveled the playing field for business. Today, any ambitious innovator can easily introduce a new application or product that can reinvent business models and transform the client experience. In their Day 2 Keynote at 19th Cloud Expo, Mercer Rowe, IBM Vice President of Strategic Alliances, and Raejeanne Skillern, Intel Vice President of Data Center Group and ...
    Founded in 2000, Chetu Inc. is a global provider of customized software development solutions and IT staff augmentation services for software technology providers. By providing clients with unparalleled niche technology expertise and industry experience, Chetu has become the premiere long-term, back-end software development partner for start-ups, SMBs, and Fortune 500 companies. Chetu is headquartered in Plantation, Florida, with thirteen offices throughout the U.S. and abroad.
    Bill Schmarzo, author of "Big Data: Understanding How Data Powers Big Business" and "Big Data MBA: Driving Business Strategies with Data Science," is responsible for setting the strategy and defining the Big Data service offerings and capabilities for EMC Global Services Big Data Practice. As the CTO for the Big Data Practice, he is responsible for working with organizations to help them identify where and how to start their big data journeys. He's written several white papers, is an avid blogge...
    More and more brands have jumped on the IoT bandwagon. We have an excess of wearables – activity trackers, smartwatches, smart glasses and sneakers, and more that track seemingly endless datapoints. However, most consumers have no idea what “IoT” means. Creating more wearables that track data shouldn't be the aim of brands; delivering meaningful, tangible relevance to their users should be. We're in a period in which the IoT pendulum is still swinging. Initially, it swung toward "smart for smart...
    Bill Schmarzo, author of "Big Data: Understanding How Data Powers Big Business" and "Big Data MBA: Driving Business Strategies with Data Science," is responsible for setting the strategy and defining the Big Data service offerings and capabilities for EMC Global Services Big Data Practice. As the CTO for the Big Data Practice, he is responsible for working with organizations to help them identify where and how to start their big data journeys. He's written several white papers, is an avid blogge...
    Charles Araujo is an industry analyst, internationally recognized authority on the Digital Enterprise and author of The Quantum Age of IT: Why Everything You Know About IT is About to Change. As Principal Analyst with Intellyx, he writes, speaks and advises organizations on how to navigate through this time of disruption. He is also the founder of The Institute for Digital Transformation and a sought after keynote speaker. He has been a regular contributor to both InformationWeek and CIO Insight...
    "IBM is really all in on blockchain. We take a look at sort of the history of blockchain ledger technologies. It started out with bitcoin, Ethereum, and IBM evaluated these particular blockchain technologies and found they were anonymous and permissionless and that many companies were looking for permissioned blockchain," stated René Bostic, Technical VP of the IBM Cloud Unit in North America, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Conventi...
    Michael Maximilien, better known as max or Dr. Max, is a computer scientist with IBM. At IBM Research Triangle Park, he was a principal engineer for the worldwide industry point-of-sale standard: JavaPOS. At IBM Research, some highlights include pioneering research on semantic Web services, mashups, and cloud computing, and platform-as-a-service. He joined the IBM Cloud Labs in 2014 and works closely with Pivotal Inc., to help make the Cloud Found the best PaaS.
    As data explodes in quantity, importance and from new sources, the need for managing and protecting data residing across physical, virtual, and cloud environments grow with it. Managing data includes protecting it, indexing and classifying it for true, long-term management, compliance and E-Discovery. Commvault can ensure this with a single pane of glass solution – whether in a private cloud, a Service Provider delivered public cloud or a hybrid cloud environment – across the heterogeneous enter...
    Cloud-enabled transformation has evolved from cost saving measure to business innovation strategy -- one that combines the cloud with cognitive capabilities to drive market disruption. Learn how you can achieve the insight and agility you need to gain a competitive advantage. Industry-acclaimed CTO and cloud expert, Shankar Kalyana presents. Only the most exceptional IBMers are appointed with the rare distinction of IBM Fellow, the highest technical honor in the company. Shankar has also receive...
    "We view the cloud not as a specific technology but as a way of doing business and that way of doing business is transforming the way software, infrastructure and services are being delivered to business," explained Matthew Rosen, CEO and Director at Fusion, in this SYS-CON.tv interview at 18th Cloud Expo (http://www.CloudComputingExpo.com), held June 7-9 at the Javits Center in New York City, NY.
    The Founder of NostaLab and a member of the Google Health Advisory Board, John is a unique combination of strategic thinker, marketer and entrepreneur. His career was built on the "science of advertising" combining strategy, creativity and marketing for industry-leading results. Combined with his ability to communicate complicated scientific concepts in a way that consumers and scientists alike can appreciate, John is a sought-after speaker for conferences on the forefront of healthcare science,...
    WebRTC is great technology to build your own communication tools. It will be even more exciting experience it with advanced devices, such as a 360 Camera, 360 microphone, and a depth sensor camera. In his session at @ThingsExpo, Masashi Ganeko, a manager at INFOCOM Corporation, introduced two experimental projects from his team and what they learned from them. "Shotoku Tamago" uses the robot audition software HARK to track speakers in 360 video of a remote party. "Virtual Teleport" uses a multip...
    Data is the fuel that drives the machine learning algorithmic engines and ultimately provides the business value. In his session at Cloud Expo, Ed Featherston, a director and senior enterprise architect at Collaborative Consulting, discussed the key considerations around quality, volume, timeliness, and pedigree that must be dealt with in order to properly fuel that engine.
    In his session at Cloud Expo, Alan Winters, U.S. Head of Business Development at MobiDev, presented a success story of an entrepreneur who has both suffered through and benefited from offshore development across multiple businesses: The smart choice, or how to select the right offshore development partner Warning signs, or how to minimize chances of making the wrong choice Collaboration, or how to establish the most effective work processes Budget control, or how to maximize project result...