Package com.groiss.wf
Annotation Interface CallableMethod
Annotation for methods that should be displayed in the system task editor. The annotated methods are required to be public and all their parameters must be Strings!
Further information to the annotated method and its parameters can be added via the resources. This information is found automatically if the translation key starts with the following pattern: "{fully-qualified class name}.{method name}_" e.g.
To add a customized description for the method, just add
To be able to describe the parameters, just add the ID of the parameter, which was is set in
Further information to the annotated method and its parameters can be added via the resources. This information is found automatically if the translation key starts with the following pattern: "{fully-qualified class name}.{method name}_" e.g.
com.groiss.wf.SystemAction.setFieldToValue_The key above will be used in the following examples for better visualization. Now there are a few things which can be added to the key:
To add a customized description for the method, just add
desc
to the key mentioned above and use it as translation key in the resources.
The description will then be fetched according to the currently used locale.
To be able to describe the parameters, just add the ID of the parameter, which was is set in
params()
,
to the above key like this:
com.groiss.wf.SystemAction.setFieldToValue_valueParameters may have a customized description (add
_desc
) as well as a customized label (add _label
).
The translation keys for each of them look like this:
com.groiss.wf.SystemAction.setFieldToValue_value_desc
com.groiss.wf.SystemAction.setFieldToValue_value_labelThe description is shown as hint right beside the parameters input. Addition of
_label
changes the parameters label in the wizard.-
Optional Element Summary
-
Element Details
-
description
String descriptionDescription of the method. Can either be a String, a resource key with "@" (e.g. @@@key@@) or be omitted completely and described in the resources- Default:
- ""
-
group
String groupTo which group the method belongs. Can either be a String, a resource key with "@" (e.g. @@@key@@) or be omitted completely and described in the resources- Default:
- ""
-
params
String[] paramsThe method parameters as String array. Each parameter has to be defined as JSON object and may have following properties:id, type, label, description
. The properties
id
andtype
are mandatory and cannot be translated. Bothlabel
anddescription
may be resource keys with "@" or described in the resources and therefore be omitted in the annotation. For example:{id: 'message', type:'text', description: 'The message to send', label: '@@@message@@'}
{id: 'formfield', type:'formfield}
Following types are allowed: "text" (default), "number", "boolean", "form" and "formfield". If no type is declared, the default will be taken.If no ID is set, the ID will be taken from the method parameters. CAUTION: This ID could be arg0, arg1, arg2, etc. Also bear in mind, that the ID is also needed for the resource keys (see
here
).If no label is set or found in the resources, the given ID will be used as label (see
here
).- Default:
- {}
-