[Canonical page](<https://docs.dhtmlx.com/planning-engine/java/api/resources/profile-tasks/>)
[Full documentation index](<https://docs.dhtmlx.com/planning-engine/llms.txt>)


# ProfileTasks

Selects which buckets of a load profile list the tasks booked in them. Set it through [`ProfileQuery.tasks`](<https://docs.dhtmlx.com/planning-engine/java/api/resources/profile-query.md#fields>) or `withTasks(...)`; the lists land in [`LoadBucket.tasks`](<https://docs.dhtmlx.com/planning-engine/java/api/resources/load-profile.md#loadbucket>). The default is `ProfileTasks.NONE`.

## Declaration

```java
package org.dhtmlx.plen;

public enum ProfileTasks {
  NONE,
  OVER,
  ALL
}
```

## Variants

| Variant | Description |
|---|---|
| `NONE` | Default. No bucket lists tasks: [`LoadBucket.tasks`](<https://docs.dhtmlx.com/planning-engine/java/api/resources/load-profile.md#loadbucket>) is `null` in every bucket. |
| `OVER` | Buckets where `load > capacity` list their booked tasks. Every other bucket gets an empty list. |
| `ALL` | Every bucket lists the tasks booked in it. A bucket with no load gets an empty list. |

Task ids appear in input order.

In the JSON API ([`Decode`](<https://docs.dhtmlx.com/planning-engine/java/api/json/decode.md>), [`Encode`](<https://docs.dhtmlx.com/planning-engine/java/api/json/encode.md>)), the values are spelled `"none"`, `"overallocated"` (for `OVER`) and `"all"`.

## Example

```java
import org.dhtmlx.plen.*;

public class ProfileTasksExample {
  public static void main(String[] args) throws Exception {
    ProfileQuery query = new ProfileQuery(Moment.fromYmdHm(2026, 8, 10, 0, 0), Moment.fromYmdHm(2026, 8, 14, 0, 0))
        // List the contending tasks only in overloaded buckets.
        .withTasks(ProfileTasks.OVER);
    System.out.println(query.tasks); // OVER
  }
}
```

## Related

- [`ProfileQuery`](<https://docs.dhtmlx.com/planning-engine/java/api/resources/profile-query.md>) - the query that holds the setting
- [`LoadProfile`](<https://docs.dhtmlx.com/planning-engine/java/api/resources/load-profile.md>) - where the task lists land
- [Resource load](<https://docs.dhtmlx.com/planning-engine/java/resources-and-assignment/resource-load.md#task-lists-per-bucket>) - task lists per bucket
