class 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);
        }
    }

}