@Test public void resultBpmnDecorator() { MarshallingMessageDecorator<Result> decorator = BPMNElementDecorators.resultBpmnDecorator(); BpmnNode node = mockBpmnNode(); Result result = Result.success(node); assertEquals(NAME, decorator.getName(result)); assertEquals(node.value().getContent().getDefinition().getClass().getSimpleName(), decorator.getType(result)); }
public static MarshallingMessageDecorator<Result> resultBpmnDecorator() { return MarshallingMessageDecorator.of(r -> { BpmnNode o = (BpmnNode) r.value(); return Optional.ofNullable(o.value() .getContent() .getDefinition() .getGeneral() .getName() .getValue()) .orElseGet(() -> o.value().getUUID()); }, r -> { BpmnNode o1 = (BpmnNode) r.value(); return o1.value() .getContent() .getDefinition() .getClass() .getSimpleName(); }); }
BPMNElementDecorators { public static MarshallingMessageDecorator<Result> resultBpmnDecorator() { return MarshallingMessageDecorator.of(r -> { BpmnNode o = (BpmnNode) r.value(); return Optional.ofNullable(o.value() .getContent() .getDefinition() .getGeneral() .getName() .getValue()) .orElseGet(() -> o.value().getUUID()); }, r -> { BpmnNode o1 = (BpmnNode) r.value(); return o1.value() .getContent() .getDefinition() .getClass() .getSimpleName(); }); } }
BPMNElementDecorators { public static MarshallingMessageDecorator<Result> resultBpmnDecorator() { return MarshallingMessageDecorator.of(r -> { BpmnNode o = (BpmnNode) r.value(); return Optional.ofNullable(o.value() .getContent() .getDefinition() .getGeneral() .getName() .getValue()) .orElseGet(() -> o.value().getUUID()); }, r -> { BpmnNode o1 = (BpmnNode) r.value(); return o1.value() .getContent() .getDefinition() .getClass() .getSimpleName(); }); }  }
BPMNElementDecorators { public static MarshallingMessageDecorator<Result> resultBpmnDecorator() { return MarshallingMessageDecorator.of(r -> { BpmnNode o = (BpmnNode) r.value(); return Optional.ofNullable(o.value() .getContent() .getDefinition() .getGeneral() .getName() .getValue()) .orElseGet(() -> o.value().getUUID()); }, r -> { BpmnNode o1 = (BpmnNode) r.value(); return o1.value() .getContent() .getDefinition() .getClass() .getSimpleName(); }); }  static MarshallingMessageDecorator<T> flowElementDecorator(); static MarshallingMessageDecorator<T> baseElementDecorator(); static MarshallingMessageDecorator<T> bpmnNodeDecorator(); static MarshallingMessageDecorator<Result> resultBpmnDecorator(); }
BPMNElementDecorators { public static MarshallingMessageDecorator<Result> resultBpmnDecorator() { return MarshallingMessageDecorator.of(r -> { BpmnNode o = (BpmnNode) r.value(); return Optional.ofNullable(o.value() .getContent() .getDefinition() .getGeneral() .getName() .getValue()) .orElseGet(() -> o.value().getUUID()); }, r -> { BpmnNode o1 = (BpmnNode) r.value(); return o1.value() .getContent() .getDefinition() .getClass() .getSimpleName(); }); }  static MarshallingMessageDecorator<T> flowElementDecorator(); static MarshallingMessageDecorator<T> baseElementDecorator(); static MarshallingMessageDecorator<T> bpmnNodeDecorator(); static MarshallingMessageDecorator<Result> resultBpmnDecorator();  }