Package org.jbpm

Examples of org.jbpm.JbpmException


      objectStream.writeObject(o);
      objectStream.flush();
      bytes = memoryStream.toByteArray();
    }
    catch (IOException e) {
      throw new JbpmException("could not serialize: " + o, e);
    }
    return new ByteArray(bytes);
  }
View Full Code Here


        objectStream = new ObjectInputStream(memoryStream);
      }
      return (Serializable) objectStream.readObject();
    }
    catch (IOException e) {
      throw new JbpmException("failed to read object", e);
    }
    catch (ClassNotFoundException e) {
      throw new JbpmException("serialized object class not found", e);
    }
  }
View Full Code Here

      if (node != null) {
        leavingTransition = node.getLeavingTransition(transitionName);
      }
    }
    if (leavingTransition == null) {
      throw new JbpmException("task node does not have leaving transition '" + transitionName + "'");
    }
    end(leavingTransition);
  }
View Full Code Here

  public void end(Transition transition) {
    if (this.end != null) {
      throw new IllegalStateException("task instance '" + id + "' is already ended");
    }
    if (this.isSuspended) {
      throw new JbpmException("task instance '" + id + "' is suspended");
    }

    // mark the end of this task instance
    this.end = Clock.getCurrentTime();
    this.isOpen = false;
View Full Code Here

  /**
   * suspends a process execution.
   */
  public void suspend() {
    if (!isOpen) {
      throw new JbpmException("a task that is not open cannot be suspended: " + toString());
    }
    isSuspended = true;
  }
View Full Code Here

  /**
   * resumes a process execution.
   */
  public void resume() {
    if (!isOpen) {
      throw new JbpmException("a task that is not open cannot be resumed: " + toString());
    }
    isSuspended = false;
  }
View Full Code Here

    try {
      if (eventSemaphore.tryAcquire(occurrences, timeout, TimeUnit.MILLISECONDS)) {
        log.debug("received '" + event + "' notification");
      }
      else {
        throw new JbpmException("event '" + event + "' did not occur within " + timeout + " ms");
      }
    }
    catch (InterruptedException e) {
      throw new JbpmException("wait for event '" + event + "' was interrupted", e);
    }
  }
View Full Code Here

   */
  public TokenVariableMap getOrCreateTokenVariableMap(Token token)
  {
    if (token == null)
    {
      throw new JbpmException("can't get variables for token 'null'");
    }

    // if the given token has a variable map
    TokenVariableMap tokenVariableMap = null;
    if ((tokenVariableMaps != null) && (tokenVariableMaps.containsKey(token)))
View Full Code Here

    return hasVariable;
  }

  public void deleteVariable(String name) {
    if (name==null) {
      throw new JbpmException("name is null");
    }
    if (hasVariableLocally(name)) {
      deleteVariableLocally(name);
    }
  }
View Full Code Here

    deleteVariableInstance(name);
  }

  public void setVariableLocally(String name, Object value) {
    if (name==null) {
      throw new JbpmException("name is null");
    }
   
    VariableInstance variableInstance = getVariableInstance(name);
    // if there is already a variable instance and it doesn't support the current type...
    if ( (variableInstance!=null)
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.