Package com.opensymphony.workflow

Examples of com.opensymphony.workflow.WorkflowException


    {
      logger.info(e.getMessage(), e);
    }
    lastException = e;
    workflowDatabase.setRollbackOnly();
    throw (e instanceof WorkflowException) ? (WorkflowException) e : new WorkflowException(e);
  }
View Full Code Here


  protected final Object getParameter(final String key, final boolean required) throws WorkflowException
  {
    final Object parameter = parameters.get(key);
    if(required && parameter == null)
    {
      final WorkflowException e = new WorkflowException("Required parameter " + key + " is missing.");
      logger.error(e.toString());
      throw e;
    }
    return parameter;
  }
View Full Code Here

      return CategoryController.getController().findWithChildren(categoryVO.getId(), getDatabase());
    }
    catch(Exception e)
    {
      e.printStackTrace();
      throw new WorkflowException("SimpleCategoryProvider.getRootCategory() : " + e);
    }
  }
View Full Code Here

      if(db != null)
      {
        db.setRollbackOnly();
      }
         
      throw (e instanceof WorkflowException) ? (WorkflowException) e : new WorkflowException(e);
    }
    finally
    {
      db.releaseDB();
    }
View Full Code Here

      synchronized(currentWorkflows)
      { 
        if(!isActive())
        {
          if(getEntryState() == WorkflowEntry.UNKNOWN)
            throw new WorkflowException("The workflow with id " + workflowId + " is in an unknown state - the database could be down or the workflow corrupt");
          else
            throw new InvalidActionException("Workflow " + workflowId + " is no longer active");
        }
        if(currentWorkflows.contains(id))
        {
          throw new WorkflowException("The selected workflow is executing...");
        }
        currentWorkflows.add(id);
      }
     
      try
      {
        if(useDatabaseExtension(workflowDescriptor))
        {
          doExtendedAction(actionId, inputs);
        }
        else
        {
          workflow.doAction(workflowId, actionId, inputs);
        }
      }
      finally
      {
        synchronized(currentWorkflows)
        {
          currentWorkflows.remove(id);
        }
      }
    }
    catch(Exception we)
    {
      logger.error("An error occurred when we tried to invoke an workflow action:" + we.getMessage());
      //restoreSessionFactory(workflow, we);
      throw new WorkflowException("An error occurred when we tried to invoke an workflow action:" + we.getMessage());
    }
  }
View Full Code Here

      if(db != null)
      {
        db.setRollbackOnly();
      }

      throw (e instanceof WorkflowException) ? (WorkflowException) e : new WorkflowException(e);
    }
    finally
    {
      db.releaseDB();
    }
View Full Code Here

    }
    catch(Throwable we)
    {
      logger.error("An error occurred when we tried to check for entry state:" + we.getMessage());
      //restoreSessionFactory(workflow, we);
      throw new WorkflowException("An error occurred when we tried to check for entry state:" + we.getMessage());
     }
  }
View Full Code Here

    }
    catch (WorkflowException we)
    {
      logger.error("An error occurred when we tried to invoke an workflow action:" + we.getMessage());
      //restoreSessionFactory(workflow, we);
      throw new WorkflowException("An error occurred when we tried to invoke an workflow action:" + we.getMessage());
    }
  }
View Full Code Here

        db.begin();
        }
        catch(Exception e)
        {
        logger.error("Unable to create database", e);
        throw new WorkflowException(e);
        }
    }
    return db;
  }
View Full Code Here

      doCommit();
    }
    catch(Exception e)
    {
      doRollback();
      throw new WorkflowException(e);
    }
    finally
    {
      doClose();
    }
View Full Code Here

TOP

Related Classes of com.opensymphony.workflow.WorkflowException

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.