--- alias: tutorials-document-management-scenario-resource-context description: "Associate a document with a Resource context and view it when the Resource changes state" --- # Show a Document in a Resource Change State In this scenario, you will learn how to associate a document with a resource. {% set video_id = '2a429d7addb6f935d064320bc7d1b21c' %} {% include-markdown 'includes/cloudflare_stream.md' %} !!! info For more information, see: * [[resourcedocumentcontext-st]], * [[user-guide-view-resource-documents]], * [[user-guide-change-resource-state]]. ## Sequence of Steps ### 1. Configure Resource Document Context 1. In the left side menu, select **Administration**. 2. From the Administration panel, select **Tables**. 3. Select **Smart Tables**, search for `ResourceDocumentContext`, and then select it. 4. In the top ribbon, select **Add**. The **Add Resource Document Content Record(s)** wizard opens. 5. Select **+** (Add). 6. Set **Resource** to `Mixer-01`. 7. Set **Document** to `Doc_Internal`. 8. Select **Add**. ![Add Resource Document Context Records dialog with Mixer-01 and Doc_Internal.](images/scenario-4-show-a-document-in-a-resource-change-state-3-add-row.png) !!! info The **State Transition** list offers the transitions of the Resource state model, such as SEMI E10. If you leave **State Transition** empty, the MES shows the document for every transition of the Resource. ![New row in the Resource Document Context.](images/scenario-4-show-a-document-in-a-resource-change-state-3-context-row.png) ### 2. Change the Resource State 1. In the **Resource Document Context** table, select `Mixer-01` to open the Resource page. 2. In the top ribbon, select **Change State**. The **Change State** wizard opens. 3. Select a new state, for example `Productive`. 4. Select **Next**. ![New state selected in the Change State wizard.](images/scenario-4-show-a-document-in-a-resource-change-state-3-select-state.png) 5. In the **Documents** wizard, check that the list of documents includes `Doc_Internal`. 6. Select **Change State**. ![Doc_Internal in the Documents step of the Change State wizard.](images/scenario-4-show-a-document-in-a-resource-change-state-3-documents-step.png) ## Expected Result The **Documents** wizard of the **Change State** wizard lists `Doc_Internal`, and the Resource changes to the new state.