Previous Topic: Add Procedure Step Use StatementNext Topic: Fine-tune Push Buttons


Set Exit State

If the call to the server was successful, we want to close this window and flow to the eGolfer home page. Setting the special system attribute Exit State can trigger flows. To determine if the call was successful, we can first check the Exit State value to see if it was set to processing ok.

Follow these steps:

  1. From the Tool Palette, select the If push button, and then select the USE maintain golfer statement. In the Add Statement panel select the expression exit state, select the relational operator IS EQUAL TO, expand the Global Exit States and select Processing OK, select the Select push button, then the Add push button.
  2. From the Tool Palette, select the push button Exit State, and then select the IF EXITSTATE IS statement. Then in the Exit State Selection panel, expand EGOLF SERVICES, select XFR TO EGOLFER HOME, select the Select push button, and then select the Add push button.
  3. With the EXIT STATE IS statement still highlighted, from the Menu Bar select Edit, then Add GUI Statement…, then select Close…. Next, select Dialog BoxEGOLFER REGISTRATION, and then select the OK push button.
  4. We still need to set an exit state to handle a situation in which the passwords do not match. Select the bottom of the bracket for the IF EXITSTATE IS statement, then from the Menu Bar select Edit, and then Add Statement…, then select Else. Then, from the Tool Palette select the EXIT STATE IS push button, select the Else statement you just added, select the Exit State value PASSWORD MISMATCH, select the Select push button, and then select the Add push button.
  5. The completed event handler should look as shown:

    Set Exit State

  6. Save your model.

    Note: When designing a window, you have the opportunity to place fields on a window that have not first been defined in your export views. This can be accomplished in a number of different ways, but ultimately results from changing the view (mapping) properties of the field as you place it on the window. This feature allows you to develop windows using a RAD- or RAP-type methodology, whereby you start relatively early designing your user interface before the underlying action diagrams have been developed.

  7. New users often end up adding fields to their windows incorrectly mapped to a known view and end up with additional unknown or extra views in their action diagrams. Take a few minutes to review your import and export views in the client procedure step action diagram. If you have any views in your action diagram's import or export views other than what was shown, then you will need to correct them.

    Correcting them involves determining which field on the window design caused the view to be created, re-mapping that field to the correct views in the action diagram, and finally deleting the extraneous views from the action diagram. The extra views cannot be deleted if they are mapped to a field on a window.

    If you have any extraneous views, return to the window design, double-click each field on the window, and review its view mapping. Change the field's view mapping to the correct views in the import and exports, and then delete the view from the action diagram. If you are not allowed to delete the view, then it is probably being reused on another field as well.

  8. If necessary save your model again.
  9. Close the action diagram.