Package org.uengine.persistence.processdefinition

Examples of org.uengine.persistence.processdefinition.ProcessDefinitionRepositoryHomeLocal


   
  } 
 
  public ProcessDefinitionRemote[] listProcessDefinitionRemotesLight() throws RemoteException{
    try{
      ProcessDefinitionRepositoryHomeLocal pdhr = GlobalContext.createProcessDefinitionRepositoryHomeLocal(getTransactionContext());
      ProcessDefinitionVersionRepositoryHomeLocal pdihr = GlobalContext.createProcessDefinitionVersionRepositoryHomeLocal(getTransactionContext());

      Collection definitions = pdhr.findAllProcessDefinitions();
     
      Vector processDefinitionRemotes = new Vector();     
      for(Iterator iter = definitions.iterator(); iter.hasNext();){
        ProcessDefinitionRepositoryLocal pdrl = ((ProcessDefinitionRepositoryLocal)iter.next());
        ProcessDefinitionRemote pdr = new ProcessDefinitionRemote();
View Full Code Here


    }
  }
 
  public ProcessDefinitionRemote[] findAllVersions(String pdid ) throws RemoteException{
    try{
      ProcessDefinitionRepositoryHomeLocal pdhr = GlobalContext.createProcessDefinitionRepositoryHomeLocal(getTransactionContext());
      ProcessDefinitionVersionRepositoryHomeLocal pdihr = GlobalContext.createProcessDefinitionVersionRepositoryHomeLocal(getTransactionContext());
     
      String productionVersion = "-1";
      try{
        productionVersion = getProcessDefinitionProductionVersion(pdid);
View Full Code Here

      }
     
      ProcessDefinitionVersionRepositoryHomeLocal pdvhr = GlobalContext.createProcessDefinitionVersionRepositoryHomeLocal(getTransactionContext());
      ProcessDefinitionVersionRepositoryLocal pdvlr = pdvhr.findByPrimaryKey(new Long(pdvid));
     
      ProcessDefinitionRepositoryHomeLocal pdhr = GlobalContext.createProcessDefinitionRepositoryHomeLocal(getTransactionContext());
      ProcessDefinitionRepositoryLocal pdlr = pdhr.findByPrimaryKey(pdvlr.getDefId());
     
      pdlr.setProdVer(pdvlr.getVer().intValue());
      pdlr.setProdVerId(new Long(pdvid));
     
      if(pdlr.getObjType()==null){
View Full Code Here

    try{
      if(pdid.startsWith("[")){
        String definitionAlias = pdid.substring(1, pdid.indexOf("]"));
        return getProcessDefinitionProductionVersionByAlias(definitionAlias);
      }
      ProcessDefinitionRepositoryHomeLocal pdhr = GlobalContext.createProcessDefinitionRepositoryHomeLocal(getTransactionContext());
      ProcessDefinitionRepositoryLocal pdlr = pdhr.findByPrimaryKey(new Long(pdid));
     
      Long productionVersionId = pdlr.getProdVerId();
      if(productionVersionId==null || ((Long)productionVersionId).longValue()==-1)
        throw new RemoteException("ProcessManagerError: There's no production. Make sure you have chosen a version of the process definition as production at least once.");
             
View Full Code Here

  }
 
  public String getProcessDefinitionProductionVersionByName(String pdName) throws RemoteException{
    log("getProcessDefinitionProductionVersionByName", new Object[]{pdName});
    try{
      ProcessDefinitionRepositoryHomeLocal pdhr = GlobalContext.createProcessDefinitionRepositoryHomeLocal(getTransactionContext());
      ProcessDefinitionRepositoryLocal pdlr = pdhr.findByName(pdName);
     
      if(pdlr==null)
        throw new RemoteException("ProcessManagerError: There's no such process definition named '" + pdName + "'");
     
      Long productionVersionId = pdlr.getProdVerId();
View Full Code Here

  }
 
  public String getProcessDefinitionProductionVersionByAlias(String alias) throws RemoteException{
    log("getProcessDefinitionProductionVersionByAlias", new Object[]{alias});
    try{
      ProcessDefinitionRepositoryHomeLocal pdhr = GlobalContext.createProcessDefinitionRepositoryHomeLocal(getTransactionContext());
      ProcessDefinitionRepositoryLocal pdlr = pdhr.findByAlias(alias);
     
      if(pdlr==null)
        throw new RemoteException("ProcessManagerError: There's no such process definition aliased '" + alias + "'");
     
      Long productionVersionId = pdlr.getProdVerId();
View Full Code Here

  }
 
  public String getProcessDefinitionIdByAlias(String alias) throws RemoteException{
    log("getProcessDefinitionIdByAlias", new Object[]{alias});
    try{
      ProcessDefinitionRepositoryHomeLocal pdhr = GlobalContext.createProcessDefinitionRepositoryHomeLocal(getTransactionContext());
      ProcessDefinitionRepositoryLocal pdlr = pdhr.findByAlias(alias);
     
      return pdlr.getDefId().toString();
    }catch(ObjectNotFoundException onfe){
      UEngineException ue = new UEngineException("No such processdefinition with alias '" + alias +"'.", onfe);
      throw new RemoteException("ProcessManagerError:" + ue.getMessage(), ue);
View Full Code Here

  }
 
  public String addFolder(String folderName, String parentFolder) throws RemoteException{
    log("addFolder", new Object[]{folderName, parentFolder});
    try{
      ProcessDefinitionRepositoryHomeLocal pdhr = GlobalContext.createProcessDefinitionRepositoryHomeLocal(getTransactionContext());
     
      //if there is no parent folder, this will occur an exception to break this try~catch block
      if(parentFolder!=null && !parentFolder.equals("-1")){
        pdhr.findByPrimaryKey(new Long(parentFolder));
      }
      if(!UEngineUtil.isNotEmpty(parentFolder)){
        parentFolder = "-1";
      }
     
      ProcessDefinitionRepositoryLocal pdr = null;
     
      try {
        pdr = pdhr.findByNameSameLevel(folderName, new Long(parentFolder), "folder");
      } catch (Exception e) {
        pdr = pdhr.create(UniqueKeyGenerator.issueProcessDefinitionKey(getTransactionContext()));
        pdr.setName(folderName);
        pdr.setParentFolder(new Long(parentFolder));
        pdr.setIsFolder(true);
        pdr.setObjType("folder");
      }
View Full Code Here

  }
 
  public void moveFolder(String pdid, String parentFolder) throws RemoteException{
    log("moveFolder", new Object[]{pdid, parentFolder});
    try{
      ProcessDefinitionRepositoryHomeLocal pdhr = GlobalContext.createProcessDefinitionRepositoryHomeLocal(getTransactionContext());     
      ProcessDefinitionRepositoryLocal pdr = pdhr.findByPrimaryKey(new Long(pdid));
     
      //if there is no parent folder, this will occur an exception to break this try~catch block
      if(parentFolder!=null && !parentFolder.equals("-1")){
        pdhr.findByPrimaryKey(new Long(parentFolder));
      }
      if(!UEngineUtil.isNotEmpty(parentFolder)){
        parentFolder = "-1";
      }
     
View Full Code Here

 
  public void setVisibleProcessDefinition(String pdid, boolean isVisible) throws RemoteException{
    log("setHiddenProcessDefinition", new Object[]{pdid, new Boolean(isVisible)});
    try{
     
      ProcessDefinitionRepositoryHomeLocal pdhr = GlobalContext.createProcessDefinitionRepositoryHomeLocal(getTransactionContext());     
      ProcessDefinitionRepositoryLocal pdr = pdhr.findByPrimaryKey(new Long(pdid));

      pdr.setIsVisible(isVisible);
     
    }catch(Exception e){
      e.printStackTrace();
View Full Code Here

TOP

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

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.