class BPMNElementDecorators {

    public static <T extends FlowElement> MarshallingMessageDecorator<T> flowElementDecorator() {
        return MarshallingMessageDecorator.of(o -> Optional.ofNullable(o.getName())
                                                      .orElseGet(o::getId),
                                              g -> g.getClass().getSimpleName());
    }

}