public void startElement(Properties ctx, Element element) throws SAXException {
    String elementValue = element.getElementValue();
    Attributes atts = element.attributes;
    log.info(elementValue + " " + atts.getValue("Name"));
    int id = 0;
    String entitytype = atts.getValue("EntityType");
    if (isProcessElement(ctx, entitytype)) {
      String value = atts.getValue("Value");

      // Get New process.
      id = get_IDWithColumn(ctx, "AD_Process", "Value", value);

      X_AD_Process m_Process = null;
      int AD_Backup_ID = -1;
      String Object_Status = null;
      if (id > 0) {
        m_Process = new X_AD_Process(ctx, id, getTrxName(ctx));
        AD_Backup_ID = copyRecord(ctx, "AD_Process", m_Process);
        Object_Status = "Update";
      } else {
        m_Process = new X_AD_Process(ctx, id, getTrxName(ctx));
        if (id <= 0
            && atts.getValue("AD_Process_ID") != null
            && Integer.parseInt(atts.getValue("AD_Process_ID")) <= PackOut.MAX_OFFICIAL_ID)
          m_Process.setAD_Process_ID(Integer.parseInt(atts.getValue("AD_Process_ID")));
        Object_Status = "New";
        AD_Backup_ID = 0;
      }

      String name = atts.getValue("Name");
      m_Process.setName(name);

      name = atts.getValue("ADWorkflowNameID");
      if (name != null && name.trim().length() > 0) {
        id = get_IDWithColumn(ctx, "AD_Workflow", "Name", name);
        if (id <= 0) {
          element.defer = true;
          element.unresolved = "AD_Workflow: " + name;
          return;
        }
        m_Process.setAD_Workflow_ID(id);
      }

      name = atts.getValue("ADPrintFormatNameID");
      if (name != null && name.trim().length() > 0) {
        id = get_IDWithColumn(ctx, "AD_PrintFormat", "Name", name);
        if (id <= 0) {
          if (element.pass == 1) {
            element.defer = true;
            element.unresolved = "AD_PrintFormat: " + name;
            return;
          } else {
            log.warning(
                "AD_PrintFormat: " + name + " not found for Process: " + m_Process.getName());
          }
        }
        if (id > 0) m_Process.setAD_PrintFormat_ID(id);
      }

      name = atts.getValue("ADReportViewNameID");
      if (name != null && name.trim().length() > 0) {
        id = get_IDWithColumn(ctx, "AD_ReportView", "Name", name);
        if (id <= 0) {
          if (element.pass == 1) {
            element.defer = true;
            element.unresolved = "AD_ReportView: " + name;
            return;
          } else {
            log.warning(
                "AD_ReportView: " + name + " not found for Process: " + m_Process.getName());
          }
        }
        if (id > 0) m_Process.setAD_ReportView_ID(id);
      }

      name = atts.getValue("ADFormNameID");
      if (name != null && name.trim().length() > 0) {
        id = get_IDWithColumn(ctx, "AD_Form", "Name", name);
        if (id <= 0) {
          element.defer = true;
          element.unresolved = "AD_Form: " + name;
          return;
        }
        m_Process.setAD_Form_ID(id);
      }

      name = atts.getValue("ADBrowseNameID");
      if (name != null && name.trim().length() > 0) {
        id = get_IDWithColumn(ctx, "AD_Browse", "Name", name);
        if (id <= 0) {
          element.defer = true;
          element.unresolved = "AD_Browse: " + name;
          return;
        }
        m_Process.setAD_Browse_ID(id);
      }

      m_Process.setAccessLevel(atts.getValue("AccessLevel"));
      m_Process.setClassname(getStringValue(atts, "Classname"));
      m_Process.setDescription(getStringValue(atts, "Description"));
      m_Process.setEntityType(atts.getValue("EntityType"));
      m_Process.setHelp(getStringValue(atts, "Help"));
      m_Process.setIsBetaFunctionality(
          Boolean.valueOf(atts.getValue("isBetaFunctionality")).booleanValue());
      m_Process.setIsDirectPrint(Boolean.valueOf(atts.getValue("isDirectPrint")).booleanValue());
      m_Process.setIsReport(Boolean.valueOf(atts.getValue("isReport")).booleanValue());
      m_Process.setName(atts.getValue("Name"));

      m_Process.setProcedureName(getStringValue(atts, "ProcedureName"));
      m_Process.setStatistic_Count(0);
      m_Process.setIsActive(
          atts.getValue("isActive") != null
              ? Boolean.valueOf(atts.getValue("isActive")).booleanValue()
              : true);
      m_Process.setStatistic_Seconds(0);
      m_Process.setValue(atts.getValue("Value"));
      m_Process.setWorkflowValue(atts.getValue("WorkflowValue"));
      m_Process.setShowHelp((getStringValue(atts, "ShowHelp")));
      m_Process.setJasperReport(getStringValue(atts, "JasperReport"));
      if (m_Process.save(getTrxName(ctx)) == true) {
        record_log(
            ctx,
            1,
            m_Process.getName(),
            "Process",
            m_Process.get_ID(),
            AD_Backup_ID,
            Object_Status,
            "AD_Process",
            get_IDWithColumn(ctx, "AD_Table", "TableName", "AD_Process"));
        element.recordId = m_Process.getAD_Process_ID();
      } else {
        record_log(
            ctx,
            0,
            m_Process.getName(),
            "Process",
            m_Process.get_ID(),
            AD_Backup_ID,
            Object_Status,
            "AD_Process",
            get_IDWithColumn(ctx, "AD_Table", "TableName", "AD_Process"));
        throw new POSaveFailedException("Process");
      }
    } else {
      element.skip = true;
    }
  }