Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Start the CEP, log in to its management console, select Execution Plans and click Add Execution Plan.
  2. Enter details in the form that appears.
    Image Added

    The fields in the above configuration are described below:

    • Execution Plan Name : Can contain only alphanumeric characters and '_' character
    • Description : This is optional
    • Snapshot time interval : Defines how often the state of the processing engine should be persisted, which is used to restore after a system crash. The default value is 0, which disables this feature. If snapshot is enabled, you must start the CEP with the embedded Cassandra server enabled. To do this, specify -Ddisable.cassandra.server.startup=false option at server startup.
    • Query expressions: See Siddhi Language Specification on how to write queries. When writing query expressions, you must import the required streams from event builders. The As field maps the incoming stream to a stream name suitable for the Siddhi processing engine. It can contain only alphanumeric characters and '_' character.

      In the text field that follows imported streams, you can enter any number of CEP statements, each ending with a semicolon. For example,

      The Exported streams section allows you to expose the output streams from Siddhi to the event formatter with preferred stream IDs. For example,
      Image Added
      For the StreamId, provide a character string that starts with an alphabetic because it is considered as a java variable in Siddhi. Stream Id is a combination of stream name and version. E.g.,
      Image Removed
  3. fsdf

 

  1. After an execution plan is successfully created, you can change its configuration and redeploy it. To do this, click the Edit link associated with it. You can also click the other links associated with it to delete or enable statistics and tracing.
  2. An XML based editor opens allowing you to edit the event builder configuration from the UI itself, without having to edit the file in the file system. Do your modifications and click Update.
  3. Alternatively,  you can specify an event builder configuration using an XML file and save it in <PRODUCT_HOME>/repository/deployment/server/eventbuilders directory, which is the event builder deployment directory. Since hot deployment is enabled, you can simply add/remove files to deploy/undeploy from the server.

    Create the XML file with the following XML based event builder configurations. Event builder implementation must start with <eventbuilder> root element and the namespace set to http://wso2.org/carbon/eventbuilder  as in the example below:

  4. Once all mandatory fields are filled,

...

  1. add the execution plan. If the execution plan deploys successfully, it will be displayed under the available execution plans section in Event Processor menu.

 

 

Please use a character string which starts with alphabetic for streamId because in siddhi level it is considered as a java variable. Here Stream Id is a combination of stream name and version. Eg: testStream:1.0.0 

 

 

 

 

Editing an Execution Plan Configuration through the Management Console

...

2. Place the file inside the above mentioned hot deployment directory. Note that Execution plan configurations need to start with "executionplan" root element.