Matthias, Ok, I tried that and it now seems to be disregarding the workflow. Can you seen anything wrong with my struts-config.xml tags? (Sorry for the big code chunk >:O) Essentially what (am trying to do is allow a user to go to the next step or stay on the same step. I am using struts 1.1b
Thanks Jordan ----------action class------------ ... public final class NewRegistrationAction extends GenericAction { .... public ActionForward performAction( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response ) throws IOException, ServletException { ... ----------struts-config.xml------------ <action path="/registration" type="scoop.web.struts.registration.NewRegistrationAction" className="com.livinglogic.struts.workflow.ApplicationMapping" scope="request" input="/tiles/registrationDetails" validate="true"> <set-property property="primaryWorkflow" value="registration-workflow"/> <set-property property="newState" value="0"/> <set-property property="endWorkflow" value="false"/> <forward name="success" path="/tiles/registrationDetails"/> </action> <action path="/registration/1" type="scoop.web.struts.registration.NewRegistrationAction" className="com.livinglogic.struts.workflow.ApplicationMapping" name="registrationForm" scope="session" input="/tiles/registerCompany_step1" validate="true"> <set-property property="primaryWorkflow" value="registration-workflow"/> <set-property property="newState" value="1"/> <set-property property="prevState" value="0"/> <set-property property="prevState" value="1"/> <set-property property="endWorkflow" value="false"/> <forward name="success" path="/tiles/registerCompany_step1"/> </action> <action path="/registration/2" type="scoop.web.struts.registration.NewRegistrationAction" className="com.livinglogic.struts.workflow.ApplicationMapping" name="registrationForm" scope="session" input="/tiles/registerCompany_step2" validate="true"> <set-property property="primaryWorkflow" value="registration-workflow"/> <set-property property="newState" value="2"/> <set-property property="prevState" value="1"/> <set-property property="prevState" value="2"/> <set-property property="endWorkflow" value="false"/> <forward name="success" path="/tiles/registerCompany_step2"/> </action> <action path="/registration/3" type="scoop.web.struts.registration.NewRegistrationAction" className="com.livinglogic.struts.workflow.ApplicationMapping" name="registrationForm" scope="session" input="/tiles/registerCompany_step3" validate="true"> <set-property property="primaryWorkflow" value="registration-workflow"/> <set-property property="newState" value="3"/> <set-property property="prevState" value="2"/> <set-property property="prevState" value="3"/> <set-property property="endWorkflow" value="false"/> <forward name="success" path="/tiles/registerCompany_step3"/> </action> <action path="/registration/4" type="scoop.web.struts.registration.NewRegistrationAction" className="com.livinglogic.struts.workflow.ApplicationMapping" name="registrationForm" scope="session" input="/tiles/registerCompany_step4" validate="true"> <set-property property="primaryWorkflow" value="registration-workflow"/> <set-property property="newState" value="4"/> <set-property property="prevState" value="3"/> <set-property property="prevState" value="4"/> <set-property property="endWorkflow" value="false"/> <forward name="success" path="/tiles/registerCompany_step4"/> </action> <action path="/registration/5" type="scoop.web.struts.registration.NewRegistrationAction" className="com.livinglogic.struts.workflow.ApplicationMapping" name="registrationForm" scope="session" input="/tiles/registerCompany_step5" validate="true"> <set-property property="primaryWorkflow" value="registration-workflow"/> <set-property property="newState" value="5"/> <set-property property="prevState" value="4"/> <set-property property="prevState" value="5"/> <set-property property="endWorkflow" value="true"/> <forward name="success" path="/tiles/registerCompany_step5"/> </action> -----Original Message----- From: Matthias Bauer [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 26 November 2002 8:36 AM To: Struts Users Mailing List Subject: Re: Workflow Extention Hi Jordan, sorry for the late response... You can not specify a wildcard like * for nextPath - the framework does not support that up to now. I would be happy to integrate it, if you can explain a valid use case for it. Right now I do not see a necessity for a wildcard, because you can always leave away the "nextPath" and the "nextState" parameters, which has basically the same result: The action that follows next can be any action. To refer to you concrete problem: Preventing people from entering your workflow in the middle can be achieved by using the prevState parameters: If you have actions A, B, C and you want the user to execute B only if A has been executed before and C only if B has already been executed you can do the following: - equip action A with the state 1, action B with state 2 - set prevState=1 for action B and prevState=2 for action C This way action B can only be executed, if the workflow is in state 1 (i. e. action A has been executed) and action C can only be executed, if the workflow is in state 2 (i. e. action B has been executed). Pls. let me know, if this helps. --- Matthias Jordan Thomas wrote: >Hi All, > >I am using the workflow extention to create my workflows. It seems that >when I am in the middle of a workflow, there is no way to allow the >user to jump out of the workflow into another area of the application. >I have tried specifying a * and a *.do as a nextPath parameter but that >doesn't seem to work. Does anyone know how to gain a little more >flexibility with this framework? All I want to do is stop people from >jumping steps/entering into the middle of a workflow. At the moment, it >seems that a user needs to enter a workflow and then complete that >workflow before a he/she can leave it. Does anyone have any suggestions >how I can work around this? > >Thanks > >Jordan > > >-- >To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> >For additional commands, e-mail: ><mailto:[EMAIL PROTECTED]> > > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>