Class DocumentEventEventValidator

java.lang.Object
com.flowable.validation.bpmn.impl.DocumentEventEventValidator
All Implemented Interfaces:
EventValidator

public class DocumentEventEventValidator extends Object implements EventValidator
Validates the typed DocumentEventDefinition parsed from <flowable:documentEvent> extension elements on BPMN intermediate catch events, boundary events and start events. The set of rules mirrors what the platform engine's parse handler will accept at deploy time.
Author:
Filip Hrisafov
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    findDocumentEventDefinition(org.flowable.bpmn.model.Event event)
     
    protected boolean
    Returns true when the folder path, after splitting on '/', contains any segment that is empty or whitespace-only — including a path like "/" or "//" that splits to zero non-empty segments at all.
    protected static boolean
    A folder path that contains a JUEL expression is resolved at runtime against a real variable scope, so it cannot be statically segmented.
    protected static boolean
     
    protected boolean
     
    boolean
    supports(org.flowable.bpmn.model.Event event)
     
    void
    validate(org.flowable.bpmn.model.BpmnModel bpmnModel, org.flowable.bpmn.model.Process process, org.flowable.bpmn.model.Event event, org.flowable.validation.ProcessValidationContext validationContext)
     
    protected void
    validateFilenameFilter(DocumentEventFilenameFilter filter, boolean isProcessLevelStart, org.flowable.bpmn.model.Process process, org.flowable.bpmn.model.Event event, org.flowable.validation.ProcessValidationContext validationContext)
    Filename filter is activity-only — process-level start variants reject it because there is no behavior path that could re-subscribe after a filter miss; the process / case instance would have been spawned already.
    protected void
    validateLocation(DocumentEventLocation location, boolean isProcessLevelStart, org.flowable.bpmn.model.Process process, org.flowable.bpmn.model.Event event, org.flowable.validation.ProcessValidationContext validationContext)
    Each location row must: have a scope from DocumentEventLocation.SCOPE_ROOT / DocumentEventLocation.SCOPE_INSTANCE / DocumentEventLocation.SCOPE_SCOPE; have a non-empty value for root and instance (and well-formed segments when it is not an expression); not use instance or scope on a process-level start event (no running scope at deploy time).

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DocumentEventEventValidator

      public DocumentEventEventValidator()
  • Method Details

    • supports

      public boolean supports(org.flowable.bpmn.model.Event event)
      Specified by:
      supports in interface EventValidator
    • validate

      public void validate(org.flowable.bpmn.model.BpmnModel bpmnModel, org.flowable.bpmn.model.Process process, org.flowable.bpmn.model.Event event, org.flowable.validation.ProcessValidationContext validationContext)
      Specified by:
      validate in interface EventValidator
    • validateFilenameFilter

      protected void validateFilenameFilter(DocumentEventFilenameFilter filter, boolean isProcessLevelStart, org.flowable.bpmn.model.Process process, org.flowable.bpmn.model.Event event, org.flowable.validation.ProcessValidationContext validationContext)
      Filename filter is activity-only — process-level start variants reject it because there is no behavior path that could re-subscribe after a filter miss; the process / case instance would have been spawned already. Event-sub-process starts are activity-bound (their behavior runs inside a parent instance) and accept the filter. Within the supported modes the pattern must be present and (for regex) compile cleanly.
    • validateLocation

      protected void validateLocation(DocumentEventLocation location, boolean isProcessLevelStart, org.flowable.bpmn.model.Process process, org.flowable.bpmn.model.Event event, org.flowable.validation.ProcessValidationContext validationContext)
      Each location row must:
    • isValidScope

      protected static boolean isValidScope(String scope)
    • isExpression

      protected static boolean isExpression(String value)
      A folder path that contains a JUEL expression is resolved at runtime against a real variable scope, so it cannot be statically segmented. Mirrors the ${...} / #{...} sniff used elsewhere in the design / validation chain.
    • isValidVariableName

      protected boolean isValidVariableName(String variableName)
    • hasInvalidFolderSegment

      protected boolean hasInvalidFolderSegment(String folderPath)
      Returns true when the folder path, after splitting on '/', contains any segment that is empty or whitespace-only — including a path like "/" or "//" that splits to zero non-empty segments at all. The leading slash that marks an absolute path is not itself a segment.
    • findDocumentEventDefinition

      protected DocumentEventDefinition findDocumentEventDefinition(org.flowable.bpmn.model.Event event)