Package org.uengine.kernel

Examples of org.uengine.kernel.UEngineException


      fos.close();
    }
    public void loadValueMap() throws Exception{
      InputStream fis = openValueXMLStream();
     
      if(getFilePath()==null) throw new UEngineException("OfficeDocument has not been initialized.");
     
      setValueMap((HashMap)GlobalContext.deserialize(fis, HashMap.class));
     
      //load up the values from office document file
    }
View Full Code Here


      dao.set(keyFieldName, keyFieldValue);

      if(!isNew){
        dao.getImplementationObject().createSelectSql();
        dao.select();
        if(!dao.next()) throw new UEngineException("No Such "+tableName+" where "+keyFieldName+" is " + keyFieldValue);
      }
     
      String sharedContextKey = tableName + "@" + keyFieldValue;
      sharedContextKey = sharedContextKey.toUpperCase();
     
View Full Code Here

  }
 
  protected void releaseResources(boolean fromRemoveCall) throws Exception{
    if(connection != null && !connection.isClosed()){
      if(fromRemoveCall && !isManagedTransaction()){
        (new UEngineException("This thread tries to release resources that is not applied(committed) or cancelled(rolled-back).")).printStackTrace();
      }
//      if(!isManagedTransaction()){
        if(wsCoordinationContext!=null){
          //added for ws-at
View Full Code Here

            public void beforeCommit(TransactionContext tx) throws Exception {
              Connection con = (Connection)tx.getSharedContext(sharedContextName);
              try{
                con.commit();
              }catch(Exception e){
                throw new UEngineException("Error when to delayed transaction commit for external datasource", e);
              }finally{
                con.close();
              }
            }
 
            public void beforeRollback(TransactionContext tx) throws Exception {
              Connection con = (Connection)tx.getSharedContext(sharedContextName);
              try{
                con.rollback();
              }catch(Exception e){
                throw new UEngineException("Error when to delayed transaction rollback for external datasource" , e);
              }finally{
                con.close();
              }
            }
View Full Code Here

        );
     
      return actualDAOTypeCls;

    } catch (Exception e) {
      throw new UEngineException("Failed to find proper DAO type: ", e);
    }     
     
  }
View Full Code Here

    //document source
    String docFileURL = (UEngineUtil.isNotEmpty(getPath()) ? getPath() : defaultValue.getTemplateFilePath());

    if(docFileURL==null)
      throw new UEngineException(" document file is empty.");
   
    ProcessDefinition definition = (instance !=null ? instance.getProcessDefinition() : new ProcessDefinition(){

      public StringBuffer evaluateContent(ProcessInstance instance, String expression) {
        return new StringBuffer("");
View Full Code Here

        is.close();
        tis.close()
        workbook.close();
        resultWorkbook.close();
      }catch(java.io.FileNotFoundException fne){
        new UEngineException("File result is not found. You might never open or edit a required document.");
      }

    }
   
    return false; //force to save the value itself as well.
View Full Code Here

   
/*    if(getFieldName().equals("BTTM_DCD")){
      System.out.println();
    }
*/   
    if(instance==null) throw new UEngineException("Instance is null");
   
    if("bpm_procinst".equalsIgnoreCase(getTableName()) && instance instanceof EJBProcessInstance){
      dao = ((EJBProcessInstance)instance).getProcessInstanceDAO();
    }else{
      Object keyValue = ((EJBProcessInstance)instance).getProcessInstanceDAO().get(getCorrelatedFieldName());
      String sharedContextKey = "DAO." + getTableName() + "@" + keyValue;
     
      if(keyValue==null) throw new UEngineException("Database Synchronization Process Variable Exception: No value for correlation key [" + getCorrelatedFieldName() + "] of instance [" + instance.getInstanceId() + "]");
     
      dao = (IDAO)instance.getProcessTransactionContext().getSharedContext(sharedContextKey);

      if(dao==null){
        String sql = "select * from " + getTableName() + " where " + getCorrelationFieldName() + "=?" + getCorrelationFieldName();
View Full Code Here

        pmb.remove();
      }catch(Exception ex2){}
    }
   
    if(tracingTag !=null && instance!=null){
      UEngineException ue = null;
     
      if(!(e instanceof UEngineException)){
        ByteArrayOutputStream bao = new ByteArrayOutputStream();
        e.printStackTrace(new PrintStream(bao));
        try{     
            ue = new UEngineException("uEngine Exception: " + e + "("+e.getMessage()+")", e);
            ue.setDetails(bao.toString());
        }catch(Exception e3){
          e3.printStackTrace();
        }
       
      }else
View Full Code Here

 
  public static void queueActivity(final Activity act, final ProcessInstance instance) throws Exception
    try{
      //check if act has its process definition
      if(act.getProcessDefinition()==null)
        throw new UEngineException("The activity '" + act.getName() + "' is not belong to its definition", "Check the definition");
     
      InitialContext jndiContext = GlobalContext.getInitialContext();
      QueueConnectionFactory factory = (QueueConnectionFactory)jndiContext.lookup ("ConnectionFactory");
         
      Queue resultQueue = (Queue)jndiContext.lookup ("queue/uEngine-WorkQueue");
View Full Code Here

TOP

Related Classes of org.uengine.kernel.UEngineException

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.