> ## Documentation Index
> Fetch the complete documentation index at: https://learn.nextedy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Configure Gantt Workflow Conditions

> Enforce dependency-aware workflow gates in Polarion so that a work item cannot transition to a new status unless its Nextedy GANTT predecessors are in an allowed state.

export const LastReviewed = ({date}) => {
  if (!date) return null;
  const formatted = new Date(`${date}T00:00:00Z`).toLocaleDateString("en-US", {
    year: "numeric",
    month: "long",
    day: "numeric",
    timeZone: "UTC"
  });
  return <p className="mt-10 text-sm text-gray-400 dark:text-zinc-500 not-prose">
      Last reviewed on {formatted}
    </p>;
};

## Prerequisites

* Gantt installed and configured with dependency roles
* Polarion administrator access to edit workflow configurations
* Dependency links already established between work items

## How the Condition Works

The Gantt workflow condition checks all work items linked to the transitioning item via specified dependency link roles. If any linked predecessor is not in one of the allowed status states, the workflow transition is blocked.

<Frame>
  <img src="https://mintcdn.com/none-17b4493f/DDjWgCW2DWY5biNv/gantt/diagrams/guides/integration/polarion-workflow-conditions/diagram-1.svg?fit=max&auto=format&n=DDjWgCW2DWY5biNv&q=85&s=4549060c07bb0db735bde8386cbc2f16" alt="diagram" style={{ maxWidth: "520px", width: "100%" }} width="520" height="300" data-path="gantt/diagrams/guides/integration/polarion-workflow-conditions/diagram-1.svg" />
</Frame>

<Note title="Dependency-type aware">
  The condition is aware of Gantt dependency types. For forward-link checking, items connected via `start-to-finish` or `start-to-start` dependency types are excluded from the check because they do not need to finish first. Only `finish-to-start` dependencies are enforced in the forward direction.
</Note>

<Steps>
  <Step title="Open the Workflow Configuration">
    1. Navigate to **Administration > Work Items > Workflow**
    2. Select the work item type whose workflow you want to modify
    3. Locate the transition where you want to add the dependency gate
  </Step>

  <Step title="Add the Workflow Condition">
    1. Click on the target transition to edit it
    2. In the **Conditions** section, add a new condition
    3. Select **`GanttDependenciesStatusCondition`** from the list of available conditions (it appears under that exact ID, alongside the built-in conditions such as `LinkedWorkItem` and `FieldNonEmpty`)
  </Step>

  <Step title="Configure the Condition Parameters">
    The condition accepts the following parameters:

    | Parameter         | Type                     | Required                                          | Description                                                                 |
    | ----------------- | ------------------------ | ------------------------------------------------- | --------------------------------------------------------------------------- |
    | `link.roles`      | String (comma-separated) | At least one of `link.roles` or `back.link.roles` | Link role IDs for forward-linked work items to check                        |
    | `back.link.roles` | String (comma-separated) | At least one of `link.roles` or `back.link.roles` | Link role IDs for back-linked work items to check                           |
    | `valid.states`    | String (comma-separated) | Yes                                               | Work item status IDs that linked items must be in for the condition to pass |

    ### Configuration Example

    To require all predecessors (via the `depends_on` link role) to be in `done` or `closed` status before a work item can move to `in_progress`:

    ```
    link.roles=depends_on
    valid.states=done,closed
    ```

    To check both forward and backward links:

    ```
    link.roles=depends_on
    back.link.roles=depends_on
    valid.states=done,closed
    ```

    <Warning title="Use status IDs, not display names">
      The `valid.states` parameter accepts Polarion status **IDs** (e.g., `done`, `in_progress`), not the human-readable display names (e.g., "Done", "In Progress"). Check your workflow configuration for the correct status IDs.
    </Warning>
  </Step>

  <Step title="Understand the Forward vs. Backward Check">
    * **`link.roles`** checks items that the current work item links **to** (forward direction)
    * **`back.link.roles`** checks items that link **back to** the current work item (reverse direction)

    Use `link.roles` when your dependency links point from the dependent item to its predecessor. Use `back.link.roles` when links point from the predecessor to the dependent item.

    <Tip title="Security across permission boundaries">
      The condition runs with elevated system privileges, ensuring that dependency gates are enforced even when the current user cannot see all linked work items. Hidden links cannot bypass the status gate.
    </Tip>
  </Step>
</Steps>

## Verification

You should now see:

* When attempting to transition a work item whose predecessors are not in the allowed states, the transition is blocked with a validation message
* When all predecessors meet the status requirements, the transition proceeds normally
* The condition respects dependency type semantics, only enforcing finish-to-start dependencies in the forward check

## See Also

* [Create and Configure Dependency Links](/gantt/guides/dependencies/create-dependency-links)
* [Configure Advanced Dependency Types (FS, SS, FF, SF)](/gantt/guides/dependencies/advanced-dependency-types)
* [Configure Auto-Scheduling](/gantt/guides/scheduling/configure-auto-scheduling)

<LastReviewed date="2026-07-07" />
