Defining Execution Conditions
Execution conditions can be defined at the data layer or step level and are used to conditionalize the execution of the layer or step based on the result of a specified Validation Condition.
Validation Conditions are defined in Validation Steps. In order to set up an Execution Condition, the Graphmart needs to have at least one Validation Step that defines a Condition Variable. Validation Conditions can be used across all Data Layers in the same Graphmart. For guidance on configuring a Validation Step, see Validate the Data (Validation Step).
This topic focuses on configuring an execution condition at the data layer level.
Configuring an Execution Condition
Execution Conditions are configured from the Execution Condition tab that is available when creating or editing a layer. The image below shows the Execution Condition tab for a layer.
Enable Layer Based on Boolean Condition
This setting indicates whether to enable this data layer only if the returned value of a Condition Variable previously set in graphmart or a Conditional Query specified in this tab is either true or false. You specify true or false in the field Execute only if returned value is. If the validation condition fails, the layer is disabled.
Condition Type: Variable
Select Condition Variable
This field is enabled if you select the Variable option. It specifies the variable that you want to base this execution condition on. If the list is empty, that means either there are no Validation Steps or Context Attribute Steps in the graphmart or there is only a Validation Step but it does not include a Condition Variable (defined on the Options tab). Refer to Validate the Data (Validation Step) for more information.
Execute only if returned value is
If you enabled the Enable Layer Based on Boolean Condition setting, select true or false from the drop-down list. The data layer will be enabled only if the returned value from the condition variable matches the selected result value.
Condition Type: Query
If you select the Query Condition Type, the Execution Condition tab has the following settings:
Execute only if returned value is
If you enabled the Enable Layer Based on Boolean Condition setting, select true or false from the drop-down list. The data layer will be enabled only if the returned value from the query matches the selected result value.
Conditional Query Datasource
Specify an optional Datasource used to perform the condition query.
Condition Query
Use this field to specify a SPARQL ASK query that determines if the layer is conditionally enabled.