Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
VIATRA/CEP/Language
Contents
VIATRA-CEP User's guide
The following contents introduce the VIATRA-CEP complex event processing stack and its main features. Basic knowledge on complex event processing is advised, although not strictly required. Should this guide prove to be insufficient, please do not hesitate to ask your question on our mailing list.
Getting started
The VIATRA-CEP stack
//TODO
Language essentials
This section is a comprehensive overview on the features of the VIATRA Event Processing Language (VEPL).
Atomic event patterns
AtomicEvent name (parameters) {body}
- The name of the atomic event must be unique among the model.
- The parameters are typed and use the JVM type hierarchy. An example parameter list could be (name:String, id:int). Parameters are evaluated at runtime. To see the main motivation behind this, see the Complex event patterns.
- The body is currently not in used, but it will be soon: https://bugs.eclipse.org/bugs/show_bug.cgi?id=440748.
From this structure, two types of source code is generated: atomic events and atomic event patterns. The former ones are used by applications to be instantiated and forwarded to the engine; while the latter ones are actual patterns which can be reused in /link complex event pattern definitions or /link rules.
Complex event patterns
ComplexEvent name (parameters) { definition: complex pattern definition }
IncQuery event patterns
Complex event operators
Rules
Rule name { events: complex pattern definition action{ executable code block using XBase syntax } }
Rule name { events: complex pattern definition actionHandler: reference to an action handler, i.e. a class implementing the IActionHandler interface }
Packages and Usages
package name
VEPL allows the model to be organized into different packages and reuse those packages in other ones by usages. Every model begins with a package declaration, which is a hierarchical identifier. For example: package com.company.cepproject.
uses package name with wildcard or a specific class in a package uses-patterns IncQuery pattern package
The uses keyword imports other VEPL packages or source code packages; the uses-patterns keyword imports IncQuery patterns to be used in IncQuery event patterns.
Setting up the environment
- Download the latest Eclipse Luna Modeling (currently SR1) package.
- Install the following plugins or import their source plug-ins into a running Eclipse instance:
- EMF-IncQuery 0.9.0
- CI update site
- VIATRA 0.7.0 (required components are VIATRA2-EMF and VIATRA-CEP)
- CI update site
Examples
You can find demonstrative examples here.
Important links
- VIATRA-CEP Bugzilla
- our mailing list: viatra-dev@eclipse.org
- A paper on VIATRA-CEP from MoDELS 2014 (Available for download from here.)