What's the difference between State Flow and State Model?

JennyHu
Tera Guru
Tera Guru

Hi there,

What's the difference between State Flow (sf_state_flow) and State Model (sys_state_model) ? and Process Flow (sys_process_flow)?

I'm looking into develop a state transition (showing the process formatter) for a custom table in a scoped application.

Thanks,
Jenny

 

3 REPLIES 3

sachin_namjoshi
Kilo Patron
Kilo Patron

Please see purpose of these tables below

 

sf_state_flow --> Contains state flow definitions. This table contains all state flow definitions, including those for work orders and work order tasks.

 

sys_state_model --> Defines how each record in the target table transitions to (the enter condition) and/or from (the exit condition) each state predefined for that table.

 

 

Each record on the Flow Formatter [sys_process_flow] table represents a process stage and can have a different condition applied to it. When specified conditions are fulfilled, the formatter highlights the current stage and places a check mark next to all previous stages.

 

Please see quick video below to configure custom process formatter

 

https://www.youtube.com/watch?v=ve52RRXjAbs

 

Regards,

Sachin

 

 

Hi Sachin,

Thank you very much for your reply and the video link.  I've the state choices created, records set up in Flow Formatter [sys_process_flow], and process flow formatter added to the form.

So if I'm understanding correctly..

1. Flow Formatter [sys_process_flow] defines the process stages.

2. State Flow [sf_state_flow] manages behavior of fields, field visibility on the form, and system events for state transitions.

What I'm not understanding is in what cases, do I need to define a State Model [sys_state_model]?  If Flow Formatter [sys_process_flow] can already define the enter condition for the state, why is there a need to use State Model?  Is this just another way to define state transitions?

From this doc, https://docs.servicenow.com/bundle/london-platform-administration/page/administer/state-model/concep..., it mentions that

"A state model is a list of states that describe an expected record workflow through the lifecycle of the record. State models can be defined for any table that extends the task table. State models simplify defining the state transitions allowed for a specific task type."

 

Thanks,
Jenny

 

I am also getting confused. Both the state model and state flow has similar capabilities. What is the difference then?