Questions Tagged With systemhttps://answers.axonivy.com/tags/system/?type=rssquestions tagged <span class="tag">system</span>enFri, 27 May 2016 07:54:55 -0400Is there any possible way to switch SYSTEM session to another regular user's session in a ProgramStart execution?https://answers.axonivy.com/questions/1780/is-there-any-possible-way-to-switch-system-session-to-another-regular-user-s-session-in-a-programstart-execution<p>In our project, we use <code>ProgramStart</code> to implement <code>cron</code> jobs. The executions will always be carried on by the SYSTEM user using only one <code>ISession(id = 0)</code>.</p> <p>The problem is, we heavily store plenty of <em>Context Information</em> (authentication token, user-session-specific data, etc) into <code>ISession.setAttribute()</code>. It works well on normal situation with logged-in Ivy user. However, because in background jobs, there is only one session, each execution will interfere with each others, trying to <code>set</code> and <code>get</code> the <em>Context Information</em>.</p> <p>In addition, this happens the same with <code>Signals</code> since execution of those also delegated to <code>SYSTEM</code>.</p> <p>I've tried to call <code>ivy.session.login()</code> but it threw exception since Axon.ivy refuse to allow logging out of <code>SYSTEM</code> user.</p> <p>My question is: Is there any possible way to switch from SYSTEM sessions to regular normal user's session?</p> <p>Thanks</p>Genzer HawkerFri, 27 May 2016 07:54:55 -0400https://answers.axonivy.com/questions/1780/is-there-any-possible-way-to-switch-system-session-to-another-regular-user-s-session-in-a-programstart-executionbackground-jobsignalssessionsystem