Questions Tagged With apihttps://answers.axonivy.com/tags/api/?type=rss&user=Genzer%20Hawkerquestions tagged <span class="tag">api</span>enMon, 04 Apr 2016 08:15:34 -0400Configure SystemTaskFailureBehaviour for system-wide or application-widehttps://answers.axonivy.com/questions/1715/configure-systemtaskfailurebehaviour-for-system-wide-or-application-wide<p>Hi Ivy team</p> <p>According to the public javadoc of <a href="http://developer.axonivy.com/doc/latest/publicApi/ch/ivyteam/ivy/workflow/SystemTaskFailureBehaviour.html">SystemTaskFailureBehaviour</a></p> <blockquote> <p>The following example shows how to set the behaviour:</p> </blockquote> <pre><code>ivy.response.setParameter("ch.ivyteam.ivy.workflow.SystemTaskFailureBehaviour", SystemTaskFailureBehaviour.FAIL_TASK_DO_NOT_RETRY); If the behaviour is not set in the system task process the default behaviour is SystemTaskFailureBehaviour.FAIL_TASK_DO_RETRY. </code></pre> <p>However, the snippet above only applies for a particular process by setting parameters of the <code>ivy.response</code>. </p> <p>Is there anyway that I can set <code>SystemTaskFailureBehaviour.FAIL_TASK_DO_NOT_RETRY</code> as default per application (or system)?</p> <p>Regards</p>Genzer HawkerMon, 04 Apr 2016 08:15:34 -0400https://answers.axonivy.com/questions/1715/configure-systemtaskfailurebehaviour-for-system-wide-or-application-widesystem-taskapitaskHow we can obtain the context of the business process programmatically?https://answers.axonivy.com/questions/1185/how-we-can-obtain-the-context-of-the-business-process-programmatically<p>We want to implement a feedback feature in which the user can submit a feedback at any where. What we want to achieve is to attach the context (what is the current screen, which point in the process, etc) into the feedback.</p> <p>I found out a way to (somehow) close to what we expect:</p> <pre><code>StringBuilder fullContextBuilder = new StringBuilder(); for (IIvyThreadLocal threadlocal : IvyThreadContext.getIvyThreadLocals()) { fullContextBuilder.append(threadlocal).append("\n"); } Ivy.log().error(fullContextBuilder.toString()); </code></pre> <p>However, the <code>IIvyThreadLocal</code> and <code>IvyThreadContext</code> are not <code>@PublicAPI</code> so we could not rely on them.</p> <p>Is there a public API which can help me to obtain the context of the business process (something like what printed in the log file for an exception)?</p> <p><strong>UPDATE</strong></p> <p>(It seems I was still ambiguous about what the process context mean)</p> <p>The process context here means what is the current dialog and the context when the feedback submittet. What is the route (dialogs to dialogs) that the user has accessed before submitting the feedback.</p> <p>The idea is something similar to what is printed in the Ivy Server log file. I started to digg into the <code>Logger</code> and <code>ExceptionUtil</code> which I experimented as the snippet above.</p> <p>Thanks &amp; Regards</p>Genzer HawkerMon, 02 Mar 2015 10:56:42 -0500https://answers.axonivy.com/questions/1185/how-we-can-obtain-the-context-of-the-business-process-programmaticallyprocessapicontextWhy I got warning about "Discourage access to CaseQuery/TaskQuery" when I use it in Java code?https://answers.axonivy.com/questions/740/why-i-got-warning-about-discourage-access-to-casequery-taskquery-when-i-use-it-in-java-code<p>Despite being one part of Ivy API but when I try to use CaseQuery/TaskQuery inside a Java class, the compiler yeilds warnings:</p> <blockquote> <p>Discouraged access: The type CaseQuery is not accessible due to restriction on required library C:\dev\ide\xpert.ivy.alag\4.3.20.44658\plugins\ch.ivyteam.ivy.workflow_4.3.20.44658.jar</p> </blockquote> <p>It's true that we can suppress those warnings by using <code>@SuppressWarnings("restriction")</code> but I want to know the reason why they are restricted? Is there anyway we can remove it?</p> <p>P.s: I use Ivy v4.3.20</p> <p>Thanks</p>Genzer HawkerThu, 05 Jun 2014 05:12:46 -0400https://answers.axonivy.com/questions/740/why-i-got-warning-about-discourage-access-to-casequery-taskquery-when-i-use-it-in-java-codeapiworkflow