You are not required to use any specific elements to define the end of a scenario. The Scenarios module keeps track of each visitor’s progress through a scenario, and after the final element in a scenario is complete for a specific visitor, the scenario is considered to be over for him or her, unless repeat behavior is enabled for this scenario and the visitor triggers the scenario again.

However, it is important to be aware that scenarios do not stop automatically when a visitor’s site session ends. Take a look at the following example, which shows part of a possible scenario:

This diagram described in surrounding text

In this example, the system waits for a visitor to log into the site, and then waits for him or her to view a page from a specific folder. However, if a visitor logs in but does not complete the next element, and then subsequently leaves the site, the system does not stop waiting for him to view one of the given pages and will keep waiting for an infinite amount of time. This behavior does not necessarily have any adverse effects, but if your site has many visitors and you create a large number of scenarios in this way, it may cause performance to slow down. It is also probably not the behavior you wanted; you may have expected the system to exclude from the rest of the scenario any visitors who leave the site.

To avoid this problem, include an element that recognizes when a visitor leaves the site:

This diagram described in surrounding text

In this example, the system waits for the visitor to view the given page or to end his session, and then continues to the next element. Visitors whose sessions end are eliminated from the rest of the scenario.

If you want to explicitly prevent a visitor from progressing through a scenario if he or she meets given criteria, you can add a Stop element. This elements works the same way as the Stop elements in workflows. For an example, refer to Using Stop Elements in Workflows.

If you want to force a scenario to end for all visitors if certain circumstances occur, you can include a Disable Scenario element. For more information, see Using Action Elements in Scenarios.

Note that the list of event elements in the scenario editor does include an event called Scenario Ends, which is exposed in the editor as part of the back-end operation of the Disable Scenario action. It is fired automatically when a scenario is deleted or disabled; you do not have to add this element to a scenario to indicate that the scenario has finished. For more information on this event, refer to the Personalization Programming Guide.

Refer to Designing Effective Scenarios in the Personalization Programming Guide for more information on efficient ways to both create and terminate a scenario.


Copyright © 1997, 2014 Oracle and/or its affiliates. All rights reserved. Legal Notices