struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthias Bauer <Matthias.Ba...@livinglogic.de>
Subject Re: Workflow extension
Date Wed, 18 Dec 2002 10:06:14 GMT
Hi Jerry,

so your question is where is the state information stored an checked, or 
do you have to check it yourself? Well, if you had to check it yourself, 
you would not need to use the workflow extension. ;-)

For detailed instructions please refer to www.livinglogic.de/Struts/

You need to make sure that all your actions are derived from 
GenericAction and implement the method performAction instead of the 
method perform defined by Action. This ensures that all state 
information you define in struts-config.xml is maintained and checked.

Please note: If you are using Struts 1.1, you need to modify the config 
file. For more information refer to: 
http://www.livinglogic.de/Struts/struts1_1.html


--- Matthias


Jerry Yu wrote:

> Dear Mr Bauer,
>
> How are you Mr Bauer, my name is Jerry.. I am learning to use your 
> Struts Workflow Extension, but I have a problem when I try to use it 
> on my own webpages.  I donwloaded your example and it works fine for 
> me. Then I try to make my own flow using some pages created for the 
> project I am working on.  My problem is I don't need to do 
> authentication and basically I only want to control how the order of 
> pages that user can see.
> Following is the code in struts-config.xml:
>
> <action path="/createStaffRec1" name="createStaffForm" scope="session" 
> attribute="createStaffSess" 
> input="/staff/content-createstaffrecpg1.jsp" 
> type="com.ifshk.hrms.struts.actions.CreateStaffAction1">
>        <set-property property="primaryWorkflow" value="wf1" />
>        <set-property property="newState" value="1" />
>        <set-property property="nextState" value="2" />
>        <forward name="success" 
> path="/staff/content-createstaffrecpg2.jsp" />
>    </action>
>    <action path="/createStaffRec2" 
> type="com.ifshk.hrms.struts.actions.CreateStaffAction1" 
> name="createStaffForm" input="/staff/content-createstaffrecpg2.jsp" 
> attribute="createStaffSess" scope="session">
>        <set-property property="primaryWorkflow" value="wf1" />
>        <set-property property="prevState" value="1" />
>        <set-property property="newState" value="2" />
>        <set-property property="nextState" value="3" />
>        <forward name="success" 
> path="/staff/content-selectperson-createpersondetails.jsp"/>
>    </action>
>    <action path="/createStaffRec3" 
> type="com.ifshk.hrms.struts.actions.CreateStaffAction1" 
> name="createStaffForm" 
> input="/staff/content-selectperson-createpersondetails.jsp" 
> attribute="createStaffSess" scope="session">
>        <set-property property="primaryWorkflow" value="wf1" />
>        <set-property property="prevState" value="2" />
>        <set-property property="newState" value="3" />
>        <set-property property="nextState" value="0" />
>        <set-property property= "endWorkflow" value="true" />
>        <forward name="success" path="/staff/content-promotestaff.jsp"/>
>    </action>
>
> As you can see, it is only 3 pages and the action I use 
> CreateStaffAction1 is almost the same as yours only some more package 
> is imported.  The thing is do I have to check the workflow state 
> myself? Since I can't find any checking in your Wf1Action.java, 
> Wf2Action.java, and Wf3Action.java, I assume I don't have to. My main 
> problem is do I have to check the state myself and where is all the 
> state information stored ? I know they are coded in the 
> struts-config.xml, but when and where did they being used ??  Thanks 
> for your time to read this!
>
> P.S. I am using WSAD 4.0 to cook up the whole project.
>
> Thanks in advance,
> Jerry
>




--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message