@Test public void testConvertEdgeNonDirectional() { when(factoryManager.newEdge(ASSOCIATION_ID, NonDirectionalAssociation.class)).thenReturn((Edge) edgeNonDirectional); when(associationReader.getAssociationByDirection()).thenAnswer(a -> NonDirectionalAssociation.class); when(edgeNonDirectional.getContent()).thenReturn(contentNonDirectional); when(contentNonDirectional.getDefinition()).thenReturn(definitionNonDirectional); BpmnEdge.Simple result = (BpmnEdge.Simple) associationConverter.convertEdge(association, nodes).value(); assertEquals(edgeNonDirectional, result.getEdge()); }
public Result<BpmnEdge> convertEdge(org.eclipse.bpmn2.Association association, Map<String, BpmnNode> nodes) { AssociationPropertyReader p = propertyReaderFactory.of(association); Edge<View<Association>, Node> edge = factoryManager.newEdge(association.getId(), p.getAssociationByDirection()); Association definition = edge.getContent().getDefinition(); definition.setGeneral(new BPMNGeneralSet( new Name(""), new Documentation(p.getDocumentation()) )); return result(nodes, edge, p, "Association ignored from " + p.getSourceId() + " to " + p.getTargetId(), MarshallingMessageKeys.associationIgnored); }
AssociationConverter implements EdgeConverter<org.eclipse.bpmn2.Association> { public Result<BpmnEdge> convertEdge(org.eclipse.bpmn2.Association association, Map<String, BpmnNode> nodes) { AssociationPropertyReader p = propertyReaderFactory.of(association); Edge<View<Association>, Node> edge = factoryManager.newEdge(association.getId(), p.getAssociationByDirection()); Association definition = edge.getContent().getDefinition(); definition.setGeneral(new BPMNGeneralSet( new Name(""), new Documentation(p.getDocumentation()) )); return result(nodes, edge, p, "Association ignored from " + p.getSourceId() + " to " + p.getTargetId(), MarshallingMessageKeys.associationIgnored); } }
AssociationConverter implements EdgeConverter<org.eclipse.bpmn2.Association> { public Result<BpmnEdge> convertEdge(org.eclipse.bpmn2.Association association, Map<String, BpmnNode> nodes) { AssociationPropertyReader p = propertyReaderFactory.of(association); Edge<View<Association>, Node> edge = factoryManager.newEdge(association.getId(), p.getAssociationByDirection()); Association definition = edge.getContent().getDefinition(); definition.setGeneral(new BPMNGeneralSet( new Name(""), new Documentation(p.getDocumentation()) )); return result(nodes, edge, p, "Association ignored from " + p.getSourceId() + " to " + p.getTargetId(), MarshallingMessageKeys.associationIgnored); } AssociationConverter(TypedFactoryManager factoryManager,
                                PropertyReaderFactory propertyReaderFactory); }
AssociationConverter implements EdgeConverter<org.eclipse.bpmn2.Association> { public Result<BpmnEdge> convertEdge(org.eclipse.bpmn2.Association association, Map<String, BpmnNode> nodes) { AssociationPropertyReader p = propertyReaderFactory.of(association); Edge<View<Association>, Node> edge = factoryManager.newEdge(association.getId(), p.getAssociationByDirection()); Association definition = edge.getContent().getDefinition(); definition.setGeneral(new BPMNGeneralSet( new Name(""), new Documentation(p.getDocumentation()) )); return result(nodes, edge, p, "Association ignored from " + p.getSourceId() + " to " + p.getTargetId(), MarshallingMessageKeys.associationIgnored); } AssociationConverter(TypedFactoryManager factoryManager,
                                PropertyReaderFactory propertyReaderFactory); Result<BpmnEdge> convertEdge(org.eclipse.bpmn2.Association association,
                                        Map<String, BpmnNode> nodes); }
AssociationConverter implements EdgeConverter<org.eclipse.bpmn2.Association> { public Result<BpmnEdge> convertEdge(org.eclipse.bpmn2.Association association, Map<String, BpmnNode> nodes) { AssociationPropertyReader p = propertyReaderFactory.of(association); Edge<View<Association>, Node> edge = factoryManager.newEdge(association.getId(), p.getAssociationByDirection()); Association definition = edge.getContent().getDefinition(); definition.setGeneral(new BPMNGeneralSet( new Name(""), new Documentation(p.getDocumentation()) )); return result(nodes, edge, p, "Association ignored from " + p.getSourceId() + " to " + p.getTargetId(), MarshallingMessageKeys.associationIgnored); } AssociationConverter(TypedFactoryManager factoryManager,
                                PropertyReaderFactory propertyReaderFactory); Result<BpmnEdge> convertEdge(org.eclipse.bpmn2.Association association,
                                        Map<String, BpmnNode> nodes);  }