This section describes the default action elements you can insert into a scenario segment. Note that, as for all scenario elements, you create actions through the scenario editor in the ACC (see Creating a Scenario: Basic Steps in the ATG Personalization Guide for Business Users).

Scenario actions are implementations of the atg.process.action.Action interface. In general terms, they represent actions that you want the Scenarios module to perform as a response to some form of user behavior (represented by scenario events) – for example, you might want the system to send a “Welcome” email to anyone who registers at one of your sites. You would create a scenario that includes a Registers event followed by a Send Email action; when the Registers event is triggered by the site visitor, the Send Email action is performed by the Scenarios module.

All scenario actions have corresponding entries in the action registry within the Scenario Manager configuration file (scenarioManager.xml). The action registry tags define various settings for each action, including information that determines whether an action is individual or collective, and how you want the system to respond to any errors that occur while an action is being executed.

The following table describes the action registry tags that apply to all action elements. See also the Process Manager document type definition (DTD) located in <ATG10dir>\DSS\lib\classes.jar.

Tag

Required

Description

<action-name>
</action-name>

Yes

The logical name of the action as passed to an action handler.

<action-class>
</action-class>

Yes

A Java class that is an implementation of the atg.process.action.Action interface.

<action-configuration>
</action-configuration>

No

The Nucleus path of the action’s configuration file.

<icon-resource>
</icon-resource>

No

A CLASSPATH-relative path to a 24x24 icon resource for a descriptor. Note that, for reasons of backwards compatibility, this is not a resource bundle key.

<action-terminal>
</action-terminal>

No

Boolean. Terminal actions are those that cannot be followed by other elements in a scenario, usually for reasons of logic. For example, the Disable Scenario action by definition cannot have any subsequent elements. The scenario editor indicates an action is terminal by showing no connecting line after it and by displaying in red any elements that a user attempts to add.

<action-execution-policy>
</action-execution-policy>

No

Determines whether an action applies to individual users in a scenario (individual) or to all users in a scenario (collective). The default value is individual. For more information, see Specifying the <action-execution-policy> Tag.

<action-error-response>
</action-error-response>

No

Specifies what to do if an error occurs while the action is being executed. You can specify delete, continue, or retry as the value. For descriptions of these options, see Specifying the <action-error-response> Tag.

<action-parameter>
</action-parameter>

At least one

A named parameter passed to an action. Its value is an expression, one that might be used, for example, as the component of a filter. By default, action parameters are Strings.

The following list shows the possible child tags for an <action-parameter> tag:

Tag

Required

Description

<action-parameter-name>
</action-parameter-name>

Yes

The PDL name of the parameter.

<action-parameter-class>
</action-parameter-class>

No

An optional type for the parameter used to constrain it in the ACC user interface. The default type is String.

<action-parameter-repository-name>
</action-parameter-repository-name>

No

If the parameter is a repository ID or an array of repository IDs, this tag supplies the name of the repository.

<action-parameter-repository-item-type>
</action-parameter-repository-item-type>

No

If the parameter is a repository ID or an array of repository IDs, this tag supplies the repository item type. In the ACC, users can select any item of this type or its subtypes for this action.

<action-parameter-expression-construct>
</action-parameter-expression-construct>

No

An expression editor grammar construct name that can be used to edit the value of this parameter. If specified, this tag permits the construct to control custom editing of an individual parameter.

For information on the <resource-bundle>, <display-name-resource>, <required>, <expert>, <description>, and <description-resource> tags, refer to the DTD for a standard SQL repository in the ATG Repository Guide.

The following example shows the action registry tags for the EmailNotify action:

<action>
      <action-name>
        emailNotify
      </action-name>
      <action-class>
        atg.process.action.EmailNotify
      </action-class>
      <action-configuration>
        /atg/scenario/configuration/EmailNotifyConfiguration
      </action-configuration>
      <resource-bundle>
        atg.ui.scenario.TemplateResources
      </resource-bundle>
      <display-name-resource>
        emailNotify.displayName
      </display-name-resource>
      <icon-resource>
        emailNotify.icon
      </icon-resource>
      <description-resource>
        emailNotify.description
      </description-resource>
      <action-execution-policy>
        collective
      </action-execution-policy>
      <action-error-response>
         delete
      </action-error-response>

      <action-parameter>
        <action-parameter-name>
          recipientIds
        </action-parameter-name>
        <required>
          false
        </required>
        <description-resource>
           emailNotify.recipientIds.description
        </description-resource>
      </action-parameter>

      <action-parameter>
        <action-parameter-name>
          recipientAddresses
        </action-parameter-name>
        <required>
          false
        </required>
        <description-resource>
           emailNotify.recipientAddresses.description
        </description-resource>
      </action-parameter>

      <action-parameter>
        <action-parameter-name>
          recipientAddress
        </action-parameter-name>
        <required>
          false
        </required>
        <description-resource>
          emailNotify.recipientAddress.description
        </description-resource>
      </action-parameter>

      <action-parameter>
        <action-parameter-name>
          template
        </action-parameter-name>
        <required>
          true
        </required>
        <description-resource>
          emailNotify.template.description
        </description-resource>
      </action-parameter>

      <action-parameter>
        <action-parameter-name>
          application-name
        </action-parameter-name>
        <required>
          false
        </required>
        <description-resource>
          emailNotify.application-name.description
        </description-resource>
      </action-parameter>

</action>

The remaining sections of this chapter describe the following default scenario actions: