After your action is implemented, and you update the configuration file to include it, the action appears in the Scenarios area of the ACC. Your business managers can then add it to scenarios just like any other action.
Here is an example scenario that includes both the custom LinkMessage
event and the custom LogAction
action:
![](media/image25.png)
This scenario waits for a clickthrough with a location
of either One or Two to occur. Whenever this happens, it logs the event’s location code to the info.log
file using our custom log action. The following test page can be created with the name link.jsp
to test this scenario:
<%@ taglib uri="/dspTaglib" prefix="dsp" %> <dsp:page> <HTML> <HEAD> <TITLE>Link Event Test</TITLE> </HEAD> <BODY BGCOLOR="#FFFFFF"> <H1>Link Event Test</H1> <P>Actions: <UL> <LI><dsp:a bean="/test/scenario/LinkMessageSource.location" value="One" href="link.jsp">One</dsp:a></LI> <LI><dsp:a bean="/test/scenario/LinkMessageSource.location" value="Two" href="link.jsp">Two</dsp:a></LI> <LI><dsp:a bean="/test/scenario/LinkMessageSource.location" value="Three" href="link.jsp">Three</dsp:a></LI> </UL> </BODY> </HTML> <%/* Version: $Change: 224215 $$DateTime: 2001/12/27 14:00:56 $*/%> </dsp:page>
Here is the same example in JHTML:
<HTML> <HEAD> <TITLE>Link Event Test</TITLE> </HEAD> <BODY BGCOLOR="#FFFFFF"> <H1>Link Event Test</H1> <P>Actions: <UL> <LI><A HREF="link.jhtml" BEAN="/test/scenario/LinkMessageSource.location" VALUE="One">One</A></LI> <LI><A HREF="link.jhtml" BEAN="/test/scenario/LinkMessageSource.location" VALUE="Two">Two</A></LI> <LI><A HREF="link.jhtml" BEAN="/test/scenario/LinkMessageSource.location" VALUE="Three">Three</A></LI> </UL> </BODY> </HTML>
Click any of the links and then examine the info.log
file (<ATG2007.3dir>\home\logs
). Clicking link One or Two generates the output specified by the custom action. Clicking link Three produces no output.