Wednesday, February 18, 2009

Using BPM for Software Delivery-The Process

Using BPM for Software Delivery

Traditional Approach:
1. Software projects go through requirements analysis. This phase involves talking to business and get individual requirements in document fashion and then are converted into software design and implementation decisions.
2. These requirements together form complete picture.
3. In that sense it is bottom-up design approach. Which leaves a lot to interpretation when it comes to how business and IT “see” the complete picture of organizational flow of information.

BPM Approach:
1. Main way it differs from traditional approach is that, it is top-down approach. Meaning it should start with Business Analysts and/or Users creating block diagrams to describe their overall flow of information in complete manner.
2. These blocks can be as abstract or detailed as Business can provide or wants them to be.
3. Each of these blocks interact with others via various synchronous/asynchronous mechanisms there by enabling Service Oriented Architecture (SOA) in the design and foundational infrastrure of all business requirements.
4. This also will automatically make sure all the sides involved “see” EXACT same “big picture” and can agree on the same.
5. Corollary effect of that is to allow all levels to drill down , see interdependencies, and make whole organization flexible, and more responsive to changes/updates.
6. Increased ROI, Risk-mitigation, reduced cost and other benefits follow the above.
***** BPM tool is ideal for flows of information that can be depicted as individual tasks that are controlled by some business logic or rules and can in general be described as a “process”
Most, if not all business process can be described in such a manner,
***

Implementation methodology:
To achieve BPM enabled software delivery following steps should be taken.
1. Business users/Analysts will provide Block diagram describing the process in terms of individual steps, decisions and flows.
This is very much like the “flow-charts” that all are familier with. Any IDE based tool of BPM (Jboss JBPM Engine) provides an easy to use and quick to adapt designer (Eclipse based Graphical Process Designer (GPD)) that can be used for this purpose.
This tool will create a simple text (xml formatted) file. Please see attached diagram below for example of such an image.

2.These blocks are then filled with details of functionality that is represented by that block.This normally means business analyst and business users doing requirements analysis and create a simple document that will give following information.
a. Globally applicable rules for process flows.
a. – These might include details such as business units responsible and allowed to see this process.
b. What are global variables if any are there any rules or validation that apply when this process fits in bigger flow as a sub-process maybe. (for e.g. Create Employee Payroll process might be a sub-process to Hire New Employee Process and can only be run if new employee SSN is validated against legal dept’s validate SSN service”)
c. Global tasks needed which can be organization wide rules or task. (for. e.g. upon completion of each order above email may be sent to manager)
b. Each individual block should then be given detailed description with following pieces
a. What is the functionality? Describe actual task
b. Timers and notification info – Due date, (if any) escalation actions (might be emails to supervisors, automated DB updates) , Rules for sending emails on task start, completion, expiring of task due dates etc.
c. Assignment and management rules – What business roles should be able to start/complete/stop task. Is task automatically sent to some user or is there specific set of rule for doing so.
d. User Interface details – Does task have any specific screen that should be associated while performing that task.
e. Auditing information – What are the business Process measurement matrices that are needed. (for e.g. Number of Orders processed in a day? Total Orders not completed in time, How many employees have more than 10 tasks in their to-do list etc)
f. If there is existing application/code that already does a particular functionality depicted by a block it should be noted and it will be RE-USED in almost all cases.
g. After all the above are given, any other specific rules, details of tasks, out of ordinary requests etc should be noted in a separate section under each block details.

3. Block diagram and subsequent info then is sent to IT for analysis and IT will create design and solution.
a. After previous steps and input from them, IT basically has all the info needed. At this point IT will likely look for re-use, application integration of existing coded functionality, and custom coding of new or updated functionality. But even if individual step is missed or has bugs.. the “BIG PICTURE” will be exactly what business has in mind.
b. IT does not have to write code to follow business flow, BPM tools will automatically do that based on outcome of individual business steps.
c. Business performance matrices become automatically available. – For this BPM tool will integrate with outside monitoring tools as needed,

Possible reasons for Web Application Memory Leaks-And Solutions

1) Check the version of CGLIB Jar Version deployed in container

And possible known classes in CGLIB which cause memory leak are present in Package - net.sf.cglib.proxy and these are the Classes with bugs
a) LazyLoader b) InvocationHandler c) Enhancer

The fix has been applied in CGLIB 2.2 JAR

2) If your application uses Spring Framework for Dependency Injection and JavaBeans Introspection,make sure the WebApp Domain, deployment descriptor "web.xml" has references to different Spring Listener classes like org.springframework.web.util.Log4jConfigListener & org.springframework.web.context.ContextLoaderListener

Spring offers another listener : org.springframework.web.util.IntrospectorCleanupListener

This is the Listener that flushes the JavaBeans Introspector cache on web app shutdown. Register this listener in "web.xml" to guarantee proper release of the web app class loader and the classes that it holds.

If the JavaBeans Introspector has been used to analyze application classes, the Introspector cache will hold a hard reference to those classes. Consequently, those classes and the web app class loader will not be garbage collected on web app shutdown!

Unfortunately, the only way to clean up the Introspector is to flush the entire cache, as there is no way to specifically determine the application's classes referenced there. This will remove cached introspection results for all other applications in the server too.

Note that this listener is not necessary when using Spring's beans infrastructure, as Spring's own introspection results cache will immediately flush an analyzed class from the JavaBeans Introspector cache.

Application classes hardly ever need to use the JavaBeans Introspector directly, so are normally not the cause of Introspector resource leaks. Rather, many libraries and frameworks do not clean up the Introspector..

Note that a single such Introspector leak will cause the entire web app class loader to not get garbage collected! This has the consequence that you will see all the application's static class resources (like singletons) around after web app shutdown, which is not the fault of those classes!

Possible Solution : Add this code in web.xml and place it before any other Spring Listeners

<listener>
<listener-class>
org.springframework.web.util.IntrospectorCleanupListener
</listener-class>
</listener>

3) Problem with DOM4J JAR

There's a problem with the use of ThreadLocals for caching, it's never cleaned up. If the ClassLoader is thrown away (e.g. if a webapp is reloaded), then the ThreadLocal stuff hold until the Thread dies, which might take a while in a Servlet container where the Threads are pooled. In such situation, DOM4J would prevent the webapp's ClassLoader to be garbage collected, which would creates a a memory leak and eventually an OOM if the webapp is reloaded too many times.

Workaround : if possible,avoid using ThreadLocal class(Programmatically it can be done)

4) Get the latest version of JDOM JAR...the latest version 1.1 has fix for known memory leak issues being caused by org.jdom.input.SAXHandler class in older versions

5) Last but not the least, make sure you have Java Profilers like Eclipse Profiler Plugin(this is the best as far as Iam concerned), JProbe ,VisualGC or JSTAT running against web application server...

Feel free to add any more known bugs which cause memory leaks.....!!

Enhancing BPM Processes Performance

Declaring BPM Processes Instance Variables as "Separated"...

From my personal experience it has been seen so far that if the BPM Processes has big Instance Variables like Value Objects,Transfer Objects, Collection Objects, they consume lot of memory for processing each single instance and BPM Engine starts throwing Severe Exceptions like "Max Instance Size has exceeded",which will hinder the progress of execution of business activity.

Below is the short synopsis related to different ways of increasing Max Instance Size in ALBPM...

Advantages:
1)Enhance BPM Processes Execution
2)Lowering the BPM Message size can affect the performance of these processes specially...

Disadvantages of Higher Message size:
Each single process instance takes that much more time to persist to BPM DB and they are stored as Binary Objects(BLOB) in DB...so it will increase the cache memory/space consumed by these processes in DB

Workaround with 32KB Instance Size:
Declare these 'big' (10k or more) instance variables (VO/TO)as 'separated'. In ALBPM,while declaring variables,there is an attribute called 'Category' and the default value is 'Normal'. If you declare an instance variable as 'Separated' the data will be stored in another database table and it's size won't count towards the process instance size and it will not affect the BPM DB Cache Memory..

Cataloging Components in ALBPM

1)When registering/creating Java Libraries as part of External Resources in BPM Studio, we have two options :Versionable and Non-versionable
If we select "Versionable",then the JARS will be included in the Project Export from Studio and when the project is published and deployed into an Enterprise Environment, then these will be stored as binaries in the BPM Directory Service..The BPM Engine and Workspace applications will be pulling them and injecting into appropriate classloader...As per the configuration for the Java Libraries in the Enterprise Process Administrator,they are just there for a reference..The binding is determined at project publication time if we use "Versionable" Java Libraries..

2)On the other hand,if we use Non-Versionable Libraries for BPM Cataloging,then manually we need to include them into Process Administrator's Classpath...Most likely, these JARS wll need to be copied into Process Administrators' WEB-INF/lib directory.... and the path is, ~/albpm5.7/j2eewl/webapps/webconsole/WEB-INF/lib and then restart the BPM Server...

Basic principle to follow before you catalog BPM components in Studio is to make sure

1 )The "External Resources" does include "Versionable" libraries before publishing/deploying the BPM project to get the latest JAR files and make them run in ALBPM Enterprise Server. Right Click -> "External Resources" -> Select "Versionable" -> then do a publish/deploy project in Studio.

2) Then complete the BPM Catalog process manually from studio

Copy the Application JARS in BPM Webconsole and Portal WEB-INF/lib folder and regenerate BPM EAR to get latest versions of these files and then execute BPM cataloging from Studio using External Resources..

Wednesday, October 8, 2008

Anatomy & Physiology of Android OS

Android has been designed as a modern mobile platform that will enable applications to take full advantage of the mobile device capabilities. This session will break down the various components of the Android platform, examine how they work, and give developers a deeper understanding of the underlying technologies that drive the Android platform...

This video tutorial will give you deep understanding of how Linux Kernel 2.6.24 is stacked up inside Android OS including the different drivers,libraries and runtime interfaces which drives the Android platform and the applications which run on it....
Source: GoogleDevelopers




Thursday, October 2, 2008

EJB 3.1 Specifications Overview

Source: The Server Side.....

Kenneth Saks is the specification lead for Enterprise JavaBeans 3.1 (JSR 318) . This talk will give the latest update on the contents of the EJB 3.1 specification , which will soon be released for Public Draft Review.

With its 3.0 release, the Enterprise JavaBeans™ (EJB™) architecture underwent a dramatic simplification targeted at ease of use for application developers. The purpose of the Enterprise JavaBeans 3.1 specification is to further simplify the EJB architecture by reducing its complexity from the developer's point of view, while also adding new features in response to the needs of the community.

Topics will include : .war packaging of EJB components, improved unit testing support, portable global JNDI names, singleton beans, startup/shutdown callbacks, a simplified(no interface) local view, asynchronous session bean invocations, automatic timer creation, and more

Live Video streaming by Ustream

Visa to Develop Applications for Android, Nokia Phones

Visa wants to become a part of your mobile phone, working with Nokia on realizing mobile payments and also announcing services for Google's Android platform.

The idea of using the mobile phone as a payment device has been around for along time, but has not yet encountered widespread success. With more than 3 billion mobile devices already in the market today, though, Visa sees a big opportunity to extend its reach, according to Elizabeth Buse, global head of product at Visa.

For future owners of the T-Mobile G1 and other upcoming Android phones, Visa will at first include three services, Alerts, Offers and Locator, which will be available for download before the end of the year.

With Alerts consumers will receive what Visa calls "near real-time" notification of purchase activity, based on rules defined by the cardholder.

Offers and Locator will make it possible for users to receive targeted offers, based on for example previous purchases, and show consumers nearby locations of shops or ATMs that accepts Visa. The two functions can also be combined. Consumers would opt in to the services, only activating those they choose, and would be able to opt out at any time, according to Visa.

The services will at first be offered to Chase Visa card holders in the U.S., and Visa says it plans to add more banks later.

Visa is also developing a payment application that will enable consumers to make mobile payments with Android phones.

Visa's work with Nokia is also about making payments possible using the mobile phone. Using the Nokia 6212 classic, expected to be available starting next month, users will be able to make contactless payments, remote payments, money transfers, as well as receive alerts and notifications, according to Nokia.

What makes all that possible is built-in support for a technology called NFC (Near-Field Communications), which lets consumers simply wave the phone within a few inches of a special point-of-sale reader to complete a transaction.

Nokia and Visa will first do trials with financial institutions, but for it to really take off the retail sector has to get onboard, and that is currently a blocking point, according to Richard Webb, directing analyst at Infonetics Research.

"Mobile payments are a good thing for the mobile sector, but there is no real gain for the retail sector, which would have to upgrade its systems for payments to work," said Webb.

Companies such as Nokia and Visa have to explain what's in it for retailers, but there are also other aspects that need to be addressed before mobile payments can take off, including security and trust, according to Webb.

Tuesday, May 13, 2008

Business Process Management- Quick look at three more products

Business Process Management ,the subject or concept which is gripping every major enterprise applications deployment now-a-days coupled with SOA/Web Services, has been part of my pedigree since more than a year now and the more I tend to learn about it, the more I feel like a naive,its such a vast concept . Many people have asked me how do you define a "Business Process Management"? and I tend to come up with different answers (not my fault...because each of the BPM solution providers have their own definition and meaning to it.

First thing first, as part of BPM initiatives so far I have been exposed to different products like Jboss JBPM(I still feel this is the best one,as far as IDE based BPM tools go,next best Intalio) , Albpm , Savvion & Intalio.

Currently Iam working on an enterprise application using ALBPM(Aqualogic BPM) from BEA as the BPM product and good thing is adopted by many leading companies and the thing which sometimes worries me about it is very little documentation and support from BEA(thats my perception) and coming from IDE background primarily for most of the development ,I feel it is behind Jboss Jbpm or Intalio because these products does support IDEs like Eclipse,which definitely makes my life easy as a Developer,Well BEA may argue with me that ALBPM Studio 6.0 has development environment similar to Eclipse or rather built on Eclipse IDE,but then Iam using ALBPM Studio 5.7 right now which doesnt come with full IDE support ...But I must say among commercial solutions this fits the bill...

And over the year,one thing which has worried me as a BPM Developer is how best I can make the Business Analysts or the business folks,understand the business processes which I have developed better,because in hindsight we expect them to be not technical savvy to really understand the workflow pattern being used nor how it has been developed since their major priority is how best this workflow/application fits their business needs .....For Example,l to overcome this situation,in one of my assignments while using Jboss Jbpm,I had to develop an EXE file or installer (something like Java Web Start)for BA and Testers,which simulates the workflow processes being developed without them having to worry about seeing it in action in a IDE ..And then as part of my curiosity and research,I realized there are different BPM solutions/products out there in IT industry that are so easy to understand ,that even non-technical folks can understand.And with this article Iam going to introduce such BPM products because most of them are browser based and not IDE based ...

Today we will be looking at 3 different BPM products that have been adopted by noted companies and how best they are serving the needs for workflow management and development.I will be giving an overview about each one of them,their features and benefits
I) Appian : Accidently I came across this product and it is definitely worth trying in any business process management effort. And when I see its customers list who have adopted Appian-Enterprise-based business process management (BPM) solution for their IT department it definitely must have some reason to it.Then I realized the advantages/benefits it brings to the table.From its legacy in the portal/knowledge-management (KM) space, Appian has built its functionality into a full blown BPM suite. In turn, it's built on a Java base following the Unified Modeling Language (UML) and the XML Process Definition Language (xPDL). (These are solid standards all, and which seem to be doing what standards should do without the interference of the European Union and Document Freedom Day groupies--. From an open source perspective, Appian comes with JBoss out of the box but of course works with WebSphere and WebLogic. It makes use of Lucene search engine as well. Not open source but Appian’s doing some real interesting stuff with KX Systems Kdb.

But the good news is that users don’t have to worry about all that technology stuff . Appian’s Form and Rules Designers and other real-user-facing components all work vis a straight Web interface (no need for Flash, plug-ins, etc.). That’s important for security requirements, which is key to many of Appian's government customers. But it is also good for ease of use for any customer. More important are the ease of Appian BPM implementation templates developed over the 10 years since it was founded. Examples are available for procurement in federal government, for wealth management with rules for credit scoring, a program with Instill to build a quality management solution for the food/service industry... I think the best place to know about Appian would be seeing its recorded webinars

II) Cordys
Cordys BPMS is a single toolset, built from the ground up to offer comprehensive BPM and SOA capabilities, giving business managers direct control over new and existing processes.And I you see the below listed features,Iam sure everyone will be curios to use and test it for their BPM efforts.And when I see that a utility which I use frequently for my business needs "WebEx", the leading provider of Web communication services has adopted Cordys,I gave it a try.
Features & Benefits :
a)Graphical, browser-based interface
* Accurately draw executable business processes using a Visio-like application
* Bridge the gap between business and IT
* Enable business users to control and quickly change their own processes
* Consolidate and present data from disparate sources as one unified and personalized workspace for higher productivity
b)Intuitive, drag-and-drop business process execution, with virtually no coding
cDistributed, fault-tolerant, and scalable architecture
* Configure nonstop, fault-tolerant runtime environments with no single point of failure on commodity hardware
d)Real-time alerts and notifications
* Accelerate responsiveness to critical events and exceptions
e)Operational intelligence dashboard
* Obtain real-time, enterprise-wide visibility of business process performance and business metrics
f)Historical analysis
* Discover enterprise performance trends for more-informed decision making
g)Composite application framework
* Create Web 2.0 interfaces quickly by visualizing, combining, and manipulating data from disparate sources
h)Composite application developer
* Create needed business services
i)SOA Grid
* Connect incompatible systems together, allowing them to communicate
* Rapidly assemble composite objects based on a variety of previously non-interoperable backends
* Govern and manage Web services, both in design and run time
j)Data manager
* Facilitate template-based reconciliation of differences among disparate data connected to the Cordys platform
k)Secure file transfer
* Provide end-to-end document security, including legal grade non-repudiation and guaranteed integrity of transmitted data

III) Lombardi
Last but not the least is Lombardi.Best place to know about this product is its resource section
Major customer which has adopted Lombardi's Teamworks BPM software is Wells Fargo Financial.

I hope some of the organizations start looking at adopting at either one of these for their BPM implementations,considering how easy they can be understood and used by workflow developers,business folks and Business Analysts.