SourceForge has been redesigned. Learn more.
Close

rulefactoryexample not working

Help
Bao
2013-07-18
2013-07-22
  • Bao

    Bao - 2013-07-18

    Hello,

    I am trying to get the rulefactoryexample running but it doesn't seem to work and I am kind of stuck here.
    I've followed the steps in the example

    1. kept the original code, because I want to use overspeed(50)
    2. startupinit.java in addTableFactories I uncommented this line
      // To add the RuleFactoryExample module:
      Device.setRuleFactory(new RuleFactoryExample());
    3. in config.cnf I uncommented this line
      startupInit.Device.NotificationFieldInfo=true
      and updated the database, I can now see the extra fields in the database
      rebuild and redeploy
    4. I can see the fields in the device admin
    5. I filled out this in the device admin
      notify enable : yes
      notify email : myemail@gmail.com
      rule selector : overSpeed(50)
      notify subject : some subject
      notify body : some body
    6. then I send this link
      http://baobabexpress.com:8080/gprmc/Data?id=358281002237505&lat=50.853400&lon=4.733816&alt=10&date=20130718&time=1223612&&speed=120
      and the eventdata shows up in the database but nothing of the notification happens

    I already sent a testmail using bin/checkInstall.sh -sendMail myemailaddress@example.com and this worked fine.
    I also found that if I add
    RuleFactory.class=org.opengts.db.RuleFactoryExample
    to the common.cnf that doing checkInstall.sh says factory installed.

    I have no idea what I could have missed. Any ideas someone?
    Thanks

     
    Last edit: Bao 2013-07-18
  • Bao

    Bao - 2013-07-22

    After a lot of debuging I found the problem, it actually was something stupid I didn't see.
    In the factoryexample there is this line

    private static boolean SEND_NOTIFICATION = true; // set to 'true' for production

    This was set to false and so it didn't work.

     

Log in to post a comment.