From gilles.bardouillet at atos.net Fri May 22 06:14:02 2015
From: gilles.bardouillet at atos.net (Gilles Bardouillet)
Date: Fri, 22 May 2015 12:14:02 +0200
Subject: [Windup-users] XML Rule with otherwise action
In-Reply-To: <555E0E68.1090204@atos.net>
References: <555E0E68.1090204@atos.net>
Message-ID: <555F016A.10509@atos.net>
Hi,
I wrote an XML rule with an action specified in "otherwise" part, but
the action is not launched when the condition is false :-(
Here is my rule :
In overview panel, this xml rule is converted in
addRule()
.when(And.all(FileContent.matches(release).inFilesNamed({*}Tag.java).as(default))
)
.perform(new NoOp()
)
withId("TagLib release")
It seems that "otherwise" action disappeared !
Any tip ?
Gilles.
From ozizka at redhat.com Wed May 27 07:07:44 2015
From: ozizka at redhat.com (Ondrej Zizka)
Date: Wed, 27 May 2015 13:07:44 +0200
Subject: [Windup-users] XML Rule with otherwise action
In-Reply-To: <555F016A.10509@atos.net>
References: <555E0E68.1090204@atos.net> <555F016A.10509@atos.net>
Message-ID: <5565A580.9080507@redhat.com>
I am no expert on , but I think that it has no context of
what was found.
In other words, you are trying to apply , but Windup doesn't know
what to apply it to. The file is only "known" in the scope of nested
and in .
Again, that's my guess, someone more knowledgable may confirm or not.
If I am right, then you could either do a nested :
The first would find {*}Tag.java, the nested would find the
pattern, or not:
This won't work, we don't have and doesn't have fileref.
A chance for you to submit a Jira :)
HTH,
Ondra
On 22.5.2015 12:14, Gilles Bardouillet wrote:
>
> Hi,
>
> I wrote an XML rule with an action specified in "otherwise" part, but
> the action is not launched when the condition is false :-(
>
> Here is my rule :
>
>
>
>
>
>
>
>
>
> In overview panel, this xml rule is converted in
> addRule()
> .when(And.all(FileContent.matches(release).inFilesNamed({*}Tag.java).as(default))
> )
> .perform(new NoOp()
> )
> withId("TagLib release")
>
> It seems that "otherwise" action disappeared !
>
> Any tip ?
>
>
> Gilles.
>
> _______________________________________________
> Windup-users mailing list
> Windup-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/windup-users
From lincolnbaxter at gmail.com Wed May 27 12:20:04 2015
From: lincolnbaxter at gmail.com (Lincoln Baxter, III)
Date: Wed, 27 May 2015 12:20:04 -0400
Subject: [Windup-users] XML Rule with otherwise action
In-Reply-To: <5565A580.9080507@redhat.com>
References: <555E0E68.1090204@atos.net> <555F016A.10509@atos.net>
<5565A580.9080507@redhat.com>
Message-ID:
The rule should be formatted as he originally posted:
It sounds like there might be a bug here if the "otherwise" clause is not
being picked up. We'll have to look into this! I created an issue for it:
https://issues.jboss.org/browse/WINDUP-613
Thanks,
Lincoln
On Wed, May 27, 2015 at 7:07 AM, Ondrej Zizka wrote:
> I am no expert on , but I think that it has no context of
> what was found.
> In other words, you are trying to apply , but Windup doesn't know
> what to apply it to. The file is only "known" in the scope of nested
> and in .
> Again, that's my guess, someone more knowledgable may confirm or not.
>
> If I am right, then you could either do a nested :
> The first would find {*}Tag.java, the nested would find the
> pattern, or not:
>
>
>
>
>
>
>
>
>
>
> />
>
>
>
>
> This won't work, we don't have and doesn't have
> fileref.
> A chance for you to submit a Jira :)
>
> HTH,
>
> Ondra
>
>
> On 22.5.2015 12:14, Gilles Bardouillet wrote:
> >
> > Hi,
> >
> > I wrote an XML rule with an action specified in "otherwise" part, but
> > the action is not launched when the condition is false :-(
> >
> > Here is my rule :
> >
> >
> > />
> >
> >
> > effort="4" />
> >
> >
> >
> > In overview panel, this xml rule is converted in
> > addRule()
> >
> .when(And.all(FileContent.matches(release).inFilesNamed({*}Tag.java).as(default))
> > )
> > .perform(new NoOp()
> > )
> > withId("TagLib release")
> >
> > It seems that "otherwise" action disappeared !
> >
> > Any tip ?
> >
> >
> > Gilles.
> >
> > _______________________________________________
> > Windup-users mailing list
> > Windup-users at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/windup-users
>
> _______________________________________________
> Windup-users mailing list
> Windup-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/windup-users
>
--
Lincoln Baxter, III
http://ocpsoft.org
"Simpler is better."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/windup-users/attachments/20150527/168569cc/attachment.html
From lincolnbaxter at gmail.com Wed May 27 12:24:50 2015
From: lincolnbaxter at gmail.com (Lincoln Baxter, III)
Date: Wed, 27 May 2015 12:24:50 -0400
Subject: [Windup-users] XML Rule with otherwise action
In-Reply-To:
References: <555E0E68.1090204@atos.net> <555F016A.10509@atos.net>
<5565A580.9080507@redhat.com>
Message-ID:
Actually, on further thought, I bet that the negated rule *is* created, but
the system doesn't really know how to handle this situation.
You should see a second rule in the output:
addRule()
.when(Not.any(And.all(FileContent.matches(release).inFilesNamed(
{*}Tag.java).as(default))))
.perform(Hint.message("C7.1 : No release in Tag"))
.withId("TagLib release")
However, with the way our system currently works, the otherwise will never
fire because there probably ARE matches in teh system the have that
filecontent. This is something we need to address.
~Lincoln
On Wed, May 27, 2015 at 12:20 PM, Lincoln Baxter, III <
lincolnbaxter at gmail.com> wrote:
> The rule should be formatted as he originally posted:
>
>
>
>
>
>
> />
>
>
>
> It sounds like there might be a bug here if the "otherwise" clause is not
> being picked up. We'll have to look into this! I created an issue for it:
> https://issues.jboss.org/browse/WINDUP-613
>
> Thanks,
> Lincoln
>
> On Wed, May 27, 2015 at 7:07 AM, Ondrej Zizka wrote:
>
>> I am no expert on , but I think that it has no context of
>> what was found.
>> In other words, you are trying to apply , but Windup doesn't know
>> what to apply it to. The file is only "known" in the scope of nested
>> and in .
>> Again, that's my guess, someone more knowledgable may confirm or not.
>>
>> If I am right, then you could either do a nested :
>> The first would find {*}Tag.java, the nested would find the
>> pattern, or not:
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> > />
>>
>>
>>
>>
>> This won't work, we don't have and doesn't have
>> fileref.
>> A chance for you to submit a Jira :)
>>
>> HTH,
>>
>> Ondra
>>
>>
>> On 22.5.2015 12:14, Gilles Bardouillet wrote:
>> >
>> > Hi,
>> >
>> > I wrote an XML rule with an action specified in "otherwise" part, but
>> > the action is not launched when the condition is false :-(
>> >
>> > Here is my rule :
>> >
>> >
>> > > />
>> >
>> >
>> > > effort="4" />
>> >
>> >
>> >
>> > In overview panel, this xml rule is converted in
>> > addRule()
>> >
>> .when(And.all(FileContent.matches(release).inFilesNamed({*}Tag.java).as(default))
>> > )
>> > .perform(new NoOp()
>> > )
>> > withId("TagLib release")
>> >
>> > It seems that "otherwise" action disappeared !
>> >
>> > Any tip ?
>> >
>> >
>> > Gilles.
>> >
>> > _______________________________________________
>> > Windup-users mailing list
>> > Windup-users at lists.jboss.org
>> > https://lists.jboss.org/mailman/listinfo/windup-users
>>
>> _______________________________________________
>> Windup-users mailing list
>> Windup-users at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/windup-users
>>
>
>
>
> --
> Lincoln Baxter, III
> http://ocpsoft.org
> "Simpler is better."
>
--
Lincoln Baxter, III
http://ocpsoft.org
"Simpler is better."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/windup-users/attachments/20150527/0334a208/attachment.html
From gilles.bardouillet at atos.net Thu May 21 12:57:12 2015
From: gilles.bardouillet at atos.net (Gilles Bardouillet)
Date: Thu, 21 May 2015 18:57:12 +0200
Subject: [Windup-users] XML Rule with otherwise action
Message-ID: <555E0E68.1090204@atos.net>
Hi,
I wrote an XML rule with an action specified in "otherwise" part, but
the action is not launched when the condition is false :-(
Here is my rule :
In overview panel, this xml rule is converted in
addRule()
.when(And.all(FileContent.matches(release).inFilesNamed({*}Tag.java).as(default))
)
.perform(new NoOp()
)
withId("TagLib release")
It seems that "otherwise" action disappeared !
Any tip ?
Gilles.