Execution Constraints

Set Execution Constraints.

The method defines the conditions that govern the execution of the circuit, allowing developers to limit runs based on criteria such as time frame or number of successful completions.

If no executionConstraints are added then the Lit Action Code will run according to the setConditions and conditionalLogic.

const executionOptions = {
    conditionMonitorExecutions: 10,
    startDate: new Date("2023-07-01T00:00:00Z"),
    maxLitActionCompletions: 3
}

newCircuit.executionConstraints(executionOptions);

Execution Constraints Parameters:

/* Optional. The maximum amount of times that the circuit will run before 
    stopping, inclusive of conditions on matched, on unmatched and conditional logic failures.*/
conditionMonitorExecutions?: number;

/* Optional. The circuit will not run before this date.*/
startDate?: Date;

/* Optional. The circuit will stop running once this date has passed.*/
endDate?: Date;

/* Optional. The maximum amount of times that the Lit Action code will be 
    executed before the circuit stops running. This is a full run of the circuit.*/
maxLitActionCompletions?: number;

Last updated