Announcement: You can find the guides for Commerce 7.5 and later on the new Elastic Path Documentation site. This Developer Center contains the guides for Commerce 6.13.0 through 7.4.1.Visit new site

This version of Elastic Path Commerce is no longer supported or maintained. To upgrade to the latest version, contact your Elastic Path representative.

Introduction to State Policies

Introduction to State Policies

To understand how state policies work, it's important to understand the different objects that interact with them.intro.png

State Policy A set of rules that can be used to determine the state of widgets (editable, read-only, or disabled).

State Policy Contribution

Maps a State Policy Target to a State Policy. There may be multiple State Policies that apply to a given State Policy Target. For example, there may be one State Policy governing access to data from a particular catalog. There may also be a State Policy governing access to objects in a particular Change Sets. In this case, the rules of both State Policies need to be applied.

State Policy Resolver

Resolves the State Policy Contributions and creates a single State Policy that can be applied to State Policy Targets.

State Policy Governable

An object, such as a Dialog, Wizard, Page, or Editor, that can have a State Policy applied to it. It contains one or more Policy Action Containers. There are two types of Goverable:

  • State Policy Target
  • State Policy Delegate

State Policy Target

A State Policy Governable that receives its State Policy through a direct assignment. Dialogs, Editors, and Actions are examples of State Policy Targets.

State Policy Delegate

A State Policy Governable that inherits its State Policy from its container. Pages and Sections are examples of State Policy Delegates.

Policy Action Container

Contains State Change Targets.

State Change Target

A UI control whose state may change depending on different factors.