Class DocumentEventCaseStartParseHandler

java.lang.Object
org.flowable.cmmn.engine.impl.parser.handler.AbstractCmmnParseHandler<org.flowable.cmmn.model.Case>
com.flowable.platform.engine.impl.documentevent.cmmn.DocumentEventCaseStartParseHandler
All Implemented Interfaces:
org.flowable.cmmn.engine.impl.parser.CmmnParseHandler

public class DocumentEventCaseStartParseHandler extends org.flowable.cmmn.engine.impl.parser.handler.AbstractCmmnParseHandler<org.flowable.cmmn.model.Case>
Detects a <flowable:documentEvent> extension element on the CMMN <case> element and attaches a DocumentEventCaseStartLifecycleHandler via Case.addStartLifecycleHandler(...) so the deployer creates / removes one __flowableDocument* subscription per configured lifecycle, tied to the case definition. Configuration shape is validated by DocumentEventListenerValidator ahead of deployment, so this handler only does the wiring.
  • Field Details

  • Constructor Details

    • DocumentEventCaseStartParseHandler

      public DocumentEventCaseStartParseHandler()
  • Method Details

    • getHandledTypes

      public Collection<Class<? extends org.flowable.cmmn.model.BaseElement>> getHandledTypes()
    • executeParse

      protected void executeParse(org.flowable.cmmn.engine.impl.parser.CmmnParserImpl cmmnParser, org.flowable.cmmn.engine.impl.parser.CmmnParseResult cmmnParseResult, org.flowable.cmmn.model.Case caseModel)
      Specified by:
      executeParse in class org.flowable.cmmn.engine.impl.parser.handler.AbstractCmmnParseHandler<org.flowable.cmmn.model.Case>
    • addContentItemOutParameter

      protected void addContentItemOutParameter(org.flowable.cmmn.model.Case caseModel, DocumentEventDeclaration declaration)
      Add a <flowable:eventOutParameter source="contentItem" target="<configured-name>"/> extension element on the <case> so the standard CmmnEventInstanceOutParameterHandler writes the matched content item as a variable when CaseInstanceHelperImpl.applyCaseInstanceBuilder runs at case-instance creation time. Mirrors the BPMN start path that uses the same wire shape on the start event.
    • attribute

      protected org.flowable.cmmn.model.ExtensionAttribute attribute(String name, String value)
    • parseBoolean

      protected boolean parseBoolean(org.flowable.cmmn.model.ExtensionElement extension, String attributeName, boolean defaultValue)
    • readLifecycleChildren

      protected List<String> readLifecycleChildren(org.flowable.cmmn.model.ExtensionElement extension)
      Lifecycle values are nested as <flowable:lifecycle>token</flowable:lifecycle> child elements of the <flowable:documentEvent> extension element on the <case>. Each child's body text contributes one lifecycle value; empty / whitespace-only entries are skipped.
    • toResolvedLocations

      protected List<DocumentEventDeclaration.ResolvedLocation> toResolvedLocations(List<DocumentEventLocation> locations)
    • readLocationChildren

      protected List<DocumentEventLocation> readLocationChildren(org.flowable.cmmn.model.ExtensionElement extension)
      Location rows are nested as <flowable:location scope="...">value</flowable:location> child elements of the <flowable:documentEvent> extension element on the <case>. The value body is optional (scope / any carry no value); a missing scope skips the row. Validation errors are surfaced separately by DocumentEventListenerValidator.