use of org.camunda.bpm.model.bpmn.instance.bpmndi.BpmnShape in project camunda-bpmn-model by camunda.
the class ProcessBuilder method startEvent.
public StartEventBuilder startEvent(String id) {
StartEvent start = createChild(StartEvent.class, id);
BpmnShape bpmnShape = createBpmnShape(start);
setCoordinates(bpmnShape);
return start.builder();
}
use of org.camunda.bpm.model.bpmn.instance.bpmndi.BpmnShape in project camunda-bpmn-model by camunda.
the class CoordinatesGenerationTest method findBpmnShape.
protected BpmnShape findBpmnShape(String id) {
Collection<BpmnShape> allShapes = instance.getModelElementsByType(BpmnShape.class);
Iterator<BpmnShape> iterator = allShapes.iterator();
while (iterator.hasNext()) {
BpmnShape shape = iterator.next();
if (shape.getBpmnElement().getId().equals(id)) {
return shape;
}
}
return null;
}
use of org.camunda.bpm.model.bpmn.instance.bpmndi.BpmnShape in project camunda-bpmn-model by camunda.
the class DiGeneratorForFlowNodesTest method shouldGenerateShapeForThrowingIntermediateEvent.
@Test
public void shouldGenerateShapeForThrowingIntermediateEvent() {
// given
ProcessBuilder processBuilder = Bpmn.createExecutableProcess();
// when
instance = processBuilder.startEvent(START_EVENT_ID).intermediateThrowEvent("inter").endEvent(END_EVENT_ID).done();
// then
Collection<BpmnShape> allShapes = instance.getModelElementsByType(BpmnShape.class);
assertEquals(3, allShapes.size());
assertEventShapeProperties("inter");
}
use of org.camunda.bpm.model.bpmn.instance.bpmndi.BpmnShape in project camunda-bpmn-model by camunda.
the class DiGeneratorForFlowNodesTest method assertTaskShapeProperties.
protected void assertTaskShapeProperties(String id) {
BpmnShape bpmnShapeTask = findBpmnShape(id);
assertNotNull(bpmnShapeTask);
assertActivitySize(bpmnShapeTask);
}
use of org.camunda.bpm.model.bpmn.instance.bpmndi.BpmnShape in project camunda-bpmn-model by camunda.
the class DiGeneratorForFlowNodesTest method shouldGenerateShapeForExclusiveGateway.
@Test
public void shouldGenerateShapeForExclusiveGateway() {
// given
ProcessBuilder processBuilder = Bpmn.createExecutableProcess();
// when
instance = processBuilder.startEvent(START_EVENT_ID).exclusiveGateway("or").endEvent(END_EVENT_ID).done();
// then
Collection<BpmnShape> allShapes = instance.getModelElementsByType(BpmnShape.class);
assertEquals(3, allShapes.size());
assertGatewayShapeProperties("or");
BpmnShape bpmnShape = findBpmnShape("or");
assertTrue(bpmnShape.isMarkerVisible());
}
Aggregations