Examples of DefinitionArchive


Examples of org.uengine.util.export.DefinitionArchive

 
  private Hashtable setFormsForExport(String rootDirectory,Hashtable options) throws Exception {
    UEngineArchive ua = (UEngineArchive) options.get(UEngineArchive.UENGINE_ARCHIVE);

    for (int i=0; i<ua.getDefinitionList().size(); i++) {
      DefinitionArchive da = (DefinitionArchive)ua.getDefinitionList().get(i);
      if(!"process".equals(da.getObjectType())) continue;
     
      String subDefVerId = da.getId();
      ProcessVariable[] pvs = null;
      try {
        pvs = getProcessDefinition(subDefVerId).getProcessVariables();
      } catch (Exception ex) {
        System.out.println("Exception subDefVerId : " + subDefVerId);
View Full Code Here

Examples of org.uengine.util.export.DefinitionArchive

    UEngineArchive ua = (UEngineArchive) GlobalContext.deserialize(manifestXml);
    ProcessDefinitionRemote[] pds = listProcessDefinitionRemotesLight();
    boolean[] duplication = new boolean[ua.getDefinitionList().size()];

    for (int i = 0; i < ua.getDefinitionList().size(); i++) {
      DefinitionArchive da = (DefinitionArchive) ua.getDefinitionList().get(i);
      ProcessDefinitionRemote pdr = null;
      for (int j = 0; j < pds.length; j++) {
        pdr = pds[j];
        if (da.getAlias().equals(pdr.getAlias()) && UEngineUtil.isNotEmpty(da.getAlias())) {
          duplication[i] = true;
          break;
        }
      }
    }
View Full Code Here

Examples of org.uengine.util.export.DefinitionArchive

                        UEngineArchive ua,
                        UEngineArchive edited_ua,
                        Hashtable newDefIdList) throws Exception {
       
    for (int i = 0; i < ua.getDefinitionList().size(); i++) {
      DefinitionArchive da = (DefinitionArchive) ua.getDefinitionList().get(i);
      DefinitionArchive fixedDa = (DefinitionArchive) edited_ua.getDefinitionList().get(i);

      if (da.isRoot() == false && da.getObjectType().equals("folder") && da.getParentFolder().equals(oldRootFolderId)) {
        String newFolderId = addFolder(fixedDa.getName(), newRootFolderId);
     
        newDefIdList.put(da.getBelongingId(),newFolderId);
       
        importFolder(newFolderId, da.getBelongingId(), ua,edited_ua,newDefIdList);
      }
View Full Code Here

Examples of org.uengine.util.export.DefinitionArchive

                             Hashtable newDefIdList,
                             Hashtable newDefVerIdList,
                             Hashtable newAliasList) throws Exception {

    for (int i = 0; i < ua.getDefinitionList().size(); i++) {
      DefinitionArchive da = (DefinitionArchive) ua.getDefinitionList().get(i);
      DefinitionArchive fixedDa = (DefinitionArchive) edited_ua.getDefinitionList().get(i);
      String[] deployedDefinitionInformation = null;

      if (!da.isRoot()&& fixedDa.getArchiveFileName().equals(da.getArchiveFileName()) && !"folder".equals(da.getObjectType())) {
       
        String key = da.getName() + "." + da.getAlias() + "." + da.getId() + "." + da.getObjectType();
        String definitionDoc = (String) inputStreamList.get(key);

        if (definitionDoc != null) {
          Map objectOptions = new HashMap();
          objectOptions.put("alias", fixedDa.getAlias());
          objectOptions.put("objectType", da.getObjectType());
         
          if ("new".equals(command[i])) {
            String parentFolder = (String) newDefIdList.get(da.getParentFolder());
 
            deployedDefinitionInformation = ProcessDefinitionFactory.getInstance(getTransactionContext()).addDefinitionImpl(
                null, null, 1, fixedDa.getName(), null, false, definitionDoc, parentFolder, false, objectOptions);
           
          } else if ("update".equals(command[i])) {
            String parentFolder = null;
            ProcessDefinitionRemote[] pdrs = listProcessDefinitionRemotesLight();
            for (int j = 0; j < pdrs.length; j++) {
              ProcessDefinitionRemote tempPdr = pdrs[i];
              if ((!tempPdr.isFolder) && ((tempPdr.getAlias()).equals(fixedDa.getAlias())) && (fixedDa.getAlias() != null && !fixedDa.getAlias().equals(""))) {
                parentFolder = tempPdr.getParentFolder();
              }
            }

            String pdId = getProcessDefinitionIdByAlias(fixedDa.getAlias());
            ProcessDefinitionRemote[] findLastVersion = findAllVersions(pdId);
           
            int versionId = 0;
            for (int j = 0; j < findLastVersion.length; j++) {
              int compareVersionId = findLastVersion[j].getVersion();
              if (versionId < compareVersionId) {
                versionId = compareVersionId;
              }
            }

            deployedDefinitionInformation = ProcessDefinitionFactory.getInstance(getTransactionContext()).addDefinitionImpl(
                pdId, null, versionId+1, fixedDa.getName(), null, false, definitionDoc, parentFolder, false, objectOptions);
          }
         
          String pdvId = deployedDefinitionInformation[0];
          newDefIdList.put(da.getBelongingId(),deployedDefinitionInformation[1]);
          newDefVerIdList.put(da.getId(),pdvId);
          newAliasList.put(da.getAlias(), fixedDa.getAlias());
         
          setProcessDefinitionProductionVersion(pdvId);

          if ("form".equals(da.getObjectType())) {
            saveFormFilesForImport(definitionDoc, pdvId);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.