Flag events where duration is negative

Flag events where duration is negative

In this article, you will find the rules document for flagging events where duration is negative.

Before you begin

To learn how to access the rules page, refer to this article.

Flag events where duration is negative

Notes
Note: This is a complete rules document. In the rules page, copy this JSON into the editor.

Info
[
  {
    "name": "json1",
    "operator": "any",
    "rules": [
      {
        "conditions": {
          "all": [
            {
              "fact": "duration",
              "operator": "lessThan",
              "value": 0
            }
          ]
        },
        "event": {
          "type": "flagged",
          "params": {
            "reason": "Invalid event time: startTime can not be greater than endTime"
          }
        }
      }
    ]
  }
]