Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subscription using wrong regex patterns #968

Closed
fgalan opened this issue Jun 10, 2015 · 1 comment
Closed

Subscription using wrong regex patterns #968

fgalan opened this issue Jun 10, 2015 · 1 comment
Assignees
Labels
Milestone

Comments

@fgalan
Copy link
Member

fgalan commented Jun 10, 2015

Raised during Developers Week Viena 2015.

It seem there are problems with subscriptions using patterns when the pattern is not a righ regex. Eg, when using * (wrong) instead of .* (right). Details below (IPs has been offuscated).

Orion Context Broker GE
version 0.14.0
image 3.4

Subscription request

Endpoint: http://A.B.C.D:1026/ngsi10/subscribeContext

payload:

{
    "entities": [
        {
            "type": "Patient",
            "isPattern": "true",
            "id": "*"
        }
    ],
    "attributes": [
        "Blood glucose",
        "Body temperature",
        "Systolic blood pressure",
        "Diastolic blood pressure",
        "Respiration rate",
        "Heart rate",
        "Blood oxygen",
        "timestamp"
    ],
    "reference": "http://A.B.C.D:5999/orion2mysql",
    "duration": "P1Y",
    "notifyConditions": [
        {
            "type": "ONCHANGE",
            "condValues": [
                "timestamp"
            ]
        }
    ],
    "throttling": "PT1S"
}

Update request:
Endpoint: http://A.B.C.D:1026/ngsi10/updateContext

Payload:

{
     "contextElements":
     [
        {
            "type": "Patient",
            "isPattern": "false",
            "id": "Patient138866191",
            "attributes": [
            {
                "name": "Heart rate",
                "type": "bpm",
                "value": "72"
            },
            {
                "name" : "Diastolic blood pressure",
                "type" : "mmHg",
                "value" : "11.6"
            },
            {
                "name" : "Systolic blood pressure",
                "type" : "mmHg",
                "value" : "7.6"
            },
            {
                "name" : "timestamp",
                "type" : "Europe/Athens",
                "value" : "2014-12-09 17:05:34"
            }
            ]
        }
    ],
    "updateAction": "APPEND"
}

You have to replace the id:"Patient138866191" included in the update request payload with id:"GR138866191" to get a right response.

@fgalan
Copy link
Member Author

fgalan commented Sep 22, 2015

Need to check if the problem happens in a recent version (Orion 0.24.0).

@crbrox crbrox self-assigned this Jun 17, 2016
@fgalan fgalan added this to the 1.3.0 milestone Jun 17, 2016
@fgalan fgalan changed the title Subscription using wring regex patterns Subscription using wrong regex patterns Jun 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants