# @jc:task-get-info Annotation

Creates Worklist control methods that return information from Tasks.

Used by the Task and Task Worker controls.

### Syntax

@jc:task-get-info

[enabled="true"]

### Attributes

enabled

When set to true, this Boolean creates Worklist control methods that return information from Tasks.

### Remarks

Methods in the Task Worker control with this annotation can have the following return types:

    String, String[]
    TaskInfo, TaskInfo[]
    TaskInfoXML, TaskInfoXML[]

The jc:task-get-info annotation is used in correlation with @jc:task-get-info.

The return type determines the value returned by the method:

    String  —>  the taskId
    TaskInfo  —>  the TaskInfo object
    TaskInfoXML  —>  the taskInfoXML

If you need to select more than one Task with @jc:task-get-info, use an array instead. If you specify a return type for a single task and multiple tasks are selected, a run-time exception occurs when the code executes. If you are unsure, it is better to return an array, as shown in the following example:

    /**
         * @jc:task-get-info enabled="true"
         * @jc:select task-id="{taskId}"
         */

        public TaskInfo getTaskInfo(String taskId);

        /**
         * @jc:task-get-info enabled="true"
         * @jc:select task-id="{taskIds}"
         */

        public TaskInfoXMLDocument[] getTasksInfoXML(String[] taskIds);