<div class="gmail_quote">Hi,<br><br>I&#39;m new to drools and having troubles in using drools with seam framework. Specifically speaking,<br><br>I have the following tables(namely entities):<br>User table:<br>Long id,<br>String name,<br>
List&lt;AccountPermission&gt; permissions<br>
<br>AccountPermission table:<br>Long id,<br>User user,<br>Account account<br><br>Account table:<br>Long id,<br>Long name,<br>Set&lt;Comment&gt; comments<br><br>Comment table:<br>Long id,<br>Account account<br><br>and my drl file:<br>

<br>rule &quot;insertCommentRule&quot;<br>    no-loop<br>when<br>        $check: PermissionCheck(target == &quot;commentHome&quot;, action == &quot;insertComment&quot;)<br>        Principal($username: name)<br>     &lt;...........more rules should be put here&gt;<br>

then<br>       $check.grant();<br>end<br><br>Lastly, I have an action in CommentHome, a seam component with name &quot;commentHome&quot; and this action is used to insert a comment.<br><br>As above, I understand some rules can be put there to control whether the current user is authorised to insert a comment. However, I have failed in many different ways.<br>

I looked through seam books and reference as well. Nothing really explained clearly on how to do a process control with seam components.<br><br>All I wanna do is to check whether a user who just log in with valid credentials have permissions to insert comments. It&#39;s really hard for me to get to that point. So could anybody show me how to do it with seam? I really appreciate it. Thanks in advance.<br>

<br><br><br><br>
</div><br>