Blog Posts Process Management Process Modeling

Business Process Management & Transactions

Blog: Gary Samuelson Information Systems Anatomy

Though BPMN 2 supports transactions (in notation form) their implementation requires some additional work with regards to details – effort being a method for managing distributed transactions across heterogeneous service providers. A natural fit is called a “saga” where the transacted activity is broken down into a sequence of steps which are pared, via event association, with compensating tasks. If any of the activities within the transaction context fail, these compensating tasks then  undo the work, in reverse sequence, in an attempt to reverse the changes defined within the BPMN transaction[1][4].

Compensating Transaction

However, in certain situations, this approach isn’t practical due to the fact that a “compensating transaction” is really just another transaction – all of which could end up potentially building upon an already congested logjam of pending work. Scaling the “saga” method therefor leads to some concern in context to busy, volatile data-stores.

Another more serious problem is that we’re still left without transaction isolation. This isn’t necessarily an issue so long as your process follows a pattern of creating records (or documents) as apposed to updating existing. Though, avoiding updates is a tricky affair given that most, if not all, “create new” implementations first check for pre-existing and/or potentially duplicate instances.

Collaborating with Business Object Services

My attempt towards a more ideal solution starts first with a process-oriented view – one where we address the problem as a question about two collaborating systems defined by their roles: either needing or managing business objects. This collaboration then helps illustrate interaction requirements between the two domains.

Collaborating Context Management

Business Object Consumer: Service Client

The client (example: “Task 1″) starts work by first sending a business object request into the instance manager. Only after the client receives the requested instance does work begin. The client is then responsible for both monitoring transaction related messages and committing changes upon completion. Transaction related messages include: rollback, timeout, etc..

There is obviously room for some aspect-oriented modularization[3] here to help break out the eventually repeating behavior associated with fetching and monitoring object state. And, I do intend to follow-up on Aspect Oriented Programming (AOP) – for now we’ll skip past this topic and continue onto object instance and context management.

Business Object Manager: Service Provider

Object instance and context management responsibilities are broken out into two collaborating processes. Instance management first evaluates locking (object management) rules. Rules can include: authorization, concurrency, logging, and regulatory requirements.  Instance creation then follows with implied interaction with object stores (data-services). Objects are then delivered to both the requesting client and associated context manager. The Context Process keeps track of objects associated with activities surrounded by the client’s Transaction group (BPMN Transaction). Transactional information is relayed back to registered clients involved within the transaction’s context – this insures all participants either commit or rollback changes.

Enforcing Transaction Protocol: ACID Model

The ACID model has the following properties:

We enforce transaction protocol through event communication between Client and Service Provider. The Client “requests” objects and transactions from the Object Manager. Object Instance and Context Management processes collaborate to enforce protocol.  A key feature of this arrangement are the “locking rules” that insure a uniformity of constraints are followed across all type instances (e.g. “Customer”, “Account”, etc).

Due to the long-running nature of BPM transactions, we avoid traditional “hard-locking” (XA) transactions. As a work-around, “soft locks”[2] are issued and manageable so long as we constrain object activities to the protocols enforced by the Object Instance and Context models.

 

References

[1]  Weske, Mathias. Business Process Management: Concepts, Languages, Architectures. Second ed. : Springer, 2012.

[2] Jang, Julian, Alan Fekete, And Paul Greenfield. “Delivering Promises For Web Services Applications Technical Report 605.” (2006).

[3] Jalali, Amin, Petia Wohed, and Chun Ouyang. Aspect oriented business process modelling with precedence. Springer Berlin Heidelberg, 2012.

[4] Bernstein, Philip A., and Eric Newcomer. Principles of transaction processing. Morgan Kaufmann, 2009.

 

Leave a Comment

Get the BPI Web Feed

Using the HTML code below, you can display this Business Process Incubator page content with the current filter and sorting inside your web site for FREE.

Copy/Paste this code in your website html code:

<iframe src="https://www.businessprocessincubator.com/content/business-process-management-transactions/?feed=html" frameborder="0" scrolling="auto" width="100%" height="700">

Customizing your BPI Web Feed

You can click on the Get the BPI Web Feed link on any of our page to create the best possible feed for your site. Here are a few tips to customize your BPI Web Feed.

Customizing the Content Filter
On any page, you can add filter criteria using the MORE FILTERS interface:

Customizing the Content Filter

Customizing the Content Sorting
Clicking on the sorting options will also change the way your BPI Web Feed will be ordered on your site:

Get the BPI Web Feed

Some integration examples

BPMN.org

XPDL.org

×