Core Concepts
Policies
Top-level containers that define which rules to run and when. All logic lives inside a policy.
A policy is the central configuration object in the Forte Rules Engine. It defines what rules should be executed during a contract call.
Policies are stored and enforced on-chain and can be reused across different contracts and applications.
What You Can Configure in a Policy
- A sequence of rules, defined in a specific order, each with conditions and effects
- A set of trackers for maintaining persistent state
- A list of allowed calling contracts. This defines which contracts can subscribe to the policy
- A list of foreign calls that can be used as input to rule conditions, or as effects triggered by a rule
- Policy metadata (off-chain), such as names, descriptions, and labels for readability
The diagram above illustrates the relationship between the various concepts in the Rules Engine. The Policy is the container for Rules, Trackers, and Foreign Call definition. The Calling contract calls into the Rules Engine.
See our Policy Syntax guide to understand how to configure a policy.
Available SDK functions for policies here.