[ 
https://issues.apache.org/jira/browse/UNOMI-359?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gary Thayer updated UNOMI-359:
------------------------------
    Description: 
I'm running into two problems when I try to create a segment with pastEvent 
conditions:
 # Segment creation with pastEventConditions
 ** If I create a segment with only one condition, and that condition is a 
pastEvent condition, the segment seems to work fine.
 ** A rule is created with a matching condition.
 ** If I create a segment with multiple conditions, the rule does not contain 
all conditions. I believe the additional conditions are being ignored.
 # Segments with custom "Conditions"
 ** If you group multiple checks into a "Condition", the created rule is 
malformed.
 ** For example: Creating this segment:

{noformat}
{
 "itemId": "wpUnomi_pageViewEventCondition",
 "itemType": "segment",
 "condition": {
 "parameterValues": {
 "operator": "and",
 "subConditions": [
 {
 "type": "pageViewEventCondition",
 "parameterValues": {
 "pageID": "/news"
 }
 }
 ]
 },
 "type": "booleanCondition"
 },
 "metadata": {
 "id": "wpUnomi_pageViewEventCondition40",
 "name": "pageViewEventCondition40",
 "description": null,
 "scope": null,
 "tags": [],
 "systemTags": [],
 "enabled": true,
 "missingPlugins": false,
 "hidden": false,
 "readOnly": false
 }
}{noformat}

 * 
 ** Created this rule:
 ** {
 "itemId": "eventTriggered791e293411ec6384c5629e381209e1f2",
 "itemType": "rule",
 "version": 1,
 "condition":
Unknown macro: \{ "parameterValues"}
,
 "actions": [
 {
 "parameterValues": {
 "pastEventCondition": {
 "parameterValues": {
 "operator": "and",
 "subConditions": [
Unknown macro: \{ "parameterValues"}
],
 "generatedPropertyKey": "eventTriggered791e293411ec6384c5629e381209e1f2"
 },
 "type": "booleanCondition"
 }
 },
 "type": "setEventOccurenceCountAction"
 }
 ],
 "linkedItems": [
 "wpUnomi_pageViewEventCondition40"
 ],
 "raiseEventOnlyOnceForProfile": false,
 "raiseEventOnlyOnceForSession": false,
 "raiseEventOnlyOnce": false,
 "priority": 0,
 "metadata":
{ "id": "eventTriggered791e293411ec6384c5629e381209e1f2", "name": "Auto 
generated rule for pageViewEventCondition40", "description": "", "scope": 
"systemscope", "tags": [], "systemTags": [], "enabled": true, "missingPlugins": 
false, "hidden": true, "readOnly": false }
}

 ** The structure of the pastEventCondition inside the rule is wrong.

 

I'm not sure if I am doing something wrong with these, or if I am actually 
hitting a bug. My current goal is to create a segment based on the pastEvents 
and profile values. A specific snag I am hitting is that the 'page' event has 
key which other events don't have, so the log is being filled with 
`{color:#de350b}Error evaluating value for org.apache.unomi.api.Event 
target.properties.pageInfo.pageName ognl.NoSuchPropertyException: 
org.apache.unomi.api.rules.Rule.properties{color}` errors. My intention was to 
limit the search to just page events.

  was:
I'm running into two problems when I try to create a segment with pastEvent 
conditions:
 # Segment creation with pastEventConditions
 ** If I create a segment with only one condition, and that condition is a 
pastEvent condition, the segment seems to work fine.
 ** A rule is created with a matching condition.
 ** If I create a segment with multiple conditions, the rule does not contain 
all conditions. I believe the additional conditions are being ignored.
 # Segments with custom "Conditions"
 ** If you group multiple checks into a "Condition", the created rule is 
malformed.
 ** For example: Creating this segment:
{
    "itemId": "wpUnomi_pageViewEventCondition",
    "itemType": "segment",
    "condition": {
        "parameterValues": {
            "operator": "and",
            "subConditions": [
                {
                    "type": "pageViewEventCondition",
                    "parameterValues": {
                        "pageID": "/news"
                    }
                }
            ]
        },
        "type": "booleanCondition"
    },
    "metadata": {
        "id": "wpUnomi_pageViewEventCondition40",
        "name": "pageViewEventCondition40",
        "description": null,
        "scope": null,
        "tags": [],
        "systemTags": [],
        "enabled": true,
        "missingPlugins": false,
        "hidden": false,
        "readOnly": false
    }
}
 

 ** Created this rule:
 ** 
{
    "itemId": "eventTriggered791e293411ec6384c5629e381209e1f2",
    "itemType": "rule",
    "version": 1,
    "condition": {
        "parameterValues": {
            "pageID": "/news"
        },
        "type": "pageViewEventCondition"
    },
    "actions": [
        {
            "parameterValues": {
                "pastEventCondition": {
                    "parameterValues": {
                        "operator": "and",
                        "subConditions": [
                            {
                                "parameterValues": {
                                    "pageID": "/news"
                                },
                                "type": "pageViewEventCondition"
                            }
                        ],
                        "generatedPropertyKey": 
"eventTriggered791e293411ec6384c5629e381209e1f2"
                    },
                    "type": "booleanCondition"
                }
            },
            "type": "setEventOccurenceCountAction"
        }
    ],
    "linkedItems": [
        "wpUnomi_pageViewEventCondition40"
    ],
    "raiseEventOnlyOnceForProfile": false,
    "raiseEventOnlyOnceForSession": false,
    "raiseEventOnlyOnce": false,
    "priority": 0,
    "metadata": {
        "id": "eventTriggered791e293411ec6384c5629e381209e1f2",
        "name": "Auto generated rule for pageViewEventCondition40",
        "description": "",
        "scope": "systemscope",
        "tags": [],
        "systemTags": [],
        "enabled": true,
        "missingPlugins": false,
        "hidden": true,
        "readOnly": false
    }
}
 ** The structure of the pastEventCondition inside the rule is wrong.

 

I'm not sure if I am doing something wrong with these, or if I am actually 
hitting a bug. My current goal is to create a segment based on the pastEvents 
and profile values. A specific snag I am hitting is that the 'page' event has 
key which other events don't have, so the log is being filled with 
`{color:#de350b}Error evaluating value for org.apache.unomi.api.Event 
target.properties.pageInfo.pageName ognl.NoSuchPropertyException: 
org.apache.unomi.api.rules.Rule.properties{color}` errors. My intention was to 
limit the search to just page events.


> Problems creating segments with pastEvent Conditions
> ----------------------------------------------------
>
>                 Key: UNOMI-359
>                 URL: https://issues.apache.org/jira/browse/UNOMI-359
>             Project: Apache Unomi
>          Issue Type: Bug
>            Reporter: Gary Thayer
>            Priority: Major
>
> I'm running into two problems when I try to create a segment with pastEvent 
> conditions:
>  # Segment creation with pastEventConditions
>  ** If I create a segment with only one condition, and that condition is a 
> pastEvent condition, the segment seems to work fine.
>  ** A rule is created with a matching condition.
>  ** If I create a segment with multiple conditions, the rule does not contain 
> all conditions. I believe the additional conditions are being ignored.
>  # Segments with custom "Conditions"
>  ** If you group multiple checks into a "Condition", the created rule is 
> malformed.
>  ** For example: Creating this segment:
> {noformat}
> {
>  "itemId": "wpUnomi_pageViewEventCondition",
>  "itemType": "segment",
>  "condition": {
>  "parameterValues": {
>  "operator": "and",
>  "subConditions": [
>  {
>  "type": "pageViewEventCondition",
>  "parameterValues": {
>  "pageID": "/news"
>  }
>  }
>  ]
>  },
>  "type": "booleanCondition"
>  },
>  "metadata": {
>  "id": "wpUnomi_pageViewEventCondition40",
>  "name": "pageViewEventCondition40",
>  "description": null,
>  "scope": null,
>  "tags": [],
>  "systemTags": [],
>  "enabled": true,
>  "missingPlugins": false,
>  "hidden": false,
>  "readOnly": false
>  }
> }{noformat}
>  * 
>  ** Created this rule:
>  ** {
>  "itemId": "eventTriggered791e293411ec6384c5629e381209e1f2",
>  "itemType": "rule",
>  "version": 1,
>  "condition":
> Unknown macro: \{ "parameterValues"}
> ,
>  "actions": [
>  {
>  "parameterValues": {
>  "pastEventCondition": {
>  "parameterValues": {
>  "operator": "and",
>  "subConditions": [
> Unknown macro: \{ "parameterValues"}
> ],
>  "generatedPropertyKey": "eventTriggered791e293411ec6384c5629e381209e1f2"
>  },
>  "type": "booleanCondition"
>  }
>  },
>  "type": "setEventOccurenceCountAction"
>  }
>  ],
>  "linkedItems": [
>  "wpUnomi_pageViewEventCondition40"
>  ],
>  "raiseEventOnlyOnceForProfile": false,
>  "raiseEventOnlyOnceForSession": false,
>  "raiseEventOnlyOnce": false,
>  "priority": 0,
>  "metadata":
> { "id": "eventTriggered791e293411ec6384c5629e381209e1f2", "name": "Auto 
> generated rule for pageViewEventCondition40", "description": "", "scope": 
> "systemscope", "tags": [], "systemTags": [], "enabled": true, 
> "missingPlugins": false, "hidden": true, "readOnly": false }
> }
>  ** The structure of the pastEventCondition inside the rule is wrong.
>  
> I'm not sure if I am doing something wrong with these, or if I am actually 
> hitting a bug. My current goal is to create a segment based on the pastEvents 
> and profile values. A specific snag I am hitting is that the 'page' event has 
> key which other events don't have, so the log is being filled with 
> `{color:#de350b}Error evaluating value for org.apache.unomi.api.Event 
> target.properties.pageInfo.pageName ognl.NoSuchPropertyException: 
> org.apache.unomi.api.rules.Rule.properties{color}` errors. My intention was 
> to limit the search to just page events.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to