Ejemplo n.º 1
0
  public void signal(ExecutionImpl execution, String signalName, Map<String, ?> parameters)
      throws Exception {
    Activity activity = execution.getActivity();

    if (parameters != null) {
      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);
    } else {
      transition = activity.findOutgoingTransition(signalName);
    }

    if (transition != null) {
      execution.historyActivityEnd(signalName);
      execution.take(transition);
    } else {
      execution.waitForSignal();
    }
  }
Ejemplo n.º 2
0
  public void execute(ExecutionImpl execution) {
    execution.historyActivityStart();

    execution.waitForSignal();
  }