The status of each event instance is obtained by comparing the event instances of the current run of the agent to those of the previous run. You want to specify which event statuses will cause the agent to perform the report task.
You know that for the event condition you specified, the Product name, Retailer name, and Order method data items have duplicate values in two or more event instances. However, because the Order number data item has a different value for each event instance, you choose it as the event key.
You decide that the report task that you added previously should
be performed for both:
new event instances
New event instances are detected when the agent runs and were not detected the previous time the agent ran.
ongoing event instances in which the return quantity has changed
Ongoing event instances are detected when the agent runs and were also detected the previous time the agent ran. In this case, only ongoing event instances in which the return quantity has changed cause the report task to run.
In the summary area, click new report.
In the I want to area, click Manage the task execution rules.
Click the Event Key tab.
On the source tab ,
expand Returned items (query), then Order.
Under Order, click Order number, and drag it to the Event key box.
Click the Event Selection tab.
Choose the event status for which the report task is performed:
Under Select when to perform each task, select the New events and Ongoing events check boxes.
From the list, click Values of selected items change.
In the Insertable Objects area, expand Returned items (query), then Returned items.
Click Return quantity and click the insert
button .
Click OK.
Save the agent.
The next step in the creating an agent tutorial is to add an email task.