本文介绍了FIWARE通用启动器CEP中的Complext事件结构-Proton的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的FI-WARE体系结构中将Proton用作CEP GE.

I'd like to use Proton as CEP GE in my FI-WARE architecture.

我请求您的帮助是因为我遇到了一个结构复杂的事件,并且我想了解如何定义它以及应该使用它的EPA.

I ask your help because I have an event that has a complex structure and I would like to understand how can I define it and the EPA that should use it.

我检入您在此Wiki中提供的文档 https://forge.fiware.org/plugins/mediawiki /wiki/fiware/index.php/CEP_GE_-_IBM_Proactive_Technology_Online_User_and_Programmer_Guide 接着 forge.fiware.org/plugins/mediawiki/wiki/fiware/index .php/Complex_Event_Processing_Open_RESTful_API_Specification http://forge.fiware.org /plugins/mediawiki/wiki/fiware/index.php/FIWARE.ArchitectureDescription.Data.CEP

I check in documents you provide in this wikihttps://forge.fiware.org/plugins/mediawiki/wiki/fiware/index.php/CEP_GE_-_IBM_Proactive_Technology_Online_User_and_Programmer_Guideand thenforge.fiware.org/plugins/mediawiki/wiki/fiware/index.php/Complex_Event_Processing_Open_RESTful_API_Specificationandhttp://forge.fiware.org/plugins/mediawiki/wiki/fiware/index.php/FIWARE.ArchitectureDescription.Data.CEP

但是在事件配置或EPA(事件处理代理)配置中,或者在如何使用REST API设置事件描述方面,我找不到关于类型对象属性的任何信息.

but I don't find anything about attributes of type object in event configuration or EPA (Event Process Agent) configuration or how set up the event description using REST api.

传入事件的json结构是这样的(我知道这里缺少name属性)

the json structure of incoming event is this (I know that name attribute here is missing)

{"contextElements":[
    {"type":"ADD",
    "isPattern":false,
    "id":"ADD_MESSAGE_com.liferay.portlet.messageboards.model.MBMessage_111516",
    "attributes":[
        {"name":"id_","type":"long","value":"32302"},
        {"name":"companyId","type":"long","value":"10157"},
        {"name":"groupId","type":"long","value":"10184"},
        {"name":"userId","type":"long","value":"10201"},
        {"name":"date","type":"date","value":"12-mar-2015"},
        {"name":"type","type":"string","value":"ADD_MESSAGE"},
        {"name":"className","type":"string","value":"com.liferay.portlet.messageboards.model.MBMessage"},
        {"name":"classPK","type":"string","value":"111516"},
        {"name":"classUuid","type":"string","value":"9cd599c5-e01e-417d-9118-a636beed7145"},
        {"name":"model","type":"string","value":"{32302}"}
        ]}
    ],
"updateAction":"APPEND"}

然后,EPA应检查名称":"groupId"属性"字段的值".我认为使用Proton UI做到这一点并不容易( http://130.206.81.23:8080 /AuthoringTool/Main.html ).我在那里创建了一个名为is3_like_eng_test的新项目.

The EPA should then check the "value" of "name":"groupId" "attributes" field.I don't think is easy to do it using Proton UI (http://130.206.81.23:8080/AuthoringTool/Main.html). I created there a new project named is3_like_eng_test.

您能否向我介绍一个资源,该资源深入解释如何创建我也需要的质子项目json文件.

Could you address me to a resource that deeply explain how create the proton project json file I need also.

提前谢谢

推荐答案

要定义事件,您需要在UI中创建一个新的Event,并向其中添加一个属性列表,每个属性都有一个名称和一个类型.
在此教程中,您可以看到事件定义的示例.

To define an event, you need to create a new Event in the UI, and add to it a list of attributes, each has a name and a type.
In this tutorial you can see an example of event definition.

此事件可用作EPA的输入事件.在上述教程中,您可以看到完整的CEP应用程序定义和运行时示例.

This event can be used as input event for EPAs. In the tutorial mentioned above, you can see complete CEP application definition, and runtime examples.

稍后,在运行时,您可以使用 REST API .支持三种格式:

Later, at runtime, you can send the CEP input events using REST api. There are three supported formats:

  • 平面JSON.示例:

  • Flat JSON. Example:

{"Name":"TrafficReport", "volume":"1000"}

标签定界格式.示例:

Name=TrafficReport;volume=1000;

NGSI XML-请参见上面的链接中的示例.

NGSI XML - see example in the above link.

这篇关于FIWARE通用启动器CEP中的Complext事件结构-Proton的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-10 01:34