Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Hard Depenencies with project ppm task

vs00884087
Tera Contributor

I wanted to know how I can create a Hard Dependency within two project tasks.

Example

PRJ0001- contains 2 tasks prjtask001, prjtask002 and prjtask003.

Now I want a hard dependency  with two scenarios

Scenario-1: prjtask003 cant be closed completed unless and until prjtask002 is 'closed complete'

Scenario-2: prjtask002 should not be progressed(in-progress) until prjtask001 is 'closed complete'

 

Currently I'm able to close the Successor PPM task despite the state of predecessor. I have tried with both 'Start to Finish' and 'Finish to Finish' kind of dependency

 

vs00884087_0-1763452527006.png

 

1 REPLY 1

jms4279
Giga Contributor

I researched Configuring Hard Task Dependencies in ServiceNow Project Management with the Documentation online and Overview of Task Dependencies in ServiceNow Projects .  Try this and I hope it helps.

 

ServiceNow Project Management enables users to establish "hard dependencies" between project tasks using the Task Relations functionality. This is achieved primarily through the "Finish-to-Start" (FS) dependency type and the platform's built-in process flows. Task relations are managed in ServiceNow using the pm_task_relationship table, which helps enforce task dependencies to ensure proper workflow sequencing. 

Key Concept: Task Relations and the Finish-to-Start Dependency 

The most common dependency type in ServiceNow projects is "Finish-to-Start" (FS). In this configuration, a successor task cannot begin until its predecessor has been completed. These relationships are recorded and managed to automate and enforce project task sequencing, ensuring that tasks progress in the correct order. 

Scenario 1: Enforcing Task Closure Sequence 

In the first scenario, the objective is to prevent prjtask003 from being marked as "Closed Complete" until prjtask002 has reached the same status. This is accomplished using an FS dependency combined with standard system validation rules. 

  • When a Finish-to-Start relationship is established between prjtask002 (predecessor) and prjtask003 (successor), the system enforces a rule that blocks prjtask003 from being closed until prjtask002 is also closed. 
  • If a user attempts to set prjtask003 to "Closed Complete" while prjtask002 is still "Open" or "In Progress," the system issues an error and prevents the action. 

Configuration Steps: 

  1. Navigate to the record for prjtask003. 
  1. Open the "Dependencies" (or "Predecessors") related list. 
  1. Click "New" to create a new task relation record. 
  1. Set the Predecessor field to prjtask002. 
  1. Choose Finish-to-Start (FS) as the type. 
  1. Leave Lag Duration as "0" unless a delay is required. 

This configuration creates a hard dependency, automatically enforcing the closure sequence between the two tasks. 

Scenario 2: Restricting Task Progression Based on Predecessor Completion 

The second scenario involves preventing prjtask002 from moving to "In Progress" until prjtask001 is "Closed Complete." This requirement goes beyond the default closure check of the FS dependency and requires an additional condition to block state changes. 

  • By default, FS dependencies only block the closure of the successor task. 
  • To restrict a task from progressing to "In Progress," a specific condition must be applied to the task relationship. 

Configuration Steps: 

  1. Navigate to the record for prjtask002. 
  1. Open the "Dependencies" related list. 
  1. Click "New" to add a new dependency. 
  1. Set the Predecessor field to prjtask001. 
  1. Choose Finish-to-Start (FS) as the type. 
  1. In the condition builder, add: [State] [is] [Closed Complete]. 
  1. Leave Lag Duration as "0". 

With this condition, prjtask002 cannot transition from "Open" to "In Progress" or any other advanced state until prjtask001 has been marked "Closed Complete." 

Summary of Implementation 

Scenario 

Predecessor 

Successor 

Type 

Condition 

1 (Close Check) 

prjtask002 

prjtask003 

Finish-to-Start (FS) 

(None needed, system default handles closure check) 

2 (Start Check) 

prjtask001 

prjtask002 

Finish-to-Start (FS) 

State is Closed Complete 

Source Reference: https://www.servicenow.com/docs/csh?topicname=c_ProjectTaskRelationDepend.html&version=latest