3 Replies Latest reply on Dec 30, 2008 8:52 AM by Raghunath Nandy

    need drools permissions hello world application

    Raghunath Nandy Newbie

      Hi
      I'm new to drools and trying to implement permissions using drools
      rules. I'm able to understand point by point using seamspace example.
      But I'm not able to run the rule in my helloworld app. here is my sample code


      1)I generated seam application using jboss tools


      rule apple
      when
       check: PermissionCheck(name=="Ale",action == "ale")
      then
      System.out.println("Hello World");
      check.grant();
      end



      2)


      @Name("Ale")
      public class Ale
      {
              @Logger private Log log;
          public void ale()
          {
                log.info("Ale.ale() action called");
          }
      
      }
      



      2)I'm trying to print the permissions on my xhtml page using following expression.
                


      #{s:hasPermission(Ale,'ale')}




      Here I'm trying to validate the permission.
      When ever I call Ale.ale() then rule should  print Hello World but it's not at all going through


      I'm novice at drools rules. I'm searching explanation for here.
      As per my understanding
      hasPermission checks permissions on (target or name)->action (PermissionCheck)
      And I'm not able to understand few things here..
      a) As per my requirement I want to render a component based on ownership and with few conditions. here my mind is empty
      because I'm still at HelloWorld in drools.



      please suggest me ..


      thanks
      raghu