docs: public void dispatchEvent(VariableEvent variableEvent) {
      boolean invokeCustomListeners =
          Context
            .getProcessEngineConfiguration()
            .isInvokeCustomVariableListeners();
  
      Map<String, List<VariableListener<?>>> listeners = getActivity()
          .getVariableListeners(variableEvent.getEventName(), invokeCustomListeners);
  
      // only attempt to invoke listeners if there are any (as this involves resolving the upwards execution hierarchy)
      if (!listeners.isEmpty()) {
        getCaseInstance().queueVariableEvent(variableEvent, invokeCustomListeners);
      }
    }