use of org.camunda.bpm.model.bpmn.builder.ProcessBuilder in project camunda-bpmn-model by camunda.
the class CoordinatesGenerationTest method shouldPlaceBlankSubProcess.
@Test
public void shouldPlaceBlankSubProcess() {
ProcessBuilder builder = Bpmn.createExecutableProcess();
instance = builder.startEvent(START_EVENT_ID).sequenceFlowId(SEQUENCE_FLOW_ID).subProcess(SUB_PROCESS_ID).done();
Bounds subProcessBounds = findBpmnShape(SUB_PROCESS_ID).getBounds();
assertShapeCoordinates(subProcessBounds, 186, 18);
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.builder.ProcessBuilder in project camunda-bpmn-model by camunda.
the class CoordinatesGenerationTest method shouldPlaceEventBasedGateway.
@Test
public void shouldPlaceEventBasedGateway() {
ProcessBuilder builder = Bpmn.createExecutableProcess();
instance = builder.startEvent(START_EVENT_ID).sequenceFlowId(SEQUENCE_FLOW_ID).eventBasedGateway().id("id").done();
Bounds gatewayBounds = findBpmnShape("id").getBounds();
assertShapeCoordinates(gatewayBounds, 186, 93);
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.builder.ProcessBuilder in project camunda-bpmn-model by camunda.
the class CoordinatesGenerationTest method shouldPlaceParallelGateway.
@Test
public void shouldPlaceParallelGateway() {
ProcessBuilder builder = Bpmn.createExecutableProcess();
instance = builder.startEvent(START_EVENT_ID).sequenceFlowId(SEQUENCE_FLOW_ID).parallelGateway("id").done();
Bounds gatewayBounds = findBpmnShape("id").getBounds();
assertShapeCoordinates(gatewayBounds, 186, 93);
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.builder.ProcessBuilder 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.builder.ProcessBuilder 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);
}
Aggregations