08-10-2011 09:22 AM
public class Tests extends PluggableActivitiTestCase {
@Deployment(resources = {"com/example/wfe/test/res/Example_Spec_1_StartEnd.bpmn2"})
public void testMinimalProcess() throws Exception {
// After starting the process, a task should be assigned to the 'initiator' (normally set by GUI)
Map<String, Object> variables = new HashMap<String, Object>();
variables.put("initiator", "micha");
ProcessDefinitionQuery query = repositoryService.createProcessDefinitionQuery();
query.deploymentId(deploymentId);
List<ProcessDefinition> defs = query.list();
for(Iterator<ProcessDefinition> i = defs.iterator();i.hasNext();){
ProcessDefinition def = i.next();
System.out.println(def.getKey());
}
String procId = runtimeService.startProcessInstanceByKey("Minimal").getId();
Task task = taskService.createTaskQuery().taskAssignee("micha").singleResult();
assertEquals("Minimal Process", task.getName());
}
}I get a deploymentId here(AbstractActivitiTestCase):
deploymentId = TestHelper.annotationDeploymentSetUp(processEngine, getClass(), getName());
So my resource is found and I would expect to find it within the defs-list. But that remains empty.String procId = runtimeService.startProcessInstanceByKey("Minimal").getId();With the message:<process processType="Private" isExecutable="true" id="Minimal" name="Minimal Process" >Please give me a hint what I do wrong.08-10-2011 10:08 AM
08-10-2011 10:15 AM
Your file should be a bpmn20.xml instead of just bpmn2 in order to be picked up as process-file.Yes, now it works. Thank you for that light speed help
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.