snippets/data-in-processes/src/main/java/org/camunda/consulting/patterns/guard/GuardBpmnParseListener.java
private void addExecutionListener(final ActivityImpl activity) {
    final String guardClass = guardClass(activity);

    if (isNotBlank(guardClass)) {
      activity.addExecutionListener(ExecutionListener.EVENTNAME_START, classDelegateFor(guardClass));
      activity.addExecutionListener(ExecutionListener.EVENTNAME_END, classDelegateFor(guardClass));
    }
  }
private void addExecutionListener(final ActivityImpl activity) {
    final String guardClass = guardClass(activity);

    if (isNotBlank(guardClass)) {
      activity.addExecutionListener(ExecutionListener.EVENTNAME_START, classDelegateFor(guardClass));
      activity.addExecutionListener(ExecutionListener.EVENTNAME_END, classDelegateFor(guardClass));
    }
  }
Adds aa {@link ActivityGuard} on {@link ExecutionListener#EVENTNAME_START}
and {@link ExecutionListener#EVENTNAME_END} if one is configured in the
properties file.

@param activity
the current Activity in process