Workflow Task 3
Set up a workflow engine and connect it to your book ordering code so that
- Ordering a book puts "approve book order" on a chairperson's work
- When the chairperson approves or rejects the order, "email is sent"
to the submitter.
Do this task in stages. I recommend the following:
Stage 1: Set Up
- Installing a workflow engine, e.g., Twister.
- Make sure the examples provided with the engine run.
Stage 2: Mock Up
- Define a book order workflow with the necessary steps, but don't worry about
the email action.
- To save time, if you want, you can try using my
mockup. To use this, you need to deploy
wsdefs.xml and create some user with the
chairperson. Then you can send the message
to put a request for that course on the user's worklist.
- If you use the mockup, after testing to make sure it works, you should
fix it -- e.g., right now the chairperson doesn't see anything except
the submitter and course name. Hardly enough to approve a request!
- Test the book order workflow using whatever method your engine provides
for stepping through a workflow manually. Test both approving and rejecting
- Add a Java class that simulates sending email to the submitter with the
appropriate message (approve, reject). It's OK for it just to print "email
sent to ..." plus the body of the message, on the console or in a log
- Test that manually running your workflow causes the correct email "to
Stage 3: Link Up
- Change your book order
Action in your Struts webapp to do whatever's
necessary to tell the workflow engine to initiate an instance of a book order
- Verify that the workflow is initiated, with the right data, and that the
right thing happens when you manually approve or reject the order.
When the above is working, create and send a Zip file with your webapp's folder.
Do not include .jar and class files please. I want just text
files, i.e., Java, JSP, XML, CSS, and so on.
Email the Zip file to
email@example.com with Subject
CS 395: Task 3. In the body
of the email, describe the steps you went through, including missteps, surprises,