Previous Topic: Adding Functionality to Logical Events

Next Topic: Generating and Building the Task Entity and Project.Grid Maintenance Suite.Edit Grid User Interface

Adding Functionality

  1. In the Object Browser, right-click Project.Grid Maintenance Suite.Edit Grid User Interface and choose Editor.

    The action diagram opens, with the Select Edit Point dialog over it. Before you can make a change or addition to a function, you must specify where you want to make the change. This dialog enables you to select the edit or collection point into which to insert new constructs.

  2. To define your events in the Events Handler, select the post point after Edit Point 1 Additional events (which is under Edit Point 0 Additional events).

    PLEX--Adding Functionality

  3. Now, you can see the three windows that make up the Action Diagrammer.

    If these windows overlap, drag or resize them so that you can work with all of them at once.

    PLEX--Adding Functionality (2)

    PLEX--Adding Functionality (3)

  4. In the Action Diagram Palette, expand Panel, and then Events.

    PLEX--Adding Functionality (4)

    The Action Diagram Palette is a container for all the instructions you can use in an action diagram, grouped by similarity. The Panel folder holds all of the syntax elements you use when working with panel functionality.

    In the Events group, notice the Modify Tasks logical event. You previously created this earlier in the chapter; see Creating a Logical Event.

  5. Drag the Modify Tasks logical event from the Action Diagram Palette to the input line at the top of the main window.

    The main window automatically adds the text Event: to the line when you drop the event, indicating that you are adding the functionality for an event.

  6. Press Enter. The Action Diagrammer adds the statement in the input line to the body of the Action Diagram:

    PLEX--Adding Functionality (5)

    You specified that the function will do something when the Modify Tasks logical event is triggered. Next, you specify what the function does.

  7. From the Object Browser, drag Task.Grid Maintenance Suite.Edit Grid User Interface to the input line of the Action Diagrammer (make sure you are dragging from Task, and not Project).

    This time, the Action Diagrammer adds the syntax "Function: " to input line, so that the function calls the Task.Grid Maintenance Suite.Edit Grid User Interface function when the logical event is triggered.

  8. Press Enter. The Parameter Mapping dialog appears:

    PLEX--Adding Functionality (6)

    When you call one function from another, often you need to pass information. In this case, when you call the function Task.Grid Maintenance Suite.Edit Grid User Interface, you need to tell it which Project is selected in the Edit Project panel so that Task.Grid Maintenance Suite.Edit Grid User Interface knows which tasks to display on its panel.

    Next, you indicate which variable in the Project.Grid Maintenance Suite.Edit Grid User Interface function to map it to.

  9. Click Map Parameter. The Select Field dialog appears. This dialog shows you all of the values CA Plex could use for the Project ID field. Because you want to see the tasks assigned to the project that an end user selected on the Edit Project panel, you choose a Project ID field that comes from the grid on that panel.

    PLEX--Adding Functionality (7)

  10. Select the Project ID field that appears below the Grid entry and click OK. This indicates that the function will use the Project ID selected in the Grid region on the Edit Project panel to determine which tasks to display.
  11. Click OK on the Parameter Mapping dialog. The Action Diagrammer appears. The Action Diagrammer should look like this:

    PLEX--Action Diagrammer Windows

    Note: If you need to change the parameter mapping in the future, open this action diagram and double‑click the Call line.

  12. Close the Action Diagrammer and save your changes.
  13. Save your model.