An [[Invantive Studio/Repository/Concepts/Attribute Rule|attribute rule]] that performs an action on an event is written as follows: - Open the table in the tree and select its folder "Attribute Rules". - Choose [[Invantive Studio/Ribbon/Add|"Add"]]. - Enter the "Code", choose the "Event Category" and choose `A` as "Action Category". - Choose the "Action Moment Category": `B` to act before the row is written, for instance to fill a value, or `A` to act after it. - Write the statement in "Action Specification", such as `:last.date_next_attempt := sysdate;`, and optionally a condition in "Constraint Specification" that must hold for the action to run. - Switch "Create" on and choose [[Invantive Studio/Ribbon/Save|"Save"]]. The rule takes effect after the next [[Invantive Studio/Repository/Concepts/Generation of the Business Layer|generation of the business layer]].