To continue the navigation discussion of a few days back involving property
files, may I provide an alternate option? I'll try doing this based on an
simplified example:
Suppose there are two simplified workflows that share the same pages. For
example: the first page enters a number A, the second page enters a number B
and the third page either displays, depending on the active workflow, the
addition or multiplication of A and B. So I either have A->B->A+B or
A->B->A*B. (In this email it is not the goal to find the optimal solution
for this simplified example, but to illustrate an alternative workflow
handling suitable for more complex environments.)
What you want to do is separate the workflow from the actual processing
logic (not business logic!) for A and B. This could be done by having
wrapper classes that only contain workflow information. So one could have a
AddA, MultiplyA, AddB and MultiplyB, where "Add" and "Multiply" denote the
two workflows which share A and B:
AddA -> AddB -> A+B
A -> B
MulA -> MulB -> A*B
So when the user wants to do an addition, he starts at the AddA page. This
page set in the request object the a value denoting the "nextURL" to "AddB",
then it forwards to "A".
"A" will also and set the "nextURL" but since it already exists, it will not
overwrite. After processing "A" will check the request where to go next and
it will go to "AddB". "AddB" does the same, setting the next page to "A+B"
and continues to "B". Will will check the request again and go to "A+B".
In the other workflow, the user wanted to do multiplication, he would start
at "MultiplyA". This page would set "MultiplyB" as the next URL and also
continue to "A". "A" at the end will check the request where to go and it
will head out for MultiplyB.
This approach still encodes the workflow in classes so there is no external
file where from-to tuples are stored and it is supported by standard tools.
The used classes "A" and "B" are completely functional and can be use on
their own or in alternate workflows.
Am I making any sense or am I just rambling away?
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets