<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How did the timer events work? in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/how-did-the-timer-events-work/m-p/83479#M56081</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Is the JobExecuter quering the database for ready timer events? Or how does it work?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;If you want to know in detail, there is always the source, but asically that is what it does, yes.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Jun 2012 12:29:46 GMT</pubDate>
    <dc:creator>ronald_van_kuij</dc:creator>
    <dc:date>2012-06-11T12:29:46Z</dc:date>
    <item>
      <title>How did the timer events work?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-did-the-timer-events-work/m-p/83478#M56080</link>
      <description>Hi everybody,Can somebody explain how the timer event is working in activiti. I want to understand how the timer were stored and how they are read.In the Userguide I only find the information that you can enable the JobExecuter with &amp;lt;property name="jobExecutorActivate" value="true" /&amp;gt;.But it i</description>
      <pubDate>Mon, 11 Jun 2012 07:27:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-did-the-timer-events-work/m-p/83478#M56080</guid>
      <dc:creator>cweber</dc:creator>
      <dc:date>2012-06-11T07:27:10Z</dc:date>
    </item>
    <item>
      <title>Re: How did the timer events work?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-did-the-timer-events-work/m-p/83479#M56081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Is the JobExecuter quering the database for ready timer events? Or how does it work?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;If you want to know in detail, there is always the source, but asically that is what it does, yes.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2012 12:29:46 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-did-the-timer-events-work/m-p/83479#M56081</guid>
      <dc:creator>ronald_van_kuij</dc:creator>
      <dc:date>2012-06-11T12:29:46Z</dc:date>
    </item>
    <item>
      <title>Re: How did the timer events work?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-did-the-timer-events-work/m-p/83480#M56082</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;All right, thanks for the answear. So I have to keep this service running even if my application sleeps to find out which timers are finished.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2012 13:31:41 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-did-the-timer-events-work/m-p/83480#M56082</guid>
      <dc:creator>cweber</dc:creator>
      <dc:date>2012-06-12T13:31:41Z</dc:date>
    </item>
    <item>
      <title>Re: How did the timer events work?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-did-the-timer-events-work/m-p/83481#M56083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The job executor is a thread that looks every couple of seconds if new jobs / timers need to be executed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So yes, this needs to keep running to have the timers executed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2012 14:06:36 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-did-the-timer-events-work/m-p/83481#M56083</guid>
      <dc:creator>trademak</dc:creator>
      <dc:date>2012-06-12T14:06:36Z</dc:date>
    </item>
    <item>
      <title>Re: How did the timer events work?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-did-the-timer-events-work/m-p/83482#M56084</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi. I know the question is a few days old but I'm not sure if I understand it right.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I use Xpages on Domino Sever to connect the activiti engine. So I have to create a managedBean that connects the runtime of activiti.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;First I thougt to set this bean as application bean but because of&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;MBSActivitiRuntime.getInstance().getProcessEngine().getIdentityService().setAuthenticatedUserId(pUser)&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;I think I get trouble with the authentication if I'm using this as a application bean.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So I change it to session. But this means every user get its own engine and all of the engines will run the thread that search for new timed events, right? So I get more threads with more logged in users, right?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Would it make sence to run an instance as application (a kind of server engine) were no user will logon and it just handles the threads.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;And every user will start his/her bean as session without the threading for the timer events?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope I get it right!?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jul 2012 08:52:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-did-the-timer-events-work/m-p/83482#M56084</guid>
      <dc:creator>cweber</dc:creator>
      <dc:date>2012-07-04T08:52:33Z</dc:date>
    </item>
    <item>
      <title>Re: How did the timer events work?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-did-the-timer-events-work/m-p/83483#M56085</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Authentication is done on a thread-local base. So when you set the "setAuthenticatedUser()", be sure to clear the user in a finally-block around all the API-calls to ensure thread-pool threads' thread local userId doesn't stick after call to engine is completed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It makes no sense to have multiple engines (one for each user), since current user is stored thread-based. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When a timer fires, it's executed by a job-executor thread. In this thread, by default, NO authenticated user is set. However, if you really want timers to be executed as a certain user, you can override the job handler. Good example of this is a class I implemented in alfresco, which uses the "assignee" of the task as authenticated user in alfresco. A similar approach can be created to call the setAuthenticatedUser() and clear it again before and after the time fires. This can be found on the Alfresco open mirror:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://svn.alfresco.com/repos/alfresco-open-mirror/alfresco/HEAD/root/projects/repository/source/java/org/alfresco/repo/workflow/activiti/AuthenticatedTimerJobHandler.java" rel="nofollow noopener noreferrer"&gt;http://svn.alfresco.com/repos/alfresco-open-mirror/alfresco/HEAD/root/projects/repository/source/java/org/alfresco/repo/workflow/activiti/AuthenticatedTimerJobHandler.java&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jul 2012 09:51:52 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-did-the-timer-events-work/m-p/83483#M56085</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2012-07-04T09:51:52Z</dc:date>
    </item>
    <item>
      <title>Re: How did the timer events work?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-did-the-timer-events-work/m-p/83484#M56086</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the explanation.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jul 2012 11:03:35 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-did-the-timer-events-work/m-p/83484#M56086</guid>
      <dc:creator>cweber</dc:creator>
      <dc:date>2012-07-04T11:03:35Z</dc:date>
    </item>
  </channel>
</rss>

