Real-time event-driven process orchestration
Support for web services is a key new features of SAP Sybase Event Stream Processor (ESP) 5.1 SP02. And one aspect of the new web services features is the ability to deliver events from ESP to a web service.
This delivery is event-driven; the web service request is triggered when continuous queries within ESP identify a key business event or condition from the flow of real-time event streams throughout an enterprise. These “complex events” may be derived by correlating events occuring in many different event streams at once, or by comparing trending observations within a stream against historical observations or predicted observations, by identifying events that are occurring out of sequence, missing or otherwise atypically-related.
A very common desire expressed by our customers, particularly in asset-intensive industries, is for help in identifying potential problems before they become critical and costly to remedy. They typically have the necessary remediation processes in place, but they aren’t always triggered in time to prevent asset failure or costly repairs, and this is often due to difficulty in analyzing high-velocity and high-volume data.
The identification and derivation of events has long been a strong suit of ESP; the new integration features in the latest release allow these events and insights to immediately trigger action and follow-up under the auspices of an organization’s existing, proven, business processes. SAP NetWeaver Process Orchestration helps companies improve processes and save integration costs by easily building, integrating, managing and monitoring business processes both within the enterprise and with partners.
To illustrate this synergy, we’ll quickly walk through an illustration of using ESP to kick off a NetWeaver business process to repair a piece of equipment. In this example, there is an existing business process within NetWeaver Process Orchestration and it has been exposed within a web service. A startapproval action has been defined to kick off a repair work order for processing, and we’re going to develop a simple ESP project to invoke it. We start with an empty ESP project, open in the visual editor. In the Output Adapters draw of the Palette, we click on the Web Services Output adapter
and then we click again to drop it on the canvas, and give it a descriptive name.
Next, we need to fill in some properties, both design-time and run-time, for the adapter to run. Click the plus sign to expand the adapter item, and then click on the Edit Properties button to fill in the properties.
We identify the location of the adapter instance’s configuration file which contains information about the service and operation to invoke, information about the ESP project to connect to and the stream of window that will contain the events to be dispatched. The mapping file specifies how to map ESP column values into the web service request message. ESP will generate the mapping file for you…we’ll walk through that below. With setting this property here we are telling ESP Studio where to save the generated mapping file for later use at runtime. The JDK location is required so the web service adapter can dynamically-generate the classes required to invoke the target web service oepration. The Discovery configuration properties are used to identify to ESP Studio which service and operation is the source of the artifacts (streams or windows, schema, mappings) it needs to generate.
When we hit OK, ESP retrieves the WSDL, prompts the user to select the service and operation for which it should generate artifacts,
and prompts the user for options about how to define the resulting content in the application.
In this case, we want an output stream or window (so we can attach the output adapter to it), and we indicated that we want the schema (that defines the structure of the stream or window be created) as a separate object in the ESP application (making it more reusable). When we click Finish, we have quickly created an output adapter ready to dispatch arriving on the corresponding output stream to initiate the NetWeaver business process.
For a quick test of this integration, open the Streams and Windows drawer in the palette, click on Input Stream, and click again to drop it on the canvas. Click on the Connector and connect the schema to the input stream (defining the metadata for the input stream), and then again click on the Connector and connect the input stream to the output stream.
Using ESP Studio, compile the project, deploy it to an ESP cluster, then use the Manual Input view in the Run-Test perspective to send a sample row through to NetWeaver.
The event is dispatched to NetWeaver where it appears on a user’s Universal Worklist.
With the sanity check complete, one would typically set about modeling the input streams, reference data and continuous queries used to derive critical business conditions that might go unnoticed. A complete application may monitor streams of equipment sensor observations and current weather conditions and use them to when sensor observations appear materially inconsistent with weather conditions. So a modestly more typical event processing application that leverages the pieces built above might look something like the below. The reusable bits we developed above are highlighted in the rounded red rectange below:
With web services support ESP is more easily integrated than ever with NetWeaver Process Orchestration, giving customers an improved opportunity to achieve excellence in closed-loop, end-to-end, problem identification and resolution.
How do you envision SAP Sybase Event Stream Processor and NetWeaver Process Orchestration could/should be used together?
For More Information