Class BpmndtParseListener

java.lang.Object
org.camunda.bpm.engine.impl.bpmn.parser.AbstractBpmnParseListener
org.camunda.community.bpmndt.api.cfg.BpmndtParseListener
All Implemented Interfaces:
org.camunda.bpm.engine.impl.bpmn.parser.BpmnParseListener

public class BpmndtParseListener extends org.camunda.bpm.engine.impl.bpmn.parser.AbstractBpmnParseListener
Custom BPMN parse listener that:
1. Overrides CallActivityBehaviors to make test cases independent of sub processes.
2. Enables asynchronous continuation for multi instance activities.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    instrumentCallActivity(org.camunda.bpm.engine.impl.pvm.process.ActivityImpl activity)
    Instruments the call activity by overriding its behavior to allow isolated testing.
    protected void
    instrumentEndActivity(List<org.camunda.bpm.engine.impl.pvm.process.ActivityImpl> activities)
    Instruments the end activity, if it does not end the process.
    protected void
    instrumentMultiInstanceActivity(org.camunda.bpm.engine.impl.pvm.process.ScopeImpl scope, org.camunda.bpm.engine.impl.pvm.process.ActivityImpl activity)
    Instruments the given activity, if it is a multi instance activity.
    protected void
    instrumentMultiInstanceScope(org.camunda.bpm.engine.impl.pvm.process.ScopeImpl scope, org.camunda.bpm.engine.impl.pvm.process.ActivityImpl activity)
    Instruments the given activity, if it is a multi instance scope.
    void
    parseBusinessRuleTask(org.camunda.bpm.engine.impl.util.xml.Element businessRuleTaskElement, org.camunda.bpm.engine.impl.pvm.process.ScopeImpl scope, org.camunda.bpm.engine.impl.pvm.process.ActivityImpl activity)
     
    void
    parseCallActivity(org.camunda.bpm.engine.impl.util.xml.Element callActivityElement, org.camunda.bpm.engine.impl.pvm.process.ScopeImpl scope, org.camunda.bpm.engine.impl.pvm.process.ActivityImpl activity)
     
    void
    parseManualTask(org.camunda.bpm.engine.impl.util.xml.Element manualTaskElement, org.camunda.bpm.engine.impl.pvm.process.ScopeImpl scope, org.camunda.bpm.engine.impl.pvm.process.ActivityImpl activity)
     
    void
    parseProcess(org.camunda.bpm.engine.impl.util.xml.Element processElement, org.camunda.bpm.engine.impl.persistence.entity.ProcessDefinitionEntity processDefinition)
     
    void
    parseScriptTask(org.camunda.bpm.engine.impl.util.xml.Element scriptTaskElement, org.camunda.bpm.engine.impl.pvm.process.ScopeImpl scope, org.camunda.bpm.engine.impl.pvm.process.ActivityImpl activity)
     
    void
    parseSendTask(org.camunda.bpm.engine.impl.util.xml.Element sendTaskElement, org.camunda.bpm.engine.impl.pvm.process.ScopeImpl scope, org.camunda.bpm.engine.impl.pvm.process.ActivityImpl activity)
     
    void
    parseServiceTask(org.camunda.bpm.engine.impl.util.xml.Element serviceTaskElement, org.camunda.bpm.engine.impl.pvm.process.ScopeImpl scope, org.camunda.bpm.engine.impl.pvm.process.ActivityImpl activity)
     
    void
    parseSubProcess(org.camunda.bpm.engine.impl.util.xml.Element subProcessElement, org.camunda.bpm.engine.impl.pvm.process.ScopeImpl scope, org.camunda.bpm.engine.impl.pvm.process.ActivityImpl activity)
     
    void
    parseTask(org.camunda.bpm.engine.impl.util.xml.Element taskElement, org.camunda.bpm.engine.impl.pvm.process.ScopeImpl scope, org.camunda.bpm.engine.impl.pvm.process.ActivityImpl activity)
     
    void
    parseUserTask(org.camunda.bpm.engine.impl.util.xml.Element userTaskElement, org.camunda.bpm.engine.impl.pvm.process.ScopeImpl scope, org.camunda.bpm.engine.impl.pvm.process.ActivityImpl activity)
     
    void
    Sets a reference to the related test case instance.
    protected String
     

    Methods inherited from class org.camunda.bpm.engine.impl.bpmn.parser.AbstractBpmnParseListener

    parseBoundaryConditionalEventDefinition, parseBoundaryErrorEventDefinition, parseBoundaryEscalationEventDefinition, parseBoundaryEvent, parseBoundaryMessageEventDefinition, parseBoundarySignalEventDefinition, parseBoundaryTimerEventDefinition, parseCompensateEventDefinition, parseConditionalStartEventForEventSubprocess, parseEndEvent, parseEventBasedGateway, parseExclusiveGateway, parseInclusiveGateway, parseIntermediateCatchEvent, parseIntermediateConditionalEventDefinition, parseIntermediateMessageCatchEventDefinition, parseIntermediateSignalCatchEventDefinition, parseIntermediateThrowEvent, parseIntermediateTimerEventDefinition, parseIoMapping, parseMultiInstanceLoopCharacteristics, parseParallelGateway, parseProperty, parseReceiveTask, parseRootElement, parseSequenceFlow, parseStartEvent, parseTransaction

    Methods inherited from class java.lang.Object

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

    • BpmndtParseListener

      public BpmndtParseListener()
  • Method Details

    • instrumentCallActivity

      protected void instrumentCallActivity(org.camunda.bpm.engine.impl.pvm.process.ActivityImpl activity)
      Instruments the call activity by overriding its behavior to allow isolated testing.
      Parameters:
      activity - The current activity.
    • instrumentEndActivity

      protected void instrumentEndActivity(List<org.camunda.bpm.engine.impl.pvm.process.ActivityImpl> activities)
      Instruments the end activity, if it does not end the process.
      Parameters:
      activities - A list of activities, which should also contain the end activity.
    • instrumentMultiInstanceActivity

      protected void instrumentMultiInstanceActivity(org.camunda.bpm.engine.impl.pvm.process.ScopeImpl scope, org.camunda.bpm.engine.impl.pvm.process.ActivityImpl activity)
      Instruments the given activity, if it is a multi instance activity.
      Parameters:
      scope - The surrounding scope.
      activity - The current activity.
    • instrumentMultiInstanceScope

      protected void instrumentMultiInstanceScope(org.camunda.bpm.engine.impl.pvm.process.ScopeImpl scope, org.camunda.bpm.engine.impl.pvm.process.ActivityImpl activity)
      Instruments the given activity, if it is a multi instance scope.
      Parameters:
      scope - The surrounding scope.
      activity - The current activity.
    • parseCallActivity

      public void parseCallActivity(org.camunda.bpm.engine.impl.util.xml.Element callActivityElement, org.camunda.bpm.engine.impl.pvm.process.ScopeImpl scope, org.camunda.bpm.engine.impl.pvm.process.ActivityImpl activity)
      Specified by:
      parseCallActivity in interface org.camunda.bpm.engine.impl.bpmn.parser.BpmnParseListener
      Overrides:
      parseCallActivity in class org.camunda.bpm.engine.impl.bpmn.parser.AbstractBpmnParseListener
    • parseBusinessRuleTask

      public void parseBusinessRuleTask(org.camunda.bpm.engine.impl.util.xml.Element businessRuleTaskElement, org.camunda.bpm.engine.impl.pvm.process.ScopeImpl scope, org.camunda.bpm.engine.impl.pvm.process.ActivityImpl activity)
      Specified by:
      parseBusinessRuleTask in interface org.camunda.bpm.engine.impl.bpmn.parser.BpmnParseListener
      Overrides:
      parseBusinessRuleTask in class org.camunda.bpm.engine.impl.bpmn.parser.AbstractBpmnParseListener
    • parseManualTask

      public void parseManualTask(org.camunda.bpm.engine.impl.util.xml.Element manualTaskElement, org.camunda.bpm.engine.impl.pvm.process.ScopeImpl scope, org.camunda.bpm.engine.impl.pvm.process.ActivityImpl activity)
      Specified by:
      parseManualTask in interface org.camunda.bpm.engine.impl.bpmn.parser.BpmnParseListener
      Overrides:
      parseManualTask in class org.camunda.bpm.engine.impl.bpmn.parser.AbstractBpmnParseListener
    • parseProcess

      public void parseProcess(org.camunda.bpm.engine.impl.util.xml.Element processElement, org.camunda.bpm.engine.impl.persistence.entity.ProcessDefinitionEntity processDefinition)
      Specified by:
      parseProcess in interface org.camunda.bpm.engine.impl.bpmn.parser.BpmnParseListener
      Overrides:
      parseProcess in class org.camunda.bpm.engine.impl.bpmn.parser.AbstractBpmnParseListener
    • parseScriptTask

      public void parseScriptTask(org.camunda.bpm.engine.impl.util.xml.Element scriptTaskElement, org.camunda.bpm.engine.impl.pvm.process.ScopeImpl scope, org.camunda.bpm.engine.impl.pvm.process.ActivityImpl activity)
      Specified by:
      parseScriptTask in interface org.camunda.bpm.engine.impl.bpmn.parser.BpmnParseListener
      Overrides:
      parseScriptTask in class org.camunda.bpm.engine.impl.bpmn.parser.AbstractBpmnParseListener
    • parseSendTask

      public void parseSendTask(org.camunda.bpm.engine.impl.util.xml.Element sendTaskElement, org.camunda.bpm.engine.impl.pvm.process.ScopeImpl scope, org.camunda.bpm.engine.impl.pvm.process.ActivityImpl activity)
      Specified by:
      parseSendTask in interface org.camunda.bpm.engine.impl.bpmn.parser.BpmnParseListener
      Overrides:
      parseSendTask in class org.camunda.bpm.engine.impl.bpmn.parser.AbstractBpmnParseListener
    • parseServiceTask

      public void parseServiceTask(org.camunda.bpm.engine.impl.util.xml.Element serviceTaskElement, org.camunda.bpm.engine.impl.pvm.process.ScopeImpl scope, org.camunda.bpm.engine.impl.pvm.process.ActivityImpl activity)
      Specified by:
      parseServiceTask in interface org.camunda.bpm.engine.impl.bpmn.parser.BpmnParseListener
      Overrides:
      parseServiceTask in class org.camunda.bpm.engine.impl.bpmn.parser.AbstractBpmnParseListener
    • parseSubProcess

      public void parseSubProcess(org.camunda.bpm.engine.impl.util.xml.Element subProcessElement, org.camunda.bpm.engine.impl.pvm.process.ScopeImpl scope, org.camunda.bpm.engine.impl.pvm.process.ActivityImpl activity)
      Specified by:
      parseSubProcess in interface org.camunda.bpm.engine.impl.bpmn.parser.BpmnParseListener
      Overrides:
      parseSubProcess in class org.camunda.bpm.engine.impl.bpmn.parser.AbstractBpmnParseListener
    • parseTask

      public void parseTask(org.camunda.bpm.engine.impl.util.xml.Element taskElement, org.camunda.bpm.engine.impl.pvm.process.ScopeImpl scope, org.camunda.bpm.engine.impl.pvm.process.ActivityImpl activity)
      Specified by:
      parseTask in interface org.camunda.bpm.engine.impl.bpmn.parser.BpmnParseListener
      Overrides:
      parseTask in class org.camunda.bpm.engine.impl.bpmn.parser.AbstractBpmnParseListener
    • parseUserTask

      public void parseUserTask(org.camunda.bpm.engine.impl.util.xml.Element userTaskElement, org.camunda.bpm.engine.impl.pvm.process.ScopeImpl scope, org.camunda.bpm.engine.impl.pvm.process.ActivityImpl activity)
      Specified by:
      parseUserTask in interface org.camunda.bpm.engine.impl.bpmn.parser.BpmnParseListener
      Overrides:
      parseUserTask in class org.camunda.bpm.engine.impl.bpmn.parser.AbstractBpmnParseListener
    • setInstance

      public void setInstance(TestCaseInstance instance)
      Sets a reference to the related test case instance.
      Parameters:
      instance - The related instance.
    • stripMultiInstanceScopeSuffix

      protected String stripMultiInstanceScopeSuffix(String activityId)