@Test public void convertMissingNodes() { Map<String, BpmnNode> nodes = new HashMap<>(); Result<BpmnEdge> result = tested.convertEdge(event, nodes); BpmnEdge value = result.value(); assertTrue(result.isIgnored()); assertNull(value); }
@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()); }
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()); } }
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()); }  }
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()); }  @Override Result<BpmnEdge> convertEdge(BoundaryEvent event, Map<String, BpmnNode> nodes); }
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()); }  @Override Result<BpmnEdge> convertEdge(BoundaryEvent event, Map<String, BpmnNode> nodes);  }