As said here : https://issues.apache.org/jira/browse/UNOMI-171 it seems ok
but there must be either a bug or something that is not quite right.


Here are the steps to debug:

   1. Start Karaf using: ./karaf debug
   2. Connect a debugger inside your IDE (Eclipse, Intellij IDEA) to remote
   connect to port 5005
   3. Set some breakpoints in
   theorg.apache.unomi.plugins.baseplugin.actions.SetPropertyAction.execute
   method
   4. Send the event to trigger the rule -> that should trigger your
   breakpoint



Serge Huber
CTO & Co-Founder
T +41 22 361 3424
9 route des Jeunes | 1227 Acacias | Switzerland
jahia.com <http://www.jahia.com/>
SKYPE | LINKEDIN <https://www.linkedin.com/in/sergehuber> | TWITTER
<https://twitter.com/sergehuber> | VCARD
<http://www.jahia.com/vcard/HuberSerge.vcf>


> JOIN OUR COMMUNITY <http://www.jahia.com/> to evaluate, get trained and
to discover why Jahia is a leading User Experience Platform (UXP) for
Digital Transformation.

On Thu, Mar 15, 2018 at 2:49 PM, mitesh jain <[email protected]> wrote:

> Hi,
>
> I had installed Unomi 1.3.0
>
> Elastic Search: 5.6.3 with cluster.name: contextElasticSearch
>
> Karaf is running successfully.
>
> Following steps I tried to, call a event and execute rules agains it and
> set the property value
>
> 1. I had created new property called "categoryLastVisitedID" through Rest
> API, created property below:
>
> {
>
>   "itemId": "categoryLastVisitedID",
>
>   "itemType": "propertyType",
>
>   "version": 8,
>
>   "target": "profiles",
>
>   "defaultValue": null,
>
>   "dateRanges": [
>
>
>
>   ],
>
>   "numericRanges": [
>
>
>
>   ],
>
>   "ipRanges": [
>
>
>
>   ],
>
>   "automaticMappingsFrom": [
>
>
>
>   ],
>
>   "rank": null,
>
>   "mergeStrategy": null,
>
>   "multivalued": null,
>
>   "protected": false,
>
>   "metadata": {
>
>     "id": "categoryLastVisitedID",
>
>     "name": "categoryLastVisitedID",
>
>     "description": null,
>
>     "scope": "luxebe",
>
>     "tags": [
>
>
>
>     ],
>
>     "systemTags": [
>
>       "profileProperties",
>
>       "properties",
>
>       "systemProfileProperties"
>
>     ],
>
>     "enabled": true,
>
>     "missingPlugins": false,
>
>     "hidden": false,
>
>     "readOnly": false
>
>   },
>
>   "type": "integer"
>
> }
>
> 2. I had created a new rule called "profileCategoryUpdate" through Rest
> API, shown below
>
> {
>
>   "itemId": "profileCategoryUpdate",
>
>   "itemType": "rule",
>
>   "version": 23,
>
>   "condition": {
>
>     "parameterValues": {
>
>       "eventTypeId": "categoryVisit"
>
>     },
>
>     "type": "eventTypeCondition"
>
>   },
>
>   "actions": [
>
>     {
>
>       "parameterValues": {
>
>         "setPropertyName": "properties.categoryLastVisitedID",
>
>         "setPropertyValue": "1",
>
>         "storeInSession": false
>
>       },
>
>       "type": "setPropertyAction"
>
>     }
>
>   ],
>
>   "linkedItems": null,
>
>   "raiseEventOnlyOnceForProfile": false,
>
>   "raiseEventOnlyOnceForSession": false,
>
>   "priority": 0,
>
>   "metadata": {
>
>     "id": "profileCategoryUpdate",
>
>     "name": "Category assigned to a profile",
>
>     "description": "Update profile category information",
>
>     "scope": "luxebe",
>
>     "tags": [
>
>
>
>     ],
>
>     "systemTags": [
>
>
>
>     ],
>
>     "enabled": true,
>
>     "missingPlugins": false,
>
>     "hidden": false,
>
>     "readOnly": true
>
>   }
>
> }
>
> 3. I had triggered event from angular application, with event type:
> "categoryVisit" which is matching the rule created above, and also action
> setting the "categoryLastVisitedID" to 1, but profile is not getting the
> property "categoryLastVisitedID"
> Event triggered given below:
> {
> "itemId": "d1ba896d-fa6a-4598-aaa1-497c5e7b6fad",
> "itemType": "event",
> "scope": "systemscope",
> "version": 1,
> "eventType": "categoryVisit",
> "sessionId": "ef9150af-346d-42aa-bb48-d19afa2b8f17",
> "profileId": "e2dfd376-8e13-4209-a1f3-b56a86548a3d",
> "timeStamp": "2018-03-12T13:46:19Z",
> "properties": {
>
> },
> "source": {
> "itemId": "aHR0cDovL2xvY2FsaG9zdDo1NTU2L2NhdGVnb3J5L2VwaWN1cmVhbg==",
> "itemType": "page",
> "scope": "systemscope",
> "version": null,
> "properties":
>
> { "url": "http://localhost:5556/category/epicurean";, "categoryId": 42 }
>
> },
> "target": null
> }
>
> Please let me know, If I am doing anything wrong, as I am not able to set
> the property "categoryLastVisitedID" for a profile ?
>
> Thanks,
>
> Mitesh Jain
>

Reply via email to