Package org.jbpm

Examples of org.jbpm.JbpmException


    valueCache = value;
    isValueCached = true;

    if (converter != null) {
      if (!converter.supports(value)) {
        throw new JbpmException("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 JbpmException("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");
    }
View Full Code Here


    try {
      variableInstance = variableInstanceClass.newInstance();
      variableInstance.converter = converter;
    }
    catch (Exception e) {
      throw new JbpmException("couldn't instantiate variable instance class '"
          + variableInstanceClass.getName()
          + "'");
    }
    return variableInstance;
  }
View Full Code Here

        processArchiveParsers.add(processArchiveParser);
      }
    }
    catch (Exception e)
    {
      throw new JbpmException("couldn't parse process archive parsers (jbpm.parsers.xml)", e);
    }
    return processArchiveParsers;
  }
View Full Code Here

      throw e;
    }
    catch (Exception e) {
      jbpmContext.setRollbackOnly();
      log.error("failed to execute " + command, e);
      throw new JbpmException("failed to execute " + command, e);
    }
    finally {
      jbpmContext.close();
    }
  }
View Full Code Here

    else
    {
      Token token = getToken(jbpmContext);

      if (expectedStateName != null && !expectedStateName.equals(token.getNode().getName()))
        throw new JbpmException("token is not in expected state '" + expectedStateName + "' but in '" + token.getNode().getName() + "'");

      if (variables != null && variables.size() > 0)
        token.getProcessInstance().getContextInstance().addVariables(variables);

      if (transitionName == null)
View Full Code Here

  public void leave(ExecutionContext executionContext, String transitionName)
  {
    Transition transition = getLeavingTransition(transitionName);
    if (transition == null)
    {
      throw new JbpmException("transition '" + transitionName + "' is not a leaving transition of node '" + this + "'");
    }
    leave(executionContext, transition);
  }
View Full Code Here

   * called by the implementation of this node to continue execution over the given transition.
   */
  public void leave(ExecutionContext executionContext, Transition transition)
  {
    if (transition == null)
      throw new JbpmException("can't leave node '" + this + "' without leaving transition");
    Token token = executionContext.getToken();
    token.setNode(this);
    executionContext.setTransition(transition);

    // fire the leave-node event for this node
View Full Code Here

   * @return deployed ProcessDefinition
   */
  public Object execute(JbpmContext jbpmContext) throws Exception
  {
    if (par == null && xml == null)
      throw new JbpmException("either xml string or process archive must be given.");

    ProcessDefinition processDefinition;
    if (par != null)
    {
      log.debug("parse process from archive");
View Full Code Here

      try {
        ModuleDefinition moduleDefinition = (ModuleDefinition) ClassLoaderUtil.classForName(moduleClassName).newInstance();
        processDefinition.addDefinition(moduleDefinition);
       
      } catch (Exception e) {
        throw new JbpmException("couldn't instantiate default module '"+moduleClassName+"'", e);
      }     
    }
    return processDefinition;
  }
View Full Code Here

    return new ProcessInstance(this, variables, businessKey);
  }

  public void setProcessDefinition(ProcessDefinition processDefinition) {
    if (! this.equals(processDefinition)) {
      throw new JbpmException("can't set the process-definition-property of a process defition to something else then a self-reference");
    }
  }
View Full Code Here

TOP

Related Classes of org.jbpm.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.