Examples of ExecutionListener


Examples of org.camunda.bpm.engine.delegate.ExecutionListener

  public void testExecutionListenerWithSignalBoundaryEvent() {
    final AtomicInteger eventCount = new AtomicInteger();

    EmbeddedProcessApplication processApplication = new EmbeddedProcessApplication() {
      public ExecutionListener getExecutionListener() {
        return new ExecutionListener() {
          public void notify(DelegateExecution execution) throws Exception {
            eventCount.incrementAndGet();
          }
        };
      }
View Full Code Here

Examples of org.camunda.bpm.engine.delegate.ExecutionListener

    if (extentionsElement != null) {
      List<Element> listenerElements = extentionsElement.elementsNS(BpmnParser.ACTIVITI_BPMN_EXTENSIONS_NS, "executionListener");
      for (Element listenerElement : listenerElements) {
        String eventName = listenerElement.attribute("event");
        if (isValidEventNameForScope(eventName, listenerElement)) {
          ExecutionListener listener = parseExecutionListener(listenerElement);
          if (listener != null) {
            scope.addExecutionListener(eventName, listener);
          }
        }
      }
View Full Code Here

Examples of org.camunda.bpm.engine.delegate.ExecutionListener

  public void parseExecutionListenersOnTransition(Element activitiElement, TransitionImpl activity) {
    Element extensionElements = activitiElement.element("extensionElements");
    if (extensionElements != null) {
      List<Element> listenerElements = extensionElements.elementsNS(BpmnParser.ACTIVITI_BPMN_EXTENSIONS_NS, "executionListener");
      for (Element listenerElement : listenerElements) {
        ExecutionListener listener = parseExecutionListener(listenerElement);
        if (listener != null) {
          // Since a transition only fires event 'take', we don't parse the
          // event attribute, it is ignored
          activity.addExecutionListener(listener);
        }
View Full Code Here

Examples of org.camunda.bpm.engine.delegate.ExecutionListener

   *
   * @param executionListenerElement
   *          the XML element containing the executionListener definition.
   */
  public ExecutionListener parseExecutionListener(Element executionListenerElement) {
    ExecutionListener executionListener = null;

    String className = executionListenerElement.attribute("class");
    String expression = executionListenerElement.attribute("expression");
    String delegateExpression = executionListenerElement.attribute("delegateExpression");
    Element scriptElement = executionListenerElement.elementNS(BpmnParser.ACTIVITI_BPMN_EXTENSIONS_NS, "script");
View Full Code Here

Examples of org.camunda.bpm.engine.delegate.ExecutionListener

public class ExecutionListenerProcessApplication extends ServletProcessApplication {

  public static final String LISTENER_INVOCATION_COUNT = "listenerInvocationCount";

  public ExecutionListener getExecutionListener() {
    return new ExecutionListener() {
      public void notify(DelegateExecution execution) throws Exception {

        int listenerInvocationCount = 0;

        if(execution.hasVariable(LISTENER_INVOCATION_COUNT)) {
View Full Code Here

Examples of org.camunda.bpm.engine.delegate.ExecutionListener

    if (extentionsElement != null) {
      List<Element> listenerElements = extentionsElement.elementsNS(BpmnParser.ACTIVITI_BPMN_EXTENSIONS_NS, "executionListener");
      for (Element listenerElement : listenerElements) {
        String eventName = listenerElement.attribute("event");
        if (isValidEventNameForScope(eventName, listenerElement)) {
          ExecutionListener listener = parseExecutionListener(listenerElement);
          if (listener != null) {
            scope.addExecutionListener(eventName, listener);
          }
        }
      }
View Full Code Here

Examples of org.camunda.bpm.engine.delegate.ExecutionListener

  public void parseExecutionListenersOnTransition(Element activitiElement, TransitionImpl activity) {
    Element extensionElements = activitiElement.element("extensionElements");
    if (extensionElements != null) {
      List<Element> listenerElements = extensionElements.elementsNS(BpmnParser.ACTIVITI_BPMN_EXTENSIONS_NS, "executionListener");
      for (Element listenerElement : listenerElements) {
        ExecutionListener listener = parseExecutionListener(listenerElement);
        if (listener != null) {
          // Since a transition only fires event 'take', we don't parse the
          // event attribute, it is ignored
          activity.addExecutionListener(listener);
        }
View Full Code Here

Examples of org.camunda.bpm.engine.delegate.ExecutionListener

   *
   * @param executionListenerElement
   *          the XML element containing the executionListener definition.
   */
  public ExecutionListener parseExecutionListener(Element executionListenerElement) {
    ExecutionListener executionListener = null;

    String className = executionListenerElement.attribute("class");
    String expression = executionListenerElement.attribute("expression");
    String delegateExpression = executionListenerElement.attribute("delegateExpression");
    Element scriptElement = executionListenerElement.elementNS(BpmnParser.ACTIVITI_BPMN_EXTENSIONS_NS, "script");
View Full Code Here

Examples of ptolemy.actor.ExecutionListener

    }

    private void fireExecutionFinished(final boolean stoppedInError) {
        // Erwin : 18205
        for (final ExecutionListener executionListener : executionListeners) {
            final ExecutionListener listener = executionListener;
            if (!stoppedInError) {
                listener.executionFinished(null);
            } else {
                listener.executionError(null, null);
            }
        }
    }
View Full Code Here

Examples of ptolemy.actor.ExecutionListener

        this.executionListeners.add(execListener);
    }

    private void fireExecutionFinished() {
        for (ExecutionListener executionListener : executionListeners) {
            ExecutionListener listener = executionListener;
            listener.executionFinished(null);
        }
    }
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.