forked from community/device-mgt-plugins
parent
d1fb11a0c0
commit
99054e1e77
@ -1,26 +0,0 @@
|
||||
/* Enter a unique ExecutionPlan */
|
||||
@Plan:name('Geo-ExecutionPlan-EventsFusionGenerateNotifications')
|
||||
|
||||
/* Enter a unique description for ExecutionPlan */
|
||||
-- @Plan:description('ExecutionPlan')
|
||||
|
||||
/* define streams/tables and write queries here ... */
|
||||
|
||||
@Plan:trace('false')
|
||||
|
||||
@Import('org.wso2.geo.ProcessedSpatialEvents:1.0.0')
|
||||
define stream dataIn (id string, latitude double, longitude double, timeStamp long, type string, speed float, heading float, eventId string, state string, information string );
|
||||
|
||||
@Export('iot.per.device.stream.geo.AlertNotifications:1.0.0')
|
||||
define stream alertsOut ( id string, state string, information string, timeStamp long, latitude double, longitude double, type string);
|
||||
|
||||
@Export('iot.per.device.stream.geo.FusedSpatialEvent:1.0.0')
|
||||
define stream dataOut ( id string, latitude double, longitude double, timeStamp long, type string, speed float, heading float, state string, information string, notify bool );
|
||||
|
||||
from dataIn
|
||||
select id, latitude, longitude, timeStamp, type, speed, heading, state , information, (str:strcmp("ALERTED", state) == 0) as notify
|
||||
insert into dataOut;
|
||||
|
||||
from dataOut[notify == true]
|
||||
select id, state, information,timeStamp, latitude, longitude, type
|
||||
insert into alertsOut;
|
@ -1,21 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><!--
|
||||
~ Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
|
||||
~
|
||||
~ WSO2 Inc. licenses this file to you under the Apache License,
|
||||
~ Version 2.0 (the "License"); you may not use this file except
|
||||
~ in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing,
|
||||
~ software distributed under the License is distributed on an
|
||||
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
~ KIND, either express or implied. See the License for the
|
||||
~ specific language governing permissions and limitations
|
||||
~ under the License.
|
||||
-->
|
||||
|
||||
<artifact name="Geo-ExecutionPlan-EventsFusionGenerateNotifications" version="1.0.0" type="event/execution-plan" serverRole="GeoDashboard">
|
||||
<file>Geo-ExecutionPlan-EventsFusionGenerateNotifications-1.0.0.siddhiql</file>
|
||||
</artifact>
|
@ -1,21 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><!--
|
||||
~ Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
|
||||
~
|
||||
~ WSO2 Inc. licenses this file to you under the Apache License,
|
||||
~ Version 2.0 (the "License"); you may not use this file except
|
||||
~ in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing,
|
||||
~ software distributed under the License is distributed on an
|
||||
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
~ KIND, either express or implied. See the License for the
|
||||
~ specific language governing permissions and limitations
|
||||
~ under the License.
|
||||
-->
|
||||
|
||||
<artifact name="org.wso2.geo.ProcessedSpatialEvents" version="1.0.0" type="event/stream" serverRole="GeoDashboard">
|
||||
<file>org.wso2.geo.ProcessedSpatialEvents-1.0.0.json</file>
|
||||
</artifact>
|
@ -1,48 +0,0 @@
|
||||
{
|
||||
"name": "org.wso2.geo.ProcessedSpatialEvents",
|
||||
"version": "1.0.0",
|
||||
"nickName": "",
|
||||
"description": "",
|
||||
"payloadData": [
|
||||
{
|
||||
"name": "id",
|
||||
"type": "STRING"
|
||||
},
|
||||
{
|
||||
"name": "latitude",
|
||||
"type": "DOUBLE"
|
||||
},
|
||||
{
|
||||
"name": "longitude",
|
||||
"type": "DOUBLE"
|
||||
},
|
||||
{
|
||||
"name": "timeStamp",
|
||||
"type": "LONG"
|
||||
},
|
||||
{
|
||||
"name": "type",
|
||||
"type": "STRING"
|
||||
},
|
||||
{
|
||||
"name": "speed",
|
||||
"type": "FLOAT"
|
||||
},
|
||||
{
|
||||
"name": "heading",
|
||||
"type": "FLOAT"
|
||||
},
|
||||
{
|
||||
"name": "eventId",
|
||||
"type": "STRING"
|
||||
},
|
||||
{
|
||||
"name": "state",
|
||||
"type": "STRING"
|
||||
},
|
||||
{
|
||||
"name": "information",
|
||||
"type": "STRING"
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in new issue