Script XML.
Power Java
Techniques for Optimizing Web Site Development and Runtime Characteristics
Christopher A. Fregly
Listing 2. Script XML.
<?xml version="1.0"?>
<!-####################################################
<Scene> // Each scene available in the flow
<SceneName></SceneName> //the name of the scene
<URL></URL> //the url of the scene
<Stage></Stage> //the container of the scene (frame name, etc.)
<Transition> // Each scenario possible from this Scene
<Action></Action> //action name
<ActionResult></ActionResult> //result of action
<NextScene></NextScene> //next scene defined by action
</Transition>
</Scene>
######################################################->
<Script>
<Scene>
<SceneName>Login</SceneName>
<URL>Login.jsp</URL>
<Stage>Main</Stage>
<Transition>
<Action>LoginAction</Action>
<ActionResult>Success</ActionResult>
<NextScene>Home</NextScene>
</Transition>
<Transition>
<Action>LoginAction</Action>
<ActionResult>RecoverableError</ActionResult>
<NextScene>Login</NextScene>
</Transition>
<Transition>
<Action>LoginAction</Action>
<ActionResult>FatalError</ActionResult>
<NextScene>FatalError</NextScene>
</Transition>
</Scene>
<Scene>
<SceneName>Home</SceneName>
<URL>Home.jsp</URL>
<Stage>Main</Stage>
<Transition>
<Action>OrderEntryAction</Action>
<ActionResult>Success</ActionResult>
<NextScene>OrderEntry</NextScene>
</Transition>
</Scene>
<Scene>
<SceneName>OrderEntry</SceneName>
<URL>OrderEntry.jsp</URL>
<Stage>Main</Stage>
<Transition>
<Action>SubmitOrderAction</Action>
<ActionResult>Success</ActionResult>
<NextScene>OrderAck</NextScene>
</Transition>
<Transition>
<Action>SubmitOrderAction</Action>
<ActionResult>RecoverableError</ActionResult>
<NextScene>OrderEntry</NextScene>
</Transition>
<Transition>
<Action>SubmitOrderAction</Action>
<ActionResult>FatalError</ActionResult>
<NextScene>FatalError</NextScene>
</Transition>
<Transition>
<Action>CancelOrderAction</Action>
<ActionResult>Success</ActionResult>
<NextScene>Home</NextScene>
</Transition>
<Transition>
<Action>CancelOrderAction</Action>
<ActionResult>FatalError</ActionResult>
<NextScene>FatalError</NextScene>
</Transition>
</Scene>
<Scene>
<SceneName>OrderAck</SceneName>
<URL>OrderAck.jsp</URL>
<Stage>Main</Stage>
<Transition>
<Action>HomeAction</Action>
<ActionResult>Success</ActionResult>
<NextScene>Home</NextScene>
</Transition>
</Scene>
<Scene>
<SceneName>FatalError</SceneName>
<URL>FatalError.jsp</URL>
<Stage>Top</Stage>
</Scene>
</Script>
About the Author
Christopher A. Fregly is Senior Cunsultant for BEA Systems Inc. in Chicago. He can be contacted at chris@fregly.