Reusable Dialog Components (RDC) Framework is "a framework
for creating JSP taglibs that aid in rapid development of voice and
multimodal applications". The RDC Framework defines a
<group>
container for aggregating multiple components
in one view. The dialog management across the child components for a
group is pluggable, more details are available on this RDC wiki page on
aggregation. A Commons SCXML driven dialog management strategy has
been incorporated into the RDC Framework, as seen
here.
To illustrate the use of the SCXML strategy for <rdc:group>, consider a simple air travel information speech dialog, which prompts the user for the trip type (one way or round trip), and collect either one travel date or two depending on the answer.
Here is the UML state machine diagram that represents this SCXML-based travel information speech dialog.
That gives us the following JSP snippet, if named variable
today
contains the MMddyyyy string for the
current date:
<rdc:group id="travelInfo" strategy="org.apache.taglibs.rdc.dm.SCXMLDialog" config="travel-dialog.xml"> <rdc:select1 id="tripType" options="travel-types.xml" echo="true" /> <rdc:usMajorCity id="departureCity" /> <rdc:usMajorCity id="arrivalCity" /> <rdc:date id="departureDate" minDate="${today}" confirm="true"/> <rdc:date id="arrivalDate" minDate="${departureDate}" confirm="true" /> </rdc:group>
View the RDC documentation in Jakarta Taglibs for packaging and deployment as a web application.