Package de.danet.an.workflow.omgcore

Examples of de.danet.an.workflow.omgcore.CannotStopException


  updateState (RunningState.RUNNING);
    }

    /* Comment copied from Interface. */
    public void terminate () throws CannotStopException, NotRunningException {
  throw new CannotStopException(toString() + " cannot be terminated.");
    }
View Full Code Here


  throw new CannotStopException(toString() + " cannot be terminated.");
    }

    /* Comment copied from Interface. */
    public void abort () throws CannotStopException, NotRunningException {
  throw new CannotStopException(toString() + " cannot be aborted.");
    }
View Full Code Here

          // the better, make checkstyle happy
          int dummy = 0;
      }
      p.abort ();
        } catch (CannotSuspendException ee) {
      throw new CannotStopException
          ("To be aborted sub-process cannot be suspended: "
           + e.getMessage ());
        } catch (NotRunningException ee) {
      // may safely by ignored, make checkstyle happy
      continue;
View Full Code Here

    public void terminate () throws CannotStopException, NotRunningException {
  mayCloseCheck (ClosedState.TERMINATED);
  try {
      terminateImpl ();
  } catch (ApplicationNotStoppedException e) {
      throw new CannotStopException
    ("Cannot terminate, application not stopped: "
     + e.getMessage());
  }
  setPaWaitOnProc (null);
  setPaWaitOnChan (null);
View Full Code Here

      throw new NotRunningException
    ("Cannot terminate "+toString()+", process already closed.");
  }
  if (!validTypedStates().contains (s)) {
      if (typedState().isSameOrSubState(OpenState.RUNNING)) {
    throw new CannotStopException(toString() + " is " + state());
      } else {
    throw new NotRunningException (toString() + " is " + state());
      }
  }
    }
View Full Code Here

    }
      } finally {
    setPaTypedState(SuspendedState.SUSPENDED);
      }
      if (unstoppable != null) {
    throw new CannotStopException (unstoppable);
      }
  }
  updateState(ClosedState.ABORTED);
    }
View Full Code Here

    private void mayCloseCheck (ClosedState s)
  throws CannotStopException, NotRunningException {
  if (!validTypedStates().contains (s)) {
      if (typedState().isSameOrSubState(OpenState.RUNNING)) {
    throw new CannotStopException(toString() + " is " + state());
      } else {
    throw new NotRunningException (toString() + " is " + state());
      }
  }
    }
View Full Code Here

      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.");
    }
      }
      String unstoppable = null;
      try {
    setPaTypedState(RunningState.TERMINATING);
    for (Iterator it = stepsLocal().iterator(); it.hasNext();) {
        ActivityLocal act = (ActivityLocal)it.next();
        if (act.workflowState() == State.OPEN
      && (!act.typedState().isSameOrSubState
          (NotRunningState.NOT_STARTED))) {
      try {
          act.terminate();
      } catch (CannotStopException e) {
          unstoppable = act.toString()
        + " cannot be terminated: " + e.getMessage();
      } catch (NotRunningException e) {
          // cannot happen
          logger.error (e.getMessage(), e);
      }
        }
    }
      } finally {
    setPaTypedState(RunningState.RUNNING);
      }
      if (unstoppable != null) {
    throw new CannotStopException (unstoppable);
      }
  }
  updateState(ClosedState.TERMINATED);
    }
View Full Code Here

TOP

Related Classes of de.danet.an.workflow.omgcore.CannotStopException

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.