Questions Tagged With userhttps://answers.axonivy.com/tags/user/?type=rss&user=Nikel%20Weisquestions tagged <span class="tag">user</span>enThu, 15 May 2014 11:30:21 -0400How to avoid IllegalStateException during login & logout in a Script-Step?https://answers.axonivy.com/questions/694/how-to-avoid-illegalstateexception-during-login-logout-in-a-script-step<p>We have a certain situation where the current named user shall be logged out and be logged in as a different user. The problem is, that this results in an illegal task state. Code in the script step:</p> <pre><code>ivy.session.loginSessionUser("user1", "user1"); if(in.isSuperior == true) { ivy.session.loginSessionUser("superiorUser", "superiorUser"); } </code></pre> <p>Exception:</p> <pre><code>Exception at element [13B4B87B3A16CFA4-f15-io0]: java.lang.IllegalStateException: State of Task must be one of the following values CREATED, RESUMED but is ZOMBIE: </code></pre> <p>Is there a way to avoid this behavoir?</p> <p>Xpert.ivy 4.3. - error occurs on Designer &amp; Server level.</p>Nikel WeisThu, 15 May 2014 11:30:21 -0400https://answers.axonivy.com/questions/694/how-to-avoid-illegalstateexception-during-login-logout-in-a-script-stepuser