<?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: different output from Test in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/different-output-from-test/m-p/122821#M86488</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I got it now.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I did it now in this way:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;CODE&gt;ProcessInstance pi = runtimeService.startProcessInstanceByKey("financialReport");&lt;BR /&gt;TaskService taskService = processEngine.getTaskService();&lt;BR /&gt;Task task = taskService.createTaskQuery().processInstanceId(pi.getId()).singleResult();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; assertEquals("Verify monthly financial report1", task.getName());&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; taskService.complete(task.getId());&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; task = taskService.createTaskQuery().processInstanceId(pi.getId()).singleResult();&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; assertEquals("Verify monthly financial report2", task.getName());&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; taskService.complete(task.getId());&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; task = taskService.createTaskQuery().processInstanceId(pi.getId()).singleResult();&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;What can I do that JUnit didn't use the data and tasks from the database for the next starts?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;–&amp;gt;like an "Uninfected start"&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 Jan 2013 09:52:15 GMT</pubDate>
    <dc:creator>tomi87</dc:creator>
    <dc:date>2013-01-28T09:52:15Z</dc:date>
    <item>
      <title>different output from Test</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/different-output-from-test/m-p/122817#M86484</link>
      <description>Hello,can you explain me why the output for the following test is not in order like the tasks in my xml file?and can you suggest me how I can get the output in the right order ?In my xml file I have an userTask connection from "Verify monthly financial report1" to "Verify monthly financial report4".</description>
      <pubDate>Sun, 27 Jan 2013 07:09:44 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/different-output-from-test/m-p/122817#M86484</guid>
      <dc:creator>tomi87</dc:creator>
      <dc:date>2013-01-27T07:09:44Z</dc:date>
    </item>
    <item>
      <title>Re: different output from Test</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/different-output-from-test/m-p/122818#M86485</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;It looks like you've ran this test multiple times right?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;First of all, do you really want to use a standalone H2 database to run this test? It would be better to use an in-memory H2 database, so you have a clean database every time you run the test.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The first time you run it you only have one user task. But the second time you already have two user tasks, one from the first test run (which is already one step further in the process since you completed the task) and a new task of the second test run. And since you don't do any ordering in the query, the order in which you get the tasks back is random.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So therefore you see the test result you described.&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>Sun, 27 Jan 2013 10:07:48 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/different-output-from-test/m-p/122818#M86485</guid>
      <dc:creator>trademak</dc:creator>
      <dc:date>2013-01-27T10:07:48Z</dc:date>
    </item>
    <item>
      <title>Re: different output from Test</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/different-output-from-test/m-p/122819#M86486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;No I ran it just one time. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Now I get a listSize = 6. Why ? But I didn't change anything.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And my other output is &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Verify monthly financial report3 1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Verify monthly financial report4 2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Verify monthly financial report3 3&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Verify monthly financial report3 4&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Verify monthly financial report2 5&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Verify monthly financial report1 6&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Process instance end time: null&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Because I want to move the execution until the point I want, and test from there. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you give me a simple code example how I can get no double tasks?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 27 Jan 2013 14:57:38 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/different-output-from-test/m-p/122819#M86486</guid>
      <dc:creator>tomi87</dc:creator>
      <dc:date>2013-01-27T14:57:38Z</dc:date>
    </item>
    <item>
      <title>Re: different output from Test</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/different-output-from-test/m-p/122820#M86487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;To be absolutely sure, you're unit-test is only using the tasks from the process that you JUST created, include the "procId" in the task-query. This way, you'll be unaffected by any data left in the DB…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt; List&amp;lt;Task&amp;gt; tasks = taskService.createTaskQuery().processInstanceId(procInst).list();&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&lt;/CODE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2013 09:23:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/different-output-from-test/m-p/122820#M86487</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2013-01-28T09:23:19Z</dc:date>
    </item>
    <item>
      <title>Re: different output from Test</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/different-output-from-test/m-p/122821#M86488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I got it now.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I did it now in this way:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;CODE&gt;ProcessInstance pi = runtimeService.startProcessInstanceByKey("financialReport");&lt;BR /&gt;TaskService taskService = processEngine.getTaskService();&lt;BR /&gt;Task task = taskService.createTaskQuery().processInstanceId(pi.getId()).singleResult();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; assertEquals("Verify monthly financial report1", task.getName());&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; taskService.complete(task.getId());&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; task = taskService.createTaskQuery().processInstanceId(pi.getId()).singleResult();&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; assertEquals("Verify monthly financial report2", task.getName());&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; taskService.complete(task.getId());&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; task = taskService.createTaskQuery().processInstanceId(pi.getId()).singleResult();&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;What can I do that JUnit didn't use the data and tasks from the database for the next starts?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;–&amp;gt;like an "Uninfected start"&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2013 09:52:15 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/different-output-from-test/m-p/122821#M86488</guid>
      <dc:creator>tomi87</dc:creator>
      <dc:date>2013-01-28T09:52:15Z</dc:date>
    </item>
    <item>
      <title>Re: different output from Test</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/different-output-from-test/m-p/122822#M86489</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you're using the activiti base-class for your tests and use the @deployment annotation, the deployment should be removed and all data cascades with it… The same applies when you're using the ActivitiRule.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I see you're NOT using the activiti-rule and deployment-annotation, rather you deploy the process manually. If you don't want to use the utilities we provide you, you can always delete the deployment (cascade = true) at the end of your test.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2013 10:08:08 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/different-output-from-test/m-p/122822#M86489</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2013-01-28T10:08:08Z</dc:date>
    </item>
    <item>
      <title>Re: different output from Test</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/different-output-from-test/m-p/122823#M86490</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I used the whole time this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;@Test&lt;BR /&gt; @Deployment(resources={"FinancialReportProcess.bpmn20.xml"})&lt;BR /&gt; public void startFormSubmit() {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProcessEngine processEngine = ProcessEngineConfiguration&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .createStandaloneProcessEngineConfiguration()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .buildProcessEngine();&lt;BR /&gt;…&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;But good to know. Thank you!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2013 10:13:52 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/different-output-from-test/m-p/122823#M86490</guid>
      <dc:creator>tomi87</dc:creator>
      <dc:date>2013-01-28T10:13:52Z</dc:date>
    </item>
    <item>
      <title>Re: different output from Test</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/different-output-from-test/m-p/122824#M86491</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You're using the @Deployment annotation, but you're creating the process-engine yourself. That's not going to work. You should use the services/engine provided by the ActivitiRule OR - in case of JUnit3 - the ones provided on the abstract base test class. If you're not using either of these approaches, the @Deployment is useless, as there is nothing in place to pick it up, so NO deployments will be cleaned up, either…&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2013 10:57:15 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/different-output-from-test/m-p/122824#M86491</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2013-01-28T10:57:15Z</dc:date>
    </item>
    <item>
      <title>Re: different output from Test</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/different-output-from-test/m-p/122825#M86492</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Feb 2013 08:21:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/different-output-from-test/m-p/122825#M86492</guid>
      <dc:creator>tomi87</dc:creator>
      <dc:date>2013-02-05T08:21:16Z</dc:date>
    </item>
  </channel>
</rss>

