Class DocumentEventEventValidator
java.lang.Object
com.flowable.validation.bpmn.impl.DocumentEventEventValidator
- All Implemented Interfaces:
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 -
Method Summary
Modifier and TypeMethodDescriptionprotected DocumentEventDefinitionfindDocumentEventDefinition(org.flowable.bpmn.model.Event event) protected booleanhasInvalidFolderSegment(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.protected static booleanisExpression(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.protected static booleanisValidScope(String scope) protected booleanisValidVariableName(String variableName) booleansupports(org.flowable.bpmn.model.Event event) voidvalidate(org.flowable.bpmn.model.BpmnModel bpmnModel, org.flowable.bpmn.model.Process process, org.flowable.bpmn.model.Event event, org.flowable.validation.ProcessValidationContext validationContext) protected voidvalidateFilenameFilter(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 voidvalidateLocation(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 fromDocumentEventLocation.SCOPE_ROOT/DocumentEventLocation.SCOPE_INSTANCE/DocumentEventLocation.SCOPE_SCOPE; have a non-emptyvalueforrootandinstance(and well-formed segments when it is not an expression); not useinstanceorscopeon a process-level start event (no running scope at deploy time).
-
Constructor Details
-
DocumentEventEventValidator
public DocumentEventEventValidator()
-
-
Method Details
-
supports
public boolean supports(org.flowable.bpmn.model.Event event) - Specified by:
supportsin interfaceEventValidator
-
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:
validatein interfaceEventValidator
-
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 (forregex) 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:- have a scope from
DocumentEventLocation.SCOPE_ROOT/DocumentEventLocation.SCOPE_INSTANCE/DocumentEventLocation.SCOPE_SCOPE; - have a non-empty
valueforrootandinstance(and well-formed segments when it is not an expression); - not use
instanceorscopeon a process-level start event (no running scope at deploy time). Event-sub-process starts run inside the parent process so all three scopes resolve at activation time and are allowed.
- have a scope from
-
isValidScope
-
isExpression
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
-
hasInvalidFolderSegment
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
-