Monday, September 27, 2010

Business Objects in BOP4

 

Introduction

Maintenance of Business Objects is required for most business processes.

MDM has an important role in enterprise data management and quality. It provides a “single point of truth” in the enterprise and allows connected  processes and service to use “the latest and greatest” and clean business data. MDM therefore is the preferred way to manage business data.

 

If MDM is not in place, and business objects are not maintained in backend-applications there are mainly two ways how to maintain and persist business objects:
  1. A dedicated solution database
  2. Object Templates

 

This blog will briefly zoom in into these options

 

Options

 

1: Dedicated database

 
This option can be compared to the traditional application development approach. From the logical data/object model a technical data model is developed. This model describes the database tables and the constraints like primary keys and relations. Based on this a database can be created, preferably separate from the Cordys database instance.

Cordys BOP4 provides the feature to query the metadata of a database, and to generate standard or customized web-services to access the database tabels. These web services should be deployed on a WS-AppServer container, before they can be used e.g. in XForms or BPM-s

 

Cordys allows developers to add business rules to these web servcies in order to perform additional validations and control the lifecycle of these business objects, represented by the database tables.

 

2. Object Templates

 
Object Templates are a construct that is offered by Cordys BOP4.
 
It allows to define data objects based on Schema fragments. The developer may specify constraints and validations, attach (execution-) rules en specify whether or not changes to the the object are subject to audits. Besides that it is possible to specify if the object should be persisted by Cordys. If that option is selected the instances of the Object Template will be stored inside the CoBOC database (the database used to store information about the BPM instances).

 

Object templates can be accessed using the following CoBOC WebServices:

 - UpdateXMLObject to insert, update or delete an object

 - GetObjectsByAttribute  to retrieve a object

 

Obviously these can could be embedded in a dedicated Webservice per separate Object

 

 

Best pick?

Both approaches above have pro-s and con-s. The "best" choice depends on project or architectural requirements:

 

Dedicated database

Pro-s
  • Open database format (Data can be accessed easily from outside)
  • More control on data (Separate database, custimizable WS services for data access)
Con-s
  • Data layer should be maintained manually
  • Separate WebServices are required
 

Object templates

Pro-s
  • The data-tier remains hidden
  • More productive because of less required steps and objects
  • Audit possibilities
Con-s
  • Cordys specific data format and Web Services to access data
  • Data stored in CoBOC, so it may impact BPM execution performance

 

Depending on requirements (e.g. portability, testability, traceability, maintainability) one should decide on the way to go.

 

 Regards,
 
Harald van der weel

 

Wednesday, September 22, 2010

Testing Cordys BOP-4 using SOAPUI

 

SOAP-UI

Intro

In the previous project I have experienced soapUI as a low cost but very effective test tool for Cordys BOP-4 solutions. The abilities to invoke web services and test the result from outside the Cordys environment are very convenient. The features to define test scripts make it a very powerful tool to run automatic tests (e.g. for regression tests)

SOAP UI is build around uses an hierarchy of test objects: Each level contains 0 or more of the lower level objects:
1. Project
    2. Test-suite
        3. Test-case
            4. Test step.

Test steps

In the Test Steps the effective test actions are defined. Test actions may for instance be:

  • invoking a SOAP Service

  • validating the result (e.g. by checking database content)

  • Set properties

  • Pausing for an amount of time.

  • Executing an script

Properties

Properties contain values that can be used in the tests by a reference to the property. There are system and user defined properties. Properties are always related to one of the test-object types mentioned above and available to all object beneath it in the hierarchy.
A convenient application of properties are end-points –URLs for the web services that are tested. This way it is possible to test web services from another (DTAP) environment simply be changing this property.

Cordys Case

It was my intention to use SOAP UI to test my state-transition model, as described in my earlier BLOG-s. Testing it involves injecting numerous messages via SOAP, and check whether the correct state transition (or error) was invoked.

Initial approach

May first approach was to build test cases that consisted of multiples series of 3 steps:

  • A SOAP call to send a message

  • A wait step to allow Cordys to process the request

  • A validation step.
This approached worked: I was able to work out a number of scenario’s that covered most of the functionality that I wanted to test.

As my state-diagram was pretty extended (consisting of 17 states) I experiences a number of disadvantages:

  • Building was toilsome, defining similar steps for each state transition to test

  • The test scenario is hard to read, as only the title of each step is visible, and the vision is blurred because of sequences of 3 steps.

  • The scenarios were relatively hard to maintain, every time replacing 3 steps in case of a change.

Optimization 1

This led to a need of being able to define the sequence of the test offline, in a  file, were only the vital data would have to be specified.
This approach enables to maintain and store the test sequence in a text, making the scenario much more visible and way easier to modify (e.g. simply by inserting  some lines)

The solution I developed used the following capabilities of SOAP UI:

  • Run “Groovy” scripts (See http://groovy.codehaus.org/)

  • Invoke test cases from groovy

  • Read files from Groovy

  • Set property variables in Groovy

The main idea is simple:

  • Recognize and separate the repeating steps in the test case. Extract one instance of the repeating steps and isolate them in a separate test case (“TC1”)

  • Replace all required hard-coded values by a property

  • Define an external file having sets of lines containing values that may on the defined parameters

  • Build a "groovy" script that reads each line, sets the according parameters and executes  TC1

The file now consisted for each state-transition-to-test of a line of multiple properties in a fixed order. Each line was processed by the groovy script and assigned to the properties, before invoking the 3-step test sequence in TC1.

This approach worked fine.
The only disadvantage was that in the sequence certain properties remain the same for a long period of time (e.g. the correlation id of messages, which  is the same for all steps in the same sequence).

Optimization 2

The perfectionist in me decided to make the test script more fancy and general purpose, so I added the following options:

  •  The option to specify the properties that are mapped upon the value lists.
            #plist,<property-1>,<property-2>, … <property-N>

  • The option to specify a property that is assigned with a unique value each time it is set
            #property,<property>,<value>

  • The option to specific a specific property until it is set again.
            #unique, <property>

  • The option to add line-comments
         //<Any comment>

An example of an input file is:

// MessageId is always unique
#unique, messageId
// For the first sequence we always use the same sequence id
#property,correlationId,cor01
// Each value line contains values for the properties messageType,Sender,Receiver
#plist,messageType,Sender,Receiver

MT01,Party1,Party2
MT02,Party2,Party1
MT01,Party1,Party3
MT02,Party3,Party1
MT03,Party3,Party4
MT04,Party4,Party3

// Now we addone property to the value lines: The correlation Id.
// The pre-set value is overruled now
#plist,correlationId,messageType,Sender,Receiver

Cor02, MT01,Party1,Party2
Cor02,MT02,Party2,Party1
Cor03,MT01,Party1,Party3
Cor03,MT02,Party3,Party1

To provide an idea what the code looked like I add a screendump of the code.
(As a Groovy novice I won't accept any liaibility ;) ) 
Regards,
Harald van der Weel

Monday, September 20, 2010

BOP-4 BAM imperfections

  
Where the BOP-4 product stack generally looks very complete, mature and well designed, I have to admit I am still a little less enthusiastic about the Business Activity Monitoring (BAM) part.

In our latest project we have implemented a quiet extensive BAM implementation. We managed to implement a pretty useable dashboard, that satisfied the project and customer needs. However the BAM functionality did not feel quiet as “ready” as e.g. BPM.

BAM intends to monitor KPI-s that map upon a values used in a BPM. To get a graphical representation of these values in you dashboard a number of steps (and Cordys objects) is required.

  1. First the BPM values to reflect in BAM have to be explicitly exposed using the “Message filter” tab of the BPM. A selection is to be made of all values in the message map in the BPM.

  2. Next a Process Monitoring Object (PMO) must be created. This object defines the actual BAM data to collect in the BAM database, and the events when they are collected. It takes the BPM process as the input of the PMO. A selection of exposed data values and possible events must be made, and it is possible to process or enrich the data e.g. by using XPath or web services.

  3. Business Measure (BM) objects are intended to define the actual information from the PMO-s in the BAM database, to reflect in the report. A Business Measure is actually a SQL query that results in a aggregated measurements (averages, totals, counts) reported over a specific “dimension” (e.g. a Location, Person or Unit). This dimension ends up in a GROUP BY clause and it is possible to use a number of parameters in the WHERE clause. A Business Measure will result in a UI dashboard component and a related web service to get the specific data out of the BAM database. The web service can be used autonomously as well.

  4. The BAM dashboard is effectively an XForm, to which one or more BM -graphical components are added. There they can be linked to each other or to standard BAM components like “Time Selectors”. This way the output from one component  can be used in a filter of another. This way some kind of down drilling can be implemented. For a little advanced functionality scripting is required.

Though the functionality described above behaves correctly, there are a number of inconveniences and hence potential enhancements. I will name a number that come to mind:

  1. The number of fields to use in a PMO is limited. A PMO just offers a limited amount of fields for each data type (15x String, 10x Numeric, 10x decimal and 10x Date-Time). Exceeding one of these amounts results in an error message.

  2. Unlike other Cordys objects a PMO object must be manually unpublished before a new version can be published. There is no proper warning or error system available to prevent mistakes.  

  3. The possibilities to manipulate the looks of the dashboard graphs are very limited.

  4. Not types of graphical components are standard supported by BAM (like the gauge component). It requires intensive scripting.

  5. It is cumbersome to implement drill down features. Relations between data is now specified on graph level, and the business measures should already be prepared for the specific need. It would be more convenient to define these relations on data level.

  6. BAM does not support runtime packages; only staging packages

  7. BAM does not offer any standard reporting options (unlike Cordys Process Factory – CPF)

  8. In an ideal world PMO-s and BM shouldn’t be required. It would be nice to be able to specify data to expose on BPM level, and the relations too. This should be sufficient to define and populate a BAM database. When designing the dashboard standard graphical components should allow to select any data that should be displayed.  

At the recent Cordial event I was able to ask the development team after expected developments of BAM. They confirmed these imperfections and announced a number of enhancements that will be implemented with FP1 (Optimistic planning: end of 2010).

It is not hard to imagine I am looking forward very much to FP1, which I expect to solve a number of this issues!

Thursday, September 16, 2010

Personal highlights Cordial 2010

Personal highlights Cordial 2010

Event: Cordial 2010 event

Date: 14 and 15 September 2010

Location: Cordys, Putten, Netherlands

This year I had the luck to attend Cordial 2010.
This is a quick impression and listing of personal highlights of the event:
  • A massive crowd of both customers and partners of Cordys attended the events from all over the world, showing that Cordys is very much alive.
  • Being introduced to the new CEO and Jan Baan’s successor Per Johnsson
  • A very dynamic and inspiring presentation by Manfred Kets de Vries about Leadership
  • The opportunity to meet the product development team face-2-face to get an insight in the expected enhancements in both BOP-4 and Cordys Process Process Factory, that will be shipped in fp1. (FP1 ships “when ready”, expected before the end of 2010)
I.m.o. the most interesting:
    • Multi browser support
    • BAM enhancements (KPI-s in processes, Alignment of BAM)
    • MDM
    • Connections between CPF and BOP-4
    • CPF mobile support
    • Extended security features for CPF(e.g. SAML2.0)
  • The insights provided by Forrester in the trends in Cloud and BPM, where the most imlessons are:
    • There is a bright future for combined on-premises / cloud solutions, mostly depending on the level of confidentiality and commodity
    • Data remains the biggest asset
    • New business and payment models will arise based on the options that the cloud offers.
    • Collaboration using the social networks
  • 2 thrilling demonstrations by Matt Davies and Chris Hyde to realize a Cloud and a hybrid BOP-4 / Cloud solution in 9 minutes
  • The statement that Cordys shifts from a product demonstration towards a marketing organization, where the product “the most important marketing tool”
  • Meeting a lot of old “acquaintances” and many new interesting cordys related professionals.

More detailed info can be found on http://cordial.cordys.com

A more extensive report can be found on:

http://rogervdkimmenade.blogspot.com/2010/09/cordial-2010.html

Looking forward to Cordial 2011!