Java Code Examples for org.camunda.bpm.engine.impl.pvm.process.ActivityImpl#addListener()

The following examples show how to use org.camunda.bpm.engine.impl.pvm.process.ActivityImpl#addListener() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LocalBpmnParseListener.java    From wecube-platform with Apache License 2.0 5 votes vote down vote up
@Override
public void parseSubProcess(Element subProcessElement, ScopeImpl scope, ActivityImpl activity) {
    log.info("add listener {} {}", ExecutionListener.EVENTNAME_START, subProcessStartListener.getClass().getSimpleName());
    log.info("add listener {} {}", ExecutionListener.EVENTNAME_END, subProcessEndListener.getClass().getSimpleName());
    activity.addListener(ExecutionListener.EVENTNAME_START, subProcessStartListener);
    activity.addListener(ExecutionListener.EVENTNAME_END, subProcessEndListener);
}
 
Example 2
Source File: LocalBpmnParseListener.java    From wecube-platform with Apache License 2.0 5 votes vote down vote up
@Override
public void parseServiceTask(Element serviceTaskElement, ScopeImpl scope, ActivityImpl activity) {
    log.info("add listener {} {}", ExecutionListener.EVENTNAME_START, serviceTaskStartListener.getClass().getSimpleName());
    log.info("add listener {} {}", ExecutionListener.EVENTNAME_END, serviceTaskEndListener.getClass().getSimpleName());
    activity.addListener(ExecutionListener.EVENTNAME_START, serviceTaskStartListener);
    activity.addListener(ExecutionListener.EVENTNAME_END, serviceTaskEndListener);
}
 
Example 3
Source File: LocalBpmnParseListener.java    From wecube-platform with Apache License 2.0 5 votes vote down vote up
@Override
public void parseUserTask(Element userTaskElement, ScopeImpl scope, ActivityImpl activity) {
    log.info("add listener {} {}", ExecutionListener.EVENTNAME_START, userTaskStartListener.getClass().getSimpleName());
    log.info("add listener {} {}", ExecutionListener.EVENTNAME_END, userTaskEndListener.getClass().getSimpleName());
    activity.addListener(ExecutionListener.EVENTNAME_START, userTaskStartListener);
    activity.addListener(ExecutionListener.EVENTNAME_END, userTaskEndListener);
}
 
Example 4
Source File: PublishDelegateParseListener.java    From camunda-bpm-spring-boot-starter with Apache License 2.0 5 votes vote down vote up
private void addExecutionListener(final ActivityImpl activity) {
  if (executionListener != null) {
    for (String event : EXECUTION_EVENTS) {
      activity.addListener(event, executionListener);
    }
  }
}
 
Example 5
Source File: PublishDelegateParseListener.java    From camunda-bpm-platform with Apache License 2.0 5 votes vote down vote up
private void addExecutionListener(final ActivityImpl activity) {
  if (executionListener != null) {
    for (String event : EXECUTION_EVENTS) {
      activity.addListener(event, executionListener);
    }
  }
}
 
Example 6
Source File: LocalBpmnParseListener.java    From wecube-platform with Apache License 2.0 4 votes vote down vote up
@Override
public void parseEndEvent(Element endEventElement, ScopeImpl scope, ActivityImpl activity) {
    log.info("add listener {} {}", ExecutionListener.EVENTNAME_END, endEventListener.getClass().getSimpleName());
    activity.addListener(ExecutionListener.EVENTNAME_END, endEventListener);
}
 
Example 7
Source File: RegisterAllBpmnParseListener.java    From camunda-bpm-reactor with Apache License 2.0 4 votes vote down vote up
void addExecutionListener(final ActivityImpl activity) {
  for (final String event : EXECUTION_EVENTS) {
    activity.addListener(event, executionListener);
  }
}