Questions Tagged With ivyhttps://answers.axonivy.com/tags/ivy/?type=rss&user=trungdvquestions tagged <span class="tag">ivy</span>enMon, 16 Apr 2018 00:31:50 -0400Subscribe when login ivy user ?https://answers.axonivy.com/questions/3190/subscribe-when-login-ivy-user<p>Hi all</p> <p>Normally we use <code>Ivy.session().loginSessionUser(userName, password)</code> to login. And we have common modules to do common stuff like this (wrap by Ivy component).</p> <p>My question is: Does ivy support a mechanism that we can subscribe this event and we'll be notified when a ivy user is logged in?</p> <p>Thanks</p>trungdvMon, 16 Apr 2018 00:31:50 -0400https://answers.axonivy.com/questions/3190/subscribe-when-login-ivy-userivyHow to load ivy class to class loader on maven pluginhttps://answers.axonivy.com/questions/3163/how-to-load-ivy-class-to-class-loader-on-maven-plugin<p>Hi ivyteam</p> <p>I'm building a maven plugin to scanning java class in ivy project to generate some business documentation (by reading the annotation in classes). It's seem to work well with java class. </p> <p>There is only one problem with some classes which belong to ivy, for example a java class that extends from <code>ch.ivyteam.ivy.scripting.objects.CompositeObject</code> or a class that references from another class from other ivy project, in maven plugin it could not load those classes like that then throw NoClassDefFoundException, I guess that because <code>CompositeObject</code> does not available on current class loader yet. </p> <p>My question is: How could i resolve those ivy dependencies to load those class? how <code>project-build-plugin</code> can compile them or is there any solutions?</p> <p>Thanks</p>trungdvThu, 29 Mar 2018 11:01:23 -0400https://answers.axonivy.com/questions/3163/how-to-load-ivy-class-to-class-loader-on-maven-pluginclassloaderivyCan we hide Webservice startlink from index page?https://answers.axonivy.com/questions/3087/can-we-hide-webservice-startlink-from-index-page<p>Hi all</p> <p>I have the webservice in my project and by default i will see it on index page like this <img alt="alt text" src="https://answers.axonivy.com/upfiles/Untitled_n66e3dM.png"></p> <p>Is there any way to hide it from this page like startlink?</p>trungdvThu, 01 Feb 2018 06:12:49 -0500https://answers.axonivy.com/questions/3087/can-we-hide-webservice-startlink-from-index-pageivyHow to verify username/password of user without logging in?https://answers.axonivy.com/questions/3085/how-to-verify-username-password-of-user-without-logging-in<p>Hi all</p> <p>Normally when we want to check whether user is authenticated ivy user or not, we use this api:</p> <pre><code>Ivy.session().loginSessionUser(userName, password) </code></pre> <p>But this api will also change the current login user to new one. </p> <p>Is there any other api to verify user/pass without logout current user?</p> <p>Because my process is an ivy webservice then it's run with <code>system</code> permission, if i use above api to verify another user it will throw exception that i can't logout of <code>system</code> user.</p> <p>Thanks</p>trungdvThu, 01 Feb 2018 06:00:58 -0500https://answers.axonivy.com/questions/3085/how-to-verify-username-password-of-user-without-logging-inauthenticationivyCan i turn on/off webservice authentication programmaticallyhttps://answers.axonivy.com/questions/3084/can-i-turn-on-off-webservice-authentication-programmatically<p>Hi all</p> <p>We have a webservice which implemented on ivy. This service serve for many customer. As default it required basic-auth. <img alt="alt text" src="https://answers.axonivy.com/upfiles/Untitled_JZ9zRwy.png"> Now some of customers dont want to be authenticated when calling it, so we intend to introduce the global var where admin can allow to turn on/off this feature.</p> <p>Can we go with that way and how to turn off/on this authentication type programmatically?</p> <p>Thanks</p>trungdvThu, 01 Feb 2018 03:06:57 -0500https://answers.axonivy.com/questions/3084/can-i-turn-on-off-webservice-authentication-programmaticallyauthenticationwebserviceivyZombie task is created after finishing callable subprocess. How to avoid it?https://answers.axonivy.com/questions/2932/zombie-task-is-created-after-finishing-callable-subprocess-how-to-avoid-it<p>Hi all</p> <p>We're using ivy 6.3, and have face the problem that we implement a restfulAPI by java code, when we trigger the callable subprocess from it. After callablesub is finished, it will remain a zombie task. <img alt="alt text" src="https://answers.axonivy.com/upfiles/Untitled_OKBhfzB.png"> Why i need to call ivy subprocess from api? Answer: i need to call ivy.repo() to persist my data then response the id. This api can't be called in restful.</p> <p>Here is my callable subprocess:</p> <p><img alt="alt text" src="https://answers.axonivy.com/upfiles/Untitled_xUuYAvG.png"></p> <p>and it's the code of api:</p> <pre><code>@Path("{applicationName}/individualch") @Produces(MediaType.APPLICATION_JSON) public class IndividualchApi { /** * This API is used by third party application when it want to call * to create dossier Response message is cobId * @param provider * @param externalId * @param sobDossier * @return */ @POST @Path("/dossiers") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public Response createIndividualCHDossier(@NotNull String provider, @NotNull String externalId, SobDossier sobDossier) { if (StringUtils.isBlank(provider) || StringUtils.isBlank(externalId) || sobDossier == null) { return Response.status(Status.BAD_REQUEST).entity(new ResponseExceptionMessage() .errorCode(DossierCreationServiceExceptionType.BAD_REQUEST.getUniqueCode().toString()) .message("Invalid params")).build(); } return new CreateDossierHandlerService().createIndividualCHDossier(provider, externalId, sobDossier); } } </code></pre> <p>And here is the way we trigger subprocess from service:</p> <pre><code>SubProcessCallResult callResult = SubProcessCall.withPath(CREATE_DOSSIER_HANDLER_PROCESS_NAME) .withStartSignature("createDossier(String,String,SobDossier)") .withParam(PARAM_PROVIDER, provider).withParam(PARAM_EXTERNAL_ID, externalId) .withParam(PARAM_SOB_DOSSIER, sobDossier) .call(); </code></pre> <p>My Question: </p> <ol> <li>Is it a good solution to go? I actually can't call ivy.repo() inside my service. How can we prevent this kind of zomebie task?</li> <li>If we can't prevent zombie task, how ivy handle this kind of task? Does ivy clean it up automatically?</li> </ol> <p>Thanks all</p>trungdvFri, 27 Oct 2017 01:55:45 -0400https://answers.axonivy.com/questions/2932/zombie-task-is-created-after-finishing-callable-subprocess-how-to-avoid-itivyrestzombietaskDifferent mechanism of loading rule between Designer and Enginehttps://answers.axonivy.com/questions/2742/different-mechanism-of-loading-rule-between-designer-and-engine<p>Hi all</p> <p>I have a project that using api <em>ivy.rules.engine</em> to execute Drool rule, i just found a difference between Designer and Engine about the way it load rule package.</p> <p>Here is folder rule i have: <img alt="alt text" src="http://answers.axonivy.com/upfiles/Untitled_RkIO6RW.png"></p> <p>I have two main folders: <em>salaryReference</em> and <em>salaryCalculation</em>, each of them has a child package called <em>demo</em>. </p> <p>Here is the code that i load those rule bases:</p> <pre><code>//salaryRuleBase and basicSalaryRuleBase are IRuleBase type in.salaryRuleBase = ivy.rules.engine.createRuleBase(); in.salaryRuleBase.loadRulesFromNamespace("salaryCalculation"); in.basicSalaryRuleBase = ivy.rules.engine.createRuleBase(); in.basicSalaryRuleBase.loadRulesFromNamespace("salaryReference"); </code></pre> <p>Those two rule base only need to load main package (not childs). To be sure that it load correct package, i put two test rules on child packages, ex:</p> <pre><code>import ch.ivyteam.ivy.environment.Ivy; rule "SalaryCal.demo" when then Ivy.log().info("=========Rule SalaryCal.demo"); end </code></pre> <p>and</p> <pre><code>import ch.ivyteam.ivy.environment.Ivy; rule "SalaryRef.demo" when then Ivy.log().info("=========Rule SalaryRef.demo"); end </code></pre> <p>When executing this code on Designer (Axon ivy 6.3.0.52421), it work exactly as i want. only rules from <em>salaryCalculation/basic.drl</em> and <em>salaryReference/default.drl</em> are loaded and executed. I don't see any logs from test rules. </p> <p>But when i deploy this project to server(same version with Designer) , i saw this line: <img alt="alt text" src="http://answers.axonivy.com/upfiles/Untitled_iNiDG64.png"></p> <p>That a big trouble in our real project because we separate rule by packages and somehow expect rule engine will only load package that we set to them, non recursively. </p> <p>Do you know why do we have this difference? it's quite confused and strange to us</p> <p><a href="https://drive.google.com/file/d/0B6qldkZvvHgHRWM5X1dWb1VvM1k/view?usp=sharing">Here</a> is demo project if you want to try it out</p> <p>Thanks</p>trungdvMon, 10 Jul 2017 06:32:38 -0400https://answers.axonivy.com/questions/2742/different-mechanism-of-loading-rule-between-designer-and-engineivyruleengineWhat is different among ways to execute as system ?https://answers.axonivy.com/questions/2603/what-is-different-among-ways-to-execute-as-system<p>Hi all</p> <p>During the time i've worked with ivy, i see there is some ways to execute code with system permission:</p> <pre><code> - ServerFactory.getServer().getSecurityManager().executeAsSystem(callable) - ServerFactory.getServer().getSecurityManager().executeAsSystem2(callable) - Ivy.wf().getSecurityContext().executeAsSystemUser(callable) - SecurityManagerFactory.getSecurityManager().executeAsSystem(callable) </code></pre> <p>It make me confused, so can anyone explain the differences?</p>trungdvTue, 02 May 2017 22:55:53 -0400https://answers.axonivy.com/questions/2603/what-is-different-among-ways-to-execute-as-systemivyCan ivy dataclass extends from other classhttps://answers.axonivy.com/questions/2430/can-ivy-dataclass-extends-from-other-class<p>Hi ivyteam For the moment, ivy data class always extend from CompositeObject and we have no way to change it. But there is a need to have that feature. Does ivyteam have plan to support it? </p>trungdvThu, 09 Feb 2017 02:44:57 -0500https://answers.axonivy.com/questions/2430/can-ivy-dataclass-extends-from-other-classivyHow to check environment is ivy?https://answers.axonivy.com/questions/2429/how-to-check-environment-is-ivy<p>Hi all, Is there any official API to know whether we're running on Ivy environment or not? for checking 'server' or 'designer', we can use this API:</p> <pre><code> ivy.wf.getApplication().getName().equalsIgnoreCase("designer") </code></pre> <p>but what if i want to check is it ivy env or not?</p> <p>For the moment, i just have a temporary solution where i try to invoke some ivy command in try catch block then see if it throw exception of not. but i need a better solution. :)</p> <p>Thanks</p>trungdvThu, 09 Feb 2017 02:34:48 -0500https://answers.axonivy.com/questions/2429/how-to-check-environment-is-ivyivyPrevent multiple submit when asking questionhttps://answers.axonivy.com/questions/2363/prevent-multiple-submit-when-asking-question<p>hi ivyteam</p> <p>Once i created a question in this forum and accidentally i double click on button Ask Your Question, a several duplicated questions were created. I think we should prevent this case.</p> <p>Thanks</p>trungdvTue, 10 Jan 2017 10:49:22 -0500https://answers.axonivy.com/questions/2363/prevent-multiple-submit-when-asking-questionivyAbout errorId on log filehttps://answers.axonivy.com/questions/2361/about-errorid-on-log-file<p>hi all</p> <p>Normally i see ivy log the error like this</p> <pre><code>Problem while processing request 'http://192.168.80.22:8090/ivy/rd/System/Administration' [errorId=15987B47A0255A4D, request=Ulc over HTTP POST , session=1702, application=0, requestId=132190, executionContext=SYSTEM, pmv=System$Administration$1, client=192.168.72.39] </code></pre> <p>What can we understand about this message? Can i use <strong>errorId</strong> to trace something?</p> <p>P/S: Once i saw someone can change color of log in ivy designer (red, green, blue). How to do it?</p> <p>Thanks</p>trungdvTue, 10 Jan 2017 10:46:00 -0500https://answers.axonivy.com/questions/2361/about-errorid-on-log-fileivySynchronization of global variable on ivy enginehttps://answers.axonivy.com/questions/2354/synchronization-of-global-variable-on-ivy-engine<p>Hi ivyteam</p> <p>This is a problem (IMO) that i have faced very long time ago. When i create some global variable then deploy to server, after that i remove/rename them, then on the next deployment they're still available on engine. i have no official way to remove all redundant global variables. (have to come to DB then remove it)</p> <p>Do you have plan to enhance it?</p> <p>Thanks</p>trungdvFri, 06 Jan 2017 02:52:39 -0500https://answers.axonivy.com/questions/2354/synchronization-of-global-variable-on-ivy-engineivyUnderstanding about ivy processes categoryhttps://answers.axonivy.com/questions/2348/understanding-about-ivy-processes-category<p>Hi ivyteam</p> <p>For a long time ago i see those categories in ivy but never heard why ivy project create them as default (just Start Process is easy to know) <img alt="alt text" src="http://answers.axonivy.com/upfiles/Untitled_SI3AwnS.png"> Does anyone understand clearly about their purpose? in order to use it in good way. I checked on ivy documentation but can't find</p> <p>Thanks</p>trungdvWed, 04 Jan 2017 07:44:18 -0500https://answers.axonivy.com/questions/2348/understanding-about-ivy-processes-categoryivyListening when engine/designer stop ?https://answers.axonivy.com/questions/2294/listening-when-engine-designer-stop<p>Hi all</p> <p>I want to know when engine/designer stop working, then i do some clean up for my business. Is there any way to listen that event?</p>trungdvFri, 16 Dec 2016 02:12:08 -0500https://answers.axonivy.com/questions/2294/listening-when-engine-designer-stopivyHow to use ResultTable of cmshttps://answers.axonivy.com/questions/2237/how-to-use-resulttable-of-cms<p>Hi all</p> <p>I have used cms of ivy and now i want to have a table in my page, that table will populate data from other datasources (list or from DB). So i use the <em>Result Table</em> in ivy cms (multilingual), here is configuration of that cms: <img alt="alt text" src="http://answers.axonivy.com/upfiles/Untitled_3r44dka.png"> Here is define a attribute <em>dummyData</em> on process data (will be filled in on runtime)</p> <p>I have some questions:</p> <ul> <li>How to configure row/column will be render (this <a href="http://developer.axonivy.com/doc/latest/DesignerGuideHtml/ivy.userinterface.html#ivy.html.cms.valueeditors.resulttable">guideline </a> is not good enough for me to do that)</li> <li>When will i initialize data for my list dummydata on process data, because when i get this cms, i just use api: ivy.cms.co(uri) without any relationship with my process data</li> <li>Can i change process data type to another one, or just can use Data as below: <img alt="alt text" src="http://answers.axonivy.com/upfiles/Untitled_yyZr2qp.png"></li> </ul> <p>Thanks in advance</p>trungdvThu, 01 Dec 2016 06:02:38 -0500https://answers.axonivy.com/questions/2237/how-to-use-resulttable-of-cmscmsivyCan not create task inside overriding sub process because of IllegalStateException on TaskSwitchhttps://answers.axonivy.com/questions/1894/can-not-create-task-inside-overriding-sub-process-because-of-illegalstateexception-on-taskswitch<p>Hi ivy team</p> <p>In my current project, we have structure like this picture: <img alt="alt text" src="http://answers.axonivy.com/upfiles/1111_pdSi6Ce.jpg"></p> <p>I can explain structure in some more words: - We have three module: Standard, Wir and Wir Test. Wir depend on Standard and Wir Test depend on Wir</p> <ul> <li> <p>In Standard we have one CallableSub <em>Document Entry Process</em> and it call another callablesub <em>Handler Document Entry</em></p> </li> <li> <p>In wir, we override the <em>Handler Document Entry</em> to create Ivy Task (use Task Switch/UserTask) then open the HtmlUserDialog of Wir project. We use the overriding function from Ivy.</p> </li> <li> <p>Now we have the start link from Wir Test (actually no matter where we put the startlink, could be on Wir),and it call <em>Document Entry Process</em> from standard, then run the Overriding Process of <em>Handler Document Entry</em> on Wir. </p> </li> </ul> <p>But when the process hit to Task Element, it throw this exception:</p> <pre><code> ch.ivyteam.ivy.request.RequestException: ivy:error:system at ch.ivyteam.ivy.request.RequestException$RequestExceptionBuilder.build(RequestException.java:161) at ch.ivyteam.ivy.bpm.engine.internal.BpmEngine.handleNormalRequest(BpmEngine.java:195) at ch.ivyteam.ivy.bpm.engine.internal.BpmEngine.handleRequestWithinContext(BpmEngine.java:140) at ch.ivyteam.ivy.request.impl.ContextAwareRequestHandler.handleRequest(ContextAwareRequestHandler.java:32) at ch.ivyteam.ivy.system.task.internal.SystemTaskJob.executeProcess(SystemTaskJob.java:127) at ch.ivyteam.ivy.system.task.internal.SystemTaskJob.executeAsSystem(SystemTaskJob.java:92) at ch.ivyteam.ivy.system.task.internal.SystemTaskJob$1.call(SystemTaskJob.java:56) at ch.ivyteam.ivy.security.internal.SecurityManager.executeAsSystem(SecurityManager.java:1467) at ch.ivyteam.ivy.system.task.internal.SystemTaskJob.execute(SystemTaskJob.java:52) at ch.ivyteam.ivy.job.internal.JobManager$1.call(JobManager.java:267) at ch.ivyteam.ivy.job.internal.JobManager$1.call(JobManager.java:1) at ch.ivyteam.util.callable.ExecutionContextContainer$ContainerExecutionContext.call(ExecutionContextContainer.java:92) at ch.ivyteam.ivy.security.internal.SecurityManager.executeInContext_aroundBody0(SecurityManager.java:1519) at ch.ivyteam.ivy.security.internal.SecurityManager.executeInContext_aroundBody1$advice(SecurityManager.java:41) at ch.ivyteam.ivy.security.internal.SecurityManager.executeInContext(SecurityManager.java:1) at ch.ivyteam.util.callable.ExecutionContextContainer$ContainerExecutionContext.call(ExecutionContextContainer.java:88) at ch.ivyteam.util.callable.ExecutionContextContainer.executeInContext(ExecutionContextContainer.java:27) at ch.ivyteam.ivy.job.internal.JobManager.execute(JobManager.java:261) at ch.ivyteam.ivy.job.internal.Job.run(Job.java:83) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: BpmError ivy:error:system Unique ID: 155EDB7F283297EF Process Element: create task for Document entry &lt;155C371802ADDD14-f62&gt; Process Call Stack: DocumentEntryProcess &lt;154380E2AD199B4E-f1&gt; BaseDocumentProcess &lt;1559F2D43EBE9F5C-f3&gt; at ch.ivyteam.ivy.bpm.error.BpmErrorBuilder.build(BpmErrorBuilder.java:204) at ch.ivyteam.ivy.bpm.engine.restricted.error.BpmErrorHandler.getBpmErrorFor(BpmErrorHandler.java:90) at ch.ivyteam.ivy.bpm.engine.restricted.error.BpmErrorHandler.handleException(BpmErrorHandler.java:45) at ch.ivyteam.ivy.bpm.engine.internal.core.ProcessElementExecution.execute(ProcessElementExecution.java:42) at ch.ivyteam.ivy.bpm.engine.internal.core.RequestProcessor.handleExecution(RequestProcessor.java:140) at ch.ivyteam.ivy.bpm.engine.internal.core.RequestProcessor.processRequest(RequestProcessor.java:130) at ch.ivyteam.ivy.bpm.engine.internal.core.RequestProcessor.handleRequest(RequestProcessor.java:95) at ch.ivyteam.ivy.bpm.engine.internal.core.RequestProcessor.handleCallRequest(RequestProcessor.java:86) at ch.ivyteam.ivy.bpm.engine.internal.BpmEngine.handleCallRequest(BpmEngine.java:243) at ch.ivyteam.ivy.bpm.engine.internal.BpmEngine.handleCallRequest(BpmEngine.java:227) at ch.ivyteam.ivy.bpm.engine.internal.BpmEngine.handleRequestWithinContext(BpmEngine.java:132) at ch.ivyteam.ivy.request.impl.ContextAwareRequestHandler.handleRequest(ContextAwareRequestHandler.java:32) at ch.ivyteam.ivy.bpm.engine.internal.CallService.handleRequest(CallService.java:101) at ch.ivyteam.ivy.bpm.engine.internal.CallService.callTarget(CallService.java:93) at ch.ivyteam.ivy.bpm.engine.internal.CallService.call(CallService.java:59) at ch.ivyteam.ivy.bpm.engine.internal.core.ProcessCallExecution.execute(ProcessCallExecution.java:25) at ch.ivyteam.ivy.bpm.engine.internal.core.RequestProcessor.handleExecution(RequestProcessor.java:140) at ch.ivyteam.ivy.bpm.engine.internal.core.RequestProcessor.processRequest(RequestProcessor.java:130) at ch.ivyteam.ivy.bpm.engine.internal.core.RequestProcessor.handleRequest(RequestProcessor.java:95) at ch.ivyteam.ivy.bpm.engine.internal.core.RequestProcessor.handleCallRequest(RequestProcessor.java:86) at ch.ivyteam.ivy.bpm.engine.internal.BpmEngine.handleCallRequest(BpmEngine.java:243) at ch.ivyteam.ivy.bpm.engine.internal.BpmEngine.handleCallRequest(BpmEngine.java:227) at ch.ivyteam.ivy.bpm.engine.internal.BpmEngine.handleRequestWithinContext(BpmEngine.java:132) at ch.ivyteam.ivy.request.impl.ContextAwareRequestHandler.handleRequest(ContextAwareRequestHandler.java:32) at ch.ivyteam.ivy.bpm.engine.internal.CallService.handleRequest(CallService.java:101) at ch.ivyteam.ivy.bpm.engine.internal.CallService.callTarget(CallService.java:93) at ch.ivyteam.ivy.bpm.engine.internal.CallService.call(CallService.java:59) at ch.ivyteam.ivy.bpm.engine.internal.core.ProcessCallExecution.execute(ProcessCallExecution.java:25) at ch.ivyteam.ivy.bpm.engine.internal.core.RequestProcessor.handleExecution(RequestProcessor.java:140) at ch.ivyteam.ivy.bpm.engine.internal.core.RequestProcessor.processRequest(RequestProcessor.java:130) at ch.ivyteam.ivy.bpm.engine.internal.core.RequestProcessor.handleRequest(RequestProcessor.java:95) at ch.ivyteam.ivy.bpm.engine.internal.core.RequestProcessor.handleRequest(RequestProcessor.java:77) at ch.ivyteam.ivy.bpm.engine.internal.BpmEngine.handleNormalRequest(BpmEngine.java:191) ... 22 more Caused by: java.lang.IllegalStateException: TaskSwitch element (TaskSwitchElement [id=155C371802ADDD14-f62, name=create task for Document entry, type=UserTask]) is not permitted inside a sub process of a required project. at ch.ivyteam.ivy.bpm.engine.internal.model.bpmn.TaskSwitchElementExecutorAdapter.checkIllegalTaskSwitchUsage(TaskSwitchElementExecutorAdapter.java:111) at ch.ivyteam.ivy.bpm.engine.internal.model.bpmn.TaskSwitchElementExecutorAdapter.execute(TaskSwitchElementExecutorAdapter.java:81) at ch.ivyteam.ivy.bpm.engine.internal.model.ProcessElement.lambda$0(ProcessElement.java:215) at ch.ivyteam.ivy.bpm.engine.internal.model.ProcessElement.executeInElementContext(ProcessElement.java:286) at ch.ivyteam.ivy.bpm.engine.internal.model.ProcessElement.execute(ProcessElement.java:215) at ch.ivyteam.ivy.bpm.engine.internal.core.ProcessElementExecution.execute(ProcessElementExecution.java:37) ... 51 more </code></pre> <p>Does anyone know about this issue? Why it happen and how to solve it</p>trungdvFri, 15 Jul 2016 10:58:56 -0400https://answers.axonivy.com/questions/1894/can-not-create-task-inside-overriding-sub-process-because-of-illegalstateexception-on-taskswitchtaskivyException when using ch.ivyteam.ivy.scripting.objects.List on Primefaceshttps://answers.axonivy.com/questions/1350/exception-when-using-ch-ivyteam-ivy-scripting-objects-list-on-primefaces<p>Hi all</p> <p>I'm using primefaces 5 with HtmlUserDialog, in my page i'm using &lt;p:selectmanycheckbox&gt; that binding with a instance of ch.ivyteam.ivy.scripting.objects.List, for example:</p> <pre><code>p:selectManyCheckbox value="#{data.selectedWeeklyDayList}" layout="pageDirection"&gt; f:selectItems value="#{data.listWeekDay}" var="weekDay" itemValue="#{weekDay}" itemLabel="#{weekDay.value}"/&gt; /p:selectManyCheckbox&gt; </code></pre> <p>And <code>selectedWeeklyDayList</code> and <code>listWeekDay</code> are instances of <code>ch.ivyteam.ivy.scripting.objects.List</code>. When i submit this page, after several times, i got this exception:</p> <pre><code>IllegalAccessException: Class javax.faces.component.UIComponentBase can not access a member of class ch.ivyteam.ivy.scripting.objects.List with modifiers "private" RuntimeException: java.lang.IllegalAccessException: Class javax.faces.component.UIComponentBase can not access a member of class ch.ivyteam.ivy.scripting.objects.List with modifiers "private" IllegalStateException: Error restoring component: addNewEditForm_5649:selectedWeeklyDayList </code></pre> <p>Now i just have temporary solution to avoid this exception is i change from <code>ch.ivyteam.ivy.scripting.objects.List</code> to <code>java.util.List</code></p> <p>Why do i face this issue? and is there any solutions to avoid it but i still can use <code>ch.ivyteam.ivy.scripting.objects.List</code>? because i need to use some features of this class (for ex: clone() method)</p> <p>Thanks all.</p>trungdvWed, 03 Jun 2015 06:50:29 -0400https://answers.axonivy.com/questions/1350/exception-when-using-ch-ivyteam-ivy-scripting-objects-list-on-primefaceshtmluserdialogivyOverwrite process logic of ivyhttps://answers.axonivy.com/questions/949/overwrite-process-logic-of-ivy<p>Hi all I have this situation, i have a project A and it can be used in portal B, can i overwrite some method/process of A from B? Thanks in advance</p>trungdvFri, 12 Sep 2014 08:56:03 -0400https://answers.axonivy.com/questions/949/overwrite-process-logic-of-ivyivyHow to change default port in ivy designer/server?https://answers.axonivy.com/questions/928/how-to-change-default-port-in-ivy-designer-server<p>Hi all I'm using ivy designer 5 with htmlUserDialog. When i start an apllication, it can be access by browser with default port is 8081 (for ex: <code>http://localhost:8081/ivy/info/index.jsp</code>). Now i want to change it to another port because 8081 is being used by another application. How can i change it. Please help me for designer and server Thanks in advance</p>trungdvTue, 19 Aug 2014 10:59:44 -0400https://answers.axonivy.com/questions/928/how-to-change-default-port-in-ivy-designer-serverjsfivyHow can i register a custom taglib in ivy 5?https://answers.axonivy.com/questions/760/how-can-i-register-a-custom-taglib-in-ivy-5<p>Hello everybody.</p> <p>Now i'm using ivy 5 with HTML dialog(jsf) and i have a trouble with registering that taglib. Because of our requirement i have to create new custom taglib (put it in jar file) then i want to register it to use. But i can't do that in Ivy (don't have web.xml for each project). So i have to copy it to &lt;ivy folder=""&gt;\webapps\ivy\WEB-INF\lib\ everytime i make a new deployment/make some changes it that jar. My customer really now happy with that. What is alternative way to register it directly in our project?</p> <p>Anyone has ever met that problem and give me any suggestions? Thanks in advance!</p>trungdvTue, 10 Jun 2014 11:07:07 -0400https://answers.axonivy.com/questions/760/how-can-i-register-a-custom-taglib-in-ivy-5htmluserdialogivytagsHow can Junit access to Ivy environment without EnvironmentNotAvailableExceptionhttps://answers.axonivy.com/questions/617/how-can-junit-access-to-ivy-environment-without-environmentnotavailableexception<p>Hello everybody I have two projects, one is A and one is A_Test. And i try to run JUnit Test case from project A_Test to test some functionalities of A. Here is a portion of code Project A</p> <pre><code>public CalendarEventRequest(){ this.organizer = **Ivy.var().get("xabs_calendarEvent_organizer").toString();** Calendar c = new GregorianCalendar(Ivy.session().getContentLocale()); this.timezone= c.getTimeZone(); } </code></pre> <p>Test case</p> <pre><code>@Test public void testCreateCalendarEvent002() throws Exception { CalendarEventRequest request = new CalendarEventRequest(); CalendarEventResult result = CalendarUtil.createCalendarEvent(request); assertNotNull(result); } </code></pre> <p>And JUnit threw this exception:</p> <pre><code> ch.ivyteam.ivy.environment.EnvironmentNotAvailableException: Access to ivy environment outside a process request thread is not possible. Current thread: Thread[main,5,main] at ch.ivyteam.ivy.environment.Ivy.getEnvironmentData(Ivy.java:455) at ch.ivyteam.ivy.environment.Ivy.var(Ivy.java:272) at ch.soreco.customers.xabs.bean.CalendarEventRequest.&lt;init&gt;(CalendarEventRequest.java:26) at ch.soreco.customers.xabs.bean.CalendarUtilTest.createRequestForOneDay(CalendarUtilTest.java:75) at ch.soreco.customers.xabs.bean.CalendarUtilTest.testCreateCalendarEvent002(CalendarUtilTest.java:52) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) at org.junit.runners.ParentRunner.run(ParentRunner.java:300) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) </code></pre> <p>anyone can help me?</p>trungdvMon, 07 Apr 2014 09:34:02 -0400https://answers.axonivy.com/questions/617/how-can-junit-access-to-ivy-environment-without-environmentnotavailableexceptionenvironmentunit-testdesignerivy