Class DocumentEventFolderResolver
java.lang.Object
com.flowable.platform.engine.impl.documentevent.DocumentEventFolderResolver
Resolves a slash-separated folder path used inside a
<flowable:location> row of a
<flowable:documentEvent> to a concrete content folder id, creating any missing intermediate
folders along the way.
Resolution rules:
- Absolute paths (starting with
/) are resolved against root folders —/Top/Inboxwalks from the filesystem root. - Relative paths with a supplied
scopeRootFolderId(instance-scope rows) are resolved against that scope folder. - Relative paths with no scope anchor (root-scope rows) are resolved against the configured platform
root folder — passing in
"Inbox"with"Top"as the platform root yields the same folder as/Top/Inbox. - An empty / null path returns
null(the caller decides whether absence is valid). - Paths that split to zero non-empty segments (e.g. literal
"/"or"//", or an expression that resolves to one of these) are rejected withFlowableIllegalArgumentException— the static validators reject literal forms, this catches expression-resolved variants at deploy / activation time.
The resolver memoizes resolved (parentFolderId, name, tenantId) triples for the lifetime of the
instance. A single resolver should be reused across all location rows of one subscription registration
pass: within a transaction MyBatis's query cache does not always see same-session inserts, so without
memoization two locations that share a parent (e.g. /Top/A and /Top/B) would each create
a duplicate /Top root folder.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static final record -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Stringprotected final Map<DocumentEventFolderResolver.FolderKey, String> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionresolveOrCreate(String folderPath, String tenantId, String scopeRootFolderId, CoreContentService contentService) protected StringresolveOrCreateChild(String parentFolderId, String name, String tenantId, CoreContentService contentService) protected StringresolveOrCreateRootFolder(String name, String tenantId, CoreContentService contentService)
-
Field Details
-
resolvedFolders
-
configuredRootFolderName
-
-
Constructor Details
-
DocumentEventFolderResolver
-
-
Method Details
-
resolveOrCreate
public String resolveOrCreate(String folderPath, String tenantId, String scopeRootFolderId, CoreContentService contentService) -
resolveOrCreateRootFolder
protected String resolveOrCreateRootFolder(String name, String tenantId, CoreContentService contentService) -
resolveOrCreateChild
protected String resolveOrCreateChild(String parentFolderId, String name, String tenantId, CoreContentService contentService)
-