Package org.jbpm

Examples of org.jbpm.PvmException


      execution.propagation = Propagation.UNSPECIFIED;
      externalActivity.signal(execution, signal, parameters);
    } catch (RuntimeException e) {
      throw e;
    } catch (Exception e) {
      throw new PvmException("couldn't signal "+node+": "+e.getMessage(), e);
    } finally {
      execution.userCodeType = null;
    }

    if (execution.propagation == Propagation.UNSPECIFIED) {
View Full Code Here


                exception,
                environment.getEnvironmentFactory()
        );
        transaction.addListener(afterTxCompletionListener, Transaction.EVENT_AFTERCOMPLETION);
        log.finest("registering exception handler to "+transaction);
        throw new PvmException("transaction exception handler registered handler after transaction completed.  make sure this transaction is rolled back", exception);
      } else {
        throw new PvmException("no transaction present in the environment for transactional exception handler", exception);
      }
    } else {
      executeHandler(execution, exception);
    }
  }
View Full Code Here

          execution.userCodeType = UserCodeType.EXCEPTION_HANDLER;
          activity.execute(execution);
        } catch (RuntimeException e) {
          throw e;
        } catch (Exception e) {
          throw new PvmException("couldn't execute "+activity, e);
        } finally {
          execution.userCodeType = null;
        }
      }
    }
View Full Code Here

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

      if (! transaction.isRolledBack()) {
        log.warning("no rollback after transactional exception handler. did you forget to rollback the transaction ?");
      }
      CommandService commandService = environmentFactory.get(CommandService.class);
      if (commandService==null) {
        throw new PvmException("environment factory doesn't have a command service");
      }
      commandService.execute(this);
    }
View Full Code Here

    }
    public Object execute(Environment environment) {
      // reload the execution
      DbSession dbSession = environment.get(DbSession.class);
      if (dbSession==null) {
        throw new PvmException("no "+DbSession.class.getName()+" available in the environment for reloading the execution");
      }
      execution = dbSession.get(ExecutionImpl.class, execution.getDbid());
      executeHandler(execution, exception);
      return null;
    }
View Full Code Here

  }

  public void setValue(Object value) {
    if (converter!=null) {
      if (! converter.supports(value)) {
        throw new PvmException("the converter '"+converter.getClass().getName()+"' in variable instance '"+this.getClass().getName()+"' does not support values of type '"+value.getClass().getName()+"'.  to change the type of a variable, you have to delete it first");
      }
      value = converter.convert(value);
    }
    if ( (value!=null)
         && (! this.isStorable(value)) ) {
      throw new PvmException("variable instance '"+this.getClass().getName()+"' does not support values of type '"+value.getClass().getName()+"'.  to change the type of a variable, you have to delete it first");
    }
    setObject(value);
  }
View Full Code Here

      Configuration configuration = (Configuration) target;
      try {
        Class<?> persistentClass = wireContext.getClassLoader().loadClass(className);
        configuration.addClass(persistentClass);
      } catch (Exception e) {
        throw new PvmException("couldn't add mapping for class "+className, e);
      }
    }
View Full Code Here

          try {
            variableClass = mapping.getVariableClass();
            log.finest("creating new "+variableClass.getName()+" for variable "+key);
            variable = (Variable) variableClass.newInstance();
          } catch (Exception e) {
            throw new PvmException("couldn't instantiate variable instance class '"+variableClass.getName()+"'");
          }
          Converter converter = mapping.getConverter();
          variable.setConverter(converter);
        }
      }
View Full Code Here

    public void apply(Object target, WireContext wireContext) {
      Configuration configuration = (Configuration) target;
      try {
        configuration.addURL(new URL(url));
      } catch (Exception e) {
        throw new PvmException("couldn't add hibernate mapping from URL "+url, e);
      }
    }
View Full Code Here

TOP

Related Classes of org.jbpm.PvmException

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.