Questions asked by Emmanuelhttps://answers.axonivy.com/questions/asked-by/28/emmanuel/?type=rssQuestions asked by <a href="/users/28/emmanuel" >Emmanuel</a>enFri, 31 Mar 2017 10:47:49 -0400How to extend a user session time programmatically?https://answers.axonivy.com/questions/2556/how-to-extend-a-user-session-time-programmatically<p>Dear Ivy support,</p> <p>Using Ivy 6.2 we set the User session time-out value in the web.xml. Is there a way to extend the session validity programmatically without any User action? </p> <p>In a JSF context, would this method have any effect on the Ivy Session ? javax.faces.context.ExternalContext.setSessionMaxInactiveInterval(int interval) <em>Specifies the time, in seconds, between client requests before the servlet container will invalidate this session.</em></p> <p>Thanks in advance Emmanuel</p>EmmanuelFri, 31 Mar 2017 10:47:49 -0400https://answers.axonivy.com/questions/2556/how-to-extend-a-user-session-time-programmaticallysessionusertimeoutAssign and revoke Role to Session User dynamicallyhttps://answers.axonivy.com/questions/1703/assign-and-revoke-role-to-session-user-dynamically<p>Hello,</p> <p>I need to assign and revoke Ivy Role dynamically on the session user. If I understand the API documentation well, the following method assigns the given role to the session, the role should be automatically unassigned after logout: Ivy.session().assignRole(role);</p> <p>Here the API documentation:</p> <p><em>@PublicAPI(value=EXPERT) Assigns a role to the session. Parameters:role The role to assign</em></p> <p>The problem is that I need also to revoke an Ivy Role dynamically, I could not find a method like Ivy.session().revokeRole(IRole role) or Ivy.session().unassignRole(Irole role). Is there a possibility to do that?</p> <p>Thanks a lot in advance.</p> <p>Emmanuel</p>EmmanuelThu, 31 Mar 2016 10:26:20 -0400https://answers.axonivy.com/questions/1703/assign-and-revoke-role-to-session-user-dynamicallysessionroleuserAssign user Tasks to another (user will be deleted)https://answers.axonivy.com/questions/1653/assign-user-tasks-to-another-user-will-be-deleted<p>Good morning,</p> <p>Is there a possibility to assign all the tasks owned by a user to another one? In that case the first user. Thanks a lot in advance</p> <p>Emmanuel</p>EmmanuelFri, 12 Feb 2016 09:16:11 -0500https://answers.axonivy.com/questions/1653/assign-user-tasks-to-another-user-will-be-deletedtasksuserHow can we get the kind of Engine that runs the code (Server or Designer) ?https://answers.axonivy.com/questions/1600/how-can-we-get-the-kind-of-engine-that-runs-the-code-server-or-designer<p>Hello all!</p> <p>Does anybody know an easy way to get if an AxonIvy Application runs on a designer or on a Server? Or with other words how can we get the kind of Engine that runs the code (Server or Designer) ?</p> <p>Thanks in advance</p> <p>Emmanuel</p>EmmanuelThu, 17 Dec 2015 20:56:05 -0500https://answers.axonivy.com/questions/1600/how-can-we-get-the-kind-of-engine-that-runs-the-code-server-or-designerenginedesignerserverTaskQuery case insensitive searchhttps://answers.axonivy.com/questions/1442/taskquery-case-insensitive-search<p>Hi all,</p> <p>Is it possible to search against String Task properties with a TaskQuery so that the search is performed case insensitive.</p> <pre><code> TaskQuery stringFieldQuery = TaskQuery.create(); stringFieldQuery.where().name().isLike("my task name"); </code> </pre> <p>I would like that such a query returns the tasks which name is "MY Task NAme". Thanks in advance</p> <p>Emmanuel</p>EmmanuelFri, 14 Aug 2015 16:36:27 -0400https://answers.axonivy.com/questions/1442/taskquery-case-insensitive-searchcase-querytaskstask-queryHow to dynamically start a task from a process that was started from an HTML Dialoghttps://answers.axonivy.com/questions/1383/how-to-dynamically-start-a-task-from-a-process-that-was-started-from-an-html-dialog<p>Hi all,</p> <p>In a JSF Dialog we can start a task dynamically with: </p><pre><code>FacesContext.getCurrentInstance().getExternalContext().redirect(ivy.html.taskstartref(ivy.wf.findTask(95)));</code></pre><p></p> <p>We can also start an IProcess dynamically with something like that: </p><pre><code>IRequest request = requestFactory.createRequest(processStart, thisMapOrEmptyMapIfNull(params)); IResponse response = responseFactory.createResponse(); IRequestHandler requestHandler = (IRequestHandler)processStart.getProcessModelVersion().getAdapter(IProcessEngine.class); requestHandler.handleRequest(request, response); </code></pre><p></p> <p>Now we would like to combine both to start a process dynamically that should in turn start a task. The process can be started from within the JSF Dialog.<br> In the started process, as we are not in the JSF context, the following does not work (fails silently):</p><pre><code>FacesContext.getCurrentInstance().getExternalContext().redirect(ivy.html.taskstartref(ivy.wf.findTask(95)));</code></pre> The following code does not work as well (fails silently):<pre><code>IHttpResponse resp = ivy.response as IHttpResponse; resp.sendRedirect(ivy.html.taskstartref(in.task));</code></pre><p></p> <p>We tried also: </p><pre><code>IHttpResponse resp = ivy.response as IHttpResponse; HttpServletResponse sresp = resp.getHttpServletResponse(); sresp.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY); sresp.setHeader("Location",ivy.html.taskstartref(in.task)); sresp.sendRedirect(ivy.html.taskstartref(in.task)); sresp.flushBuffer();</code></pre> Here we get:<br> IllegalStateException: Cannot change buffer size after data has been written<br> Cannot set content type. Response already committed<p></p> <p>Is there a possibility to achieve what we try to do? Like for the process-start I have tried to find a proper IRequestHandler for starting a task. I have not found it.</p> <p>Thanks a lot in advance</p> <p>Emmanuel</p>EmmanuelThu, 25 Jun 2015 23:25:10 -0400https://answers.axonivy.com/questions/1383/how-to-dynamically-start-a-task-from-a-process-that-was-started-from-an-html-dialogtaskDetect a user session is closing because of timeouthttps://answers.axonivy.com/questions/1359/detect-a-user-session-is-closing-because-of-timeout<p>Hi everybody,</p> <p>Is there a way to detect a user session is closing because of a timeout? There is the "unload" event that can be catched in an ULC Rich Dialog for performing some stuff when the user close a Dialog. Is there something similar for a session timeout?</p> <p>If not it would be very usefull to have such a possibility.</p> <p>Thanks in advance Emmanuel</p>EmmanuelSat, 13 Jun 2015 10:22:25 -0400https://answers.axonivy.com/questions/1359/detect-a-user-session-is-closing-because-of-timeoutsystemeventsessioneventTaskQuery for description searchhttps://answers.axonivy.com/questions/1353/taskquery-for-description-search<p>Hi all,</p> <p>Is that possible to make a search for tasks by their description? A search by name is possible through:</p> <pre><code>TaskQuery stringFieldQuery = TaskQuery.create(); stringFieldQuery.where().name().isLike("search by name"); </code></pre> <p>I guessed it was the same for the description but it seems to be unpossible to do such a TaskQuery for the description because the following code returns an <em>IColumnFilterQuery</em> and not an <em>IStringColumnFilterQuery</em> as for the name():</p> <pre><code>stringFieldQuery.where().description() // There is no isLike("...") method then. </code></pre> <p>Is there another possibility with the TaskQuery?</p> <p>Thanks in advance</p> <p>Emmanuel</p>EmmanuelTue, 09 Jun 2015 11:50:46 -0400https://answers.axonivy.com/questions/1353/taskquery-for-description-searchtasktask-queryTaskQuery isInvolved and canWorkOnhttps://answers.axonivy.com/questions/1345/taskquery-isinvolved-and-canworkon<p>Hello,</p> <p>What does mean isInvolved for a SecurityMember in a TaskQuery? If I want to get all the tasks that I can start, is "canWorkOn" enough?</p> <p>Thanks a lot in advance!</p> <p>Example:</p> <pre><code>ISecurityMember member = Ivy.wf().getSecurityContext().findUser(username); TaskQuery taskUserQuery = TaskQuery.create(); taskUserQuery.where().isInvolved(member); taskUserQuery.where().or().canWorkOn(member); </code></pre>EmmanuelFri, 29 May 2015 15:25:40 -0400https://answers.axonivy.com/questions/1345/taskquery-isinvolved-and-canworkontask-queryIs it possible to find the ICase that has lead to another ICase creation?https://answers.axonivy.com/questions/1220/is-it-possible-to-find-the-icase-that-has-lead-to-another-icase-creation<p>Hi everybody!</p> <p>I have a process which triggers another process start through a trigger step. The first process has a related ICase (ivy.case) and the 2d started process belongs to another ICase. We could consider in such a situation that the first ICase is the "ancestor" of the second one. Is there a possibility to get a reference to the "ancestor" ICase from the second one? Especially in a WorkflowEvent Listener like the one stated in this question: <a href="http://answers.axonivy.com/questions/1193/listen-to-process-case-start-and-task-creation-start">listen-to-process-case-start-and-task-creation-start</a></p> <p>A very convenient way would be something like:</p> <pre><code>IWorkflowEvent createEvent = wfManager.findWorkflowEvent(event.getId()); if (createEvent.getEventKind() != WorkflowEventKind.EVENT_CREATE_CASE) { return; } ICase newCase = createEvent.getCase(); newCase.getAncestorICase() // null if no ancestor, the ICase from which this newCase has been triggered </code></pre> <p>Thanks a lot in advance! Cheers Emmanuel</p>EmmanuelWed, 11 Mar 2015 02:54:29 -0400https://answers.axonivy.com/questions/1220/is-it-possible-to-find-the-icase-that-has-lead-to-another-icase-creationapiListen to process-case start and task creation & starthttps://answers.axonivy.com/questions/1193/listen-to-process-case-start-and-task-creation-start<p>I would like to know if there is a possibility to dynamically listen to all ivy standard processes starts and ivy task creations and starts. The idea would be to get a reference to any standard processes-cases that are started or tasks that are created.</p> <p>Thanks a lot in advance</p> <p>Emmanuel</p>EmmanuelTue, 03 Mar 2015 17:07:50 -0500https://answers.axonivy.com/questions/1193/listen-to-process-case-start-and-task-creation-startprocesstasksHow can I find out if a user is logged in?https://answers.axonivy.com/questions/445/how-can-i-find-out-if-a-user-is-logged-in<p>I need to know if a particular user has an active session in an Ivy application, or in other words whether he is currently loggedin.</p> <p>I can get a particular IUser with <code>Ivy.session.getWorkflowContext().getSecurityContext().findUser("username")</code> and I can get all the sessions with <code>ivy.session.getWorkflowContext().getSecurityContext().getSessions()</code>.</p> <p>But I cannot find the way to see if the user is part of one of these sessions?</p>EmmanuelThu, 08 Mar 2012 08:40:26 -0500https://answers.axonivy.com/questions/445/how-can-i-find-out-if-a-user-is-logged-inapiRListDisplay Scrollbarhttps://answers.axonivy.com/questions/387/rlistdisplay-scrollbar<p>I use the RListDisplay Widget in Ivy 4.1.2 and 4.1.3 to display other components dynamically and it works good so far.</p> <p>The RListDisplay shows a vertical Scrollbar as soon as there is not enough vertical place to show all the components. It is included into a Rich Dialog and the list of components to load in the RListDisplay is built in the Rich Dialog Start method.</p> <p>The problem is that the scrollbar scrolls automatically to the end of the ListDisplay after the RDC has been loaded. I can not get the scrollbar to stay "quiet" at the 0.0 position.</p> <p>I have tried with the "ListDisplay.setAutoscrolls(false);" method or with panel.ListDisplay.setVerticalScrollBarPosition(0.0); in the last step of the start method: the scrollbar scrolls always automatically to the end.</p> <p>I there any solution to this problem?</p>EmmanuelThu, 06 Jan 2011 07:46:58 -0500https://answers.axonivy.com/questions/387/rlistdisplay-scrollbarrichdialogrdwidgets