<?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: Error forcing a timer event in a test case in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/error-forcing-a-timer-event-in-a-test-case/m-p/123708#M87093</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Did you configure your process engine with the job executor enabled? That might cause the exception you see.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Jan 2013 08:28:11 GMT</pubDate>
    <dc:creator>jbarrez</dc:creator>
    <dc:date>2013-01-29T08:28:11Z</dc:date>
    <item>
      <title>Error forcing a timer event in a test case</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/error-forcing-a-timer-event-in-a-test-case/m-p/123707#M87092</link>
      <description>I'm trying to write an automated test case to simulate the behavior of some timers that are in my process diagram.&amp;nbsp; However, whenever I call managementService.executeJob(), I get an "already taking a transition" exception.&amp;nbsp; Is there something else that I need to do?&amp;nbsp; I'm currently using Activiti 5.1</description>
      <pubDate>Mon, 28 Jan 2013 18:40:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/error-forcing-a-timer-event-in-a-test-case/m-p/123707#M87092</guid>
      <dc:creator>brianshowers</dc:creator>
      <dc:date>2013-01-28T18:40:33Z</dc:date>
    </item>
    <item>
      <title>Re: Error forcing a timer event in a test case</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/error-forcing-a-timer-event-in-a-test-case/m-p/123708#M87093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Did you configure your process engine with the job executor enabled? That might cause the exception you see.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jan 2013 08:28:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/error-forcing-a-timer-event-in-a-test-case/m-p/123708#M87093</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2013-01-29T08:28:11Z</dc:date>
    </item>
    <item>
      <title>Re: Error forcing a timer event in a test case</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/error-forcing-a-timer-event-in-a-test-case/m-p/123709#M87094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I don't think that's the problem.&amp;nbsp; I added the following two lines to my test case to verify&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;boolean active = ((ProcessEngineImpl) processEngine).getProcessEngineConfiguration().getJobExecutor().isActive();&lt;BR /&gt;Assert.assertTrue(active);&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;With the new version of the test, I still get the same exception when calling executeJob()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;@Test&lt;BR /&gt;@Deployment&lt;BR /&gt;public void myTimerTestExample() {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Unfortunately, the ProcessEngine interface doesn't expose the JobExecutor&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //So we are forced to cast to the implementation&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; boolean active = ((ProcessEngineImpl) processEngine).getProcessEngineConfiguration().getJobExecutor().isActive();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Assert.assertTrue(active);&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Start a new process instance&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; String processDefinitionKey = "mykey";&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProcessInstance instance = runtimeService.startProcessInstanceByKey(processDefinitionKey);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; String processInstanceId = instance.getProcessInstanceId();&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Find the timer job.&amp;nbsp; For this process, there is exactly one timer job which is always started&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Job timerJob = managementService.createJobQuery().processInstanceId(processInstanceId).singleResult();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Assert.assertNotNull(timerJob );&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Force the timer to fire&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; managementService.executeJob(timerJob.getId());&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //TODO: Validate the results of the timer executing&lt;BR /&gt;}&lt;BR /&gt;&lt;/CODE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jan 2013 19:04:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/error-forcing-a-timer-event-in-a-test-case/m-p/123709#M87094</guid>
      <dc:creator>brianshowers</dc:creator>
      <dc:date>2013-01-31T19:04:00Z</dc:date>
    </item>
    <item>
      <title>Re: Error forcing a timer event in a test case</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/error-forcing-a-timer-event-in-a-test-case/m-p/123710#M87095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think I found the issue.&amp;nbsp; It's related to upgrading from Activiti 5.10 to 5.11.&amp;nbsp; The issue was that the timer I was firing sent a signal that tried to kill the process that owned it.&amp;nbsp; In v5.10, it appears that this was acceptable.&amp;nbsp; A sub-process could send a signal to cancel itself.&amp;nbsp; It appears that is no longer possible as of v5.11.&amp;nbsp; If a sub-process sends a signal that cancels itself, you'll get these exceptions.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is that expected behavior or a bug in the latest release?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jan 2013 23:12:56 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/error-forcing-a-timer-event-in-a-test-case/m-p/123710#M87095</guid>
      <dc:creator>brianshowers</dc:creator>
      <dc:date>2013-01-31T23:12:56Z</dc:date>
    </item>
    <item>
      <title>Re: Error forcing a timer event in a test case</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/error-forcing-a-timer-event-in-a-test-case/m-p/123711#M87096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Using a timer-event to trigger a signal to cancel the sub-process that OWNS the timer is not something that you want to do. The fact that it worked on 5.10 is probably an implementation detail.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Why don't you let the timer-boundary event be placed on the subprocess-boundary and have interrupt the subprocess ("cancelActivity=true")?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2013 08:03:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/error-forcing-a-timer-event-in-a-test-case/m-p/123711#M87096</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2013-02-01T08:03:31Z</dc:date>
    </item>
  </channel>
</rss>

