AnsweredAssumed Answered

@deployment does it really deploy a process definition ?

Question asked by heymjo on Jun 10, 2011
Latest reply on Jun 12, 2011 by frederikheremans1
Hi,

I have this simple test which fails because the process definition is not getting deployed.


@Test
@ContextConfiguration
public class DemoProcessTest extends AbstractTestNGSpringContextTests {

    @Autowired
    private RepositoryService repositoryService;

    @Deployment(resources = {"workflow/demo.bpmn20.xml"})
    public void simpleTest() {
        ProcessDefinition financialReport = repositoryService.createProcessDefinitionQuery()
                .processDefinitionKey("financialReport").latestVersion().singleResult();
        Assert.assertNotNull(financialReport);
    }
}


I can get it to work by putting the deploymentResources attribute of SpringProcessEngineConfiguration, but i thought it would be nicer with the annotation. I also checked act_re_deployment table and indeed it is empty.

Also, @Deployment claims to create *and* delete a deployment around a test method' in the javadoc. When it deletes the deployment will it do a cascade delete ?

Thanks
Jorg

Outcomes