Package de.danet.an.workflow.omgcore

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


      if (newState == ClosedState.ABORTED) {
    abort ();
    return;
      }
  } catch (NotRunningException e) {
      throw new TransitionNotAllowedException
    (e.getClass().getName() + ": " + e.getMessage());
  } catch (InvalidControlOperationException e) {
      throw new TransitionNotAllowedException
    (e.getClass().getName() + ": " + e.getMessage());
  }
  throw new TransitionNotAllowedException
      (toString() + " from " + state() + " to " + newState.toString());
    }
View Full Code Here


      if (newState.isSameOrSubState(ClosedState.COMPLETED)) {
    complete ();
    return;
      }
  } catch (CannotCompleteException e) {
      throw new TransitionNotAllowedException
    (e.getClass().getName() + ": " + e.getMessage());
  }
        if (typedState().isSameOrSubState(SuspendedState.ABANDONING)
            && newState.isSameOrSubState(SuspendedState.CLEARING_EXCEPTION)) {
            updateImmediate(SuspendedState.SUSPENDED);
            return;
        }
  if (getPaDebug ()) {
      State oldState = typedState ();
      if (newState == DebugState.FORWARDING_EXCEPTION
    && STATE_TO_SUB_STATE.containsKey(oldState)) {
    setPaSubStateBackup
        (((Integer)STATE_TO_SUB_STATE.get(oldState)).intValue());
    setPaTypedState (newState);
    return;
      }
      if (newState == DebugState.AWAITING_EXCEPTION) {
    if (oldState == DebugState.ABANDONING) {
        // Proceed from abandoning
        setPaTypedState (newState);
        return;
    }
    throw new TransitionNotAllowedException
        ("Change to " + DebugState.AWAITING_EXCEPTION
         + " is only allowed from " + DebugState.ABANDONING);
      }
      if (oldState.isSameOrSubState (RunningState.DEBUG)) {
    if (!newState.isSameOrSubState (OpenState.RUNNING)
        && !(oldState == DebugState.INVOKING
       && newState.isSameOrSubState
                            (NotRunningState.SUSPENDED))) {
        throw new TransitionNotAllowedException
      ("Only valid change from debug states is to "
       + OpenState.RUNNING + " or sub-state");
    }

    // Resume closing with the proper state.
View Full Code Here

     * been preliminarily chosen
     */
    public void withdrawPreliminaryChoice (boolean reset)
  throws TransitionNotAllowedException {
  if (!getPaPreliminarilyChosen ()) {
      throw new TransitionNotAllowedException
    (this + " is not in state preliminary chosen");
  }
  setPaPreliminarilyChosen (false);
  if (!reset) {
      return;
View Full Code Here

  // normal procedures. Note that having a running tool implies
        // that the activity is running or suspended
   if ((getPaExecStat().intValue() <= 0
       || getPaExecStat().intValue() == Integer.MAX_VALUE)
      && !typedState().isSameOrSubState (DebugState.COMPLETING)) {
       throw new TransitionNotAllowedException ("No tool executing");
   }
       
        if (result.suspendActivity()) {
            // Everything that is usually done when suspend() is called is
            // either not applicable or indirectly done here. Suspending
View Full Code Here

  try {
      pdd = pddHome.create();
      pdd.setEnabled
    (packageId, processId, newState == WfProcessMgr.ENABLED);
  } catch (InvalidKeyException ivke) {
      throw new TransitionNotAllowedException(ivke.getMessage());
  } catch (CreateException ce) {
      logger.error (ce.getMessage(), ce);
      throw new RemoteException(ce.getMessage());
  } finally {
      EJBUtil.removeSession (pdd);
View Full Code Here

      // 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 ()) {
      return true;
View Full Code Here

    && newState == OpenState.RUNNING) {
    start ();
    return;
      }
  } catch (CannotStartException e) {
      throw new TransitionNotAllowedException
    (e.getClass().getName() + ": " + e.getMessage());
  } catch (AlreadyRunningException e) {
      throw new TransitionNotAllowedException
    (e.getClass().getName() + ": " + e.getMessage());
  }
  super.changeState (newState);
    }
View Full Code Here

TOP

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

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.