@Test public void testConvertUnsupportedChildNodes() { List<LaneSet> laneSets = Collections.emptyList(); List<FlowElement> flowElements = Arrays.asList(mockTask("1"), mockTask("2"), mockUnsupportedTask("3"), mockUnsupportedDataObject("4")); Result<Map<String, BpmnNode>> result = converterDelegate.convertChildNodes(parentNode, flowElements, laneSets); List<MarshallingMessage> messages = result.messages(); assertEquals(2, messages.size()); assertTrue(messages.stream().map(MarshallingMessage::getViolationType).allMatch(Violation.Type.WARNING::equals)); }
Result<Map<String, BpmnNode>> convertChildNodes( BpmnNode firstNode, List<FlowElement> flowElements, List<LaneSet> laneSets) { for (FlowElement element : flowElements) { element.setId(revertIllegalCharsAttribute(element.getId())); element.setName(revertIllegalCharsAttribute(element.getName())); } final Result<Map<String, BpmnNode>> flowElementsResult = convertFlowElements(flowElements); final Map<String, BpmnNode> freeFloatingNodes = flowElementsResult.value(); freeFloatingNodes .values() .forEach(n -> n.setParent(firstNode)); final Result<BpmnNode>[] laneSetsResult = convertLaneSets(laneSets, freeFloatingNodes, firstNode); final Map<String, BpmnNode> lanesMap = Stream.of(laneSetsResult) .filter(Objects::nonNull).map(v -> v.value()) .collect(Collectors.toMap(n -> n.value().getUUID(), n -> n)); freeFloatingNodes.putAll(lanesMap); return ResultComposer.compose(freeFloatingNodes, flowElementsResult, ResultComposer.compose(laneSets, laneSetsResult)); }
ProcessConverterDelegate { Result<Map<String, BpmnNode>> convertChildNodes( BpmnNode firstNode, List<FlowElement> flowElements, List<LaneSet> laneSets) { for (FlowElement element : flowElements) { element.setId(revertIllegalCharsAttribute(element.getId())); element.setName(revertIllegalCharsAttribute(element.getName())); } final Result<Map<String, BpmnNode>> flowElementsResult = convertFlowElements(flowElements); final Map<String, BpmnNode> freeFloatingNodes = flowElementsResult.value(); freeFloatingNodes .values() .forEach(n -> n.setParent(firstNode)); final Result<BpmnNode>[] laneSetsResult = convertLaneSets(laneSets, freeFloatingNodes, firstNode); final Map<String, BpmnNode> lanesMap = Stream.of(laneSetsResult) .filter(Objects::nonNull).map(v -> v.value()) .collect(Collectors.toMap(n -> n.value().getUUID(), n -> n)); freeFloatingNodes.putAll(lanesMap); return ResultComposer.compose(freeFloatingNodes, flowElementsResult, ResultComposer.compose(laneSets, laneSetsResult)); } }
ProcessConverterDelegate { Result<Map<String, BpmnNode>> convertChildNodes( BpmnNode firstNode, List<FlowElement> flowElements, List<LaneSet> laneSets) { for (FlowElement element : flowElements) { element.setId(revertIllegalCharsAttribute(element.getId())); element.setName(revertIllegalCharsAttribute(element.getName())); } final Result<Map<String, BpmnNode>> flowElementsResult = convertFlowElements(flowElements); final Map<String, BpmnNode> freeFloatingNodes = flowElementsResult.value(); freeFloatingNodes .values() .forEach(n -> n.setParent(firstNode)); final Result<BpmnNode>[] laneSetsResult = convertLaneSets(laneSets, freeFloatingNodes, firstNode); final Map<String, BpmnNode> lanesMap = Stream.of(laneSetsResult) .filter(Objects::nonNull).map(v -> v.value()) .collect(Collectors.toMap(n -> n.value().getUUID(), n -> n)); freeFloatingNodes.putAll(lanesMap); return ResultComposer.compose(freeFloatingNodes, flowElementsResult, ResultComposer.compose(laneSets, laneSetsResult)); } ProcessConverterDelegate(
            TypedFactoryManager typedFactoryManager,
            PropertyReaderFactory propertyReaderFactory,
            DefinitionResolver definitionResolver,
            BaseConverterFactory factory); }
ProcessConverterDelegate { Result<Map<String, BpmnNode>> convertChildNodes( BpmnNode firstNode, List<FlowElement> flowElements, List<LaneSet> laneSets) { for (FlowElement element : flowElements) { element.setId(revertIllegalCharsAttribute(element.getId())); element.setName(revertIllegalCharsAttribute(element.getName())); } final Result<Map<String, BpmnNode>> flowElementsResult = convertFlowElements(flowElements); final Map<String, BpmnNode> freeFloatingNodes = flowElementsResult.value(); freeFloatingNodes .values() .forEach(n -> n.setParent(firstNode)); final Result<BpmnNode>[] laneSetsResult = convertLaneSets(laneSets, freeFloatingNodes, firstNode); final Map<String, BpmnNode> lanesMap = Stream.of(laneSetsResult) .filter(Objects::nonNull).map(v -> v.value()) .collect(Collectors.toMap(n -> n.value().getUUID(), n -> n)); freeFloatingNodes.putAll(lanesMap); return ResultComposer.compose(freeFloatingNodes, flowElementsResult, ResultComposer.compose(laneSets, laneSetsResult)); } ProcessConverterDelegate(
            TypedFactoryManager typedFactoryManager,
            PropertyReaderFactory propertyReaderFactory,
            DefinitionResolver definitionResolver,
            BaseConverterFactory factory);  }
ProcessConverterDelegate { Result<Map<String, BpmnNode>> convertChildNodes( BpmnNode firstNode, List<FlowElement> flowElements, List<LaneSet> laneSets) { for (FlowElement element : flowElements) { element.setId(revertIllegalCharsAttribute(element.getId())); element.setName(revertIllegalCharsAttribute(element.getName())); } final Result<Map<String, BpmnNode>> flowElementsResult = convertFlowElements(flowElements); final Map<String, BpmnNode> freeFloatingNodes = flowElementsResult.value(); freeFloatingNodes .values() .forEach(n -> n.setParent(firstNode)); final Result<BpmnNode>[] laneSetsResult = convertLaneSets(laneSets, freeFloatingNodes, firstNode); final Map<String, BpmnNode> lanesMap = Stream.of(laneSetsResult) .filter(Objects::nonNull).map(v -> v.value()) .collect(Collectors.toMap(n -> n.value().getUUID(), n -> n)); freeFloatingNodes.putAll(lanesMap); return ResultComposer.compose(freeFloatingNodes, flowElementsResult, ResultComposer.compose(laneSets, laneSetsResult)); } ProcessConverterDelegate(
            TypedFactoryManager typedFactoryManager,
            PropertyReaderFactory propertyReaderFactory,
            DefinitionResolver definitionResolver,
            BaseConverterFactory factory);   }