docs: public ProcessDefinitionEntity parseProcess(Element processElement) {
      // reset all mappings that are related to one process definition
      sequenceFlows = new HashMap<String, TransitionImpl>();
  
      ProcessDefinitionEntity processDefinition = new ProcessDefinitionEntity();
  
      /*
       * Mapping object model - bpmn xml: processDefinition.id -> generated by
       * processDefinition.key -> bpmn id (required) processDefinition.name ->
       * bpmn name (optional)
       */
      processDefinition.setKey(processElement.attribute("id"));
      processDefinition.setName(processElement.attribute("name"));
      processDefinition.setCategory(rootElement.attribute("targetNamespace"));
      processDefinition.setProperty(PROPERTYNAME_DOCUMENTATION, parseDocumentation(processElement));
      processDefinition.setTaskDefinitions(new HashMap<String, TaskDefinition>());
      processDefinition.setDeploymentId(deployment.getId());
      processDefinition.setProperty(PROPERTYNAME_JOB_PRIORITY, parsePriority(processElement, PROPERTYNAME_JOB_PRIORITY));
      processDefinition.setProperty(PROPERTYNAME_TASK_PRIORITY, parsePriority(processElement, PROPERTYNAME_TASK_PRIORITY));
      processDefinition.setVersionTag(processElement.attributeNS(CAMUNDA_BPMN_EXTENSIONS_NS, "versionTag"));
  
      try {
        String historyTimeToLive = processElement.attributeNS(CAMUNDA_BPMN_EXTENSIONS_NS, "historyTimeToLive",
            Context.getProcessEngineConfiguration().getHistoryTimeToLive());
        processDefinition.setHistoryTimeToLive(ParseUtil.parseHistoryTimeToLive(historyTimeToLive));
      }
      catch (Exception e) {
        addError(new BpmnParseException(e.getMessage(), processElement, e));
      }
  
      boolean isStartableInTasklist = isStartable(processElement);
      processDefinition.setStartableInTasklist(isStartableInTasklist);
  
      LOG.parsingElement("process", processDefinition.getKey());
  
      parseScope(processElement, processDefinition);
  
      // Parse any laneSets defined for this process
      parseLaneSets(processElement, processDefinition);
  
      for (BpmnParseListener parseListener : parseListeners) {
        parseListener.parseProcess(processElement, processDefinition);
      }
  
      // now we have parsed anything we can validate some stuff
      validateActivities(processDefinition.getActivities());
  
      //unregister delegates
      for (ActivityImpl activity : processDefinition.getActivities()) {
        activity.setDelegateAsyncAfterUpdate(null);
        activity.setDelegateAsyncBeforeUpdate(null);
      }
      return processDefinition;
    }