Package org.jbpm

Examples of org.jbpm.PvmException


  }

  /** @see Execution#lock(String) */
  public void lock(String state) {
    if (userCodeType==UserCodeType.EVENT_ACTIVITY) {
      throw new PvmException("lock is not allowed inside an event. only node behaviour activities can control the propagation of execution");
    }
    if (state==null) {
      throw new PvmException("given state is null");
    }
    checkLock();
    log.finest("locking "+this);
    this.state = state;
  }
View Full Code Here


  }
 
  /** @see Execution#unlock() */
  public void unlock() {
    if (STATE_ACTIVE.equals(state)) {
      throw new PvmException("state is already active");
    }
    log.finest("unlocking "+this);
    this.state = STATE_ACTIVE;
  }
View Full Code Here

  }
 
  /** @see Execution#end(String, boolean) */
  public void end(String state, boolean remove) {
    if (state==null) {
      throw new PvmException("state is null");
    }
    if (userCodeType==UserCodeType.EVENT_ACTIVITY) {
      throw new PvmException("end is not allowed inside an event. only node behaviour activities can control the propagation of execution");
    }
    log.finest(toString()+" ends with state "+state);
    lock(state);
    this.propagation = Propagation.EXPLICIT;
    fire(ProcessDefinition.EVENT_PROCESS_END, processDefinition);
View Full Code Here

  }

  /** @see Execution#cancel() */
  public void cancel() {
    if (userCodeType==UserCodeType.EVENT_ACTIVITY) {
      throw new PvmException("cancel is not allowed inside an event. only node behaviour activities can control the propagation of execution");
    }
    end(Execution.STATE_CANCELLED, true);
  }
View Full Code Here

  /** @see Execution#suspend() */
  public void suspend() {
    if ( userCodeType==UserCodeType.EVENT_ACTIVITY
         || userCodeType==UserCodeType.NODE_BEHAVIOUR) {
      throw new PvmException("suspend is not allowed inside an activity.");
    }
    if (isSuspended()) {
      throw new PvmException(toString()+" is suspended");
    }
    lock(STATE_SUSPENDED);
  }
View Full Code Here

  /** @see Execution#resume() */
  public void resume() {
    if (userCodeType==UserCodeType.EVENT_ACTIVITY
        || userCodeType==UserCodeType.NODE_BEHAVIOUR) {
      throw new PvmException("resume is not allowed inside an activity.");
    }
    if (! isSuspended()) {
      throw new PvmException(toString()+" is not suspended");
    }
    unlock();
  }
View Full Code Here

  // state : internal methods /////////////////////////////////////////////////

  protected void checkLock() {
    if (!STATE_ACTIVE.equals(state)) {
      throw new PvmException(toString()+" is not active: "+state);
    }
  }
View Full Code Here

       ) {
      variableScopes.remove(0);
    } else if (parent!=null) {
      parent.destroyVariableScope();
    } else {
      throw new PvmException("no variable scope to destroy");
    }
  }
View Full Code Here

  /** @see Execution#createExecution(String) */
  public ExecutionImpl createExecution(String name) {
    // creating a child execution implies that this execution
    // is not a leave any more and therefore, it is inactivated
    if (userCodeType==UserCodeType.EVENT_ACTIVITY) {
      throw new PvmException("createExecution is not allowed inside an event. only node behaviour activities can control the propagation of execution");
    }
    if (isActive()) {
      lock(STATE_INACTIVE);
      propagation = Propagation.EXPLICIT;
    }
View Full Code Here

 
  // extensions ///////////////////////////////////////////////////////////////

  public <T> T getExtension(Class<T> extensionClass) {
    if (extensionClass==null) {
      throw new PvmException("extensionClass is null");
    }
    throw new PvmException("unsuppported extension "+extensionClass.getName());
  }
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.