Search in sources :

Example 91 with BpmnModel

use of org.activiti.bpmn.model.BpmnModel in project Activiti by Activiti.

the class MapExceptionConverterTest method testMapExceptionWithNoExceptionClass.

@Test
public void testMapExceptionWithNoExceptionClass() throws Exception {
    resourceName = "mapException/mapExceptionNoExceptionClass.bpmn";
    BpmnModel bpmnModel = readXMLFile();
    FlowElement flowElement = bpmnModel.getMainProcess().getFlowElement("servicetaskWithAndTrueAndChildren");
    assertNotNull(flowElement);
    assertTrue(flowElement instanceof ServiceTask);
    assertEquals("servicetaskWithAndTrueAndChildren", flowElement.getId());
    ServiceTask serviceTask = (ServiceTask) flowElement;
    assertNotNull(serviceTask.getMapExceptions());
    assertEquals(1, serviceTask.getMapExceptions().size());
    assertNotNull(serviceTask.getMapExceptions().get(0).getClassName());
    assertEquals(0, serviceTask.getMapExceptions().get(0).getClassName().length());
}
Also used : ServiceTask(org.activiti.bpmn.model.ServiceTask) FlowElement(org.activiti.bpmn.model.FlowElement) BpmnModel(org.activiti.bpmn.model.BpmnModel) Test(org.junit.Test)

Example 92 with BpmnModel

use of org.activiti.bpmn.model.BpmnModel in project Activiti by Activiti.

the class TimerDefinitionConverterTest method convertModelToXML.

@Test
public void convertModelToXML() throws Exception {
    BpmnModel bpmnModel = readXMLFile();
    BpmnModel parsedModel = exportAndReadXMLFile(bpmnModel);
    validateModel(parsedModel);
    deployProcess(parsedModel);
}
Also used : BpmnModel(org.activiti.bpmn.model.BpmnModel) Test(org.junit.Test)

Example 93 with BpmnModel

use of org.activiti.bpmn.model.BpmnModel in project Activiti by Activiti.

the class ValuedDataObjectConverterTest method convertModelToXML.

@Test
public void convertModelToXML() throws Exception {
    BpmnModel bpmnModel = readXMLFile();
    BpmnModel parsedModel = exportAndReadXMLFile(bpmnModel);
    validateModel(parsedModel);
    deployProcess(parsedModel);
}
Also used : BpmnModel(org.activiti.bpmn.model.BpmnModel) Test(org.junit.Test)

Example 94 with BpmnModel

use of org.activiti.bpmn.model.BpmnModel in project Activiti by Activiti.

the class ServiceTaskConverterTest method connvertXMLToModel.

@Test
public void connvertXMLToModel() throws Exception {
    BpmnModel bpmnModel = readXMLFile();
    validateModel(bpmnModel);
}
Also used : BpmnModel(org.activiti.bpmn.model.BpmnModel) Test(org.junit.Test)

Example 95 with BpmnModel

use of org.activiti.bpmn.model.BpmnModel in project Activiti by Activiti.

the class SimpleConverterTest method convertModelToXML.

@Test
public void convertModelToXML() throws Exception {
    BpmnModel bpmnModel = readXMLFile();
    BpmnModel parsedModel = exportAndReadXMLFile(bpmnModel);
    validateModel(parsedModel);
    deployProcess(parsedModel);
}
Also used : BpmnModel(org.activiti.bpmn.model.BpmnModel) Test(org.junit.Test)

Aggregations

BpmnModel (org.activiti.bpmn.model.BpmnModel)149 Test (org.junit.Test)101 BpmnXMLConverter (org.activiti.bpmn.converter.BpmnXMLConverter)15 InputStream (java.io.InputStream)13 ByteArrayInputStream (java.io.ByteArrayInputStream)10 Deployment (org.activiti.engine.repository.Deployment)10 Process (org.activiti.bpmn.model.Process)8 ProcessDefinition (org.activiti.engine.repository.ProcessDefinition)8 ProcessInstance (org.activiti.engine.runtime.ProcessInstance)8 StartEvent (org.activiti.bpmn.model.StartEvent)7 ActivitiException (org.activiti.engine.ActivitiException)7 ProcessDefinitionEntity (org.activiti.engine.impl.persistence.entity.ProcessDefinitionEntity)7 ArrayList (java.util.ArrayList)6 XMLInputFactory (javax.xml.stream.XMLInputFactory)6 XMLStreamReader (javax.xml.stream.XMLStreamReader)6 UserTask (org.activiti.bpmn.model.UserTask)6 FlowElement (org.activiti.bpmn.model.FlowElement)5 BpmnJsonConverter (org.activiti.editor.language.json.converter.BpmnJsonConverter)5 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)4 StreamResource (com.vaadin.terminal.StreamResource)4