Yes, specifying multiple prevStates is allowed. --- Matthias
Amit Harsola wrote: > Hi Matthias, > > Thanks. It worked. > I want to know one more thing. Can there be 2 > prevStates for a single action. > > > <action path="/main" type="MainAction"> > <set-property property="primaryWorkflow" value="w1" /> > <set-property property="prevState" value="1" /> > <set-property property="prevState" value="2" /> > <set-property property="newState" value="3" /> > <set-property property="nextState" value="4" /> > <forward name="success" path="Def"/> > </action> > > > Thanks, > Amit > > > > > > --- Matthias Bauer <[EMAIL PROTECTED]> > wrote: > >>With your configuration, your are in the following >>state, after having executed >>the action "/main1": >> >>- you are allowed to execute any action that leads >>to the state 2 in workflow "wf2" >>- you are allowed to execute the action "/main" >> >>So, this should admit you to execute the action >>"/main". >> >>However in your definition of the action "/main" you >>specify that this action >>can only be executed if the previous state of "wf1" >>is "1". You can solve this >>issue by rewriting your "/main1" action definition >>like so: >> >> > <action path="/main1" type="Main1Action"> >> > <set-property property="primaryWorkflow" >>value="w2" /> >> > <set-property property="newState" value="1" /> >> > <set-property property="nextState" value="2" /> >> > <set-property property="nextPath" value="/main" >>/> >> > <set-property property="secondaryWorkflow" >>value="w1" /> >> > <set-property property="newState" value="1" /> >> > <forward name="success" >>path="createOrderMenuDef"/> >> > </action> >> >>This makes the state of "wf1" being set to "1" when >>action "/main1" is executed >>and now you can execute "/main" >> >>Pls. let me know if it works then, >> >>--- Matthias >> >> >>BTW: I would like to have the messages regarding the >>struts workflow extension >>being stored in the struts mailing list archive, >>therefore I would like to have >>our conversation to be sent to the mailing list as >>well. Nevertheless you should >>also set my mail address into the to field, which >>makes the mail appear in my >>inbox instead of being filtered in the struts >>mailing list folder. >> >> >> >> >>Amit Harsola wrote: >> >>>Hi, >>> >>>I am evaluating Struts workflow extenstion. I have >> >>one >> >>>problem. >>>I have three screen index, main and main1 with >> >>action >> >>>classes as IndexAction, MainAction and >> >>Main1Action. >> >>>Workflow w1 starts when indexaction is executed >> >>and >> >>>the current state and next state are 1 and 2 after >>>this action. >>> >>>Control goes to MainAction. Here prev state is >> >>defined >> >>>as 1 and next Path as Main1Action. After this >> >>action >> >>>gets executed current state becomes 2 and next >> >>state >> >>>becomes 3 >>> >>>Control goes to Main1Action. Now from here If want >> >>to >> >>>go back to MainAction, how do I do that >>> >>>Here r the tags >>> >>> >>><action path="/index" type="IndexAction"> >>><set-property property="primaryWorkflow" >> >>value="w1" /> >> >>><set-property property="newState" value="1" /> >>><set-property property="nextState" value="2" /> >>><forward name="success" path="indexDef"/> >>></action> >>> >>><action path="/main" type="MainAction"> >>><set-property property="primaryWorkflow" >> >>value="w1" /> >> >>><set-property property="prevState" value="1" /> >>><set-property property="newState" value="2" /> >>><set-property property="nextState" value="1" /> >>><set-property property="nextState" value="3" /> >>><set-property property="nextPath" value="/main1" >> >>/> >> >>><forward name="pass" path="mainDef"/> >>></action> >>> >>><action path="/main1" type="Main1Action"> >>><set-property property="primaryWorkflow" >> >>value="w2" /> >> >>><set-property property="newState" value="1" /> >>><set-property property="nextState" value="2" /> >>><set-property property="nextPath" value="/main" /> >>><set-property property="secondaryWorkflow" >> >>value="w1" >> >>>/> >>> >>> >>>TIA, >>>Amit >>><set-property property="prevState" value="2" /> >>><forward name="success" >> >>path="createOrderMenuDef"/> >> >>></action> >>> >>> >>> >>>__________________________________________________ >>>Do You Yahoo!? >>>Yahoo! Health - Feel better, live better >>>http://health.yahoo.com >> >> >> > > > __________________________________________________ > Do You Yahoo!? > Yahoo! Health - Feel better, live better > http://health.yahoo.com -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>