<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: Signal wildcards behave in an unexpected way</title><link>https://answers.axonivy.com/questions/3797/signal-wildcards-behave-in-an-unexpected-way</link><description>&lt;p&gt;Hi Axon.ivy Team,&lt;/p&gt;
&lt;p&gt;I'm using Axon.ivy LTS 7.0.8 and I'm getting an issue related to &lt;code&gt;Signal&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;I have 4 signal receivers:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;one&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;one:two&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;one:two:three&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;one:two:three:four&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;When I send the signal &lt;code&gt;one:two:three:four&lt;/code&gt;,  I expect that only the (4) receiver would be triggered. Unfortunately, I was  surprised that &lt;strong&gt;all&lt;/strong&gt; four of them were triggered.&lt;/p&gt;
&lt;p&gt;&lt;img alt="all four signal receivers are triggered" src="https://answers.axonivy.com/upfiles/image_(3).png"&gt;&lt;/p&gt;
&lt;p&gt;According to the official document, I would expect that only if I use the wildcard in the pattern of the Receiver, I will have the same behaviours (&lt;code&gt;one:*&lt;/code&gt;, &lt;code&gt;one:two:*&lt;/code&gt;, &lt;code&gt;one:two:three:*&lt;/code&gt;) but in this case, the wildcard does not matter much here.&lt;/p&gt;
&lt;p&gt;Is it a bug or by design that the Signal Receivers behave like that?&lt;/p&gt;
&lt;p&gt;Thanks!
Jack&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/3797/signal-wildcards-behave-in-an-unexpected-way" rel="self"></atom:link><language>en</language><lastBuildDate>Fri, 17 May 2019 08:37:20 -0400</lastBuildDate><item><title>Comment by Reguel Wermelinger on Reguel Wermelinger's answer</title><link>https://answers.axonivy.com/questions/3797/signal-wildcards-behave-in-an-unexpected-way#3816</link><description>&lt;p&gt;Your suggestion is what we had for several sprint in place and was actually our first approach. Based on the feedback we got back then we switched to prefix matching without the explicit wildcard to ease listener definitions (users got annoyed by the repetitive asterics definition work).
However, now we can't easily change that behaviour without braking existing workflows. But I guess that in most cases you can easily work around that behaviour if you dont like it. 
&lt;img src="https://answers.axonivy.com/upfiles/signalPatterns_wfDemo.png" width="600"&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reguel Wermelinger</dc:creator><pubDate>Fri, 17 May 2019 08:37:20 -0400</pubDate><guid>https://answers.axonivy.com/questions/3797/signal-wildcards-behave-in-an-unexpected-way#3816</guid></item><item><title>Comment by vagabond on Reguel Wermelinger's answer</title><link>https://answers.axonivy.com/questions/3797/signal-wildcards-behave-in-an-unexpected-way#3814</link><description>&lt;p&gt;Hi Reguel Wermelinger, in my opinion, if I define a signal receiver to listen to &lt;code&gt;only:this&lt;/code&gt;, then only a &lt;code&gt;SignalCode&lt;/code&gt; of  &lt;code&gt;only:this&lt;/code&gt; can trigger it. If I want the current behavior, I'd define &lt;code&gt;only:this:*&lt;/code&gt;. To me, this is more intuitive.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">vagabond</dc:creator><pubDate>Thu, 16 May 2019 10:58:38 -0400</pubDate><guid>https://answers.axonivy.com/questions/3797/signal-wildcards-behave-in-an-unexpected-way#3814</guid></item><item><title>Answer by Reguel Wermelinger</title><link>https://answers.axonivy.com/questions/3797/signal-wildcards-behave-in-an-unexpected-way/3798</link><description>&lt;p&gt;Hi Jack&lt;/p&gt;
&lt;p&gt;that the signals are fired here is expected. Signal codes are hierarchical and can be used pretty much like package names in java.
the idea is that one fires &lt;code&gt;acme:cool:wf:customer:signed:up:3424&lt;/code&gt;
and starts can listen to this signals by using a parent code: e.g. &lt;code&gt;acme&lt;/code&gt;, &lt;code&gt;acme:cool&lt;/code&gt;, &lt;code&gt;acme:cool:wf&lt;/code&gt;, &lt;code&gt;acme:cool:wf:customer&lt;/code&gt;, &lt;code&gt;acme:cool:wf:customer:signed&lt;/code&gt;, &lt;code&gt;acme:cool:wf:customer:signed:up&lt;/code&gt;
the wildcard at the end is not necessary. But it is required if a listener should react to wildcards on the left side of the code:
&lt;code&gt;*:cool:wf:customer&lt;/code&gt; is a valid example of a wildcard.&lt;/p&gt;
&lt;p&gt;But I see 2 problems exposed by your question:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;signal wildcards are currently documented in a misleading way in the designer guide. So I'll try to clarify this chapter.&lt;/li&gt;
&lt;li&gt;and we allow to inscribe patterns such as &lt;code&gt;acme:*&lt;/code&gt; but at runtime these starts are not fired. That's a bug in my opinion. Not important as you can easily skip the wildcard and have the result you'd expect. But I'll address it in XIVY-3220.&lt;/li&gt;
&lt;/ul&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reguel Wermelinger</dc:creator><pubDate>Wed, 15 May 2019 09:44:43 -0400</pubDate><guid>https://answers.axonivy.com/questions/3797/signal-wildcards-behave-in-an-unexpected-way/3798</guid></item></channel></rss>