Class OnRaisableMissing


  • public abstract class OnRaisableMissing
    extends Object
    Used by methods from IBpmnElementStore such as error(code, onMissing) to determine what to do when a raisable to retrieve is missing. You can either have the method return null; or create a new raisable with data that you need to provide.
    Since:
    8.4.0
    • Method Detail

      • supplyRaisableData

        public abstract BpmnRaisableData supplyRaisableData​(String identifier)
        Supplies the data for the new raisable that should be created.
        Parameters:
        identifier - The identifier of the raisable (e.g. error code, escalation code, or signal name).
        Returns:
        The display name for the new raisable, or null if no raisable should be created.
      • createNewOnRaisableMissing

        public static OnRaisableMissing createNewOnRaisableMissing​(Function<String,​BpmnRaisableData> computeDisplayName)
        When a raisable is missing, create a new raisable with the given display name.
        Parameters:
        computeDisplayName - Computes the display name for the new raisable. The operator is given the identifier of the raisable, e.g. error code, escalation code, or signal name, and should return the data with the display name and details.
        Returns:
        An instance of OnRaisableMissing that will create a new raisable with the provided display name.
      • returnNullOnRaisableMissing

        public static OnRaisableMissing returnNullOnRaisableMissing()
        When a raisable is missing, return null instead of creating a new raisable.
        Returns:
        An instance of OnRaisableMissing that will return null when a raisable is missing.
      • useIdentifierOnRaisableMissing

        public static OnRaisableMissing useIdentifierOnRaisableMissing()
        When a raisable is missing, use the identifier of the raisable (e.g. error code, escalation code, or signal name) as the display name.
        Returns:
        An instance of OnRaisableMissing that will use the identifier as the display name for the new raisable.