Writing rules

You write rules to define the business logic of the agent. A rule agent encapsulates the business logic that updates the state of its bound entity.

About this task

The rules define the action to be taken when an agent receives an event. An agent can listen to several events, but is always associated with a bound entity. The binding to the entity is defined at the agent level. The rule references the entity through the authoring context.

Through rules, rule agents can emit new events, and also create and destroy the bound entity.