Exemplo n.º 1
0
  public void execute(ActivityExecution execution) throws Exception {
    List<PvmActivity> startActivities = new ArrayList<PvmActivity>();
    for (PvmActivity activity : execution.getActivity().getActivities()) {
      if (activity.getIncomingTransitions().isEmpty()) {
        startActivities.add(activity);
      }
    }

    for (PvmActivity startActivity : startActivities) {
      execution.executeActivity(startActivity);
    }
  }
Exemplo n.º 2
0
 @SuppressWarnings("unchecked")
 public void timerFires(ActivityExecution execution, String signalName, Object signalData)
     throws Exception {
   PvmActivity timerActivity = execution.getActivity();
   boolean isInterrupting = (Boolean) timerActivity.getProperty("isInterrupting");
   List<ActivityExecution> recyclableExecutions = null;
   if (isInterrupting) {
     recyclableExecutions = removeAllExecutions(execution);
   } else {
     recyclableExecutions = Collections.EMPTY_LIST;
   }
   execution.takeAll(timerActivity.getOutgoingTransitions(), recyclableExecutions);
 }