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


# Note

A non-fatal note about the input of a scheduling call: a task, link or assignment that was left out of the plan, or a field that repair validation changed. Notes are listed in [`ScheduleResult.notes`](<https://docs.dhtmlx.com/planning-engine/java/api/results/schedule-result.md#notes>). Nothing is thrown for them.

`Note` is an abstract class with four nested static subclasses, one per variant. Read a note with `instanceof` patterns or `switch` pattern matching on the nested classes.

## Declaration

```java
package org.dhtmlx.plen;

public abstract class Note extends ValueRecord {
    public Note()
    public Note copy()

    public static class DroppedLink extends Note { ... }
    public static class DroppedTask extends Note { ... }
    public static class DroppedAssignment extends Note { ... }
    public static class Repaired extends Note { ... }
}
```

The class isn't `sealed`, but the four nested classes are the only variants the library produces. A `switch` over a `Note` needs a `default` branch to compile.

Like every record, a note has public mutable fields, `copy()` (shallow; each subclass returns its own type), and structural `equals` / `hashCode` / `toString` from [`ValueRecord`](<https://docs.dhtmlx.com/planning-engine/java/api/support/value-record.md>).

## Variants

| Variant | When it occurs |
|---|---|
| [`DroppedLink`](<https://docs.dhtmlx.com/planning-engine/java/api/results/note.md#droppedlink>) | A link isn't part of the plan, for example because one of its tasks is unscheduled. |
| [`DroppedTask`](<https://docs.dhtmlx.com/planning-engine/java/api/results/note.md#droppedtask>) | A task isn't part of the plan because it's unscheduled. |
| [`DroppedAssignment`](<https://docs.dhtmlx.com/planning-engine/java/api/results/note.md#droppedassignment>) | An assignment isn't part of the plan because its task is unscheduled. |
| [`Repaired`](<https://docs.dhtmlx.com/planning-engine/java/api/results/note.md#repaired>) | [`Validation.REPAIR`](<https://docs.dhtmlx.com/planning-engine/java/api/project/validation.md>) changed an input field. |

### DroppedLink

```java
public DroppedLink(Id link, String reason)
```

| Field | Type | Description |
|---|---|---|
| `link` | [`Id`](<https://docs.dhtmlx.com/planning-engine/java/api/data/id.md>) | Id of the dropped link. |
| `reason` | `String` | Human-readable reason, e.g. `target task "3" is unscheduled`. |

### DroppedTask

```java
public DroppedTask(Id task, String reason)
```

| Field | Type | Description |
|---|---|---|
| `task` | [`Id`](<https://docs.dhtmlx.com/planning-engine/java/api/data/id.md>) | Id of the dropped task. |
| `reason` | `String` | Human-readable reason: `unscheduled`. |

A task is unscheduled when [`TaskData.unscheduled`](<https://docs.dhtmlx.com/planning-engine/java/api/data/task-data.md#fields>) is `true`.

### DroppedAssignment

```java
public DroppedAssignment(Id assignment, String reason)
```

| Field | Type | Description |
|---|---|---|
| `assignment` | [`Id`](<https://docs.dhtmlx.com/planning-engine/java/api/data/id.md>) | Id of the dropped assignment. |
| `reason` | `String` | Human-readable reason, e.g. `task "3" is unscheduled`. |

### Repaired

```java
public Repaired(String path, String message)
```

| Field | Type | Description |
|---|---|---|
| `path` | `String` | Input path of the changed field, in wire spelling, e.g. `tasks[1].start_date`. |
| `message` | `String` | What was wrong and how it was fixed. |

Only a project created with `Validation.REPAIR` reports `Repaired` notes. The list of fixes and their paths is on [`Validation`](<https://docs.dhtmlx.com/planning-engine/java/api/project/validation.md#what-repair-changes>).

## Example

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

public class NoteExample {
    public static void main(String[] args) throws Exception {
        Moment monday = Moment.fromYmdHm(2026, 8, 10, 8, 0);

        ProjectData data = new ProjectData()
                .withTasks(List.of(
                        new TaskData(Id.num(1)).withStartDate(monday).withDuration(1.0),
                        new TaskData(Id.num(2)).withStartDate(monday).withDuration(1.0)
                                .withUnscheduled(true)))
                .withLinks(List.of(
                        new LinkData().withId(Id.num(10)).withSource(Id.num(1)).withTarget(Id.num(2))));

        ScheduleResult result = Engine.schedule(data, new SolveOptions());

        for (Note note : result.notes) {
            String line = switch (note) {
                case Note.DroppedLink n -> "link " + n.link + " dropped: " + n.reason;
                case Note.DroppedTask n -> "task " + n.task + " dropped: " + n.reason;
                case Note.DroppedAssignment n -> "assignment " + n.assignment + " dropped: " + n.reason;
                case Note.Repaired n -> "repaired " + n.path + ": " + n.message;
                default -> note.toString();
            };
            System.out.println(line);
        }
        // task 2 dropped: unscheduled
        // link 10 dropped: target task "2" is unscheduled
    }
}
```

## Related

- [`ScheduleResult`](<https://docs.dhtmlx.com/planning-engine/java/api/results/schedule-result.md>) - the result that lists notes
- [`Validation`](<https://docs.dhtmlx.com/planning-engine/java/api/project/validation.md>) - the mode that produces `Repaired` notes
- [Reading results](<https://docs.dhtmlx.com/planning-engine/java/scheduling/reading-results.md#cycles-and-notes>) - reading cycles and notes
- [Accept messy input](<https://docs.dhtmlx.com/planning-engine/java/how-to/accept-messy-input.md>) - repair validation in practice
