Class DocumentEventFolderResolver

java.lang.Object
com.flowable.platform.engine.impl.documentevent.DocumentEventFolderResolver

public class DocumentEventFolderResolver extends Object
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/Inbox walks 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 with FlowableIllegalArgumentException — 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.