Package org.uengine.persistence.processdefinitionversion

Examples of org.uengine.persistence.processdefinitionversion.ProcessDefinitionVersionRepositoryHomeLocal.findByPrimaryKey()


      if(pdvid.indexOf("@")>-1){
        pdvid = ProcessDefinition.splitDefinitionAndVersionId(pdvid)[1];
      }
     
      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());
View Full Code Here


      ProcessDefinition pd = pdf.getDefinition(pdvid);
      pd.setName(newName);

      //rename process definition version
      ProcessDefinitionVersionRepositoryHomeLocal pdvhr = GlobalContext.createProcessDefinitionVersionRepositoryHomeLocal(tc);   
      ProcessDefinitionVersionRepositoryLocal pdvr = pdvhr.findByPrimaryKey(new Long(pdvid));
      pdvr.setDefName(newName);
         
      //restore upd file
      String path = null;
      String def = (String)pdvr.getFilePath();
View Full Code Here

  }
 
  public ProcessDefinitionRemote getProcessDefinitionRemote(String pdvid) throws RemoteException{
    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();
     
View Full Code Here

    ProcessManagerBean pmb = this;
    ProcessTransactionContext tc = pmb.getTransactionContext();
    ProcessDefinitionVersionRepositoryHomeLocal pdvhr = GlobalContext.createProcessDefinitionVersionRepositoryHomeLocal(tc);
    ProcessDefinitionVersionRepositoryLocal pdvr;

    pdvr = pdvhr.findByPrimaryKey(new Long(pdr.getId()));
    String def = (String) pdvr.getFilePath();
    if (def.startsWith("LINK:")) {
      File f = new File(TEMP_DIRECTORY + parentDirectory);
      if (!f.exists())
        f.mkdirs();
View Full Code Here

  public String getResourcePath(String resourceId) throws Exception{
    ProcessDefinitionVersionRepositoryHomeLocal pdvhr = GlobalContext.createProcessDefinitionVersionRepositoryHomeLocal(tc);   
   
    ProcessDefinitionVersionRepositoryLocal pdvr;
    try{
      pdvr = pdvhr.findByPrimaryKey(new Long(resourceId));
    }catch(ObjectNotFoundException onfe){
      throw new UEngineException("No such Resource Version id [" + resourceId + "]", onfe);
    }
   
    String def = (String)pdvr.getFilePath();
View Full Code Here

  protected Object getDefinitionSourceImpl(String pdvid, boolean fromCompilationVersion, boolean shouldBeObjectResult) throws Exception{
    ProcessDefinitionVersionRepositoryHomeLocal pdvhr = GlobalContext.createProcessDefinitionVersionRepositoryHomeLocal(tc);   
   
    ProcessDefinitionVersionRepositoryLocal pdvr;
    try{
      pdvr = pdvhr.findByPrimaryKey(new Long(pdvid));
    }catch(ObjectNotFoundException onfe){
      throw new UEngineException("No such Process Definition version id [" + pdvid + "]", onfe);
    }
   
    String def = (String)pdvr.getFilePath();
View Full Code Here

//    Object[] nameAndVersion = UEngineUtil.getProcessNameAndVersion(pdid);
//    String name = (String)nameAndVersion[0];
//    int version = ((Integer)nameAndVersion[1]).intValue();
   
    ProcessDefinitionVersionRepositoryHomeLocal pdvh = GlobalContext.createProcessDefinitionVersionRepositoryHomeLocal(tc);
    ProcessDefinitionVersionRepositoryLocal pdvl = pdvh.findByPrimaryKey(new Long(pdvid));
    Long pdid = pdvl.getDefId();   
   
    try{
      ProcessDefinitionVersionRepositoryLocal pdir = pdvh.findByPrimaryKey(new Long(pdvid));
      //don't remove to prevent danggling instances
View Full Code Here

    ProcessDefinitionVersionRepositoryHomeLocal pdvh = GlobalContext.createProcessDefinitionVersionRepositoryHomeLocal(tc);
    ProcessDefinitionVersionRepositoryLocal pdvl = pdvh.findByPrimaryKey(new Long(pdvid));
    Long pdid = pdvl.getDefId();   
   
    try{
      ProcessDefinitionVersionRepositoryLocal pdir = pdvh.findByPrimaryKey(new Long(pdvid));
      //don't remove to prevent danggling instances
      //pdir.remove();
      pdir.setIsDeleted(true);
     
      Collection versions = pdvh.findAllVersions(pdid);
View Full Code Here

        pdvr.setDefId(new Long(belongingPdid));
        pdvr.setDefName(name);
      }
     
    }else{
      pdvr = pdvhr.findByPrimaryKey(new Long(pdvid));
    }
   
    String fullFileName;
    String relativeFileName;
    if(overwrite){
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.