Questions asked by Stefanhttps://answers.axonivy.com/questions/asked-by/37/stefan/?type=rssQuestions asked by <a href="/users/37/stefan" >Stefan</a>enWed, 27 Mar 2019 08:02:06 -0400How to remove a "unknown user"-sessionhttps://answers.axonivy.com/questions/3748/how-to-remove-a-unknown-user-session<p>If I logout a user from it's session (session.logoutSessionUser()), the session is still existing with an "unknown user". </p> <pre><code> ISecurityManager secMgr = SecurityManager.getSecurityManager(); for (ISession ssn : secMgr.getSessions()) { if (ssn.getSessionUserName().equalsIgnoreCase("xyz")) { ssn.logoutSessionUser(); } } </code></pre> <p>The session disappears only after a timeout (that might be the timeout defined in the tomcat configuration)</p> <p>However: Is there a way to close/kill a session immediately after logging out a user?</p>StefanWed, 27 Mar 2019 08:02:06 -0400https://answers.axonivy.com/questions/3748/how-to-remove-a-unknown-user-sessionsessionSet a task to DONE by using Ivy's APIhttps://answers.axonivy.com/questions/3618/set-a-task-to-done-by-using-ivy-s-api<p>Is it possible to set a suspended Task to DONE using the Ivy API? (as it is possible to destroy the task with ivy.task.destroy())</p> <p>UseCase: Within a process, a task is generated for a specific role (e.g. a task without user interaction / interface etc.) to report the progress. The system/process may now continue working in the background and, as soon it has been done its work, the state of the task should also be set to DONE by using java code (ivyscript code would also be possible). </p> <p>The reason for that is that the user should see this task in the task history but the task should not going to "destroyed"</p> <p>Thanks in advance for answers</p>StefanWed, 16 Jan 2019 05:44:48 -0500https://answers.axonivy.com/questions/3618/set-a-task-to-done-by-using-ivy-s-apiapitasksdoneDeactivate a user in ivy temporarilyhttps://answers.axonivy.com/questions/1741/deactivate-a-user-in-ivy-temporarily<p>Is it possible to deactivate (disable, not delete) a user temporarily in IWA_User to prevent logon with it's account to ivy, but don't lose it's userId?</p>StefanThu, 21 Apr 2016 09:25:16 -0400https://answers.axonivy.com/questions/1741/deactivate-a-user-in-ivy-temporarilyiwa_userDifference between UserReadAll or UserReadName Permission / Permission Overviewhttps://answers.axonivy.com/questions/1011/difference-between-userreadall-or-userreadname-permission-permission-overview<p>To read a users name (User.getName()) whitin a script element, I assigned the corresponding permission "UserReadAll" to the role the calling user owned. Nevertheless, ivy reports the Error "The session does not fulfill the permission rule SESSION (MATCHES THIS AND OWNS UserReadOwnName PERMISSION) OR OWNS UserReadName PERMISSION OR OWNS UserReadName@SYSTEM PERMISSION" After that, I added also the permission "UserReadName/UserReadFullName" and then it worked.</p> <p>What's the difference between "UserReadAll" and "UserReadName"? In my opinion, the "UserReadAll" permission should cover and allow all "Read" operations on a user object.</p> <p>Is there any documentation which explains the permission concept of ivy? I couldn't find any detailed information about in the documentation section available on the xpert.ivy download area.</p> <p>Thanks and regards, Stefan</p>StefanMon, 20 Oct 2014 10:35:24 -0400https://answers.axonivy.com/questions/1011/difference-between-userreadall-or-userreadname-permission-permission-overviewsecurityDeserialization of Java Bean not possible within an ivy Script Elementhttps://answers.axonivy.com/questions/545/deserialization-of-java-bean-not-possible-within-an-ivy-script-element<p>ivy 5.0.9</p> <p>I created an Helper Class which should serialize / deserialize a Java Bean with the java.beans.XMLEncoder / XMLDecoder Class. Serialization works great, but if I want to deserialize the xml string within an Ivy Script Element, I got the following Error: java.lang.ArrayIndexOutOfBoundsException: 0</p> <p>If I do the deserialization within the Helper Class itself (as described as follows), the deserialization works great. Is there a way to bring it working within the Ivy Script Step?</p> <p>Thanks in advance for your ideas...</p> <h2>Helper Class "decode"</h2> <pre><code>public Employee decode(String xml) { try { XMLDecoder decoder = new XMLDecoder(IOUtils.toInputStream(xml, "UTF-8")); Employee employee = (Employee) decoder.readObject(); decoder.close(); return employee; } catch (Exception ex) { Ivy.log().error(ex.getMessage(), xml); return null; } } </code></pre> <h2>Calling the method using Ivy Script Step (Not working)</h2> <pre><code>import test.XmlHelper; import test.Employee; try { XmlHelper xh = new XmlHelper(); in.employee = xh.decode(in.usrData); /* (in.employee is a DataClass Attr. of type Employee in.usrData is a DataClass Attr. of type String containing the xml String) */ } catch (Exception ex) { in.errmsg = ex.getMessage(); } </code></pre> <h2>Calling the method directly in the Helper Class by main method (Works great)</h2> <pre><code>public static void main(String[] args) { XmlHelper xh = new XmlHelper(); Employee employee = new Employee(); employee = xh.decode("&lt;java version='1.7.0_17' class='java.beans.XMLDecoder'&gt;&lt;object class='test.Employee'&gt;&lt;void property='firstName'&gt;&lt;string&gt;Vorname&lt;/string&gt;&lt;/void&gt;&lt;void property='lastName'&gt;&lt;string&gt;Nachname&lt;/string&gt;&lt;/void&gt;"); System.out.println(employee.getFirstName()); System.out.println(employee.getLastName()); </code></pre> <p>}</p> <h2>Bean Employee (in ivy located under /src/test/entity )</h2> <pre><code>package test.entity; import java.io.Serializable; public class Employee implements Serializable { private static final long serialVersionUID = 1L; private String lastname = ""; private String firstname = ""; public String getLastName() { return lastname; } public void setLastName(String lastname) { this.lastname = lastname; } public String getFirstName() { return firstname; } public void setFirstName(String firstname) { this.firstname = firstname; } </code></pre> <p>}</p>StefanMon, 24 Feb 2014 14:24:39 -0500https://answers.axonivy.com/questions/545/deserialization-of-java-bean-not-possible-within-an-ivy-script-elementdeserializationivyscriptManage users of several applications by a single admin userhttps://answers.axonivy.com/questions/220/manage-users-of-several-applications-by-a-single-admin-user<p>xpert.ivy server: Request a task list, manage substitution, absences and so one is already limited to the appropriate WebApp the requesting user is defined in. </p> <p>Is there a possibility to request tasks, manage absences etc. for all WebApps by a single admin user (defined in a WebApp) which has access to all the other WebApps on the same system/server?</p>StefanThu, 19 Dec 2013 14:42:59 -0500https://answers.axonivy.com/questions/220/manage-users-of-several-applications-by-a-single-admin-useradministrationuser