Business Process Modeling - BTMSoftwareSolutions.com

Thursday, October 22, 2009

Intalio Timer - xPath Durations

This is a short blog to share my experience in creating a process which uses a parallel gateway in a potentially long ongoing process to allow users to perform work while process simultaneously calls a reporting service quarterly while that process is still in progress.  Here is how I did it:

The user form (Orbeon xForms) which kicks off the process determines the current date and using xpath sets date to either {year}-01-01T12:00:00.000, {year}-04-01T12:00:00.000,  {year}-07-01T12:00:00.000, or {year}-10-01T12:00:00.000.  If the month is 10, 11 or 12, one year is added to the current year so reporting quarter is in the correct year.

So, the process recives this dateTime value and it is mapped to a process variable called reportKickOff.  After the one parallel gateway branch a timer is placed and set to this value.  When the dateTime is reached, the process continues into a loop which first calls a reporting service and after service completes encounters another timer.  Here I take the reportKickOff value and add 3 months.  So, if it was 2009-01-01T12:00:00.000 it is now 2009-04-01T12:00:00.000.  The key here in the mapper is to take the reportingDate (of type xs:dateTime) variable and map to function op:add-yearMonthDuration-to-dateTime() and then map String "P0Y3M" of type xs:yearMonthDuration() to same function.  This is then mapped to 'date' variable in right side of mapper.

Once this date is reached, process continues into an intermediate event which resets the reportKickOff variable by adding another three months using the same technique above, the loop condition is evaluated and if condition to exit is not met, the process loops and calls the reporting service.  After the service completes, the timer is reached again and it waits until the next quarter.  This process repeats every 3 months until the loop is broken. 

To end the process, both branches of parallel gateway have to complete.  If user is done with this long ongoing process, before they reach the end of the parallel gateway I set reportKickOff variable to currentDate() and a loop variable to exit.  By setting the reportKickOff variable to currentDate(), the timer will release and the reporting loop will evaluate to exit.  Both parallel branches will now meet and the entire process can complete.  Before the process ends, I call the reporting service one last time to submit the data for the duration the process was in progress since last reporting period.

If you would like to learn more information about how you can use timers and loops like this in one of your Intalio processes - contact me at BTMSoftwareSolutions.com.

Tuesday, September 22, 2009

openESB Database BC and Intalio

Last week I needed to create a web service to access a MySQL database within Intalio.  I had used openESB's LDAP BC previously so I had some insight into what was required.  This blog will attempt to consolidate the pieces of information I had to find from different resources on the Internet to configure the JNDI resource and database pools within GlassFish Server so my composite application could connect to MySQL DB.  I hope this helps others.

First make sure GlassFish Server is running.  Then follow these steps:
  1. Log in to the GlassFish administration console at: http://%7bserver%7d:4848/login.jsf
  2. Click on 'Resources' in left pane
  3. Click on 'JDBC'
  4. Click on 'Connection Pools'
  5. In main window add a new Connection  Pool by clicking 'New' and enter in your pool settings
  6. Click next and configure any additional settings, then click finish - You now have a Connection Pool
  7. Click 'Ping' to test your Connection  Pool.  If Ping fails, the next tip may resolve your issue
**** If Ping Fails ****
When I was creating my Connection Pool I was not successfully connecting.  I stumbled across the following tip which hoepfully will save you time.  This is what you need to do:
  1. Make sure the MySQL Driver (mysql-connector-{version}.jar) is located in your GlassFish installation domains/domain1/lib/ext directory
  2. Restart Server
  3. Try pinging again
NOTE:  I initially read that the MySQL jar file had to be in GlassFishESBv21/glassfish/lib when setting up JDBS resources so in my installation the jar file is there as well.

Next you will create a JDBC Resource
  1. Click on 'JDBC Resources' in left pane
  2. In main window add a new JDBC resource by clicking 'New'
  3. Enter your JDBC Resource JNDI Name - JDBC/'something'
  4. Select the Connection Pool you created in previous steps
  5. Click OK
You now have your JDBC resource configured within GlassFish which can now be used within openESB Database BC.

Start NetBeans IDE

First we need to make sure you have added your Database Application within GlassFish
  1. In left hand pane select Services
  2. Under Databases if your Database Application is not listed, right click and choose 'New Connection'
  3. Enter in your settings for your Database Application Connection
Next we can create a new project using openESB Database BC
  1. Click File -New Project -SOA- BPEL Module
  2. Give your BPEL Module a name and click finish
  3. Right click on Process Files within that BPEL Module and select New - WSDL
  4. Enter a File Name
  5. Select Concrete WSDL
  6. In Binding select 'DATABASE'
  7. In Type select the appropriate value - I used 'Prepared Statement'
  8. In URl, select the conenction you created above
  9. Type in your prepared statement and enter any parameters
  10. In the JNDI Name, type in the JDBC resource you created in the beginning of these instructions.
That is it.  Create another WSDL (database trigger - make sure you select Concrete WSDL and choose SOAP -Document Literal to be used within Intalio) which will send in a SOAP message to invoke this Database service.  Add thsese two WSDLs to a BPEL Process within your Project.  Then add jar files from this project into a composite application, CLEAN and Build, Deploy and then Test.

I then took the database trigger WSDL and the associated schema and placed them within Intalio.  Dropped the operation within Intalio Diagram, wired up the variables in the data mapper and deployed successfully.

If you need more assistance, contact me at http://btmsoftwaresolutions.com/

Sunday, September 6, 2009

LDAP, Intalio and openESB

This blog demostrates how LDAP data may be accessed with Intalio using openESB to create composite application consisting of two web services.

I had a business requirement in which we had to access user attributes from LDAP within Intalio Business Process.  Since Intalio does not currently offer an LDAP connector to access user attributes, I downloaded the latest version of openESB and used the NetBeans IDE GUI to develop a BPEL module that included 2 web services to return user information stored in an LDAP.  These were the general steps involved:

  1. Create a new SOA BPEL module project
  2. Add LDAP WSDL
  3. Add Trigger WSDL
  4. Updat BPEL module to include 2 web services (WSDLs defined above)
  5. Deploy project to GlassFish Server
The Trigger WSDL is a SOAP call defined with input and output parameters.  The LDAP WSDL is an LDAP call search with filter based on cn value (SOAP input parameter) and return value of user email attribute (reply to SOAP call).  So, SOAP message is received, BPEL assigns input message to a variable called cn.  BPEL invokes LDAP service and passes cn value as a filter.  Users email address (LDAP attribute) is sent back and BPEL assigns this value to a variable called mail.  BPEL sends mail variable to SOAP call.  That is it. 

How does this work with Intalio.  The SOAP WSDL is imported into Intalio and placed within a diagram.  In the mapper, the SOAP input message and output message is exposed.  The users cn attribute is passed from within Intalio business process.  The call is made to the service (which resides in GlassFish server deployed from NetBeans) and the users email is sent back to intalio process to be used to send email notifications from within Intalio.

For more information, contact http://btmsoftwaresolutions.com/.

Monday, August 31, 2009

How to Add Twitter Post for your Blog

I recently updated my Blogger 'Layout' to include a Twitter Icon to allow readers the ability to post my blog on Twitter.  If the reader is already logged into Twitter, the Blog title and Blogger Twitter Account account is automatically entered into the Twitter 'What Are You Doing?' text area.  I updated the code to simply open Twitter in a new window instead of in the same window as the blog post.  I also had to find a twitter image I wanted to use and update the code to point to this image.  Since I use Microsoft Office Live for my Web Site, I just stored the image in the images gallery within Microsoft Office Live and then referenced that location in the image src attribute.  Finally I added the text 'Tweet Me!'.  The code is below.

<a expr:href=""http://twitter.com/home?status=Reading " + data:post.title + " @BTM_SS " + data:post.url" href="http://www.blogger.com/" target="_blank" title="Tweet it on Twitter"><img alt="Tweet This" src="http://btmsoftwaresolutions.com/images/twitter.png" />Tweet Me!</a>

Modify the code above for your specific information:
  1. update BTM_SS with your Twitter ID
  2. Change the following text to whatever you want
    • Reading
    • Tweet it on Twitter
    • Tweet This
    • Tweet Me!
    • replace the src location to a location of your image (even if you do not want a web-site, you can get a free Microsoft Office Live Web-site account and store the image there)
  3. Remove target='_blank' if you do not want twitter to open in a new window
To add this code to you blog, follow these simple steps:
  1. Log in to your blogger account
  2. Choose Layout
  3. Click 'Edit HTML'
  4. Check the box 'Expand Widget Templates'
  5. Place code above after
    <div class='post-footer'>
Any questions, visit my web-site at http://btmsoftwaresolutions.com/ and contact me for assistance.

Orbeon xForms Help

Orbeon xForms is an excellent product for creating web forms. I have been using Orbeon for almost 2 years. Orbeon continues to add functionality and enhancements which reduces the amount of code that has to be written to create functional web forms.

For the new Orbeon xForm programmer, you can join the OPS (Orbeon Presentation Server) user group on Nabble. Here you can ask questions and search previous posts to see advice and solutions. This is a great starting point. Orbeon also has good documentation on the product which I strongly encourage that you read, and re-read, and re-read. After each read you will walk away with more knowledge on the product.

If you still find yourself stuck getting started or have a specific question on how to use pipelines to connect to databases, xml instance passing, page navigation, creating PDF documents, etc, you can contact me at http://btmsoftwaresolutions.com for help.

Thursday, July 16, 2009

Intalio Diagram Web Service and Orbeon

Intalio and Orbeon yet again make my life so easy that I had to share a short blog about my late night coding. I had a thought today how I wanted to provide the ability for users to query some records and then start an Intalio business process off of one of those records. Now I did not want to develop a diagram that was a query and stick it into the processes tab of Intalio - too me a query is a query and may or may not lead to starting a process. And knowing that an Intalio Process does not have to start with a user entering data onto a form within Intalio, but may be started from any external system that can access a web service, I started down this path.

In a previous project, I developed a diagram which when compiled in Intalio creates a WSDL. This WSDL was provided to a client. The client imported that wsdl into ASP.NET and after several hours of trying to figure out the ASP.NET portion - we got processes kicked off from a .NET application into Intalio. Well, I use Orbeon forms and not ASP.NET. But I figured Orbeon is a powerful program, I should be able to start an Intalio process from an external Orbeon form. Yep - and pretty easy too. This is all that it took.

I had to create the diagram in Intalio which created my WSDL.

I had to create one instance, one control (Trigger) and one submission in my Orbeon xForm:
  1. A Trigger inside a repeated table which would first dynamically set an xml element and second send a Submission to the web service
  2. An instance which would hold the SOAP message passed to the web service. Inside the SOAP message body is the parameter the web service is expecting which I set above using the trigger and a setvalue action.
  3. A submission which would invoke the web service and send the SOAP payload

That was it. Real simple. And here is another trick if you need it.

I use the soapUI plugin in the Intalio eclispe framework - great tool. To create a new wsdl project in soapUI you just browse out to the Intalio generated WSDL. Once you double click on the request message, you get the web service end point displayed for you and in the request frame, the SOAP payload which you can just copy and place within the xform instance you are going to reference in the submission. Just make sure you have any namespaces from your SOAP message referenced in the xhtml document or you will get an error.

Any questions or comments drop me a line:

Brian Steuhl: bsteuhl@btmsoftwaresolutions.com

Tuesday, June 23, 2009

Intalio BPM - Intermediate Timers and Task Management

Use Case: Police electronically file a criminal complaint in which a summons is issued and the defendant has not been processed (electronically fingerprinted with LiveScan and Photographed). The Chief law enforcement officer of the jurisdiction wants to be able to track fingerprint compliance to monitor who has and who has not been processed. In the current model, we are able to capture those defendants who have been processed, but have no way of updating the KPI dashboard on fingerprint compliance for those who have not been fingerprinted once the complaint has been electronically filed with the Court.

Proposed Solution: Using BPM, extend the current model to track those defendants not processed and incorporate any rules of criminal procedure within the process that pertain to fingerprinting following the issuance of a summons.

In the diagram below, a message is received after electronically filing a criminal complaint if the defendant was not processed. A task is sent to the officer filing the complaint - 'Fingerprint Pending'. Since the defendant has 5 days to report for processing, an intermediate timer between the creation of the task and the completion of the task is set to 5 days and 1 minute. An intermediate timer placed on the sub process is set to 5 days. If the defendant reports for fingerprinting within the court ordered time frame of 5 days, the officer will complete this task and the Key Performance Indicator (KPI) for the fingerprint compliance dashboard will be updated. However, if 5 days passes and the task is not completed by the officer the following occurs:
  1. The task is deleted from the officer's task list. This is accomplished by calling two (2) different services within Intalio - task manager service and token service. In the task manager service, there is an operation called delete and this operation will delete a given task. The delete operation takes two (2) parameters, taskID and participantToken. The taskID is obtained within the process from the create task response message. The participantToken has to be retrieved using the Token Service. The token service takes two parameters, username and password. The administrator account has the authority to delete a task so those values are passed into the service. The response message from the token service provides the participantToken which can be passed into the delete operation. This will then delete the task from the officer's task list.
  2. In case the officer forgot to complete this task, and the defendant was fingerprinted, we send an email from the process using an email web service informing the officer that this task was deleted and if the defendant was fingerprinted to contact the District Attorney's office immediately before bail revocation documents are forwarded to the Court.
  3. A task is sent to the District Attorney's office informing them that Bail Revocation may be required due to non-compliance with a fingerprint order as a condition of bail. If the DA determines from their own investigation or from the officer that the defendant was processed, they can enter the name of the booking center and the KPI will be updated and reflected in the fingerprint compliance dashboard. If the defendant was not processed, information retrieved from the complaint can pre-populate a bail revocation web form to reduce redundant data entry. Any additional information required may be entered by the District Attorney staff. A pdf of the bail report can be printed from the web form and submitted to court. In the future it is possible that the document be electronically submitted to the court.
  4. Finally, the KPI is updated to reflect that a bail revocation has been filed on this defendant.

Below is a diagram of the proposed work flow.




Diagram:

















More info at http://btmsoftwaresolutions.com

Friday, June 12, 2009

Solving Business Problems - BPM

As stated in a previous blog, I am currently working on a BPM initiative in the criminal justice community. Since I could not sleep last night, I googled BPM and came across a free PDF download - BPM Basics for Dummies. A link to the download is available on my website currently under construction at BTMSoftwareSolutions.com. I decided to give it a read. It was only 78 pages long and you can always learn more. As it turned out, this morning I turned that reading into an email suggestion amongst our team on our current business process model. In a nutshell, this is what I stated.

Our current business process model does not capture one of the significant process outcomes of filing a criminal complaint a consumer (in my situation the criminal justice community is the consumer) expects, the fingerprinting of defendants. The criminal justice community has not been very efficient at ensuring that 100% of defendants alleged to have committed a crime are fingerprinted. They have gotten better, but more needs to be done. And studies show that even a portion of the prison population currently serving sentences are for crimes they were never fingerprinted. Without fingerprinting, criminal justice agencies (Police, DA, Courts, Probation, Prisons, etc) are making decisions sometimes without all the information about a person. Without this critical information about prior offenses, the safety of our criminal justice employees and also the community are impacted.

My suggestion was to indicate that processing defendants is a very important key performance indicator and a metric we can capture within our business process. Some current attempts to address the problem and increase fingerprint rates was to purchase more equipment for law enforcement agencies. But this approach does not address the root cause of the problem, the BUSINESS PROCESS, nor does it assist key stakeholders in monitoring their success in real-time on who has been and who has not been fingerprinted. By leveraging BPM with Business Activity Monitoring (BAM), metrics from within the process can be captured and displayed on a dashboard to users. Dashboards have drill down capabilities so those complaints where no fingerprints have been recorded, users may obtain more information about the defendant and the approrpiate measures taken to ensure fingperprint compliance.

This is part of what BPM is all about - being flexible and agile to changing business needs or newly identified process improvements. Once the process is discussed with key stakeholders, process owners and business/system analysts, the updated business process can quickly be implemented and performance tracking monitored.

Remember, modeling something that is already broken only speeds up gathering information that the process is broken. You want to measure the As-Is process to define a baseline of measurements. These measurements then can be compared to the To-Be process to determine the Return On Investment (ROI).

Monday, June 8, 2009

Probation Office Case Scenario

Having worked in the Probation and Parole field for 10 years, these agencies spend a significant amount of time preparing reports for the Court. These documents often need review from a supervisor with almost certain revisions and updates. Once completed, these reports are then shared with other criminal and non-criminal justice agencies pursuant to rules of criminal procedure and local court orders. So how does this current As-Is process look. Lets take a look at the current business process for compiling information, reviews and submissions and then compare this to what a To-Be business process might look like using BPM.

The current As-Is process scenario typically follows this route. An officer of the court gathers information from a local Record Management System (RMS) that holds offender information. This information is usually entered in by various personnel including support staff who enter the initial case information followed by probation officers who add additional case information as it is collected. To prepare a report, the Probation Officer uses a text editor and redundantly types this same information which was recorded into the RMS system. The report is then printed and delivered to a supervisor for their review. If any revisions are required, the paperwork is delivered back to the officer for corrections. This cycle continues until the report is approved at which time it is forwarded to the Court. Reports thatare permitted to be shared with other criminal justice and/or non-criminal justice agencies are also forwarded, usually in paper print. If this information is valuable to those receiving agencies, they typically redundantly enter the same information into their RMS.

As you can see from reading this case scenario, the process is not very efficient. From the redundant data entry, paper and printing costs, delivery costs (inter office and sometimes mail which requires postage) and the possibility of misplaced papers, BPM can allow agencies to better align their IT environment on a low budget and modify a business process as it changes. Lets look at what this To-Be process, using BPM and other open source technology could look like.

An officer starts a report by logging in to their business process console and selecting the type of report (process) they would like to begin. Information from various external sources are gathered using web services to pre-compile a majority of the information, thus reducing redundant data entry. The officer can save this report if not complete and it will appear in their task list neatly organized so not to slip through the cracks only to be remembered last minute. Once the report is complete it is submitted into the process electronically. Business rules decide on where this information flows next. If supervisor review is required, the report can go to a specific supervisor or be available to all personnel with the role of a supervisor. A supervisor can then CLAIM a report to be reviewed and the task will no longer appear in the other supervisors task list. The supervisor can make determinations as to whether the report should be approved, revised or rejected. Based on the supervisors decision the process flow continues. If revisions were requested, the officer will receive a task and possibly an email notification that the task is waiting for them. The officer can review any comments the supervisor made and resubmit the report upon completion. Again, this cycle continues as before in the As-Is process, but paper/printing costs are reduced and tracking of the process is possible using Business Activity Monitoring (BAM). Once approved, the process continues delivering the information to those participants involved in the process - humans and systems. Web Services using XML can be integrated into the process to allow information from the process to populate other RMS.

As mentioned in the To-Be process, Business Activity Monitoring (BAM) can be developed to capture key performance indicators to see if goals, objectives and/or mission statements of that organization are being met. This provides decision makers with critical data they can use to re-allocate resources, request additional resources or realign their goals and objectives based on the data collected. And since the data is being collected from within the process, no other human intervention for record keeping is required. Another added benefit that using business process management software allows for.

BPM is not a panacea, but from my experience it bridges the gap between the IT developers, Business Analysts and Operational Level staff that require IT support to increase efficiency of their current business processes and activities. In addition, with the amount of open source software that is available, software costs for such a system can be substantially reduced..

Friday, June 5, 2009

Business Process Modeling

Coming from a criminal justice background and commercial software product culture, accepting a new job which was focusing on open source software for Business Process Modeling felt a little daunting - and the first several months were. It has been almost two years since that leap of 'faith' and I have come into my own. I have also realized the benefits an organization may receive using this type of technology. What type of technology am I writing about - BPM (Intalio), MySQL, Apache DS LDAP, Orbeon xForms, Tomcat Server, eXist XML database. These are some of the products I have come to know over the past year.

What have I been developing with these products? I am currently working on a project which models a criminal justice process that allows information sharing between external entities relying mainly on Web Services and XML. The process is modeled representing all the actors involved (humans and systems) and the decisions, rules and flow that make up that business process . The entire application development has integrated the above technologies to deliver the back-end data storage both in a relational database (MySQL) and as XML documents (eXist), web server container (Tomcat), Directory Structure for user log in credentials (Apache DS LDAP), IntalioBPM which models the business process which creates the BPEL to deploy to Tomcat and web forms that expose all of these components to the end user - Orbeon xForms.
A significant amount of XML technologies are utilized in delivering the end result - Web Service Description Language (WSDL), SOAP, XSLT, XSL-FO, XPATH and XQUERY to name a few.

I often wonder about the market for such a software development using the above technologies that focuses on small to medium size businesses with limited technology budgets but with the necessity to be as efficient as possible. I hope to continue down this path of BPM and XML in the future and would love to hear from others on their experiences with such technologies and those who are interested in reading/learning more.