This blog entry is part of a series of blog entries on Slipstream, an SAP Research prototype for Business Activity Management for SAP NetWeaver BPM. It is a follow up on last year's blog entry and extends beyond mere monitoring.
This article deals with the event processor, i.e. the core of business activity management. While the article focuses on enabling business activity management for SAP NetWeaver BPM, other inputs and outputs are obviously also of interest to process execution as detailed in the following.
CEP makes use of an event processing network (EPN) which consists of a number of connected event processing agents (EPA). An EPA is an active component that monitors an event stream to detect and react on certain conditions. Its behavior is defined by a set of so-called event pattern rules. These reactive rules trigger on specific instances or patterns of input events. As a result of executing a rule, the agent creates output events and changes its local state. EPAs perform filtering, transformation (incl. aggregation, translation, enrichment, projection, split, and composition), and pattern detection.
Below you can see a sample EPA query that calculates the duration of a process by comparing start and end dates within a 24h window in the Continuous Computation Language (CCL):
insert into out1
in_completed.completionTime - in_started.completionTime as duration
in_started keep 24 hours,
in_started.process_instance_id = in_completed.process_instance_id;
EPAs can e.g. also be programmed and can make calls to SAP Business Rules Management in order to evaluate complex events in decision tables. As NetWeaver is a service-oriented application the calls can made automatically generated Web services. Based the input parameters BRM generates output parameters which are sent back to the client which in our case is an EPA. Unfortunately, at this stage decision tables cannot be updated as they are not stateful. Thus, return values currently have to be kept in the memory to also allow consideration over several successive BRM decisions.
EPNs can get quite large. SAP BusinessObjects and Sybase offer Event Insight and the Aleri Streaming Platform to help manage the queries with a UI. On the left hand side you can see the Aleri Studio, on the right hand side you see the Event Insight Query Builder.
We implemented our scenarios in both Event Insight and Aleri. Both of them require a specific producer to understand the event format (such as BPAF) which can be received through a standard JMS implementation such as Apache Active MQ. Events are then translated into the internal relational format.
Business Activity Management with CEP covers a wide range of different processing scenarios such as the following:
Live dashboards and business activity monitoring of multiple BPM engines and/or of multiple servers/ companies is a challenging task if no pre-packaged solution is available. As more and more information, relevant to operating a business and making decisions, is available in near real-time the need to report this information in a timely fashion rises.
Explorative and predictive process analysis such as clustering, classification or association analysis can be implemented as well as simulation based on the input data stream to predict imminent bottlenecks or excess capacities before they occur.
Context-aware business process management and automated insight to action enable processes to react to events even outside their system boundaries. This can include weather (e.g. hurricane warnings) or traffic information (e.g. port or airport closures) for logistics processes or currency exchange rates for financial systems. All of this information can be used to cancel, suspend or alter running processes or start new ones.
The CEP engine provides the basis for all business activity management operations. However, only if the insights generated by the event processor of are consumed properly, the correct action can be taken. The next article will detail event consumption.
Slipstream 2.0 has been a collaborative effort which could not have been done by one person. The current prototype has been developed in a collaboration of the SAP Research Center Brisbane in Australia with the European Research Center for Information Systems (ERCIS) at the University of Münster in Germany. The project team consisted of Felix Leif Keppmann, Jan-Philipp Friedenstab, Stefan Thiemann, Marcel Walter, Thomas Raffelsieper, Robert Malsch, and Bernd Schwegmann. The project was supervised by Martin Matzner, Oliver Müller, Prof. Dr. Jörg Becker, and myself.
If you have questions or application scenarios you would like to discuss, don't hesitate to contact me. We are looking for that kind of feedback all the time.