You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@unomi.apache.org by "David Griffon (Jira)" <ji...@apache.org> on 2021/10/21 16:51:00 UTC

[jira] [Closed] (UNOMI-518) trackedConditions are not compatible with conditions generated by the condition builder

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

David Griffon closed UNOMI-518.
-------------------------------
    Resolution: Fixed

> trackedConditions are not compatible with conditions generated by the condition builder
> ---------------------------------------------------------------------------------------
>
>                 Key: UNOMI-518
>                 URL: https://issues.apache.org/jira/browse/UNOMI-518
>             Project: Apache Unomi
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 2.0.0, 1.6.0, 1.5.7
>            Reporter: David Griffon
>            Priority: Major
>             Fix For: 2.0.0, 1.6.0
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> To be able to make the source condition working on Unomi side we would require to parse the parent Condition of the trackedCondition. So it mean a fix would be required in Unomi RuleService.getTrackedConditions(...) to be able to better detect the source condition when a condition like ours is using it's own definition but actually contains a source condition in it's parent definition.
> Currently Unomi tracked conditions are detecting the boolean condition that would contains a sourceEventCondition to check if the source of the request match the sourceEventCondition of the tracked condition.
> But this cannot work with a built condition like the clickEventCondition, because this condition is not a boolean condition it self.
> {code}
> {
>   "metadata": {
>     "id": "clickEventCondition",
>     "name": "clickEventCondition",
>     "description": "",
>     "systemTags": [
>       "availableToEndUser",
>       "behavioral",
>       "profileTags",
>       "event",
>       "condition",
>       "eventCondition",
>       "usableInPastEventCondition",
>       "trackedCondition"
>     ],
>     "readOnly": true
>   },
>   "parentCondition": {
>     "type": "booleanCondition",
>     "parameterValues": {
>       "subConditions": [
>         {
>           "type": "eventTypeCondition",
>           "parameterValues": {
>             "eventTypeId": "click"
>           }
>         },
>         {
>           "type": "sourceEventPropertyCondition",
>           "parameterValues": {
>             "path": "parameter::pagePath"
>           }
>         },
>         {
>           "type": "eventPropertyCondition",
>           "parameterValues": {
>             "propertyName": "target.itemId",
>             "propertyValue": "parameter::itemId",
>             "comparisonOperator": "equals"
>           }
>         }
>       ],
>       "operator": "and"
>     }
>   },
>   "parameters": [
>     {
>       "id": "pagePath",
>       "type": "string",
>       "multivalued": false
>     },
>     {
>       "id": "itemId",
>       "type": "string",
>       "multivalued": false
>     }
>   ]
> }
> {code}
> But the clickEventCondition is using a parent condition that is a boolean.
> So we may look into improve the Unomi algoritm to detect the sourceEventCondition of the trackedCondition that are not boolean condition, by looking into the parent condition if we find something.
> It's also possible to do completely differently if we find a more suitable solution. (new systemtag for this kind of condition ? new handling of this in unomi without breaking the existing behaviors ?)



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