--- title: "Add Expected State With Sub States" slug: "add-expected-state-with-sub-states" tags: ["sub state", "expected state", "process"] updated: 2023-02-02T13:28:12Z published: 2023-02-02T13:28:12Z canonical: "documentation.decisions.com/add-expected-state-with-sub-states" --- > ## Documentation Index > Fetch the complete documentation index at: https://documentation.decisions.com/llms.txt > Use this file to discover all available pages before exploring further. # Add Expected State With Sub States | ## Step Details | | --- | | **Introduced in Version** | 4.0.0 | | **Last Modified in Version** | 5.12.0 | | **Location** | Flow Management > Data > Sub State | --- The **Add Expected State with Sub States** step allows for [Process folders](https://documentation.decisions.com/docs/using-process-folders) or case entities to be configured with additional states and sub states. --- ## Properties #### Inputs | Property | Description | Data Type | | --- | --- | --- | | Color | Defines the color for the state and sub states | DesignerColor | | State Name | The desired State Name | String | | Sub State | The substates to add with the state | List of String | #### ![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/image-1674154349832.png) --- ## Common Errors ### Object reference not set to an instance of an object. If the State Name or Sub States are empty or null, the step will cause an error. To correct this, map or enter a value in the fields. #### Exception Message: ```csharp Exception Stack Trace: DecisionsFramework.Design.Flow.ErrorRunningFlowStep: Error running step Add Expected State With Sub States 1[AddExpectedStateWithSubStates] in flow [Flow 6]: Exception invoking method AddExpectedStateWithSubStates on class SubStateSteps ---> DecisionsFramework.LoggedException: Exception invoking method AddExpectedStateWithSubStates on class SubStateSteps ---> System.NullReferenceException: Object reference not set to an instance of an object. at DecisionsFramework.Design.Flow.CoreSteps.SubStateSteps.AddExpectedStateWithSubStates(String stateName, DesignerColor color, String[] subStates) --- End of inner exception stack trace --- at DecisionsFramework.Design.Flow.StepImplementations.InvokeMethodStep.Run(StepStartData data at DecisionsFramework.Design.Flow.FlowStep.RunStepInternal(String flowTrackingID, String stepTrackingID, KeyValuePairDataStructure[] stepRunDataValues, AbstractFlowTrackingData trackingData at DecisionsFramework.Design.Flow.FlowStep.Start(String flowTrackingID, String stepTrackingID, FlowStateData data, AbstractFlowTrackingData trackingData, RunningStepData currentStepData) --- End of inner exception stack trace — ``` ## Related - [Complete Sub State](/complete-sub-state.md) - [Add File To Sub State](/add-file-to-sub-state.md) - [Is Complete With Sub State](/is-complete-with-sub-state.md) - [Add Comment To Sub State](/add-comment-to-sub-state.md)