Search in sources :

Example 1 with AssociationPropertyReader

use of org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.AssociationPropertyReader in project kie-wb-common by kiegroup.

the class AssociationConverter method convertEdge.

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);
}
Also used : Association(org.kie.workbench.common.stunner.bpmn.definition.Association) BpmnNode(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.BpmnNode) Node(org.kie.workbench.common.stunner.core.graph.Node) Documentation(org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation) AssociationPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.AssociationPropertyReader) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) View(org.kie.workbench.common.stunner.core.graph.content.view.View) Name(org.kie.workbench.common.stunner.bpmn.definition.property.general.Name)

Aggregations

BpmnNode (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.BpmnNode)1 AssociationPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.AssociationPropertyReader)1 Association (org.kie.workbench.common.stunner.bpmn.definition.Association)1 BPMNGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet)1 Documentation (org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation)1 Name (org.kie.workbench.common.stunner.bpmn.definition.property.general.Name)1 Node (org.kie.workbench.common.stunner.core.graph.Node)1 View (org.kie.workbench.common.stunner.core.graph.content.view.View)1