@Test public void testConvertEdges() { Task task1 = mockTask("1"); Task task2 = mockTask("2"); BpmnNode task1Node = mockTaskNode(task1); BpmnNode task2Node = mockTaskNode(task2); SequenceFlow sequenceFlow = mockSequenceFlow("seq1", task1, task2); List<BaseElement> elements = Arrays.asList(sequenceFlow, task1, task2); assertFalse(converterDelegate.convertEdges(parentNode, elements, new HashMap<>()).value()); Map<String, BpmnNode> nodes = new Maps.Builder<String, BpmnNode>().put(task1.getId(), task1Node).put(task2.getId(), task2Node).build(); assertTrue(converterDelegate.convertEdges(parentNode, elements, nodes).value()); }
Result<Boolean> convertEdges(BpmnNode processRoot, List<BaseElement> flowElements, Map<String, BpmnNode> nodes) { List<Result<BpmnEdge>> results = flowElements.stream() .map(e -> converterFactory.edgeConverter().convertEdge(e, nodes)) .filter(Result::isSuccess) .collect(Collectors.toList()); boolean value = results.size() > 0 ? results.stream() .map(Result::value) .filter(Objects::nonNull) .map(processRoot::addEdge) .allMatch(Boolean.TRUE::equals) : false; return ResultComposer.composeResults(value, results); }
ProcessConverterDelegate { Result<Boolean> convertEdges(BpmnNode processRoot, List<BaseElement> flowElements, Map<String, BpmnNode> nodes) { List<Result<BpmnEdge>> results = flowElements.stream() .map(e -> converterFactory.edgeConverter().convertEdge(e, nodes)) .filter(Result::isSuccess) .collect(Collectors.toList()); boolean value = results.size() > 0 ? results.stream() .map(Result::value) .filter(Objects::nonNull) .map(processRoot::addEdge) .allMatch(Boolean.TRUE::equals) : false; return ResultComposer.composeResults(value, results); } }
ProcessConverterDelegate { Result<Boolean> convertEdges(BpmnNode processRoot, List<BaseElement> flowElements, Map<String, BpmnNode> nodes) { List<Result<BpmnEdge>> results = flowElements.stream() .map(e -> converterFactory.edgeConverter().convertEdge(e, nodes)) .filter(Result::isSuccess) .collect(Collectors.toList()); boolean value = results.size() > 0 ? results.stream() .map(Result::value) .filter(Objects::nonNull) .map(processRoot::addEdge) .allMatch(Boolean.TRUE::equals) : false; return ResultComposer.composeResults(value, results); } ProcessConverterDelegate(
            TypedFactoryManager typedFactoryManager,
            PropertyReaderFactory propertyReaderFactory,
            DefinitionResolver definitionResolver,
            BaseConverterFactory factory); }
ProcessConverterDelegate { Result<Boolean> convertEdges(BpmnNode processRoot, List<BaseElement> flowElements, Map<String, BpmnNode> nodes) { List<Result<BpmnEdge>> results = flowElements.stream() .map(e -> converterFactory.edgeConverter().convertEdge(e, nodes)) .filter(Result::isSuccess) .collect(Collectors.toList()); boolean value = results.size() > 0 ? results.stream() .map(Result::value) .filter(Objects::nonNull) .map(processRoot::addEdge) .allMatch(Boolean.TRUE::equals) : false; return ResultComposer.composeResults(value, results); } ProcessConverterDelegate(
            TypedFactoryManager typedFactoryManager,
            PropertyReaderFactory propertyReaderFactory,
            DefinitionResolver definitionResolver,
            BaseConverterFactory factory);  }
ProcessConverterDelegate { Result<Boolean> convertEdges(BpmnNode processRoot, List<BaseElement> flowElements, Map<String, BpmnNode> nodes) { List<Result<BpmnEdge>> results = flowElements.stream() .map(e -> converterFactory.edgeConverter().convertEdge(e, nodes)) .filter(Result::isSuccess) .collect(Collectors.toList()); boolean value = results.size() > 0 ? results.stream() .map(Result::value) .filter(Objects::nonNull) .map(processRoot::addEdge) .allMatch(Boolean.TRUE::equals) : false; return ResultComposer.composeResults(value, results); } ProcessConverterDelegate(
            TypedFactoryManager typedFactoryManager,
            PropertyReaderFactory propertyReaderFactory,
            DefinitionResolver definitionResolver,
            BaseConverterFactory factory);   }