Package org.camunda.bpm.model.xml

Examples of org.camunda.bpm.model.xml.Model


  private void assertFlowElementIs(Class<? extends FlowElement> elementClass) {
    BpmnModelInstance modelInstance = ModelExecutionContextExecutionListener.modelInstance;
    assertNotNull(modelInstance);

    Model model = modelInstance.getModel();
    Collection<ModelElementInstance> events = modelInstance.getModelElementsByType(model.getType(Event.class));
    assertEquals(3, events.size());
    Collection<ModelElementInstance> gateways = modelInstance.getModelElementsByType(model.getType(Gateway.class));
    assertEquals(1, gateways.size());
    Collection<ModelElementInstance> tasks = modelInstance.getModelElementsByType(model.getType(Task.class));
    assertEquals(1, tasks.size());

    FlowElement flowElement = ModelExecutionContextExecutionListener.flowElement;
    assertNotNull(flowElement);
    assertTrue(elementClass.isAssignableFrom(flowElement.getClass()));
View Full Code Here


    runtimeService.startProcessInstanceByKey(PROCESS_ID);

    BpmnModelInstance modelInstance = ModelExecutionContextServiceTask.modelInstance;
    assertNotNull(modelInstance);

    Model model = modelInstance.getModel();
    Collection<ModelElementInstance> events = modelInstance.getModelElementsByType(model.getType(Event.class));
    assertEquals(2, events.size());
    Collection<ModelElementInstance> tasks = modelInstance.getModelElementsByType(model.getType(Task.class));
    assertEquals(1, tasks.size());

    Process process = (Process) modelInstance.getDefinitions().getRootElements().iterator().next();
    assertEquals(PROCESS_ID, process.getId());
    assertTrue(process.isExecutable());
View Full Code Here

  }

  public ModelElementTypeAssert isPartOfModel(Model model) {
    isNotNull();

    Model actualModel = actual.getModel();

    if (!model.equals(actualModel)) {
      failWithMessage("Expected element type <%s> to be part of model <%s> but was part of <%s>", typeName, model.getModelName(), actualModel.getModelName());
    }

    return this;
  }
View Full Code Here

TOP

Related Classes of org.camunda.bpm.model.xml.Model

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.