package org.camunda.bpm.extension.reactor.bus;


import org.camunda.bpm.extension.reactor.bus.SelectorBuilder.Context;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface CamundaSelector {

  public String type() default "";
  public String element() default "";
  public String process() default "";
  public String event() default "";
  public Context context() default Context.bpmn;

}

@@ -46,79 +46,8 @@
 ;%0A%0A%0A
-import org.camunda.bpm.extension.reactor.bus.SelectorBuilder.Context;%0A%0A
 impo
@@ -83,16 +83,16 @@
 ntType;%0A
+
 import j
@@ -204,16 +204,87 @@
 arget;%0A%0A
+import org.camunda.bpm.extension.reactor.bus.SelectorBuilder.Context;%0A%0A
 @Retenti
@@ -376,22 +376,240 @@
 or %7B%0A%0A  
-public
+/**%0A   * Restrict listening to a certain activity type. You can use the type constants provided by %7B@link org.camunda.bpm.engine.ActivityTypes%7D.%0A   *%0A   * @return am activity type or %22%22 (meaning: all activity types).%0A   */%0A 
  String 
@@ -631,54 +631,415 @@
 %22%22;%0A
+%0A
   
-public String element() default %22%22;%0A  public
+/**%0A   * Restrict listening to a certain activityId (for example the taskDefinitionKey).%0A   *%0A   * @return an activityId of a process element or default %22%22 (meaning: all possible activities)%0A   */%0A  String element() default %22%22;%0A%0A  /**%0A   * Restrict listening to a certain processDefinitionKey.%0A   *%0A   * @return one of the deployed processes definition key, or default %22%22 (meaning: all processes)%0A   */%0A 
  Str
@@ -1064,24 +1064,358 @@
 ult %22%22;%0A
+%0A
   
-public
+/**%0A   * Restrict listening to the events specified in %7B@link org.camunda.bpm.engine.delegate.TaskListener%7D and %7B@link org.camunda.bpm.engine.delegate.ExecutionListener%7D.%0A   * @return camunda event to listen to (for example %7B@link org.camunda.bpm.engine.delegate.TaskListener#EVENTNAME_CREATE%7D, or default %22%22 (meaning: all events).%0A   */%0A 
  String 
@@ -1438,16 +1438,265 @@
 %22%22;%0A
+%0A
   
-public
+/**%0A   * The Context can be either %7B@link Context#bpmn%7D (for processes), %7B@link Context#cmmn%7D (for cases) or %7B@link Context#task%7D (for user tasks, no matter if case or process).%0A   * @return one of the context values, default %7B@link Context#bpmn%7D%0A   */%0A 
  Con

document CamundaSelector, use ActivityTypes as constants, fixes #10