Uploaded image for project: 'Help-Desk'
  1. Help-Desk
  2. HELP-3482

FIWARE.Request.Tech.Data.CEP.If condition

    Details

    • Type: extRequest
    • Status: Closed
    • Priority: Major
    • Resolution: Done
    • Fix Version/s: 2021
    • Component/s: FIWARE-TECH-HELP
    • Labels:
      None

      Description

      Dear All,

      I am trying to use If condition in the assertion part in CEP, I was
      wondering if someone can provide an example. I am trying to do this logic:

      Incoming event1

      If event1.x>1 then event2.y=2 else event2.y=3 endif

      Derived event
      event2

      I have tried to write it but getting error in the authoring tool. Attached
      the definition file.

      Also if you can provide an example for the :
      Crosses – Crosses(statFunc ,Resolution, ...) checks which boundary was
      crossed by the status function, while considering the resolution of the
      boundary.

      Assuming it's working.

      Best,
      Ahmed Sadek

      _______________________________________________
      Fiware-tech-help mailing list
      Fiware-tech-help@lists.fi-ware.org
      https://lists.fi-ware.org/listinfo/fiware-tech-help

      [Created via e-mail received from: Ahmed Sadek <asadek@kth.se>]

        Activity

        Hide
        fw.ext.user FW External User added a comment -

        Dear Ahmed,

        I just passed the case to the Ge owner.

        Regards,

        Miguel

        El 02/07/2015 a las 12:28, Ahmed Sadek escribió:
        Dear All,

        I am trying to use If condition in the assertion part in CEP, I was wondering if someone can provide an example. I am trying to do this logic:

        Incoming event1

        If event1.x>1 then event2.y=2 else event2.y=3 endif

        Derived event
        event2

        I have tried to write it but getting error in the authoring tool. Attached the definition file.

        Also if you can provide an example for the :
        Crosses – Crosses(statFunc ,Resolution, ...) checks which boundary was crossed by the status function, while considering the resolution of the boundary.

        Assuming it's working.

        Best,
        Ahmed Sadek

        Show
        fw.ext.user FW External User added a comment - Dear Ahmed, I just passed the case to the Ge owner. Regards, Miguel El 02/07/2015 a las 12:28, Ahmed Sadek escribió: Dear All, I am trying to use If condition in the assertion part in CEP, I was wondering if someone can provide an example. I am trying to do this logic: Incoming event1 If event1.x>1 then event2.y=2 else event2.y=3 endif Derived event event2 I have tried to write it but getting error in the authoring tool. Attached the definition file. Also if you can provide an example for the : Crosses – Crosses(statFunc ,Resolution, ...) checks which boundary was crossed by the status function, while considering the resolution of the boundary. Assuming it's working. Best, Ahmed Sadek
        Hide
        fw.ext.user FW External User added a comment -

        Dear Fabiana,

        No I have only 1 event as an input, it's medical data measurements that
        contain heart rate, respiration rates ...and other bio vitals. I want to
        check if heart rate exceeds certain value then generate alarm 1, if
        respiration rate exceeds certain limit then generate alarm 2 ..etc and for
        that I am using event 2 as an output to consumers where it will be sent
        using rest calls.

        Is there are a better way to implement this logic than this ?

        Best,
        Ahmed

        On Sat, Jul 4, 2015 at 9:02 AM, Help-Desk <jira-help-desk@fi-ware.org>

        Show
        fw.ext.user FW External User added a comment - Dear Fabiana, No I have only 1 event as an input, it's medical data measurements that contain heart rate, respiration rates ...and other bio vitals. I want to check if heart rate exceeds certain value then generate alarm 1, if respiration rate exceeds certain limit then generate alarm 2 ..etc and for that I am using event 2 as an output to consumers where it will be sent using rest calls. Is there are a better way to implement this logic than this ? Best, Ahmed On Sat, Jul 4, 2015 at 9:02 AM, Help-Desk <jira-help-desk@fi-ware.org>
        Hide
        fw.ext.user FW External User added a comment -

        Dear Fabiana,

        1- What is the format for writing If statement in this assertion so I can
        generate event x when condition 1 is satisfied and event y when condition 2
        satisfied.
        2- When I choose basic EPA, I can not input assertion as it says "
        No condition attributes for this EPA type. You may want to change the EPA
        type
        "

        Best,
        Ahmed

        On Sat, Jul 4, 2015 at 10:44 AM, Help-Desk <jira-help-desk@fi-ware.org>

        Show
        fw.ext.user FW External User added a comment - Dear Fabiana, 1- What is the format for writing If statement in this assertion so I can generate event x when condition 1 is satisfied and event y when condition 2 satisfied. 2- When I choose basic EPA, I can not input assertion as it says " No condition attributes for this EPA type. You may want to change the EPA type " Best, Ahmed On Sat, Jul 4, 2015 at 10:44 AM, Help-Desk <jira-help-desk@fi-ware.org>
        Hide
        TALI Fabiana Fournier added a comment -

        The issue has been emailed:

        • Time sent: 14/Jul/15 8:50 AM
        • To: asadek@kth.se
        • Cc: fiware-tech-help@lists.fi-ware.org
        • with subject: *(HELP-3482) FIWARE.Request.Lab.Data.CEP.If condition *

        Dear Ahmed,

        We have looked into it and indeed you need a FILTER condition in the Basic event processing agent. However you can just insert "TRUE" as a condition so the assertion in the derivation will be always calculated as I previously written.
        Please let me know if you succeeded so I can close the ticket
        Thanks
        Fabiana

        Show
        TALI Fabiana Fournier added a comment - The issue has been emailed: Time sent: 14/Jul/15 8:50 AM To: asadek@kth.se Cc: fiware-tech-help@lists.fi-ware.org with subject: *( HELP-3482 ) FIWARE.Request.Lab.Data.CEP.If condition * Dear Ahmed, We have looked into it and indeed you need a FILTER condition in the Basic event processing agent. However you can just insert "TRUE" as a condition so the assertion in the derivation will be always calculated as I previously written. Please let me know if you succeeded so I can close the ticket Thanks Fabiana

          People

          • Assignee:
            TALI Fabiana Fournier
            Reporter:
            fw.ext.user FW External User
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: