How to Call TIBCO BusinessEvents™ from a Process
The applications described demonstrate a simple interface between TIBCO ActiveMatrix BPM and TIBCO BusinessEvents.
TIBCO BusinessEvents applications can be exposed as web services that can be called by external applications. The business process in this tutorial calls TIBCO BusinessEvents via a web service invocation.
You can create a BusinessEvents application, implement a call to the BusinessEvents application via a web service in a business process application, and then deploy and test that application.
The tutorial is comprised of three sections:
- Creating an TIBCO ActiveMatrix BPM application using structured data.
- Creating a TIBCO BusinessEvents application.
- Testing the integration between the two applications.
You should work through all the steps in each section in turn to complete the tutorial.
The BusinessEvents application is based on a decision table. The table implements a simple rule that examines activity on a bank account for fraud.
The deposit or withdrawal of more than $500 triggers an alert on the transaction.
The business process application sends the name of the account holder and the amount of the transaction to BusinessEvents for analysis, then receives a status message regarding the transaction in return.
Prerequisites
- You are not expected to have any specific knowledge of TIBCO BusinessEvents in this tutorial. However, you should understand the general concepts and purpose of a rules engine.
- You are familiar with business process design for TIBCO ActiveMatrix BPM using TIBCO Business Studio. Note that:
Before You Begin
- Install the following software (from the TIBCO Software Inc. Product Download Site) as per the documentation referenced within each product:
- Configure TIBCO BusinessEvents Studio and TIBCO Business Studio BPM Edition to have their own unique workspace.
- From TIBCO Business Studio BPM Edition, create and connect to an ActiveMatrix BPM server instance.
- Creating the ActiveMatrix BPM Project
The BPM project consists of a user task to collect the data - name and transaction amount - followed by a call to BusinessEvents via web services. Finally, the status of the transaction determined by BusinessEvents is displayed in a user task. - Creating the Business Object Model Objects
The structured data used by the application is defined using the Business Object Model as a composite class. - Defining the Business Process
The service descriptor will be generated from the web service task and the parameters automatically mapped based on the business object model defined. - Deploying the Business Process Application
The ActiveMatrix BPM application is deployed via TIBCO Business Studio BPM Edition in the usual way. - Creating the BusinessEvents Project
A new TIBCO BusinessEvents application will be exposed via a web service that is based on SOAP over HTTP. - Creating the Ontology
A BusinessEvents Concept is the equivalent of a Business Object Model (or structured data) object in TIBCO ActiveMatrix BPM. - Setting Up the Rules and Rule Functions
In TIBCO BusinessEvents, Rules and Rule Functions connect with the Event definitions created earlier to parse the request data, invoke the decision table, and construct the response. The request and response in this example are SOAP based messages. - Defining the Decision Table
The decision table in this example defines the rule logic to be applied to the banking transaction. The decision table is structured to review the amount of the transaction and then set the status flag accordingly within the concept object. - Preparing the BusinessEvents Application for Deployment
In order to deploy the BusinessEvents application a cluster configuration must be created that explicitly defines how the BusinessEvents engine will interface with the business process application. - Deploying the BusinessEvents Application
At runtime, the EAR file is the deployment container for BusinessEvents and will be generated from the business process application. - Starting the BusinessEvents Engine
The BusinessEvents engine is started from the command line in this example. - Testing the Applications
You can use Workspace to test the integration between TIBCO ActiveMatrix BPM and TIBCO BusinessEvents.