---
sourceDocument: Australia IT Service Management
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/de-DE/it-service-management

 Release :

    - australia

ft:locale :

    - de-DE

ft:publication_title :

    - Australia IT Service Management

ft:clusterId :

    - itsm

bundleId :

    - itsm

workflow :

    - Technology


---

# Update the state model script include

# Update the state model script include {#ariaid-title1}

* Freigeben Version: Australia
* 
* Aktualisiert 12. März 2026
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 Minute Lesedauer

Update the ChangeRequestStateModel_normal script include to add
new functions for the Complete state.

## Vorbereitungen

Role required: admin

## Warum und wann dieser Vorgang ausgeführt wird

You update the ChangeRequestStateModel_normal with the following configuration.

* Add new <var class="keyword varname">canMove</var> and <var class="keyword varname">moving</var> functions for the Complete state. These functions can return a value of true since there are no special conditions for or extra actions to perform when moving to the Complete state.
* Modify the definition of the existing object for the Implement state to ensure that the next state is Complete.
* Add an object for the Complete state, which defines Review and Closed as the next two states.  
  Hinweis:  
  The <var class="keyword varname">canMove</var> functions for the transition to these states from Complete checks the Needs review custom field to determine the correct next state.
{#t_UpdateStateModelScriptInclude__ul_jh1_11b_4v}

## Prozedur

1. Navigate to AllSystem DefinitionScript Includes.
2. Open the ChangeRequestStateModel_normal script include and modify the script as follows.  
   1. Add the following line at the end of the script include but before the line that starts with type:

          toComplete_moving: function() {
                        return true; 
                   },              

                   toComplete_canMove: function() {      
                         return true;       
                   },

   2. Modify the existing <var class="keyword varname">implement</var> object to <var class="keyword varname">toComplete</var>:

          implement: {
                      nextState: [ "complete" ],

                      complete: { 
                          moving: function() {                
                              return this.toComplete_moving(); 
                          },             

                          canMove: function() {                
                              return this.toComplete_canMove();            
                          }       
                      },        

                      canceled: {  
                          moving: function() {               
                             return this.toCanceled_moving();   
                          },             

                          canMove: function() {               
                             return this.toCanceled_canMove(); 
                          }        
                      }    
                  },

   {#t_UpdateStateModelScriptInclude__ol_nsq_zy1_4v}
3. Add the following new state object for <var class="keyword varname">complete</var>.  

       complete: {
                    nextState : [ "review", "closed" ],         

                    review : {            
                          moving : function() {
                                return this.toReview_moving();            
                          },             

                          canMove : function() {              
                                 if (this._gr.getValue("u_needs_review") == "Yes")   
                                      return true;                            
                             
                                 return false;
                          }        
                    },                     

                    closed : {            
                          moving : function() {  
                                return this.toClosed_moving();
                          },             

                          canMove : function() {              
                                 if (this._gr.getValue("u_needs_review") == "No")
                                      return true;    
                               
                         return false;
                         }       
                    },  

                    canceled : { 
                          moving : function() {                
                                return this.toCanceled_moving();     
                          },             

                          canMove : function() {                
                                 return this.toCanceled_canMove(); 
                          }   
                    }    
               },

4. Click Update.
**Vorheriges Thema:** [Update the state handler script include](https://servicenow-prod.fluidtopics.net/op4l3J_Ux682WaFsJhxR3Q "Update the ChangeRequestStateHandler script include with the new Complete state.")  
**Nächstes Thema:** [Create a UI action](https://servicenow-prod.fluidtopics.net/x5ZrYRBOEloEwSQ~sfWEYw "Create a UI action to display a button on a change request for the Complete state.")

