--- alias: servicecontext-st description: "This documentation defines a ServiceContext, a data structure for resolving service dispatch" --- # ServiceContext ## Description Used to resolve the service for the specific context ## Fields The **ServiceContext** table has the following fields: | Field | Description | Key | Mandatory | Comments | | --- | ----- | -- | -- | ---- | | **Step** | Step Name | Yes | Yes | | | **LogicalFlowPath** | The Logical Flow Path | Yes | No | | | **Product** | Product Name | Yes | No | | | **ProductGroup** | Product Group Name | Yes | No | | | **Flow** | Flow Name | Yes | No |Applies to the immediate parent **Flow** of the **Step** where the **Material** is currently, and not to the Top-Level **Flow**| | **Material** | Material Name | Yes | No | | | **MaterialType** | Material Type | Yes | No | | | **ProductionOrder** | Production Order | Yes | No | | | **Service** | Service Name | No | Yes | | Table: ServiceContext fields !!! info Each **Step** is associated with a set of *Service Contexts*. A *Service Context* is used for dispatching **Material** to **Resources**. ## Precedence Keys The search precedence rules are the following: 1. Step, Material, LogicalFlowPath 2. Step, Material 3. Step, LogicalFlowPath, ProductionOrder 4. Step, ProductionOrder 5. Step, Product, LogicalFlowPath, MaterialType 6. Step, Product, Flow, MaterialType 7. Step, ProductGroup, LogicalFlowPath, MaterialType 8. Step, ProductGroup, Flow, MaterialType 9. Step, Product, LogicalFlowPath 10. Step, Product, Flow 11. Step, Product, MaterialType 12. Step, Product 13. Step, ProductGroup, LogicalFlowPath 14. Step, ProductGroup, Flow 15. Step, ProductGroup, MaterialType 16. Step, ProductGroup 17. Step, MaterialType 18. Step, LogicalFlowPath 19. Step, Flow 20. Step