David Griffon created UNOMI-518:
-----------------------------------
Summary: 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: 1.5.7, 2.0.0, 1.6.0
Reporter: David Griffon
Fix For: 2.0.0, 1.6.0
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)