Configuring through the Management Console UI
1. Log in to the CEP management console and select the Main menu in the left hand side of the screen. Then select the Execution Plans menu item under the Event Processor menu.
2. The Available Execution Plans window opens. Click Add Execution Plan.
3. This will open the Create a New Execution Plan form. Fill in the form with valid values. The Execution plan name can contain only alphanumeric characters and '_' character. The Description field is optional.
4. The Snapshot time interval field denotes how often the state of the processing engine should be persisted, which is used to restore after a system crash. The value '0' (the default value) here disables this feature.
5. When writing query expressions (See Siddhi Language specification on how to write queries), users need to import the required streams from Event Builders. The As field maps the incoming stream to a stream name suitable for the Siddhi processing engine. Note that the As field can contain only alphanumeric characters and '_' character.
6. In the text field that follows imported streams, users can enter any number of CEP statements, each ending with a semicolon.
7. The Exported streams section allows to expose the output streams from Siddhi to the Event Formatter with desired stream IDs.
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
Once all mandatory fields are filled, users can add the execution plan. If the execution plan deploys successfully, it will be displayed under the available execution plans section in Event Processor menu.
Editing an Execution Plan Configuration through the Management Console
By Clicking the Edit button of the relevant execution plan, you will able to edit the execution plan configuration and redeploy it. When you click the Edit button, it will redirect to a xml based editor window which allows you to edit the execution plan configuration from UI without opening the configuration file in the file system.
Configuring through an XML file
You can specify an execution plan configuration through an xml file and deploy it in the deployment directory of the server. Execution Plan deployment directory is located at <CARBON_HOME>/repository/deployment/server/executionplans . This is a hot deployment directory and execution plan configurations can be easily deployed and undeployed by placing/removing the xml file there.
1. Create a xml file, enter the execution plan configuration details.
2. Place the file inside the above mentioned hot deployment directory. Note that Execution plan configurations need to start with "executionplan" root element.