Package org.uengine.persistence.processdefinition

Examples of org.uengine.persistence.processdefinition.ProcessDefinitionRepositoryLocal


    try{
      ProcessDefinitionVersionRepositoryHomeLocal pdvrhl = GlobalContext.createProcessDefinitionVersionRepositoryHomeLocal(getTransactionContext());
      ProcessDefinitionVersionRepositoryLocal pdvrl = pdvrhl.findByPrimaryKey(new Long(pdvid));
     
      ProcessDefinitionRepositoryHomeLocal pdhr = GlobalContext.createProcessDefinitionRepositoryHomeLocal(getTransactionContext());
      ProcessDefinitionRepositoryLocal pdl = pdhr.findByPrimaryKey(pdvrl.getDefId());
      int productionVersion = pdl.getProdVer();
     
      ProcessDefinitionRemote pdr =null;
     
      try{
        ProcessDefinition pd = getDefinition(pdvid);
        if(pd !=null && pd instanceof ProcessDefinition){
          pdr = new ProcessDefinitionRemote(pd, getTransactionContext(), pdvrl);
         
          if(pdl.getObjType() != null){
            pdr.setObjType(pdl.getObjType());
          }
        }
      }catch (Exception e) {
        pdr = new ProcessDefinitionRemote(pdl, pdvrl);
      }
View Full Code Here


  }
 
  public ProcessDefinitionRemote getProcessDefinitionRemoteByDefinitionId(String defId) throws RemoteException{
    try{
      ProcessDefinitionRepositoryHomeLocal pdhr = GlobalContext.createProcessDefinitionRepositoryHomeLocal(getTransactionContext());
      ProcessDefinitionRepositoryLocal pdrl = pdhr.findByPrimaryKey(new Long(defId));
      ProcessDefinitionRemote pdr = new ProcessDefinitionRemote(pdrl, null);

      return pdr;

    }catch(Exception e){
View Full Code Here

      //if there is child of this folder, this folder can't be removed
      Collection childs = pdhr.findByFolder(new Long(folderId));
      if(childs.iterator().hasNext())
        throw new UEngineException("This folder is not empty");
         
      ProcessDefinitionRepositoryLocal pdr = pdhr.findByPrimaryKey(new Long(folderId));

      pdr.setIsDeleted(true);
    }catch(Exception e){
      e.printStackTrace();
      throw new RemoteException("ProcessManagerError:"+e.getMessage(), e);
    }
  }
View Full Code Here

      Collection versions = pdvh.findAllVersions(pdid);
      //force to remove the definition if there's no more version.
      if(!versions.iterator().hasNext()) throw new ObjectNotFoundException();
    }catch(javax.ejb.ObjectNotFoundException e){
      ProcessDefinitionRepositoryHomeLocal pdhr = GlobalContext.createProcessDefinitionRepositoryHomeLocal(tc);   
      ProcessDefinitionRepositoryLocal pdr = pdhr.findByPrimaryKey(pdid);
     
      //don't remove
      //pdr.remove();     
      pdr.setIsDeleted(true);
    }
   
    removeFromCache(pdvid);
  }
View Full Code Here

      }catch(Exception e){
      }
    }   
    if(!definitionExist){
      belongingPdid = ""+UniqueKeyGenerator.issueProcessDefinitionKey(tc);
      ProcessDefinitionRepositoryLocal pdr = pdhr.create(new Long(belongingPdid));
      pdr.setName(name);
      pdr.setParentFolder(new Long(folder));
      if(UEngineUtil.isNotEmpty(description))
        pdr.setDescription(description);
     
      if(options!=null && options.containsKey("objectType")){
        objectType = (String)options.get("objectType");     
        pdr.setObjType(objectType);
      }
      if(options!=null && options.containsKey("alias")){
        String alias = (String)options.get("alias");     
        pdr.setAlias(alias);
        ProcessDefinitionRepositoryLocal  pdrl=null;
        try{
          pdrl = pdhr.findByAlias(alias);
        }catch(Exception e){
        }
        if(pdrl != null)
View Full Code Here

TOP

Related Classes of org.uengine.persistence.processdefinition.ProcessDefinitionRepositoryLocal

Copyright © 2018 www.massapicom. 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.