<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: Joining two signal?</title><link>https://answers.axonivy.com/questions/2228/joining-two-signal</link><description>&lt;p&gt;Hi all&lt;/p&gt;
&lt;p&gt;I have a requirement as below:
&lt;img alt="alt text" src="http://answers.axonivy.com/upfiles/Untitled_850woR8.png"&gt;&lt;/p&gt;
&lt;p&gt;In here i have two process which send two different signals,  When one signal has been started, it will wait (by a system task) until the other signal also be started then two signal will join to do another logic. Signal 1 and Signal 2 can be started randomly. If i implement like above picture, the system task will not join to continue when two signals has started already, i guess it's because of there is two different cases. Am i correct?&lt;/p&gt;
&lt;p&gt;Another approach could be using a boundary signal event. &lt;/p&gt;
&lt;p&gt;But is there any other approaches which is better than it on ivy? i see in ivy we also has other elements like &lt;em&gt;wait&lt;/em&gt;, &lt;em&gt;Call &amp;amp; Wait&lt;/em&gt;,... Can i apply it for this requirement.&lt;/p&gt;
&lt;p&gt;Thanks a lot&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/2228/joining-two-signal" rel="self"></atom:link><language>en</language><lastBuildDate>Thu, 22 Mar 2018 10:26:51 -0400</lastBuildDate><item><title>Answer by adamf</title><link>https://answers.axonivy.com/questions/2228/joining-two-signal/3141</link><description>&lt;p&gt;You can do this in pure java with a &lt;a href="https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/CountDownLatch.html"&gt;CountDownLatch&lt;/a&gt;. Inside the "join tasks" script you a Java class with a static method that does the countDown and await. If you want it per user id, have a map of CounDownLatches.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">adamf</dc:creator><pubDate>Thu, 22 Mar 2018 10:26:51 -0400</pubDate><guid>https://answers.axonivy.com/questions/2228/joining-two-signal/3141</guid></item><item><title>Answer by Flavio Sadeghi</title><link>https://answers.axonivy.com/questions/2228/joining-two-signal/2239</link><description>&lt;p&gt;There is no solution out of the box yet. So you have to solve it by yourself. One solution could be to work with a joinging-key. Every Case which has to be finished before a “Process X” can be started is tagged with this joining key. So the “Process X“ can check if there exists running cases with this “joining-key” and will not start until there exists none. The ‘joining-key’ can be created by the initial signal, which creates the parallel cases or has to depend on this case, so that every signaled process use the same 'joining-key'.&lt;/p&gt;
&lt;p&gt;The below example illustrates this use case. &lt;/p&gt;
&lt;p&gt;&lt;img alt="Join Signals with a joining-key" src="http://answers.axonivy.com/upfiles/JoiningSignals.PNG"&gt;&lt;/p&gt;
&lt;p&gt;I will come back to this question on monday with some further details. And hopefully there is a easier solution to solve such use cases. But to be honest, I think this is a miss usage of signals...&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Flavio Sadeghi</dc:creator><pubDate>Thu, 01 Dec 2016 16:17:54 -0500</pubDate><guid>https://answers.axonivy.com/questions/2228/joining-two-signal/2239</guid></item></channel></rss>