Package org.uengine.kernel

Examples of org.uengine.kernel.UEngineException


      //Check there is child
      ProcessDefinitionRepositoryHomeLocal pdhr = GlobalContext.createProcessDefinitionRepositoryHomeLocal(getTransactionContext());
      //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){
View Full Code Here


      }else{
        processDefinition = (ProcessDefinition)definition;
      }
 
      if(processDefinition==instance.getProcessDefinition())
        throw new UEngineException("Dynamic change exception: Changed definition is the original one so it can't be changed. That means your code didn't clone the definition for changing it. Also It implies the damage of cached definition.");
     
      instance.setProcessDefinition(processDefinition);

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

      ObjectMessage message = (ObjectMessage)omessage;     
      FaultParameter faultParameter = (FaultParameter)message.getObject();
           
      String instanceId = faultParameter.getInstanceId();
      tracingTag = faultParameter.getTracingTag();
      UEngineException fault = faultParameter.getFault();
     
      pmb = new ProcessManagerBean();
      pmb.setSessionContext(null);
     
      try{
        instance = pmb.getProcessInstance(instanceId);
      }catch(Exception e){
        throw new UEngineException("Fault has been occurred during a new instance initiates.", fault);
      }
System.out.println("FaultProcessorBean::onMessage: fault is " + fault + "\n detail is " + fault.getDetails());
      //TODO: because of Oracle's max size of varchar
      fault.setDetails(null);
      //
     
      instance.fireFault(tracingTag, fault);
      pmb.applyChanges();
View Full Code Here

  protected Map retreiveTargetStartingPoints() throws Exception{
    Map targetKeys = new HashMap();
   
    IDAO targetKeysDAO = GenericDAO.createDAOImpl(getTargetConnectionFactory(), SQL_RETREIVETARGETSTARTINGPOINTS, IDAO.class);
    targetKeysDAO.select();
    if(targetKeysDAO.size() ==0) throw new UEngineException("Failed to retreive starting points from source server: No rows are returned.");
   
    while(targetKeysDAO.next()){
      Date recentModified = (Date)targetKeysDAO.get("recentModified");
      Number lastKey = (Number)targetKeysDAO.get("lastkey");
      String objectName = (String)targetKeysDAO.get("objectName");
View Full Code Here

      return pmb;
    }
  }

  public ProcessManagerRemote getProcessManager(boolean uengineManageTheTransaction, final Connection conn) throws Exception{
    if(conn == null) throw new UEngineException("Null connection is provided.");
   
    return getProcessManager(uengineManageTheTransaction, new ConnectionFactory(){

      public Connection getConnection() throws Exception {
        return conn;
View Full Code Here

  public ProcessManagerRemote getProcessManagerForReadOnly() throws Exception{
    return getProcessManager(false, (ConnectionFactory)null);
  }

  public ProcessManagerRemote getProcessManager(final Connection conn) throws Exception{
    if(conn == null) throw new UEngineException("Null connection is provided.");

    return getProcessManager(false, new ConnectionFactory(){

      public Connection getConnection() throws Exception {
        return conn;
View Full Code Here

 
  abstract boolean validate(Object value, ProcessInstance instance, Map parameterMap, Map options);


  protected Exception createException(String fieldNames, String validationMessage, ProcessInstance instance, Map parameterMap, Map options){
    UEngineException validationException = new UEngineException(fieldNames + " " + validationMessage);
    validationException.setErrorLevel(UEngineException.MESSAGE_TO_USER);
   
    return validationException;
  }
View Full Code Here

    try{
      GetMethod method =
        new GetMethod(GlobalContext.WEB_CONTEXT_ROOT+path);
      return executeMethodAsStream(method);
    }catch(Exception e){
      throw new UEngineException("Fail to open url : " + getHttpClient().getHostConfiguration().getHostURL() + GlobalContext.WEB_CONTEXT_ROOT+path);
    }
  }
View Full Code Here

      method.setRequestBody(createParameter(formValueMap));
      method.setRequestHeader("Content-Type", PostMethod.FORM_URL_ENCODED_CONTENT_TYPE
          + "; charset=" + "UTF-8");
      return executeMethodAsStream(method);
    }catch(Exception e){
      throw new UEngineException("Fail to open url : " + getHttpClient().getHostConfiguration().getHostURL() + GlobalContext.WEB_CONTEXT_ROOT+path);
    }
  }
View Full Code Here

    private ConnectionFactory connectionFactory;
    public ConnectionFactory getConnectionFactory() {
      return connectionFactory;
    }
    public void setConnectionFactory(ConnectionFactory factory) {
      if(factory==null) throw new RuntimeException(new UEngineException("ConnectionFactory should not be null."));
     
      connectionFactory = factory;
    }
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.