protected void editProcess(final ProcessSummaryType process) throws Exception {
   Listitem cbi = this.nativeTypesLB.getSelectedItem();
   VersionSummaryType version = process.getVersionSummaries().get(0);
   String nativeType = cbi.getLabel();
   String annotation = Constants.INITIAL_ANNOTATION;
   String readOnly = "false";
   this.mainC.editProcess(
       process, version, nativeType, annotation, readOnly, new HashSet<RequestParameterType<?>>());
   cancel();
 }
  public CreateProcessController(
      final MainController mainC, final HashMap<String, String> formats_ext)
      throws SuspendNotAllowedException, InterruptedException, ExceptionAllUsers, ExceptionDomains {
    this.mainC = mainC;

    this.createProcessW =
        (Window) Executions.createComponents("macros/editprocessdata.zul", null, null);
    this.createProcessW.setTitle("Create new process ");
    Rows rows =
        (Rows) this.createProcessW.getFirstChild().getFirstChild().getFirstChild().getNextSibling();
    Row processNameR = (Row) rows.getFirstChild();
    this.processNameT = (Textbox) processNameR.getFirstChild().getNextSibling();
    Row versionNameR = (Row) processNameR.getNextSibling();
    this.versionNumberT = (Textbox) versionNameR.getFirstChild().getNextSibling();
    Row domainR = (Row) versionNameR.getNextSibling();
    Row ownerR = (Row) domainR.getNextSibling();

    Row nativeTypesR = (Row) ownerR.getNextSibling();
    this.nativeTypesLB = (Listbox) nativeTypesR.getFirstChild().getNextSibling();

    Row rankingR = (Row) nativeTypesR.getNextSibling();
    Radiogroup rankingRG = (Radiogroup) rankingR.getFirstChild().getNextSibling();

    Row publicR = (Row) rankingR.getNextSibling();
    this.makePublicCb = (Checkbox) publicR.getFirstChild().getNextSibling();

    Row buttonsR = (Row) publicR.getNextSibling().getNextSibling();
    Div buttonsD = (Div) buttonsR.getFirstChild();
    Button okB = (Button) buttonsD.getFirstChild();
    Button cancelB = (Button) okB.getNextSibling();
    Button resetB = (Button) cancelB.getNextSibling();
    List<String> domains = this.mainC.getDomains();
    this.domainCB = new SelectDynamicListController(domains);
    this.domainCB.setReference(domains);
    this.domainCB.setAutodrop(true);
    this.domainCB.setWidth("85%");
    this.domainCB.setHeight("100%");
    this.domainCB.setAttribute("hflex", "1");
    domainR.appendChild(domainCB);
    List<String> usernames = this.mainC.getUsers();
    SelectDynamicListController ownerCB = new SelectDynamicListController(usernames);
    ownerCB.setReference(usernames);
    ownerCB.setAutodrop(true);
    ownerCB.setWidth("85%");
    ownerCB.setHeight("100%");
    ownerCB.setAttribute("hflex", "1");
    ownerR.appendChild(ownerCB);

    // set row visibility at creation time
    nativeTypesR.setVisible(true);
    versionNameR.setVisible(false);
    rankingR.setVisible(false);

    // default values
    ownerCB.setValue(UserSessionManager.getCurrentUser().getUsername());

    Set<String> extensions = formats_ext.keySet();
    List<String> sorted = CollectionUtil.asSortedList(extensions);

    Iterator<String> it = sorted.iterator();
    Listitem cbi;
    while (it.hasNext()) {
      cbi = new Listitem();
      this.nativeTypesLB.appendChild(cbi);
      cbi.setLabel(formats_ext.get(it.next()));

      if ("BPMN 2.0".compareTo(cbi.getLabel()) == 0) {
        cbi.setSelected(true);
      }
    }
    // empty fields
    reset();

    okB.addEventListener(
        "onClick",
        new EventListener<Event>() {
          @Override
          public void onEvent(final Event event) throws Exception {
            createProcess();
          }
        });
    this.createProcessW.addEventListener(
        "onOK",
        new EventListener<Event>() {
          @Override
          public void onEvent(final Event event) throws Exception {
            createProcess();
          }
        });
    cancelB.addEventListener(
        "onClick",
        new EventListener<Event>() {
          @Override
          public void onEvent(final Event event) throws Exception {
            cancel();
          }
        });
    resetB.addEventListener(
        "onClick",
        new EventListener<Event>() {
          @Override
          public void onEvent(final Event event) throws Exception {
            reset();
          }
        });
    this.createProcessW.doModal();
  }