use of org.camunda.bpm.model.bpmn.instance.di.Waypoint in project camunda-bpmn-model by camunda.
the class CoordinatesGenerationTest method shouldPlaceFollowingFlowNodeProperlyForTask.
@Test
public void shouldPlaceFollowingFlowNodeProperlyForTask() {
ProcessBuilder builder = Bpmn.createExecutableProcess();
instance = builder.startEvent(START_EVENT_ID).userTask(USER_TASK_ID).boundaryEvent("boundary").sequenceFlowId(SEQUENCE_FLOW_ID).endEvent(END_EVENT_ID).moveToActivity(USER_TASK_ID).endEvent().done();
Bounds endEventBounds = findBpmnShape(END_EVENT_ID).getBounds();
assertShapeCoordinates(endEventBounds, 266.5, 208);
Collection<Waypoint> sequenceFlowWaypoints = findBpmnEdge(SEQUENCE_FLOW_ID).getWaypoints();
Iterator<Waypoint> iterator = sequenceFlowWaypoints.iterator();
Waypoint waypoint = iterator.next();
assertWaypointCoordinates(waypoint, 236, 176);
while (iterator.hasNext()) {
waypoint = iterator.next();
}
assertWaypointCoordinates(waypoint, 266.5, 226);
}
use of org.camunda.bpm.model.bpmn.instance.di.Waypoint in project camunda-bpmn-model by camunda.
the class CoordinatesGenerationTest method shouldPlaceManualTask.
@Test
public void shouldPlaceManualTask() {
ProcessBuilder builder = Bpmn.createExecutableProcess();
instance = builder.startEvent(START_EVENT_ID).sequenceFlowId(SEQUENCE_FLOW_ID).manualTask(TASK_ID).done();
Bounds manualTaskBounds = findBpmnShape(TASK_ID).getBounds();
assertShapeCoordinates(manualTaskBounds, 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.di.Waypoint in project camunda-bpmn-model by camunda.
the class CoordinatesGenerationTest method shouldPlaceReceiveTask.
@Test
public void shouldPlaceReceiveTask() {
ProcessBuilder builder = Bpmn.createExecutableProcess();
instance = builder.startEvent(START_EVENT_ID).sequenceFlowId(SEQUENCE_FLOW_ID).receiveTask(TASK_ID).done();
Bounds receiveTaskBounds = findBpmnShape(TASK_ID).getBounds();
assertShapeCoordinates(receiveTaskBounds, 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.di.Waypoint in project camunda-bpmn-model by camunda.
the class CoordinatesGenerationTest method shouldPlaceTwoBranchesForInclusiveGateway.
@Test
public void shouldPlaceTwoBranchesForInclusiveGateway() {
ProcessBuilder builder = Bpmn.createExecutableProcess();
instance = builder.startEvent(START_EVENT_ID).inclusiveGateway("id").sequenceFlowId("s1").userTask(USER_TASK_ID).moveToNode("id").sequenceFlowId("s2").endEvent(END_EVENT_ID).done();
Bounds userTaskBounds = findBpmnShape(USER_TASK_ID).getBounds();
assertShapeCoordinates(userTaskBounds, 286, 78);
Bounds endEventBounds = findBpmnShape(END_EVENT_ID).getBounds();
assertShapeCoordinates(endEventBounds, 286, 208);
Collection<Waypoint> sequenceFlowWaypoints = findBpmnEdge("s2").getWaypoints();
Iterator<Waypoint> iterator = sequenceFlowWaypoints.iterator();
Waypoint waypoint = iterator.next();
assertWaypointCoordinates(waypoint, 211, 143);
while (iterator.hasNext()) {
waypoint = iterator.next();
}
assertWaypointCoordinates(waypoint, 286, 226);
}
use of org.camunda.bpm.model.bpmn.instance.di.Waypoint in project camunda-bpmn-model by camunda.
the class CoordinatesGenerationTest method shouldPlaceCatchingIntermediateEvent.
@Test
public void shouldPlaceCatchingIntermediateEvent() {
ProcessBuilder builder = Bpmn.createExecutableProcess();
instance = builder.startEvent(START_EVENT_ID).sequenceFlowId(SEQUENCE_FLOW_ID).intermediateCatchEvent("id").done();
Bounds catchEventBounds = findBpmnShape("id").getBounds();
assertShapeCoordinates(catchEventBounds, 186, 100);
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