--- alias: user-guide-automation-scheduled-action-context-resolution description: "Explain how Context Resolution defines the target scope for an Automation Scheduled Action and what options are available." --- # Context Resolution **Context Resolution** defines the operational scope of the **Automation Scheduled Action (ASA)**. This step identifies the specific entities, such as individual controllers or managers, that the **Scheduled Task** targets. For every entity instance identified during this phase, the system generates a unique **ASA Task**. A well-defined context ensures that the **Scheduled Action** runs only on the intended targets and prevents unsafe or unintended executions. This step does not evaluate readiness, so it doesn't decide whether an action runs. It only defines what is eligible to be evaluated. ![Diagram showing the working of the Context Resolution within the Scheduled Action flow.](../diagrams/context_resolution.drawio.svg) ## How It Works On **Scheduled Action** creation: 1. You create the **Scheduled Action** definition by using the **Create Scheduled Action** wizard. 2. When the wizard is complete, the MES UI requests the creation of the **Scheduled Action**. 3. The invoked Backend Service: - Evaluates the **Scheduled Action** resolution context and identifies candidate entities. - If successful, the **ASA** definition is created, as well as an **ASA Task** per entity instance resolved. On **Scheduled Action** edition: 1. You change the **Scheduled Action** definition by using the **Edit Scheduled Action** wizard. 2. When the wizard is complete, the MES UI requests the changes of the **Scheduled Action**. 3. The invoked Backend Service: - Evaluates the **Scheduled Action** resolution context and identifies candidate entities. - If successful, terminates all previous **ASA Tasks** associated with the definition and generates new ones for the resolved entity instances. **Context Resolution** does not evaluate time windows, ready state, or readiness. It only establishes the execution scope. ## Context Options The **Context Resolution** section lets you specify the kind of entity the **Scheduled Action** applies to. The output, a list of **Entity references** representing the entity instances, becomes the input for all subsequent sections. === "Automation Controller" Returns a list of **Automation Controller Instances** linked to the matching **Automation Controller**, filtered by the definition, revision, and version settings. Ideal for version-specific or definition-scoped maintenance, as the context includes only a single **Automation Controller** rather than multiple controllers managed by a **Controller Manager**. You must specify the **Automation Controller** as well as the specific revision and version. The latest version and revision are automatically suggested. When selecting a specific **Automation Controller** version, **Context Resolution** retrieves the list of active **Automation Controller Instances** associated with it. ![Screenshot showing the settings for configuring the Automation Controller Context Resolution.](../images/ASC_context_resolution_controller.png) === "Automation Manager" Returns a list of target **Automation Controller Instances** managed by a specific **Automation Manager**. Ideal for fleet-level operations, as the **Automation Manager** includes multiple **Automation Controllers** and provides broader context. Specify the **Automation Manager** you want to resolve. ![Screenshot showing the settings for configuring the Automation Manager Context Resolution.](../images/ASC_context_resolution_manager.png) === "Custom DEE Action" Returns a list of target entity instances by executing a **DEE action**. The **DEE action** is responsible for returning the full target list. Ideal for advanced or dynamic selection logic, as a **DEE action** provides greater flexibility in both behavior and context. Specify the **DEE action** you want to use to perform **Context Resolution**. Make sure its inputs and outputs match the DEE contract: | Direction | Key Name | Data Type | Description | |------------|----------------|-------------|---------------| | **Input** | `Definition` | `AutomationScheduledActionDefinition` | Provides context about the current definition being resolved. | | **Output** | `Result` | `Entity[]` / `EntityCollection` | The set of entities for which tasks will be created. | Table 1: Context Resolution DEE Contract If the action fails or returns invalid or missing output, the operation fails closed and no tasks are created since the synchronization fails. ![Screenshot showing the settings for configuring the DEE Action Context Resolution.](../images/ASC_context_resolution_dee.png) !!! warning "Do not define a broad context without strong Pre-Conditions and detectors." Defining a broad context without strong Pre-Conditions and Detectors increases the risk of triggering actions on entities that are not operationally ready. Entity instances that are not operationally ready may enter the automation flow, causing actions to be skipped, delayed, or fail. ## Configuration Steps In the **Create Scheduled Action** wizard: 1. Locate the **Context Resolution** field under the general definition section. 2. Select one of the available **Context Resolution** types. 3. Choose an entity of the type selected previously. 4. Proceed to the next section. ![Screenshot showing the settings for configuring the Context Resolution.](../images/ASC_context_resolution_general.png)