When to use state model and when to use state flow

snehapatel
Tera Contributor

Hi,

 

I am building a scoped application and defining a table extending the task table within the same. I want to define custom states and state transitions for the same. For defining state transitions, should I use state flow or state model. Kindly suggest.

 

Thanks,

Sneha

2 ACCEPTED SOLUTIONS

Nikhil Bajaj9
Tera Sage
Tera Sage

Hi @snehapatel ,

 

In ServiceNow, both State Models and State Flows manage the lifecycle of records, particularly those extending the Task table. The choice between them depends on the complexity of the transitions and the need for automated actions.

State Model:

  • When to use:

When defining the allowed states and transitions for a record type. It provides a visual representation of the record's lifecycle, simplifying understanding of where a record can move next.

  • Purpose:

Primarily defines the possible states and the allowed transitions between them. It focuses on the structural definition of the workflow.

  • Benefits:
    • Clear visualization of the record's lifecycle.
    • Simplifies defining allowed state changes.
    • Helps answer questions about the distribution of records across states.

State Flow:

  • When to use:

When you need to automate actions or trigger specific events during state transitions. It adds logic and automation to the state changes defined in the State Model.

  • Purpose:

To define how transitions occur and what happens during those transitions. It can trigger manual transitions via UI actions or automatic transitions via business rules.

  • Benefits:
    • Automates actions based on state changes.
    • Enables manual transitions through UI actions.
    • Facilitates complex workflow automation.

In essence:

  • Use a State Model to define the blueprint of your record's lifecycle, outlining the states and the valid paths between them.
  • Use a State Flow to implement the automation and logic that governs how records move through those states, triggering actions and controlling the transition process.

They are often used in conjunction, with the State Model providing the framework and the State Flow providing the dynamic behavior and automation.

 

If my answer helped you, please mark it- solution accepted. 

 

Regards,

Nikhil Bajaj

Please appreciate my efforts, help and support extended to you by clicking on – “Accept as Solution”; button under my answer. It will motivate me to help others as well.
Regards,
Nikhil Bajaj

ServiceNow Rising Star-2025

View solution in original post

Shashank_Jain
Kilo Sage

@snehapatel .

 

  1. State Flows

    • Think of it like a workflow specifically for states.

    • It controls how a record moves from one state to another.

    • Example: You can say → "If state = New, only allow moving to In Progress or Cancelled".

    • More flexible, no coding needed, good for task-based tables.

  2. State Models

    • This is more structured.

    • It defines allowed transitions in a diagram-like model (like a map of states).

    • Example: "From Open → only go to Pending or Resolved. From Resolved → only go to Closed".

    • Better for processes where you want strict control and visual transitions.

Which one should you use?

 If you just want to manage basic task states in your scoped table → State Flows are easier and built for task tables.
 If your process has complex rules with strict transitions (like approval workflows, strict compliance processes) → State Model is better.

Hope it helps!

 

If this works, please mark it as helpful/accepted — it keeps me motivated and helps others find solutions.
Shashank Jain

View solution in original post

4 REPLIES 4

Nikhil Bajaj9
Tera Sage
Tera Sage

Hi @snehapatel ,

 

In ServiceNow, both State Models and State Flows manage the lifecycle of records, particularly those extending the Task table. The choice between them depends on the complexity of the transitions and the need for automated actions.

State Model:

  • When to use:

When defining the allowed states and transitions for a record type. It provides a visual representation of the record's lifecycle, simplifying understanding of where a record can move next.

  • Purpose:

Primarily defines the possible states and the allowed transitions between them. It focuses on the structural definition of the workflow.

  • Benefits:
    • Clear visualization of the record's lifecycle.
    • Simplifies defining allowed state changes.
    • Helps answer questions about the distribution of records across states.

State Flow:

  • When to use:

When you need to automate actions or trigger specific events during state transitions. It adds logic and automation to the state changes defined in the State Model.

  • Purpose:

To define how transitions occur and what happens during those transitions. It can trigger manual transitions via UI actions or automatic transitions via business rules.

  • Benefits:
    • Automates actions based on state changes.
    • Enables manual transitions through UI actions.
    • Facilitates complex workflow automation.

In essence:

  • Use a State Model to define the blueprint of your record's lifecycle, outlining the states and the valid paths between them.
  • Use a State Flow to implement the automation and logic that governs how records move through those states, triggering actions and controlling the transition process.

They are often used in conjunction, with the State Model providing the framework and the State Flow providing the dynamic behavior and automation.

 

If my answer helped you, please mark it- solution accepted. 

 

Regards,

Nikhil Bajaj

Please appreciate my efforts, help and support extended to you by clicking on – “Accept as Solution”; button under my answer. It will motivate me to help others as well.
Regards,
Nikhil Bajaj

ServiceNow Rising Star-2025

Bhuvan
Giga Patron

@snehapatel 

 

Go through below links for guidance,

 

https://www.servicenow.com/community/developer-articles/cheat-sheet-state-flows/ta-p/2327959

 

https://www.servicenow.com/community/itsm-forum/state-flows-or-state-model/td-p/477751

 

If this helped to answer your query, please mark it helpful & accept the solution.

 

Thanks,

Bhuvan

Shashank_Jain
Kilo Sage

@snehapatel .

 

  1. State Flows

    • Think of it like a workflow specifically for states.

    • It controls how a record moves from one state to another.

    • Example: You can say → "If state = New, only allow moving to In Progress or Cancelled".

    • More flexible, no coding needed, good for task-based tables.

  2. State Models

    • This is more structured.

    • It defines allowed transitions in a diagram-like model (like a map of states).

    • Example: "From Open → only go to Pending or Resolved. From Resolved → only go to Closed".

    • Better for processes where you want strict control and visual transitions.

Which one should you use?

 If you just want to manage basic task states in your scoped table → State Flows are easier and built for task tables.
 If your process has complex rules with strict transitions (like approval workflows, strict compliance processes) → State Model is better.

Hope it helps!

 

If this works, please mark it as helpful/accepted — it keeps me motivated and helps others find solutions.
Shashank Jain

Nikhil Bajaj9
Tera Sage
Tera Sage

Hi @snehapatel ,

 

If my answer helped you, please mark it- solution accepted. This will help future readers as well.

 

Regards,

Nikhil Bajaj

Please appreciate my efforts, help and support extended to you by clicking on – “Accept as Solution”; button under my answer. It will motivate me to help others as well.
Regards,
Nikhil Bajaj

ServiceNow Rising Star-2025