In Data Analytics, there are common use cases for analyzing statistics that involve operations such as calculating the average, minimum, maximum etc., for different endpoints, and visualising them graphically using suitable charts. The Template Manager tool in WSO2 CEP allows you to define a template in order to generate the artifacts needed for different scenarios with common requirements in a convenient manner. Domain-specific parameter values (e.g., attribute name, time duration) can be customized and configured in a dashboard.
Once you create a template with required configurable parameters, WSO2 CEP generates new artifacts such as execution plans, event streams, gadgets etc. for each new scenario that you create for that template. This is done by modifying the pre-defined template with user-defined values and then deploying it.
For example, consider a scenario where you need the following three streams.
|org.wso2.event.temperature.stream||To calculate sum, average, maximum and minimum values for temperature over a period of time and display the results on a dashboard.|
|org.wso2.event.pressure.stream||To calculate sum, average, maximum and minimum values for pressure over a period of time and display the results on a dashboard.|
|org.wso2.event.humidity.stream||To calculate sum, average, maximum and minimum values for humidity over a period of time and display the results on a dashboard.|
Instead of creating each artifact individually, you can create a template based on this scenario, and then use the Template Manager tool to generate artifacts representing each sensor type for a given time period. This allows configurations to be reused, and simplifies the creation of artifacts for business users with limited knowledge of CEP artifacts.
Currently, this feature supports following WSO2 CEP artifact types
- Realtime - Execution Plan
- Event Receiver
- Event Publisher
The following sections provide detailed instructions to create templates and to use them.