All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.ow2.bonita.runtime.TransitionStatus Maven / Gradle / Ivy

/**
 * Copyright (C) 2007  Bull S. A. S.
 * Bull, Rue Jean Jaures, B.P.68, 78340, Les Clayes-sous-Bois
 * This library is free software; you can redistribute it and/or modify it under the terms
 * of the GNU Lesser General Public License as published by the Free Software Foundation
 * version 2.1 of the License.
 * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU Lesser General Public License for more details.
 * You should have received a copy of the GNU Lesser General Public License along with this
 * program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
 * Floor, Boston, MA  02110-1301, USA.
 **/
package org.ow2.bonita.runtime;

import org.ow2.bonita.pvm.model.Transition;



/**
 * @author Guillaume Porcher
 *
 */
public class TransitionStatus {

  public enum TransitionState {
    /**
     * Transition is ready to be taken
     */
    READY,
    /**
     * An execution has taken this transition.
     * However, the destination node has not been executed
     * (e.g. node execution is asynchronous)
     */
    TAKEN,
    /**
     * An execution has taken this transition
     * and the destination node has been executed.
     */
    ARRIVED,
    /**
     * This transition cannot be taken.
     * This has been aborted by the system (e.g. by a join XOR)
     */
    ABORTED
  }

  protected Transition transition;
  protected TransitionState state;

  protected TransitionStatus() { }

  public TransitionStatus(final Transition transition) {
    this.transition = transition;
    this.state = TransitionState.READY;
  }
  public Transition getTransition() {
    return this.transition;
  }
  public void setState(final TransitionState state) {
    this.state = state;
  }
  public TransitionState getState() {
    return this.state;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy