Questions Tagged With processhttps://answers.axonivy.com/tags/process/?type=rss&user=Genzer%20Hawkerquestions tagged <span class="tag">process</span>enMon, 02 Mar 2015 10:56:42 -0500How 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-programmaticallyprocessapicontext