Package org.jbpm.pvm.internal.model

Examples of org.jbpm.pvm.internal.model.Transition


    DbSession taskDbSession = Environment
        .getFromCurrent(DbSession.class);
    TaskImpl task = (TaskImpl) taskDbSession.findTaskByExecution(execution);
    task.setSignalling(false);
   
    Transition transition = null;
    List<Transition> outgoingTransitions = activity.getOutgoingTransitions();
    if ( (outgoingTransitions!=null)
         && (!outgoingTransitions.isEmpty())
       ) {
      transition = activity.findOutgoingTransition(signalName);
View Full Code Here


       ) {
      throw new JbpmException("expression '"+expr+"' in decision '"+activity.getName()+"' returned "+result.getClass().getName()+" instead of a transitionName (String): "+result);
    }
    transitionName = (String) result;
   
    Transition transition = activity.getOutgoingTransition(transitionName);
    if (transition==null) {
      throw new JbpmException("expression '"+expr+"' in decision '"+activity.getName()+"' returned unexisting outgoing transition name: "+transitionName);
    }
   
    execution.historyDecision(transitionName);
View Full Code Here

      throw new JbpmException("no decision handler specified");
    }
   
    transitionName = usedDecisionHandler.decide(execution);

    Transition transition = activity.getOutgoingTransition(transitionName);
    if (transition==null) {
      throw new JbpmException("handler in decision '"+activity.getName()+"' returned unexisting outgoing transition name: "+transitionName);
    }
   
    execution.historyDecision(transitionName);
View Full Code Here

    Activity activity = execution.getActivity();
   
    // if this is a single, non concurrent root
    if (Execution.STATE_ACTIVE_ROOT.equals(execution.getState())) {
      // just pass through
      Transition transition = activity.getDefaultOutgoingTransition();
      if (transition==null) {
        throw new JbpmException("join must have an outgoing transition");
      }
      execution.take(transition);
     
    } else if (Execution.STATE_ACTIVE_CONCURRENT.equals(execution.getState())) {
     
      // force version increment in the parent execution
      Session session = Environment.getFromCurrent(Session.class);
      session.lock(execution.getParent(), lockMode);

      execution.setState(Execution.STATE_INACTIVE_JOIN);
      execution.waitForSignal();

      ExecutionImpl concurrentRoot = execution.getParent();
      List<ExecutionImpl> joinedExecutions = getJoinedExecutions(concurrentRoot, activity);
     
      if (isComplete(joinedExecutions, activity)) {
        endJoinedExecutions(joinedExecutions);

        ExecutionImpl outgoingExecution = null;
        if (concurrentRoot.getExecutions().size()==0) {
          outgoingExecution = concurrentRoot;
          outgoingExecution.setState(Execution.STATE_ACTIVE_ROOT);
        } else {
          outgoingExecution = concurrentRoot.createExecution();
          outgoingExecution.setState(Execution.STATE_ACTIVE_CONCURRENT);
        }

        execution.setActivity(activity, outgoingExecution);
        Transition transition = activity.getDefaultOutgoingTransition();
        if (transition==null) {
          throw new JbpmException("join must have an outgoing transition");
        }
        outgoingExecution.take(transition);
      }
View Full Code Here

  public void signal(ActivityExecution execution, String signalName, Map<String, ?> parameters) throws Exception {
    signal((ExecutionImpl)execution, signalName, parameters);
  }

  public void signal(ExecutionImpl execution, String signalName, Map<String, ?> parameters) throws Exception {
    Transition transition = null;
    Activity activity = execution.getActivity();
    List<Transition> outgoingTransitions = activity.getOutgoingTransitions();
   
    int nbrOfOutgoingTransitions  = (outgoingTransitions!=null ? outgoingTransitions.size() : 0);
    if ( (signalName==null)
View Full Code Here

      execution.setVariables(parameters);
    }
   
    execution.fire(signalName, activity);
   
    Transition transition = null;
    if ( (signalName==null)
         && (activity.getOutgoingTransitions()!=null)
         && (activity.getOutgoingTransitions().size()==1)
       ) {
      transition = activity.getOutgoingTransitions().get(0);
View Full Code Here

  public void execute(ActivityExecution execution) {
    execute((ExecutionImpl) execution);
  }
 
  public void execute(ExecutionImpl execution) {
    Transition transition = findTransition(execution);
    if (transition==null) {
      throw new JbpmException("no outgoing transition condition evaluated to true for decision "+execution.getActivity());
    }
    if (transition.getName()!=null) {
      execution.historyDecision(transition.getName());
    }
    execution.take(transition);
  }
View Full Code Here

      // if the end activity itself has an outgoing transition
      // (such end activities should be drawn on the border of the group)
      if ( (outgoingTransitions!=null)
              && (outgoingTransitions.size()==1)
          ) {
         Transition outgoingTransition = outgoingTransitions.get(0);
         // taking the transition that goes over the group boundaries will
         // destroy the scope automatically (see atomic operation TakeTransition)
         execution.take(outgoingTransition);

      } else {
View Full Code Here

  public void execute(ActivityExecution execution) throws Exception {
    execute((ExecutionImpl) execution);
  }
 
  public void execute(ExecutionImpl execution) throws Exception {
    Transition transition = findTransitionUsingConditions(execution);
    if (transition==null) {
      throw new JbpmException("no outgoing transition condition evaluated to true for decision "+execution.getActivity());
    }
    if (transition.getName()!=null) {
      execution.historyDecision(transition.getName());
    }
    execution.take(transition);
  }
View Full Code Here

    DbSession taskDbSession = EnvironmentImpl .getFromCurrent(DbSession.class);
    TaskImpl task = (TaskImpl) taskDbSession.findTaskByExecution(execution);
    task.setSignalling(false);
   
    Transition transition = null;
    List<Transition> outgoingTransitions = activity.getOutgoingTransitions();
   
    if ( (outgoingTransitions!=null) && (!outgoingTransitions.isEmpty()) ) {
     
      // Lookup the outgoing transition
View Full Code Here

TOP

Related Classes of org.jbpm.pvm.internal.model.Transition

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.