<?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: @deployment does it really deploy a process definition ? in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/deployment-does-it-really-deploy-a-process-definition/m-p/62646#M39125</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Nope, you can always create a custom base-test class in NG that behaves the same on setup/teardown (or whatever it is called inTestNG &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://connect.hyland.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;):&lt;/SPAN&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;&lt;BR /&gt;deploymentId = TestHelper.annotationDeploymentSetUp(processEngine, method.getMethod().getDeclaringClass(), method.getName());&lt;BR /&gt;&lt;BR /&gt;// … and later…&lt;BR /&gt;&lt;BR /&gt;TestHelper.annotationDeploymentTearDown(processEngine, deploymentId, method.getMethod().getDeclaringClass(), method.getName());&lt;BR /&gt;&lt;/CODE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Jun 2011 13:13:57 GMT</pubDate>
    <dc:creator>frederikherema1</dc:creator>
    <dc:date>2011-06-10T13:13:57Z</dc:date>
    <item>
      <title>@deployment does it really deploy a process definition ?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/deployment-does-it-really-deploy-a-process-definition/m-p/62643#M39122</link>
      <description>Hi,I have this simple test which fails because the process definition is not getting deployed.@Test@ContextConfigurationpublic class DemoProcessTest extends AbstractTestNGSpringContextTests {&amp;nbsp;&amp;nbsp;&amp;nbsp; @Autowired&amp;nbsp;&amp;nbsp;&amp;nbsp; private RepositoryService repositoryService;&amp;nbsp;&amp;nbsp;&amp;nbsp; @Deployment(resources = {"workflow/demo.bpm</description>
      <pubDate>Fri, 10 Jun 2011 12:45:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/deployment-does-it-really-deploy-a-process-definition/m-p/62643#M39122</guid>
      <dc:creator>heymjo</dc:creator>
      <dc:date>2011-06-10T12:45:32Z</dc:date>
    </item>
    <item>
      <title>Re: @deployment does it really deploy a process definition ?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/deployment-does-it-really-deploy-a-process-definition/m-p/62644#M39123</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;All our internal QA used the @Deployment annotation, so it works allright. If you look at the spring-chapter in the userguide, it says you have to use the ActivitiRule, this will scan the test for deployment annotations and do it's magic. Just running a vanilla spring-test won't: &lt;/SPAN&gt;&lt;A href="http://activiti.org/userguide/index.html#springUnitTest" rel="nofollow noopener noreferrer"&gt;http://activiti.org/userguide/index.html#springUnitTest&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It cascades, yes. The ActivitiRule javadocs clearly state this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt; * &amp;lt;p&amp;gt;You can declare a deployment with the {@link Deployment} annotation.&lt;BR /&gt; * This base class will make sure that this deployment gets deployed before the&lt;BR /&gt; * setUp and {@link RepositoryService#deleteDeployment(String, boolean) cascade deleted}&lt;BR /&gt; * after the tearDown.&lt;BR /&gt; * &amp;lt;/p&amp;gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jun 2011 12:50:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/deployment-does-it-really-deploy-a-process-definition/m-p/62644#M39123</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2011-06-10T12:50:02Z</dc:date>
    </item>
    <item>
      <title>Re: @deployment does it really deploy a process definition ?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/deployment-does-it-really-deploy-a-process-definition/m-p/62645#M39124</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;ah so that's what the ActivitiRule is, i always thought it was a drools thingy.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyways i'm using TestNG, this rule stuff looks quite junit specific. Am i out of luck here ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jun 2011 13:10:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/deployment-does-it-really-deploy-a-process-definition/m-p/62645#M39124</guid>
      <dc:creator>heymjo</dc:creator>
      <dc:date>2011-06-10T13:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: @deployment does it really deploy a process definition ?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/deployment-does-it-really-deploy-a-process-definition/m-p/62646#M39125</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Nope, you can always create a custom base-test class in NG that behaves the same on setup/teardown (or whatever it is called inTestNG &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://connect.hyland.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;):&lt;/SPAN&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;&lt;BR /&gt;deploymentId = TestHelper.annotationDeploymentSetUp(processEngine, method.getMethod().getDeclaringClass(), method.getName());&lt;BR /&gt;&lt;BR /&gt;// … and later…&lt;BR /&gt;&lt;BR /&gt;TestHelper.annotationDeploymentTearDown(processEngine, deploymentId, method.getMethod().getDeclaringClass(), method.getName());&lt;BR /&gt;&lt;/CODE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jun 2011 13:13:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/deployment-does-it-really-deploy-a-process-definition/m-p/62646#M39125</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2011-06-10T13:13:57Z</dc:date>
    </item>
    <item>
      <title>Re: @deployment does it really deploy a process definition ?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/deployment-does-it-really-deploy-a-process-definition/m-p/62647#M39126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;OK with testng it looks like this then:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;@Test&lt;BR /&gt;@ContextConfiguration&lt;BR /&gt;public class DemoProcessTest extends AbstractTestNGSpringContextTests {&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; @Autowired&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private ProcessEngine processEngine;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; @Autowired&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private RepositoryService repositoryService;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private ThreadLocal&amp;lt;String&amp;gt; deploymentId = new ThreadLocal&amp;lt;String&amp;gt;();&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; @BeforeMethod&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void setup(java.lang.reflect.Method method) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String id = TestHelper.annotationDeploymentSetUp(processEngine, method.getDeclaringClass(), method.getName());&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.deploymentId.set(id);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; @AfterMethod&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void tearDown(java.lang.reflect.Method method) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TestHelper.annotationDeploymentTearDown(processEngine, this.deploymentId.get(), method&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .getDeclaringClass(), method.getName());&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.deploymentId.remove();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; @Deployment(resources = {"workflow/demo.bpmn20.xml"})&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void simpleTest() {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProcessDefinition financialReport = repositoryService.createProcessDefinitionQuery()&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .processDefinitionKey("financialReport").latestVersion().singleResult();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Assert.assertNotNull(financialReport);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;}&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;it might be possible to use a testlistener as well which i guess are similar to your rules. But then you'll have to see how to initialize the process engine there, i figured it was nicer to just reuse the instance as initialized by the test. I put the deployment id as a threadlocal to allow testng parallel test execution (untested). AFAICT the ActivitiRule does not allow this but can ofcourse be easily modified. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;HTH&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Jorg&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jun 2011 14:50:08 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/deployment-does-it-really-deploy-a-process-definition/m-p/62647#M39126</guid>
      <dc:creator>heymjo</dc:creator>
      <dc:date>2011-06-10T14:50:08Z</dc:date>
    </item>
    <item>
      <title>Re: @deployment does it really deploy a process definition ?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/deployment-does-it-really-deploy-a-process-definition/m-p/62648#M39127</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for sharing &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://connect.hyland.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Jun 2011 08:30:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/deployment-does-it-really-deploy-a-process-definition/m-p/62648#M39127</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2011-06-12T08:30:47Z</dc:date>
    </item>
  </channel>
</rss>

