Annotations

You can use the Java code in the TIBCO BusinessEvents project by using annotations, which are supposed to be used for the rule language. Without proper annotations, the Java code will not be recognized by TIBCO BusinessEvents. Only the methods that have proper annotations can be selected as Java resource.

Annotations for Java Task
Annotation and Classes Description
@JavaTask Identifies a class that can be used for the Java Task.
@JavaTaskContext Identifies a task context field of a given TaskContextType.
@JavaTaskMethod Identifies a Java task function.
@ModelTypeMap Required annotation that must be incorporated into your project. Identifies a type mapping between Java data type and TIBCO BusinessEvent model type (ModelType).

Apart from these annotations, two enumeration classes TaskContextType and ModelType are used. For more information on the annotation types, see TIBCO BusinessEvents® Online Reference.

Note: The custom functions and Java functions can be used in same places but their annotations are not the same. While using the BPMN annotations the functions can be used in the Java task’s input and output mapping activities, the custom catalog functions restricts you from mapping.