@Test public void convertEdge() { org.eclipse.bpmn2.SequenceFlow sequenceFlow = Bpmn2Factory.eINSTANCE.createSequenceFlow(); FlowNode source = Bpmn2Factory.eINSTANCE.createUserTask(); sequenceFlow.setSourceRef(source); FlowNode target = Bpmn2Factory.eINSTANCE.createBusinessRuleTask(); sequenceFlow.setTargetRef(target); Result<BpmnEdge> result = tested.convertEdge(sequenceFlow, new HashMap<>()); assertTrue(result.isIgnored()); assertNull(result.value()); Map<String, BpmnNode> nodes = new Maps.Builder<String, BpmnNode>() .put(SOURCE_ID, mock(BpmnNode.class)) .put(TARGET_ID, mock(BpmnNode.class)) .build(); result = tested.convertEdge(sequenceFlow, nodes); assertTrue(result.isSuccess()); BpmnEdge.Simple value = (BpmnEdge.Simple) result.value(); assertEquals(edge, value.getEdge()); }
@Override public Result<BpmnEdge> convertEdge(org.eclipse.bpmn2.SequenceFlow seq, Map<String, BpmnNode> nodes) { Edge<View<SequenceFlow>, Node> edge = factoryManager.newEdge(seq.getId(), SequenceFlow.class); SequenceFlow definition = edge.getContent().getDefinition(); SequenceFlowPropertyReader p = propertyReaderFactory.of(seq); definition.setGeneral(new BPMNGeneralSet( new Name(p.getName()), new Documentation(p.getDocumentation()) )); definition.setExecutionSet(new SequenceFlowExecutionSet( new Priority(p.getPriority()), new ConditionExpression(p.getConditionExpression()) )); return result(nodes, edge, p, "Sequence Flow ignored from " + p.getSourceId() + " to " + p.getTargetId(), MarshallingMessageKeys.sequenceFlowIgnored); }
SequenceFlowConverter implements EdgeConverter<org.eclipse.bpmn2.SequenceFlow> { @Override public Result<BpmnEdge> convertEdge(org.eclipse.bpmn2.SequenceFlow seq, Map<String, BpmnNode> nodes) { Edge<View<SequenceFlow>, Node> edge = factoryManager.newEdge(seq.getId(), SequenceFlow.class); SequenceFlow definition = edge.getContent().getDefinition(); SequenceFlowPropertyReader p = propertyReaderFactory.of(seq); definition.setGeneral(new BPMNGeneralSet( new Name(p.getName()), new Documentation(p.getDocumentation()) )); definition.setExecutionSet(new SequenceFlowExecutionSet( new Priority(p.getPriority()), new ConditionExpression(p.getConditionExpression()) )); return result(nodes, edge, p, "Sequence Flow ignored from " + p.getSourceId() + " to " + p.getTargetId(), MarshallingMessageKeys.sequenceFlowIgnored); } }
SequenceFlowConverter implements EdgeConverter<org.eclipse.bpmn2.SequenceFlow> { @Override public Result<BpmnEdge> convertEdge(org.eclipse.bpmn2.SequenceFlow seq, Map<String, BpmnNode> nodes) { Edge<View<SequenceFlow>, Node> edge = factoryManager.newEdge(seq.getId(), SequenceFlow.class); SequenceFlow definition = edge.getContent().getDefinition(); SequenceFlowPropertyReader p = propertyReaderFactory.of(seq); definition.setGeneral(new BPMNGeneralSet( new Name(p.getName()), new Documentation(p.getDocumentation()) )); definition.setExecutionSet(new SequenceFlowExecutionSet( new Priority(p.getPriority()), new ConditionExpression(p.getConditionExpression()) )); return result(nodes, edge, p, "Sequence Flow ignored from " + p.getSourceId() + " to " + p.getTargetId(), MarshallingMessageKeys.sequenceFlowIgnored); } SequenceFlowConverter(TypedFactoryManager factoryManager, PropertyReaderFactory propertyReaderFactory); }
SequenceFlowConverter implements EdgeConverter<org.eclipse.bpmn2.SequenceFlow> { @Override public Result<BpmnEdge> convertEdge(org.eclipse.bpmn2.SequenceFlow seq, Map<String, BpmnNode> nodes) { Edge<View<SequenceFlow>, Node> edge = factoryManager.newEdge(seq.getId(), SequenceFlow.class); SequenceFlow definition = edge.getContent().getDefinition(); SequenceFlowPropertyReader p = propertyReaderFactory.of(seq); definition.setGeneral(new BPMNGeneralSet( new Name(p.getName()), new Documentation(p.getDocumentation()) )); definition.setExecutionSet(new SequenceFlowExecutionSet( new Priority(p.getPriority()), new ConditionExpression(p.getConditionExpression()) )); return result(nodes, edge, p, "Sequence Flow ignored from " + p.getSourceId() + " to " + p.getTargetId(), MarshallingMessageKeys.sequenceFlowIgnored); } SequenceFlowConverter(TypedFactoryManager factoryManager, PropertyReaderFactory propertyReaderFactory); @Override Result<BpmnEdge> convertEdge(org.eclipse.bpmn2.SequenceFlow seq, Map<String, BpmnNode> nodes); }
SequenceFlowConverter implements EdgeConverter<org.eclipse.bpmn2.SequenceFlow> { @Override public Result<BpmnEdge> convertEdge(org.eclipse.bpmn2.SequenceFlow seq, Map<String, BpmnNode> nodes) { Edge<View<SequenceFlow>, Node> edge = factoryManager.newEdge(seq.getId(), SequenceFlow.class); SequenceFlow definition = edge.getContent().getDefinition(); SequenceFlowPropertyReader p = propertyReaderFactory.of(seq); definition.setGeneral(new BPMNGeneralSet( new Name(p.getName()), new Documentation(p.getDocumentation()) )); definition.setExecutionSet(new SequenceFlowExecutionSet( new Priority(p.getPriority()), new ConditionExpression(p.getConditionExpression()) )); return result(nodes, edge, p, "Sequence Flow ignored from " + p.getSourceId() + " to " + p.getTargetId(), MarshallingMessageKeys.sequenceFlowIgnored); } SequenceFlowConverter(TypedFactoryManager factoryManager, PropertyReaderFactory propertyReaderFactory); @Override Result<BpmnEdge> convertEdge(org.eclipse.bpmn2.SequenceFlow seq, Map<String, BpmnNode> nodes);  }