WSO2 DAS uses execution plans to store event processing logic. An execution plan is bound to an instance of Siddhi Data Analytics Server runtime, which is responsible for the actual processing of events. DAS allows users to configure multiple execution plans and provides multiple isolated event processing environments per execution plan. A typical execution plan consists of a set of queries and related input and output event streams.
Writing an execution plan
Follow the instructions below to write an execution plan.
- Start WSO2 DAS and log into its Management Console. Click Main and then click Execution Plans to open the Available Execution Plans page.
Click Add Execution Plan to open the Create a New Execution Plan page in which a template is displayed as shown in the example below.
You can edit this template to create a new execution plan. Follow the steps below to edit the template and create a new execution plan.The execution plan editor supports auto completion.
To view the suggestions made by the editor, press control+space keys together.
The suggestions contain two sets.
- Siddhi keywords, in alphabetical order
- All the other words which are already inserted into the editor. For example, stream names which are defined in step 2 will be suggested when writing the queries in step 3. These will appear in alphabetical order after the keyword list.
In addition to the above, press shift+2 keys together to view suggestions on annotations.
Step 1. Add execution plan info
Add Execution Plan Name
Give a meaningful name to the execution plan by replacing ExecutionPlan
in @Plan:name('ExecutionPlan')
with the new name.
For example, if the new name should be 'NewExecutionPlan'
, then replace @Plan:name('ExecutionPlan')
with @Plan:name('NewExecutionPlan')
.
Description
This is the description of the execution plan. Giving a description is optional.
To give a description to the execution plan,
- uncomment the line
-- @Plan:description('ExecutionPlan')
. - replace
'ExecutionPlan'
with the description
For example, @Plan:description('This is the description for my NewExecutionPlan')
.