< Previous | Next >

Module 2: Creating agents and rules

You create agents in a solution to detect events, to specify how events and entities interact, and to process events by rules.

An agent is related to an entity type and specifies the events that it processes. An agent detects incoming events, defines how to process the events, and can also send events.

An agent exists within an agent project, and each agent project that you create is shown in the Solution Explorer view.

Two kinds of agents are in the tutorial: rule agents and Java™ agents. Rule agents process events by using the built-in rule language. Java agents process events by using Java code.

Rule agents are more common because they use a language that is designed for the handling and processing of rules. However, in some situations you might prefer to use a Java agent for complex computations or data handling, or for other unique circumstances. For completeness, the tutorial shows how to create both of these kinds of agents.

In this module, you create a Java agent to call an external service, and a rule agent to decide what to do when transaction events occur.

< Previous | Next >