@Test @SuppressWarnings("unchecked") public void testProcessWhenIsForCompensation() { outEdges.add(mockEdge(mock(Node.class), newNode(new StartCompensationEvent()))); converter.process(processWriter, nodeWriter, eventSubprocessNode); verify(subProcess).setIsForCompensation(true); }
@Override public void process(ProcessPropertyWriter processWriter, BasePropertyWriter nodeWriter, Node<View<? extends BPMNViewDefinition>, ?> node) { boolean isForCompensation = GraphUtils.getChildNodes(node).stream() .filter(currentNode -> currentNode.getContent() instanceof View && ((View) currentNode.getContent()).getDefinition() instanceof StartCompensationEvent) .findFirst() .isPresent(); if (isForCompensation) { ((SubProcess) nodeWriter.getElement()).setIsForCompensation(true); } }
EventSubProcessPostConverter implements PostConverterProcessor { @Override public void process(ProcessPropertyWriter processWriter, BasePropertyWriter nodeWriter, Node<View<? extends BPMNViewDefinition>, ?> node) { boolean isForCompensation = GraphUtils.getChildNodes(node).stream() .filter(currentNode -> currentNode.getContent() instanceof View && ((View) currentNode.getContent()).getDefinition() instanceof StartCompensationEvent) .findFirst() .isPresent(); if (isForCompensation) { ((SubProcess) nodeWriter.getElement()).setIsForCompensation(true); } } }
EventSubProcessPostConverter implements PostConverterProcessor { @Override public void process(ProcessPropertyWriter processWriter, BasePropertyWriter nodeWriter, Node<View<? extends BPMNViewDefinition>, ?> node) { boolean isForCompensation = GraphUtils.getChildNodes(node).stream() .filter(currentNode -> currentNode.getContent() instanceof View && ((View) currentNode.getContent()).getDefinition() instanceof StartCompensationEvent) .findFirst() .isPresent(); if (isForCompensation) { ((SubProcess) nodeWriter.getElement()).setIsForCompensation(true); } }  }
EventSubProcessPostConverter implements PostConverterProcessor { @Override public void process(ProcessPropertyWriter processWriter, BasePropertyWriter nodeWriter, Node<View<? extends BPMNViewDefinition>, ?> node) { boolean isForCompensation = GraphUtils.getChildNodes(node).stream() .filter(currentNode -> currentNode.getContent() instanceof View && ((View) currentNode.getContent()).getDefinition() instanceof StartCompensationEvent) .findFirst() .isPresent(); if (isForCompensation) { ((SubProcess) nodeWriter.getElement()).setIsForCompensation(true); } }  @Override void process(ProcessPropertyWriter processWriter,
                        BasePropertyWriter nodeWriter,
                        Node<View<? extends BPMNViewDefinition>, ?> node); }
EventSubProcessPostConverter implements PostConverterProcessor { @Override public void process(ProcessPropertyWriter processWriter, BasePropertyWriter nodeWriter, Node<View<? extends BPMNViewDefinition>, ?> node) { boolean isForCompensation = GraphUtils.getChildNodes(node).stream() .filter(currentNode -> currentNode.getContent() instanceof View && ((View) currentNode.getContent()).getDefinition() instanceof StartCompensationEvent) .findFirst() .isPresent(); if (isForCompensation) { ((SubProcess) nodeWriter.getElement()).setIsForCompensation(true); } }  @Override void process(ProcessPropertyWriter processWriter,
                        BasePropertyWriter nodeWriter,
                        Node<View<? extends BPMNViewDefinition>, ?> node);  }