graphaware/neo4j-timetree

Automatic Event Attachment is not working on debian

Closed this issue · 4 comments

This is my neo4j.properties conf related to time tree.

Runtime must be enabled like this

com.graphaware.runtime.enabled=true

A Runtime module that takes care of attaching the events like this (TT is the ID of the module)

com.graphaware.module.TT.1=com.graphaware.module.timetree.module.TimeTreeModuleBootstrapper

Nodes which represent events and should be attached automatically have to be defined

com.graphaware.module.TT.event=hasLabel('Customer')

Optionally, a property on the event nodes that represents the the time (long) at which the event took place must be specified (defaults to "timestamp")

#com.graphaware.module.TT.timestamp=time

Optionally, a property on the event nodes that represents the node ID (long) of the root node for the tree, to which the event should be attached (defaults to "timeTreeRootId")

com.graphaware.module.TT.customTimeTreeRootProperty=rootId

Optionally, a resolution can be specified (defaults to DAY)

com.graphaware.module.TT.resolution=HOUR

Optionally, a time zone can be specified (defaults to UTC)

#com.graphaware.module.TT.timezone=GMT+5.5

Optionally, a relationship type with which the events will be attached to the tree can be specified (defaults to AT_TIME)

com.graphaware.module.TT.relationship=CREATED_ON

autoAttach must be set to true

com.graphaware.module.TT.autoAttach=true

Query i am using to create node is
CREATE (n:Customer {timestamp: 1436941284 , timeTreeRootId: 42, name: "test"}) return n;

Where 42 is the timetree root node ID.

Its failing to add event automatically to timetree.
If i use POST API to create event, its being attached successfully but not automatically.

Thanks.
Sreekanth

Do you have any other GraphAware Modules running?

Wrote a passing test for this, see related commits. If you have another module running, make sure to change the second line of config to:
com.graphaware.module.TT.2=com.graphaware.module.timetree.module.TimeTreeModuleBootstrapper

Also, by looking at your configuration and the fact that you use custom root id on your event nodes, be sure to uncomment this line in order to use the node with id 42 as TimeTree root :

com.graphaware.module.TT.customTimeTreeRootProperty=rootId

It's fixed, I was running another graphaware module.
Thank you so much.