Specifying Action conditions

You can specify certain conditions under which a Struts Action will be triggered. To specify a condition, do the following:
  1. Start the Struts Tools BTT Extensions.
  2. From the Action Conditions tab of the tool, click the Add button under the Defined Action Conditions section.
  3. From the dialog box that pops up, type the name of the Action condition and click OK.
  4. Select the Action condition that you just created, and click the Add button under the Action Conditions Elements section.
  5. From the dialog box that pops up, type the name of the condition element, the class name, and the Actions that are triggered when the condition is true and when the condition is false.
    Note: Note that instead of typing the class name, you can click the Add button and browse to your condition process class.
    The following types of Actions can be triggered:
    • changeState, which changes the state of the Struts process to the specified action forward.
    • condition, which moves the condition processing onto a specified condition evaluation
    • continue, which leads the Struts process to the next condition in sequence
    • abort, which aborts the condition processing
  6. Click OK to close the dialog box.
  7. Add more action condition elements and action conditions according to your business need.
Screen capture of the Action Condition tab of the Struts Tools BTT Extensions