class BoundaryEventConverter implements EdgeConverter<BoundaryEvent> {

    @Override
    public Result<BpmnEdge> convertEdge(BoundaryEvent event, Map<String, BpmnNode> nodes) {
        String parentId = event.getAttachedToRef().getId();
        String childId = event.getId();
        return valid(nodes, parentId, childId)
                ? Result.success(BpmnEdge.docked(nodes.get(parentId), nodes.get(childId)))
                : Result.ignored("Boundary ignored",
                                 MarshallingMessage.builder()
                                         .message("Boundary ignored")
                                         .messageKey(MarshallingMessageKeys.boundaryIgnored)
                                         .messageArguments(childId, parentId)
                                         .type(Violation.Type.WARNING)
                                         .build());
    }

}