<div dir="ltr">The rule should be formatted as he originally posted:<div><br></div><div><span class="im" style="font-size:12.8000001907349px">&lt;rule id=&quot;TagLib release&quot;&gt;<br>       &lt;when&gt;<br></span><span style="font-size:12.8000001907349px">            &lt;filecontent matches=&quot;{*}&quot; filename=&quot;</span><span style="font-size:12.8000001907349px">{*}Tag.java</span><span style="font-size:12.8000001907349px">&quot;/&gt;</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">       &lt;/when&gt;</span></div><div><span style="color:rgb(80,0,80);font-size:12.8000001907349px">        &lt;otherwise&gt;</span><br style="color:rgb(80,0,80);font-size:12.8000001907349px"><span style="color:rgb(80,0,80);font-size:12.8000001907349px">                      &lt;hint message=&quot;C7.1 : No release in Tag&quot; effort=&quot;4&quot; /&gt;</span><br style="color:rgb(80,0,80);font-size:12.8000001907349px"><span style="color:rgb(80,0,80);font-size:12.8000001907349px">        &lt;/otherwise&gt;</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">  &lt;/rule&gt;</span><br></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">It sounds like there might be a bug here if the &quot;otherwise&quot; clause is not being picked up. We&#39;ll have to look into this! I created an issue for it: <a href="https://issues.jboss.org/browse/WINDUP-613">https://issues.jboss.org/browse/WINDUP-613</a></span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">Thanks,</span></div><div><span style="font-size:12.8000001907349px">Lincoln</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 27, 2015 at 7:07 AM, Ondrej Zizka <span dir="ltr">&lt;<a href="mailto:ozizka@redhat.com" target="_blank">ozizka@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I am no expert on &lt;otherwise&gt;, but I think that it has no context of<br>
what was found.<br>
In other words, you are trying to apply &lt;hint&gt;, but Windup doesn&#39;t know<br>
what to apply it to. The file is only &quot;known&quot; in the scope of nested<br>
&lt;when&gt; and in &lt;perform&gt; .<br>
Again, that&#39;s my guess, someone more knowledgable may confirm or not.<br>
<br>
If I am right, then you could either do a nested &lt;perform&gt;&lt;iteration&gt;:<br>
The first would find {*}Tag.java, the nested &lt;when&gt; would find the<br>
pattern, or not:<br>
<span class=""><br>
&lt;rule id=&quot;TagLib release&quot;&gt;<br>
       &lt;when&gt;<br>
</span>            &lt;filename pathPattern=&quot;{*}Tag.java&quot; as=&quot;file&quot;/&gt;<br>
       &lt;/when&gt;<br>
       &lt;perform&gt;&lt;iteration&gt;<br>
              &lt;when&gt;<br>
                  &lt;filecontent pattern=&quot;release&quot; fileref=&quot;file&quot; /&gt;<br>
<span class="">              &lt;/when&gt;<br>
              &lt;otherwise&gt;<br>
                      &lt;hint message=&quot;C7.1 : No release in Tag&quot; effort=&quot;4&quot; /&gt;<br>
              &lt;/otherwise&gt;<br>
</span>       &lt;/iteration&gt;&lt;/perform&gt;<br>
  &lt;/rule&gt;<br>
<br>
This won&#39;t work, we don&#39;t have &lt;filename&gt; and &lt;filecontent&gt; doesn&#39;t have fileref.<br>
A chance for you to submit a Jira :)<br>
<br>
HTH,<br>
<br>
Ondra<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
On 22.5.2015 12:14, Gilles Bardouillet wrote:<br>
&gt;<br>
&gt; Hi,<br>
&gt;<br>
&gt; I wrote an XML rule with an action specified in &quot;otherwise&quot; part, but<br>
&gt; the action is not launched when the condition is false :-(<br>
&gt;<br>
&gt; Here is my rule :<br>
&gt; &lt;rule id=&quot;TagLib release&quot;&gt;<br>
&gt;               &lt;when&gt;<br>
&gt;                   &lt;filecontent pattern=&quot;release&quot; filename=&quot;{*}Tag.java&quot; /&gt;<br>
&gt;               &lt;/when&gt;<br>
&gt;               &lt;otherwise&gt;<br>
&gt;                       &lt;hint message=&quot;C7.1 : No release in Tag&quot; effort=&quot;4&quot; /&gt;<br>
&gt;               &lt;/otherwise&gt;<br>
&gt; &lt;/rule&gt;<br>
&gt;<br>
&gt; In overview panel, this xml rule is converted in<br>
&gt; addRule()<br>
&gt; .when(And.all(FileContent.matches(release).inFilesNamed({*}Tag.java).as(default))<br>
&gt; )<br>
&gt;       .perform(new NoOp()<br>
&gt; )<br>
&gt; withId(&quot;TagLib release&quot;)<br>
&gt;<br>
&gt; It seems that &quot;otherwise&quot; action disappeared !<br>
&gt;<br>
&gt; Any tip ?<br>
&gt;<br>
&gt;<br>
&gt; Gilles.<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Windup-users mailing list<br>
&gt; <a href="mailto:Windup-users@lists.jboss.org">Windup-users@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/windup-users" target="_blank">https://lists.jboss.org/mailman/listinfo/windup-users</a><br>
<br>
_______________________________________________<br>
Windup-users mailing list<br>
<a href="mailto:Windup-users@lists.jboss.org">Windup-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/windup-users" target="_blank">https://lists.jboss.org/mailman/listinfo/windup-users</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Lincoln Baxter, III<br><a href="http://ocpsoft.org" target="_blank">http://ocpsoft.org</a><br>&quot;Simpler is better.&quot;</div>
</div>