Package org.jbpm.api

Examples of org.jbpm.api.JbpmException


      ObjectOutputStream objectStream = new ObjectOutputStream(byteStream);
      objectStream.writeObject(configuration);
      byte[] bytes = byteStream.toByteArray();
      configurationBytes = new Lob(bytes);
    } catch (Exception e) {
      throw new JbpmException("couldn't serialize configuration object for "+this, e);
    }
  }
View Full Code Here


        //TODO: do not wait
        try {
          Thread.sleep(200);
        } catch (InterruptedException e) {
          e.printStackTrace();
          throw new JbpmException("exception while stopping JobExecutor");
        }
        jobExecutor.stop(true);
      }
    }
View Full Code Here

      Transaction transaction = (environment!=null ? environment.get(Transaction.class) : null);
      if (transaction!=null) {
        log.trace("registering exception handler to "+transaction);
        CommandService commandService = environment.get(CommandService.class);
        if (commandService==null) {
          throw new JbpmException("environment doesn't have a command service for registering transactional exception handler", exception);
        }
        ExceptionHandlerSynchronization exceptionHandlerSynchronization = new ExceptionHandlerSynchronization(
                this, execution,
                exception,
                commandService
        );
        // registration of the synchronization is delegated to the AfterTxCompletionListener
        // to avoid a dependency on class Synchronization
        exceptionHandlerSynchronization.register(transaction);
        log.trace("registering exception handler to "+transaction);
        throw new JbpmException("transaction exception handler registered handler after transaction completed.  make sure this transaction is rolled back", exception);
      } else {
        throw new JbpmException("no transaction present in the environment for transactional exception handler", exception);
      }
    } else {
      executeHandler(execution, exception);
    }
  }
View Full Code Here

        try {
          eventListener.notify(execution);
        } catch (RuntimeException e) {
          throw e;
        } catch (Exception e) {
          throw new JbpmException("couldn't execute "+eventListener, e);
        }
      }
    }
   
    if (transitionName!=null) {
View Full Code Here

  public static void rethrow(Exception exception, String prefixMessage) {
    log.trace("rethrowing "+exception);
    if (exception instanceof RuntimeException) {
      throw (RuntimeException) exception;
    } else {
      throw new JbpmException(prefixMessage+": "+exception.getMessage(), exception);
    }
  }
View Full Code Here

      try {
        InitialContext initialContext = new InitialContext();
        IdentitySessionFactory identitySessionFactory = (IdentitySessionFactory) initialContext.lookup(jndiName);
        return identitySessionFactory;
      } catch (Exception e) {
        throw new JbpmException("couldn't get idm session factory from jndi address "+jndiName, e);
      }
    }
   
    try {
      return new IdentityConfigurationImpl().configure(resource).buildIdentitySessionFactory();
    } catch (Exception e) {
      throw new JbpmException("couldn't instanatiate identity session factory: "+e.getMessage(), e);
    }
  }
View Full Code Here

      Class<?> variableClass = type.getVariableClass();
      try {
        log.trace("creating new "+type+" variable "+key);
        variable = (Variable) variableClass.newInstance();
      } catch (Exception e) {
        throw new JbpmException("couldn't instantiate variable instance class '"+variableClass.getName()+"'");
      }
      Converter converter = type.getConverter();
      variable.setConverter(converter);

    } else {
View Full Code Here

    } catch (RuntimeException e) {
      throw e;
     
    } catch (Exception e) {
      throw new JbpmException("couldn't signal "+activity+": "+e.getMessage(), e);
    }

    if (execution.getPropagation() == Propagation.UNSPECIFIED) {
      execution.proceed();
    }
View Full Code Here

  public Object revert(Object o) {
    try {
      return dateFormat.parseObject((String)o);
    } catch (ParseException e) {
      throw new JbpmException("invalid date format in date variable: "+o, e);
    }
  }
View Full Code Here

    for (Deployer deployer: deployers) {
      deployer.deploy(deployment);
    }
   
    if (deployment.hasErrors()) {
      JbpmException jbpmException = deployment.getJbpmException();
      log.info("errors during deployment of "+deployment+": "+jbpmException.getMessage());
      throw  jbpmException;
    }
   
    RepositoryCache repositoryCache = Environment.getFromCurrent(RepositoryCache.class);
    repositoryCache.set(deployment.getId(), deployment.getObjects());
View Full Code Here

TOP

Related Classes of org.jbpm.api.JbpmException

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.