This documentation is for WSO2 Complex Event Processor 4.0.0. View documentation for the latest release.
WSO2 Complex Event Processor is succeeded by WSO2 Stream Processor. To view the latest documentation for WSO2 SP, see WSO2 Stream Processor Documentation.

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents


This sample demonstrates how to set up an execution plan to filter out credit card transactions that makes use of an in-memory event table to identify blacklisted transactions. This sample uses Event simulator for inputs and the logger publisher for logging the outputs to the CEP console.


  • It processes the events received through the DeleteAllUsers.
  • Checks for the condition deleteAll == true and if it's true, deletes all the records in the CardUserTable. 


See Prerequisites in CEP Samples Setup page.

Building the sample

Start the WSO2 CEP server with the sample configuration numbered 0106. For instructions, see Starting sample CEP configurations. This sample configuration does the following:

  • Points the default Axis2 repo to <CEP_HOME>/sample/artifacts/0106 (by default, the Axis2 repo is <CEP_HOME>/repository/deployment/server).

Executing the sample

  1. Log into the CEP management console which is located at https://localhost:9443/carbon.


  2. Go to Tools -> Event Simulator. Under the 'Multiple Events' section, you can see 4 files listed there which contains some sample data as follows.
  3. The userEvents.csv file contains sample data that is used to fill the in-memory CardUserTable. Click play start sending events to fill the table.

  4. The blackListUserEvents.csv file contains sample data that is used to mark user entries in CardUserTable as blacklisted. Click play to start sending blacklisted events and mark some table entries as blacklisted.
  5. The purchaseEvents.csv contains credit card transactions data. Play it and send the transaction data. 
  6. After sending sample events from purchaseEvents.csv, you will be able to see the outputs as follows.