Package de.danet.an.workflow.omgcore.WfExecutionObject

Examples of de.danet.an.workflow.omgcore.WfExecutionObject.State


    }

    /* Comment copied from Interface. */
    public boolean choose (ExtActivityLocal activity)
  throws TransitionNotAllowedException {
  State state = activity.typedState ();
  if (state.isSameOrSubState (NotRunningState.NOT_STARTED)) {
      // this activity has been reset by some other activity
      return false;
  }
  if (!state.isSameOrSubState (OpenState.RUNNING)
      && !state.isSameOrSubState (NotRunningState.SUSPENDED)) {
      throw new TransitionNotAllowedException
    ("Cannot choose activity in state " + state + " must be "
     + OpenState.RUNNING + " or " + NotRunningState.SUSPENDED);
  }
  if (!activity.preliminarilyChosen ()) {
View Full Code Here


        NotRunningException {
  mayCloseCheck (ClosedState.TERMINATED);
  if (stepsLocal() != null) {
      for (Iterator it = stepsLocal().iterator(); it.hasNext();) {
    ActivityLocal act = (ActivityLocal)it.next();
    State s = act.typedState();
    if (s.isSameOrSubState(NotRunningState.SUSPENDED)
        || s == ClosedState.ABORTED) {
        throw new CannotStopException
      (act.toString() + " is suspended.");
    }
      }
View Full Code Here

  try {
      if (!(event instanceof WfStateAuditEvent)) {
    return false;
      }
      if (event.eventType().equals(WfAuditEvent.ACTIVITY_STATE_CHANGED)) {
    State newState = State.fromString
        (((WfStateAuditEvent)event).newState());
    if (newState.isSameOrSubState(State.CLOSED)) {
        return true;
    }
      } else if (event.eventType()
           .equals(WfAuditEvent.PROCESS_STATE_CHANGED)) {
    State oldState = State.fromString
        (((WfStateAuditEvent)event).oldState());
    State newState = State.fromString
        (((WfStateAuditEvent)event).newState());
    if (oldState.isSameOrSubState(NotRunningState.NOT_STARTED)) {
        if (newState == RunningState.RUNNING) {
      return true;
        }
View Full Code Here

  if (event.activityKey() == null) {
      super.handleAuditEvent (event);
      return;
  }
  // One of our activities has closed (events are pre-filtered)
  State ps = typedState();
  if (ps.isSameOrSubState(RunningState.TERMINATING)
      || ps.isSameOrSubState(SuspendedState.ABORTING)) {
      return;
  }
  State closedState = null;
  try {
      closedState = State.fromString
    (((WfStateAuditEvent)event).newState());
  } catch (InvalidStateException e) {
      // actually, this is impossible
      logger.error (e.getMessage ());
      return;
  }
  if (closedState.isSameOrSubState (ClosedState.ABORTED)) {
      if (ps.isSameOrSubState(OpenState.RUNNING)) {
    updateInterim (SuspendedState.SUSPENDED);
      } else if ((! ps.isSameOrSubState (NotRunningState.SUSPENDED))) {
    return;
      }
View Full Code Here

    private void continueProcessing () {
  // checkAllActivities
  TransitionManager tm = transitionManager();
  if (tm.isAtEnd()) {
      State resState = ClosedCompletedState.NORMAL;
      for (Iterator i = stepsLocal().iterator(); i.hasNext();) {
    State s = ((ActivityLocal)i.next()).typedState();
    if (s.isSameOrSubState (ClosedState.TERMINATED)) {
        resState = ClosedState.TERMINATED;
        break; // can't get worse, aborted activity
        // is handled separately.
    }
      }
View Full Code Here

TOP

Related Classes of de.danet.an.workflow.omgcore.WfExecutionObject.State

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.