This section provides a few actor definition examples. Note that to create an ActorChainService component, you must create both a Nucleus component and an XML file that contains the actor-template instance definition. Note that when working with actor definitions, it is best to use xml-combine to add your customizations.

Example: Creating a Order Confirmation Actor

The following is an example that creates a ComponentActor that adds a component to the ModelMap. This actor will reference a Nucleus component and an XML file that defines the actor-template.

Example: Creating a Shipping Address Actor

The following is an example that creates a Nucleus component and an XML file that defines an actor-template instance that allows you to access shipping address data.

  1. Define the Nucleus component and identify the XML file that defines the actor-template:


  2. Create the XML file that creates a shippingAddresses actor-chain:

      <actor-chain id="shippingAddresses" transaction="SUPPORTS">
        <! processes this tag.-->
        <droplet id="ShippingGroupDroplet"
          <!-The droplet input is taken from the query string -->
          <!-This tag sets the droplet input parameter -->
          <input name="clear" value="${param.init}"/>
          <input name="initShippingGroups" value="${param.init}"/>
          <input name="initShippingInfos" value="${param.init}"/>
          <input name="initBasedOnOrder" value="${param.init}"/>
          <input name="shippingGroupTypes" value="${nucleus["/atg/commerce/
        <! processes this tag.-->
        <droplet id="ApplicableShippingGroups"
          <!-This tag sets the droplet input parameter -->
          <input name="order" value="${nucleus["/atg/commerce/custsvc/
          <oparam name="output">
            <output name="shippingAddresses"

Example: Creating a Profile Form Handler Actor

The following example demonstrates how to create an actor-template with multiple chains. This allows you to define multiple chains in the same XML file. However, it is best to define XML files based on a single functional area.

This example creates a ProfileActor, which contains XML chains for its functional areas. This actor contains profile-related functions such as getting, creating, or deleting a profile, profile address, or credit card. It is best to provide the form handler or any single-service function within an actor, because doing so groups related chains together and reduces the number of Nucleus components that must be defined.

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