Examples of PvmTransition


Examples of org.activiti.engine.impl.pvm.PvmTransition

 
      log.fine("recyclable executions for reused: " + recyclableExecutions);
     
      // first create the concurrent executions
      while (!transitions.isEmpty()) {
        PvmTransition outgoingTransition = transitions.remove(0);

        ExecutionImpl outgoingExecution = null;
        if (recyclableExecutions.isEmpty()) {
          outgoingExecution = concurrentRoot.createExecution();
          log.fine("new "+outgoingExecution+" created to take transition "+outgoingTransition);
View Full Code Here

Examples of org.activiti.engine.impl.pvm.PvmTransition

      }

    } else {

      if (defaultSequenceFlow != null) {
        PvmTransition defaultTransition = execution.getActivity().findOutgoingTransition(defaultSequenceFlow);
        if (defaultTransition != null) {
          execution.take(defaultTransition);
        } else {
          throw new ActivitiException("Default sequence flow '" + defaultSequenceFlow + "' could not be not found");
        }
View Full Code Here

Examples of org.activiti.engine.impl.pvm.PvmTransition

   
    if (log.isLoggable(Level.FINE)) {
      log.fine("Leaving activity '" + execution.getActivity().getId() + "'");
    }
   
    PvmTransition outgoingSeqFlow = null;
    String defaultSequenceFlow = (String) execution.getActivity().getProperty("default");
    Iterator<PvmTransition> transitionIterator = execution.getActivity().getOutgoingTransitions().iterator();
    while (outgoingSeqFlow == null && transitionIterator.hasNext()) {
      PvmTransition seqFlow = transitionIterator.next();
     
      Condition condition = (Condition) seqFlow.getProperty(BpmnParse.PROPERTYNAME_CONDITION);
      if ( (condition == null && (defaultSequenceFlow == null || !defaultSequenceFlow.equals(seqFlow.getId())) )
              || (condition != null && condition.evaluate(execution)) ) {
        if (log.isLoggable(Level.FINE)) {
          log.fine("Sequence flow '" + seqFlow.getId() + " '"
                  + "selected as outgoing sequence flow.");
        }
        outgoingSeqFlow = seqFlow;
      }
    }
   
    if (outgoingSeqFlow != null) {
      execution.take(outgoingSeqFlow);
    } else {
     
      if (defaultSequenceFlow != null) {
        PvmTransition defaultTransition = execution.getActivity().findOutgoingTransition(defaultSequenceFlow);
        if (defaultTransition != null) {
          execution.take(defaultTransition);
        } else {
          throw new ActivitiException("Default sequence flow '" + defaultSequenceFlow + "' not found");
        }
View Full Code Here

Examples of org.activiti.engine.impl.pvm.PvmTransition

* @author Tom Baeyens
*/
public class Automatic implements ActivityBehavior {

  public void execute(ActivityExecution activityContext) throws Exception {
    PvmTransition defaultOutgoingTransition = activityContext.getActivity().getOutgoingTransitions().get(0);
    activityContext.take(defaultOutgoingTransition);
  }
View Full Code Here

Examples of org.activiti.engine.impl.pvm.PvmTransition

    // remain pointing to the current activity until execution.event(Object) is called.
    // That method will delegate to the method below. 
  }

  public void signal(ActivityExecution execution, String signalName, Object event) {
    PvmTransition transition = findTransition(execution, signalName);
    execution.take(transition);
  }
View Full Code Here

Examples of org.activiti.engine.impl.pvm.PvmTransition

* @author Tom Baeyens
*/
public class Decision implements ActivityBehavior {

  public void execute(ActivityExecution execution) throws Exception {
    PvmTransition transition = null;
    String creditRating = (String) execution.getVariable("creditRating");
    if (creditRating.equals("AAA+")) {
      transition = execution.getActivity().findOutgoingTransition("wow");
    } else if (creditRating.equals("Aaa-")) {
      transition = execution.getActivity().findOutgoingTransition("nice");
View Full Code Here

Examples of org.activiti.engine.impl.pvm.PvmTransition

          execution.takeAll(transitionsToTake, joinedExecutions);

        } else {

          if (defaultSequenceFlow != null) {
            PvmTransition defaultTransition = execution.getActivity().findOutgoingTransition(defaultSequenceFlow);
            if (defaultTransition != null) {
              execution.take(defaultTransition);
            } else {
              throw new ActivitiException("Default sequence flow '" + defaultSequenceFlow + "' could not be not found");
            }
View Full Code Here

Examples of org.activiti.engine.impl.pvm.PvmTransition

      for (ActivityExecution concurrentExecution: execution.getParent().getExecutions()) {
        if (concurrentExecution.isActive() && concurrentExecution.getActivity() != activity) {
         
          // TODO: when is transitionBeingTaken cleared? Should we clear it?
          boolean reachable = false;
          PvmTransition pvmTransition = ((ExecutionEntity) concurrentExecution).getTransitionBeingTaken();
          if (pvmTransition != null) {
            reachable = isReachable(pvmTransition.getDestination(), activity, new HashSet<PvmActivity>());
          } else {
            reachable = isReachable(concurrentExecution.getActivity(), activity, new HashSet<PvmActivity>());
          }
         
          if(reachable) {
View Full Code Here

Examples of org.activiti.engine.impl.pvm.PvmTransition

    PvmActivity end = processDefinition.findActivity("end");
    assertNotNull(end);
    assertEquals("end", end.getId());
   
    PvmTransition transition = outgoingTransitions.get(0);
    assertEquals("flow1", transition.getId());
    assertEquals("Flow One", transition.getProperty("name"));
    assertEquals("The only transitions in the process", transition.getProperty("documentation"));
    assertSame(start, transition.getSource());
    assertSame(end, transition.getDestination());
   
    repositoryService.deleteDeployment(deploymentId);
  }
View Full Code Here

Examples of org.camunda.bpm.engine.impl.pvm.PvmTransition

    PvmActivity end = processDefinition.findActivity("end");
    assertNotNull(end);
    assertEquals("end", end.getId());
   
    PvmTransition transition = outgoingTransitions.get(0);
    assertEquals("flow1", transition.getId());
    assertEquals("Flow One", transition.getProperty("name"));
    assertEquals("The only transitions in the process", transition.getProperty("documentation"));
    assertSame(start, transition.getSource());
    assertSame(end, transition.getDestination());
   
    repositoryService.deleteDeployment(deploymentId);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.