<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: Issue with receiving and sending the same signal in a process</title><link>https://answers.axonivy.com/questions/1869/issue-with-receiving-and-sending-the-same-signal-in-a-process</link><description>&lt;p&gt;Hi everyone&lt;/p&gt;
&lt;p&gt;So I have a process with a User Task that has a signal boundary event that listens to a certain signal X. After the user task is finished I check some values and depending on that I want to send the same signal X. See the image below: &lt;/p&gt;
&lt;p&gt;&lt;img alt="no alt text" src="http://answers.axonivy.com/upfiles/signals.png"&gt;&lt;/p&gt;
&lt;p&gt;But when that signal is sent I get the following exception:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;java.lang.IllegalStateException: State of Task must be one of the following values CREATED, RESUMED but is DESTROYED
  at ch.ivyteam.api.API.checkObjectState(API.java:323)
  at ch.ivyteam.ivy.workflow.internal.Task.end(Task.java:2642)
  at ch.ivyteam.ivy.workflow.internal.Task$49.execute(Task.java:2618)
  at ch.ivyteam.ivy.persistence.base.AbstractPersistencyService.execute(AbstractPersistencyService.java:176)
  at ch.ivyteam.ivy.persistence.base.AbstractPersistencyService.execute(AbstractPersistencyService.java:233)
  at ch.ivyteam.ivy.persistence.base.ClassPersistencyService.execute(ClassPersistencyService.java:660)
[...]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I uploaded a demo project here: &lt;a href="https://drive.google.com/file/d/0B3V8Sh7Fl7FXR3dzMFhzVzJlTEk/view?usp=sharing"&gt;https://drive.google.com/file/d/0B3V8Sh7Fl7FXR3dzMFhzVzJlTEk/view?usp=sharing&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Thanks in advance&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/1869/issue-with-receiving-and-sending-the-same-signal-in-a-process" rel="self"></atom:link><language>en</language><lastBuildDate>Wed, 13 Jul 2016 10:03:48 -0400</lastBuildDate><item><title>Answer by Flavio Sadeghi</title><link>https://answers.axonivy.com/questions/1869/issue-with-receiving-and-sending-the-same-signal-in-a-process/1886</link><description>&lt;p&gt;This exception can happen because of different reasons. &lt;/p&gt;
&lt;p&gt;Mainly when the current task has been destroyed by a signal. In this case the signal to destroy a task is sent in the same task, so the task did destroy itself. This is the correct behaviour because the listening boundary Signal Event is also active when the task is in state RESUMED. &lt;/p&gt;
&lt;p&gt;As a workaround you can place a task switch element before the sending script element and configure the task switch to execute the task as system. So the task where the boundary signal event is listening on is in state DONE and therefore not in scope of the sending signal event.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Flavio Sadeghi</dc:creator><pubDate>Wed, 13 Jul 2016 10:03:48 -0400</pubDate><guid>https://answers.axonivy.com/questions/1869/issue-with-receiving-and-sending-the-same-signal-in-a-process/1886</guid></item><item><title>Comment by Lars Tuchel on Reto Weiss's answer</title><link>https://answers.axonivy.com/questions/1869/issue-with-receiving-and-sending-the-same-signal-in-a-process#1880</link><description>&lt;p&gt;done. Thank you. See XIVY-1201&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Lars Tuchel</dc:creator><pubDate>Mon, 11 Jul 2016 13:45:59 -0400</pubDate><guid>https://answers.axonivy.com/questions/1869/issue-with-receiving-and-sending-the-same-signal-in-a-process#1880</guid></item><item><title>Comment by Lars Tuchel on Lars Tuchel's question</title><link>https://answers.axonivy.com/questions/1869/issue-with-receiving-and-sending-the-same-signal-in-a-process#1871</link><description>&lt;p&gt;No, still the same exception&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Lars Tuchel</dc:creator><pubDate>Tue, 05 Jul 2016 16:01:37 -0400</pubDate><guid>https://answers.axonivy.com/questions/1869/issue-with-receiving-and-sending-the-same-signal-in-a-process#1871</guid></item><item><title>Comment by Reguel Wermelinger on Lars Tuchel's question</title><link>https://answers.axonivy.com/questions/1869/issue-with-receiving-and-sending-the-same-signal-in-a-process#1870</link><description>&lt;p&gt;Does it work if you remove the Task-End-Event after the Signal-Boundary-Event?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reguel Wermelinger</dc:creator><pubDate>Tue, 05 Jul 2016 14:51:13 -0400</pubDate><guid>https://answers.axonivy.com/questions/1869/issue-with-receiving-and-sending-the-same-signal-in-a-process#1870</guid></item></channel></rss>