Interface BpmnViewer

All Superinterfaces:
com.vaadin.flow.component.HasElement, Serializable
All Known Implementing Classes:
BpmnViewerImpl

public interface BpmnViewer extends com.vaadin.flow.component.HasElement
Interface for a BPMN viewer component that allows visualization and interaction with BPMN diagrams. This interface extends HasElement to integrate with Vaadin Flow.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The name of the BPMN viewer component.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addMarker(AddMarkerCmd addMarkerCmd)
    Adds a marker to a BPMN element using the specified command.
    void
    addSelectedElementChangedListener(com.vaadin.flow.component.ComponentEventListener<SelectionChangedEvent> listener)
    Adds a listener to handle BPMN diagram element selection changes.
    void
    removeMarker(RemoveMarkerCmd removeMarkerCmd)
    Removes a marker from a BPMN element using the specified command.
    void
    setBpmnXml(String bpmnXml, com.vaadin.flow.function.SerializableConsumer<elemental.json.JsonValue> callback)
    Sets the BPMN XML for the viewer component and invokes the callback after the BPMN XML is set.
    void
    Sets the color of a BPMN element using the specified command.

    Methods inherited from interface com.vaadin.flow.component.HasElement

    getElement
  • Field Details

  • Method Details

    • setBpmnXml

      void setBpmnXml(String bpmnXml, com.vaadin.flow.function.SerializableConsumer<elemental.json.JsonValue> callback)
      Sets the BPMN XML for the viewer component and invokes the callback after the BPMN XML is set.
      Parameters:
      bpmnXml - The BPMN XML to be set.
      callback - A callback to be invoked after the BPMN XML is set.
    • setElementColor

      void setElementColor(SetElementColorCmd cmd)
      Sets the color of a BPMN element using the specified command.

      Usage example:

       bpmnViewer.setElementColor(new SetElementColorCmd(elementId,
          "#000", //stroke color
          "#c2d5ed" //fill color
       ));
       
      Parameters:
      cmd - The command to set the element color.
    • addMarker

      void addMarker(AddMarkerCmd addMarkerCmd)
      Adds a marker to a BPMN element using the specified command.

      A style for the "highlighted" marker is already defined in the viewer component css file.

      Parameters:
      addMarkerCmd - The command to add a marker to an element.
    • removeMarker

      void removeMarker(RemoveMarkerCmd removeMarkerCmd)
      Removes a marker from a BPMN element using the specified command.
      Parameters:
      removeMarkerCmd - The command to remove a marker from an element.
    • addSelectedElementChangedListener

      void addSelectedElementChangedListener(com.vaadin.flow.component.ComponentEventListener<SelectionChangedEvent> listener)
      Adds a listener to handle BPMN diagram element selection changes.
      Parameters:
      listener - The listener to handle selection changes.