[Opensource] Is anyone actually using workflow with Controlle r Form/StateFor

Dcomeau at xenos.com Dcomeau at xenos.com
Wed Feb 19 09:21:47 PST 2003


Ok, thanks Aime.  That's what I figured I'd have to do.  It prevents me from
easily reusing the PromptState objects to put them in other workflows, but I
can live with that.  I hope I don't seem critical, I really like the
workflow, it's great! :)

Cheers,
Dave


-----Original Message-----
From: BSC [mailto:bsci at lycos.com]
Sent: Wednesday, February 19, 2003 12:08 AM
To: opensource at jcorporate.com
Subject: Re: [Opensource] Is anyone actually using workflow with
Controller Form/StateFor


>>I have one question though that concerns having a handle state as the
first
state.  I would like to have a work flow controller, and have the first
state be a prompt state. I wasn't sure by your example...Is this type of
thing legal:

..snip..


Dave,

I don't think your sample code would work.  If you are simply trying to
validate the input parameters to the 1st prompt state then you can do so in
the prompt state itself (instead of some initial handle state).  Try adding
something like this to the perform method:


	//Check for session timeout or user meddling
	if ("input params not valid") {
		Transition oneTransition = new Transition();
	
oneTransition.setControllerObject("com.xxx.controller.HubController");
		setSuccessTransition(oneTransition);
		return;
	}	

I have this type of code in 'all' my prompt states that have some required
parameters.  If any input params are missing or not valid then I redirect to
my main Hub screen.  In this sample I don't display an error message because
any missing request params would be as a result of some end user hacking.
So essentially, this logic will short-circuit a controller before it
completes successfully thus overriding any return-to-sender plans for the
controller.

HTMS - Hope this makes sense!


---
Aime








_____________________________________________________________
Get 25MB, POP3, Spam Filtering with LYCOS MAIL PLUS for $19.95/year.
http://login.mail.lycos.com/brandPage.shtml?pageId=plus&ref=lmtplus
_______________________________________________
Opensource mailing list
Opensource at jcorporate.com
http://mail.jcorporate.com/mailman/listinfo/opensource
Archives: http://mail.jcorporate.com/pipermail/opensource/



More information about the Opensource mailing list