|PREV PACKAGE NEXT PACKAGE||FRAMES NO FRAMES|
Stepsin the web library.
|ActivityServlet||Demonstration servlet that illustrates one way that workflow support can be integrated into web applications (or web services) without any dependency on application frameworks.|
|DemoBean||JavaBean used in the demonstration web application.|
|GotoStep||Unconditionally transfer control to the step that is identified by a request parameter with the specified name.|
|HttpSessionScope||HttpSessionScope is a specialized
|PopulateStep||For each associated
|ServletContextScope||ServletContextScope is a specialized
|ServletRequestScope||ServletRequestScope is a specialized
|WebContext||WebContext is a specialized
|WebRuleSet||RuleSet for the Step definitions supported by the web library.|
Steps in the web library.
This package contains
for the web library. This library includes Steps for that are
executed in a web application, utilizing the
of Context. Utilizing this feature makes the request, session, and
application scope attributes of the servlet API available to workflows
as Scopes named "request", "session", and "application", respectively.
The sections below define each of the Step definitions included in this
library, utilizing the XML syntax that is recognized by the Digester used to
process your Activity definition files. Although you can use any namespace
prefix, the convention is to declare
io as the namespace prefix,
as in the following example:
<base:activity id="Demonstration Activity" xmlns:base="http://commons.apache.org/workflow/base" xmlns:core="http://commons.apache.org/workflow/core" xmlns:web="http://commons.apache.org/workflow/web" > <web:forward page="/mainMenu.jsp"/> </base:activity>
NOTE - It is not required that you use the XML syntax, processed with a Digester, to initialize the Steps associated with each Activity. However, this usage is very convenient, and is likely to be the most common case, so the Steps are documented from that perspective. To use the underlying implementation classes directly, see the Javadocs for each Step implementation class, just as you would for any other Java class.
The web:forward Step performs a RequestDispatcher.forward()
call to the specified context-relative URL, and then tells our
Context to suspend execution until the application calls
context.execute() again. This is useful in MVC-based
application architectures using a controller servlet to receive and
process all events.
The web:forward element recognizes the following attributes:
The web:goto Step unconditionally transfers control to the Step that is identified by a request parameter with the specified name.
The web:goto element recognizes the following attributes:
The web:include Step performs a
RequestDispatcher.include() operation on the specified
context-relative path, and pushes the response data (as a String) on to
the evaluation stack. WARNING - This Step is only available
on servlet contiainers implementing the Servlet 2.3 (or later) specification,
because it uses the new response wrapper facilities.
The web:include element recognizes the following attributes:
The web:populate Step, for each nested Descriptor, populates the properties of the bean specified by that Descriptor from the request parameters of the current request.
The web:populate element recognizes the following attributes:
You may nest any number of io:descriptor elements within a web:populate element. All of them will be evaluated and displayed in order specified.
In the example below, the request parameters included with the current request are used to populate the properties of an OrderBean stored under the identifier "order".
<web:populate> <web:descriptor xpath="order"/> </web:populate>
An web:descriptor element is a description of the mechanism by which an arbitrary Java object (typically a JavaBean) in some Scope, is referenced. This element recognizes the following attributes:
nameattribute. If not specified, the corresponding bean will be searched for in all Scopes, in ascending numeric order.
scopeattributes) for specifying the bean instance to be accessed by this descriptor.
The syntax for XPath expressions is a sequence of one or more identifier strings, separated by forward slash ("/") characters. The expression is evaluated as follows:
When deciding what bean a particular descriptor applies to, the following rules are applied, in this priority order:
Contextis popped off the stack and consumed.
FIXME - Support the
for access to bean properties via the Commons Beanutils package.
|PREV PACKAGE NEXT PACKAGE||FRAMES NO FRAMES|