Package org.uengine.persistence.processdefinition

Examples of org.uengine.persistence.processdefinition.ProcessDefinitionRepositoryHomeLocal.findByPrimaryKey()


     
      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


      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

    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";
      }
     
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));
      }
View Full Code Here

      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

  public void renameProcessDefinition(String pdid, String newName) throws RemoteException{
    log("renameProcessDefinition", new Object[]{pdid, newName});
    try{
      ProcessTransactionContext tc = getTransactionContext();
      ProcessDefinitionRepositoryHomeLocal pdhr = GlobalContext.createProcessDefinitionRepositoryHomeLocal(tc);     
      ProcessDefinitionRepositoryLocal pdr = pdhr.findByPrimaryKey(new Long(pdid));
      pdr.setName(newName);
     
      //2011.1.11 add by yookjy
      //rename upd
      String pdvid = String.valueOf(pdr.getProdVerId());
View Full Code Here

    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{
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

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.