WSO2 Complex Event Processor is succeeded by WSO2 Stream Processor. To view the latest documentation for WSO2 SP, see WSO2 Stream Processor Documentation.
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Introduction

This sample demonstrates how to filter incoming event attributes, and add them to another stream using simple pass-through via an UI event publisher. This sample does not have Siddhi queries since it does not not use any execution plans.

Prerequisites

Follow the steps below to set up the prerequisites before starting the configuration.

  1. Set up the prerequisites required for all samples.
  2. Navigate to  <CEP_HOME>/samples/utils/output-ui-adapter directory, and execute the following command:  ant -Dsn=0071
    This copies the <CEP_HOME>/repository/deployment/server/webapps/outputuitest.war file to the <CEP_HOME>/sample/artifacts/0071/webapps directory, to deploy the Web app which is used to test if events are published to the UI of it.

Building the sample 

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

  • Creates a stream with the ID org.wso2.event.sensor.stream:1.0.0
  • Creates an event publisher named uiPublisher
  • Loads the events stored in the <CEP_HOME>/samples/artifacts/0071/eventsimulatorfiles/events.csv file to the event simulator.

Executing the sample

Follow the steps below to execute the sample.

  1. Log in to the management console.
  2. Click Tools, and then click Event Simulator.
  3. Access the Web app which you deployed in Prerequisites via your Web browser using the following URL:  http://localhost:9763/outputuitest/
  4. Enter  the following details in the Web app as shown below.

    enter details in the Web app

      • Stream Name: org.wso2.event.sensor.stream

      • Version: 1.0.0

      • CEP Host: localhost

      • CEP Port: 9763

      • Polling Interval: 30

      • Domain: carbon.super

      • Mode: WEBSOCKET

      • Secure level: UNSECURED

  5. Click Connect.

  6. Click Play on the corresponding event stream as shown below, to send the events in the <CEP_HOME>/samples/artifacts/0071/eventsimulatorfiles/events.csv file to the publisher.

    You view the output events published from the CEP which are received by the Web app as shown below.

    published events received by the Web app

 

  • No labels