use of org.camunda.bpm.model.bpmn.instance.dc.Bounds in project camunda-bpmn-model by camunda.
the class CoordinatesGenerationTest method shouldPlaceThreeBoundaryEventsForTask.
@Test
public void shouldPlaceThreeBoundaryEventsForTask() {
ProcessBuilder builder = Bpmn.createExecutableProcess();
instance = builder.startEvent(START_EVENT_ID).userTask(USER_TASK_ID).boundaryEvent("boundary1").sequenceFlowId(SEQUENCE_FLOW_ID).endEvent(END_EVENT_ID).moveToActivity(USER_TASK_ID).endEvent().moveToActivity(USER_TASK_ID).boundaryEvent("boundary2").moveToActivity(USER_TASK_ID).boundaryEvent("boundary3").done();
Bounds boundaryEvent1Bounds = findBpmnShape("boundary1").getBounds();
assertShapeCoordinates(boundaryEvent1Bounds, 218, 140);
Bounds boundaryEvent2Bounds = findBpmnShape("boundary2").getBounds();
assertShapeCoordinates(boundaryEvent2Bounds, 254, 140);
Bounds boundaryEvent3Bounds = findBpmnShape("boundary3").getBounds();
assertShapeCoordinates(boundaryEvent3Bounds, 182, 140);
}
use of org.camunda.bpm.model.bpmn.instance.dc.Bounds in project camunda-bpmn-model by camunda.
the class CoordinatesGenerationTest method shouldPlaceCallActivity.
@Test
public void shouldPlaceCallActivity() {
ProcessBuilder builder = Bpmn.createExecutableProcess();
instance = builder.startEvent(START_EVENT_ID).sequenceFlowId(SEQUENCE_FLOW_ID).callActivity("id").done();
Bounds callActivityBounds = findBpmnShape("id").getBounds();
assertShapeCoordinates(callActivityBounds, 186, 78);
Collection<Waypoint> sequenceFlowWaypoints = findBpmnEdge(SEQUENCE_FLOW_ID).getWaypoints();
Iterator<Waypoint> iterator = sequenceFlowWaypoints.iterator();
Waypoint waypoint = iterator.next();
assertWaypointCoordinates(waypoint, 136, 118);
while (iterator.hasNext()) {
waypoint = iterator.next();
}
assertWaypointCoordinates(waypoint, 186, 118);
}
use of org.camunda.bpm.model.bpmn.instance.dc.Bounds in project camunda-bpmn-model by camunda.
the class CoordinatesGenerationTest method shouldPlaceScriptTask.
@Test
public void shouldPlaceScriptTask() {
ProcessBuilder builder = Bpmn.createExecutableProcess();
instance = builder.startEvent(START_EVENT_ID).sequenceFlowId(SEQUENCE_FLOW_ID).scriptTask(TASK_ID).done();
Bounds scriptTaskBounds = findBpmnShape(TASK_ID).getBounds();
assertShapeCoordinates(scriptTaskBounds, 186, 78);
Collection<Waypoint> sequenceFlowWaypoints = findBpmnEdge(SEQUENCE_FLOW_ID).getWaypoints();
Iterator<Waypoint> iterator = sequenceFlowWaypoints.iterator();
Waypoint waypoint = iterator.next();
assertWaypointCoordinates(waypoint, 136, 118);
while (iterator.hasNext()) {
waypoint = iterator.next();
}
assertWaypointCoordinates(waypoint, 186, 118);
}
use of org.camunda.bpm.model.bpmn.instance.dc.Bounds in project camunda-bpmn-model by camunda.
the class CoordinatesGenerationTest method shouldPlaceSendTask.
@Test
public void shouldPlaceSendTask() {
ProcessBuilder builder = Bpmn.createExecutableProcess();
instance = builder.startEvent(START_EVENT_ID).sequenceFlowId(SEQUENCE_FLOW_ID).sendTask(SEND_TASK_ID).done();
Bounds sendTaskBounds = findBpmnShape(SEND_TASK_ID).getBounds();
assertShapeCoordinates(sendTaskBounds, 186, 78);
Collection<Waypoint> sequenceFlowWaypoints = findBpmnEdge(SEQUENCE_FLOW_ID).getWaypoints();
Iterator<Waypoint> iterator = sequenceFlowWaypoints.iterator();
Waypoint waypoint = iterator.next();
assertWaypointCoordinates(waypoint, 136, 118);
while (iterator.hasNext()) {
waypoint = iterator.next();
}
assertWaypointCoordinates(waypoint, 186, 118);
}
use of org.camunda.bpm.model.bpmn.instance.dc.Bounds in project camunda-bpmn-model by camunda.
the class CoordinatesGenerationTest method shouldPlaceBoundaryEventForSubProcess.
@Test
public void shouldPlaceBoundaryEventForSubProcess() {
ProcessBuilder builder = Bpmn.createExecutableProcess();
instance = builder.startEvent(START_EVENT_ID).subProcess(SUB_PROCESS_ID).boundaryEvent("boundary").sequenceFlowId(SEQUENCE_FLOW_ID).endEvent(END_EVENT_ID).moveToActivity(SUB_PROCESS_ID).endEvent().done();
Bounds boundaryEventBounds = findBpmnShape("boundary").getBounds();
assertShapeCoordinates(boundaryEventBounds, 343, 200);
}
Aggregations