Skip to main content

CEP (Complex Event Processing)

Table of Contents​


Overview​

The CEP (Complex Event Processing) feature is a rule engine that identifies meaningful patterns in real-time event streams and immediately performs actions (save, publish, alarm). In the left menu, it is currently exposed as EQL Query and Statement under the Automation group.

Sub-menuInternal URLPurpose
EQL Query/query/indexSend temporary EQL (Event Query Language) queries to a real-time stream to view results immediately
Statement/statement/indexView domain rules (state/aggregation/event/command) by asset unit

The results of CEP rules are automatically connected as asset triggers (flow_on_asset_event, etc.) in Flow.


Screen Layout — EQL Screen in Automation Group​

ScreenPrimary UserSummary
QueryOperations AnalystExecute a single line of EQL immediately to see results from the real-time stream
StatementOperatorView the status and execution statistics of domain rules registered to assets

Query Screen (/query/index)​

This screen allows you to write temporary EQL queries and execute them immediately using the ▶ button to view results from the real-time stream.

Top — Query Save/History​

🔍 쿼리 [💾 이 쿼리를 저장] [↩ 마지막 쿼리] [▼ 이력 ▼]
ButtonAction
Save This QuerysaveQueryHistory() — Save current EQL to favorites
Last QueryloadLastQuery() — Load the most recently executed query
History DropdownloadQueryHistory() — Display saved query history in a dropdown (scroll up to 400px)

Queries written in the EQL input window at the top or in the left menu are automatically transferred to this screen for execution.

EQL Input Panel​

A large input box with a black border (textarea[name=epl], 8 rows high) and two icons in the top right.

IconAction
▶ (Play, White)runQuery() — Execute EQL
⚙ (Gear, Gray)resultConfig() — Result display options dialog (display_count, expire_time, result_format, chart options, etc.)

Execution Result Panel​

The header of the result panel displays the following:

ItemDisplay
Left⚪ "Query Execution Result" + (if saved query) [배치시간=..., EQL ID=...]
Right▶ Start / ⏸ Stop buttons (Pause real-time result reception)

Result Chart (query_result_chart, 160px)​

  • Displays input count (input_count_cur) and inputs per minute (input_count_min) in the top right.
  • The chart fills as result data begins to arrive in the form of a real-time line chart.
  • Before data arrives, it shows "Waiting for chart data reception..." (rotating icon).

Result Table (query_result_table)​

ColumnDescription
#Row number
Output TimeThe time the EQL emitted the result
Row CountNumber of rows in a single emit
DataResult body in JSON or table format

The result table will continue to accumulate unless execution is stopped. Accumulation stops when the Stop button is pressed or a new query is executed.


Trigger Screen Reference​

A separate Trigger menu is not present in the left menu. For installation environments currently operating with the existing /trigger/index screen or internal APIs, use the following content for legacy reference only. New automation should prioritize the trigger nodes in Flow and the Automation > EQL Query / Statement workflow.

Manage custom triggers that publish EQL matching results to external message channels or save them to storage.

Top Tools​

⚡ 트리거 [➕ 트리거 추가] [↻]

List Table​

The right side of the list panel header contains three buttons: Deploy Selected Triggers / Undeploy / Redeploy All.

ColumnWidthDescription
Select50pxCheckbox for batch deploy/undeploy
Status80pxDeploy/Undeploy badge
Trigger ID110pxSystem-assigned ID
Trigger Name | DescriptionAutoOperator-defined metadata
MQ Streaming70pxUse of MQ publishing (Y/N)
Storage Save70pxUse of storage loading for results (Y/N)
Total Execution Count70pxCumulative matching count
Last Execution Date110pxMost recent matching time
Error70pxCumulative error count
Registration Date110pxRegistration time
Last Modified Date110pxLast modification time
Action80pxEdit/Delete buttons

A guide box is displayed at the bottom of the page.

Using Custom Triggers You can add custom triggers that perform actions when specific conditions are met. Additionally, these can be streamed via MQ or saved to storage.

Trigger Add/Edit Form​

Click the Add Trigger button at the top to navigate to the form screen (/trigger/form).

1) Basic Information fieldset​

InputpathWidthNote
Trigger IDtrigger_id200pxRead Only — System assigned
Trigger Nametrigger_name450pxHuman-identifiable name
Descriptiontrigger_desc600 × 100px (textarea)Trigger purpose

2) EQL fieldset​

InputpathDescription
EQLepl8-row textarea — Write EQL query (SELECT ... FROM ... WHERE ...)
▶ Test Run(Icon)runQuery() — Immediately test run the written EQL. Results are displayed in the Query Result table (graph_query_result) below

Query Result Table (Test Run Preview):

ColumnDescription
Output TimeThe time the EQL emitted the result
DataResult body

3) Streaming fieldset​

InputpathDescription
MQ Output Enableduse_mq (Checkbox)Whether to publish result data to an external message channel
Protocolmq_protocol (Selector)MQTT or KAFKA
Destinationmq_destination (450px)Target topic/channel for publishing — Separator: KAFKA -, MQTT /. Example: device-machine-topic-1 or device/machine/topic_1

4) Storage Save fieldset​

InputpathDescription
Storage Save Enableduse_storage (Checkbox)Whether to load result data into storage

The storage table name and column definition area are currently disabled as the trigger result storage table is fixed.

Form Submission​

ButtonAction
List(☰)Return to trigger list screen
Save (Blue)Save after input validation. Saving alone does not deploy; you must click Deploy Selected Triggers in the list screen to start actual operation

Redeploy All​

ButtonLocationAction
Redeploy AllRight of list panel header (🔁)Batch redeploy all registered triggers. Use after rule engine restart or system inspection

Operating Procedure​

  1. Add Trigger → Enter EQL, Streaming, and Storage options → Save
  2. Check the trigger in the list → Click Deploy Selected Triggers → Status changes to "Deployed"
  3. To temporarily stop during operation, click Undeploy → Status changes to "Undeployed"
  4. After inspection, use Redeploy All for batch restart

Statement Screen (/statement/index)​

This screen is used to view the status and execution statistics of domain rules (state/aggregation/event/command) registered by asset unit.

Top Search/Filter​

√ 스테이트먼트 [유형 ▼] [검색 ...] [조회] [↻]
ControlOptionDescription
Type Selector (search_type)All Types, State (CONTEXT), Aggregation (AGGREGATION), Event (EVENT), Command (COMMAND)Filter for the 4 rule types
Search Input (txt)(250px)placeholder: "Search ..." — Rule name/applied asset ID/description keywords
Inquiry(Red + 🔍)search() — Refresh list based on conditions
Refresh(Red + ↻)refresh() — Refresh screen

4 Rule Types​

CodeEnglishMeaning
CONTEXTStateDefines the current state of an asset (running/stopped/anomaly) using EQL
AGGREGATIONAggregationAggregates values like average/maximum over a certain window
EVENTEventPublishes a domain event when a specific pattern (e.g., threshold exceedance) occurs
COMMANDCommandPublishes a command (flow_on_asset_command) to the asset upon rule match

List Table​

ColumnWidthDescription
Status80pxActive/Inactive badge
Applied Asset ID150pxIdentifier of the asset to which the rule is assigned
Type80pxOne of the 4 types (see table above)
Statement NameAutoRule name
Description300pxRule memo
Total Execution Count80pxCumulative number of rule matches
Last Execution Date120pxMost recent matching time
Error60pxCumulative error count
Registration Date120pxRule registration time
Details50pxClick to view rule details screen (/statement/view)

Creating Statements — Required Fields by Type​

Statements are attached to equipment. Select equipment from the asset tree and open Add Statement in the Registry tab (visible to ADMIN only). This screen (/statement/index) is for inquiry and operation.

For EQL SELECT, all output fields designated for the specific type must be provided for the statement to be saved. This is because the Platform reads values by those names. Other fields are optional.

TypeDialog NameRequired Fields
EVENTEventtimestamp · plugin · name · color · from_timestamp · to_timestamp · value
CONTEXTContexttimestamp · plugin · key · value
AGGREGATIONAggregationtimestamp · plugin · key · value
COMMANDCommandtimestamp · plugin · key · value
FieldMeaning
timestampEvent time (epoch ms)
pluginSource plugin (OEE, RAM, EMS, etc.)
keyItem name (Name of state, aggregation, or command)
valueValue
nameEvent name
colorDisplay color
from_timestamp · to_timestampStart · End time (epoch ms)

Fields are output using ... AS 칸 or by selecting an existing field with the same name. SELECT * will not pass because the field name is not present in the sentence. Selecting a type changes the Fields required for this type guide, and the editor is filled with the template for that type if it is empty.

SELECT
timestamp AS timestamp,
'-' AS plugin,
'' AS key,
'' AS value
FROM Point(tag_id = '...')

The dialog is designed to be validated first via EQL Execution (▶) before saving. If a field is missing, saving is rejected (HTTP 422, asset_statement.eql.missing_columns), and the missing field is displayed in an orange box below the EQL editor.

The EQL of the AGGREGATION statement is missing required fields: key. You must output timestamp, plugin, key, and value using the output name of SELECT (... AS field).

The same rule applies to Console, V5, ISO plugin application, plugin templates, and MCP validate_eql. Values other than the four specified types are rejected as asset_statement.eql.unknown_type.

View Details​

Clicking the Details button in the list navigates to a separate screen (/statement/view/{asset_id}/{statement_name}) where the following can be viewed (refer to Statement Details Screen below).

  • Rule EQL body
  • Execution result history
  • Execution trend/aggregation
  • Analysis performance trend
  • Status history

Statement Details Screen​

An analysis view (statement/view.jsp, 715 lines) entered via the details button. It consolidates all operational information for a single rule into one screen.

Top — Identification Header​

√ 스테이트먼트 | {statement_name} [ {asset_id} ] [← 목록] [↻]
ButtonAction
List(←)Return to /statement/index
RefreshReload screen

Panel 1 — Statement Information (5-Column Table)​

ColumnWidthDescription
Status250pxActive/Inactive + Last execution time
Statement NameAutoRule name
Applied Asset200pxAsset domain badge — Click to move to Asset Tree
Type200pxState (CONTEXT), Aggregation (AGGREGATION), Event (EVENT), Command (COMMAND)
Registration Date160pxRule registration time

EQL Body fieldset​

The EQL query body of the rule is displayed exactly. You can copy it from the text area and paste it into the Query Screen for a test run.

Input/Output fieldset​

AreaDisplay
Input SeriesList of tags and event types used as rule inputs
Output SeriesDomain event types published by the rule
Reset Error CountReset only the cumulative error count to 0 (resetErrorCount(asset_id, statement_name))

Panel 2 — Execution Result History (4-Column Table)​

ColumnWidthDescription
Execution Time160pxTime the rule was executed
Result60pxSuccess (Green) / Error (Red)
Result Value / Error MessageAutoResult body if successful, error message if error
Copy50px📋 — Copy result value/error message to clipboard

Panel 3 — Execution Trend Chart​

ItemDescription
Header📊 "Execution Trend"
ButtonToday (switchTrendDay(0)) / Yesterday (switchTrendDay(-1)) toggle
ChartCumulative success/error bars by hour for 24 hours (Series: Success, Error)

Panel 4 — Execution Aggregation​

ItemDescription
Header📊 "Execution Aggregation"
ButtonToday (switchAggDay(0)) / Yesterday (switchAggDay(-1)) toggle
fieldset 1Minute-level aggregation (Count by hour, average throughput, etc.)
fieldset 2Priority or result distribution

Panel 5 — Analysis Performance Trend​

ItemDescription
Header🖥 "Analysis Performance Trend"
ButtonToday (switchCpuDay(0)) / Yesterday (switchCpuDay(-1)) toggle
ChartTime series of CPU/processing time used for rule processing — Identify heavy rules

Panel 6 — Status History Table​

ColumnDescription
Change TimeTime of rule status change (Active, Undeployed, Redeployed, etc.)
StatusChanged status

Used to track the rule lifecycle (when it was activated, undeployed, or modified).

Utilization Patterns​

Analysis FlowScreen Flow
Error Rule DiagnosisExecution Result History → Error Message → Copy → Review EQL Body → Test Run in Query Screen
Identifying Heavy RulesAnalysis Performance Trend → Time period with high CPU usage → Simplify EQL Body
Rule Match Distribution AnalysisExecution Trend + Aggregation → Matching patterns by hour
Operational Rule MaintenanceStatus History → Track activation/undeploy timing

Use Case Scenarios​

ScenarioScreenProcedure
Immediate check of current line operation statusQueryEnter SELECT * FROM AssetData.win:time(1 sec) WHERE asset_id='LINE-A' in EQL input window → ▶
Testing and deploying a new alarm ruleTriggerAdd → Write EQL → ▶ Test Run → Verify result → Save → Deploy
Relaying asset events to external SCADATriggerPublish EQL matching messages to MQTT topic scada/line-a/events
Inspection of rules by asset unitStatementType=EVENT + Search Asset ID → Active rule list + Execution count
Suspected rule floodingStatementCheck rules with large total execution counts first → Review EQL/Input in Details
Receiving rule results via automationFlowReceive domain rule results directly via flow_on_asset_event trigger

Frequently Asked Questions​

Q. Is EQL the same as SQL? A. While they use similar syntax, EQL is an event processing language that adds the concepts of time windows and streams. For example, Point.win:time(5 sec) processes only data from the last 5 seconds, while Point.win:length(100) processes only the last 100 records.

Q. Are queries executed in the Query screen saved? A. Execution via ▶ is temporary; you must click the Save This Query button to save it to favorites. For one-time analysis, you do not need to save.

Q. I saved a trigger, but it is not working. A. Saving only registers the definition. You must check that trigger in the list and click Deploy Selected Triggers for it to be registered in the rule engine and begin matching.

Q. How should I define the trigger destination? A. The separator differs based on the Protocol:

  • KAFKA: Hyphen (-) separator — Example: device-machine-topic-1
  • MQTT: Slash (/) separator — Example: device/machine/topic_1

Q. Searches in the Statement screen are returning no results. A. Please check if "Type" (All) is selected in the type selector. Also, partial match searches are performed even if only a part of the asset ID is entered.

Q. The total execution count is abnormally high. A. It is likely that the rule's input window is too narrow or the matching conditions are too broad. Review the EQL via the Details button or use trigger patterns (*_pattern) in Flow to pre-filter messages.

Q. The EQL test run result for the trigger is empty. A. There may be no data inflow at the time of the test, or the EQL window may be too long, delaying the first match. Wait for about 1 minute and check again, or adjust the window to be shorter (win:time(1 sec)) for testing.

Q. How do I temporarily stop a trigger? A. Check the trigger in the list and click Undeploy. To start it again, use Deploy Selected Triggers.

Q. Are rules automatically assigned to assets? A. Depending on the operating environment settings, basic domain rules may be automatically assigned when an asset is registered. Check the currently applied rules in the Statement screen; if additions or removals are needed, proceed via the system administrator or the asset-specific settings screen.

Q. I want to process EQL results automatically. A. You can automatically receive domain rule results via asset triggers (flow_on_asset_event/flow_on_asset_alarm, etc.) in Flow and link them to follow-up actions (issuing work orders, email, external API calls).


  • Data Point — Time series tag data that serves as EQL input
  • Alarm — Operational screen for alarms generated by triggers
  • Flow — Automatic processing of rule results via asset triggers
  • Factory Management — Rule assignment in the asset tree
  • Status Code Definition — Status codes (NORMAL/WARN/ERROR) evaluated by rules
  • Diagnostic — Error logs during rule processing