Previous Topic: Open the Elementary Process uses Entity Type MatrixNext Topic: Detailing the Business Rules


Examine Expected Effects

It can be useful to examine the expected effects of an execution of an elementary process against objects in the data model. This can assist you in finding gaps in your analysis. Expected effects are defined in terms of creating entities of an entity type, reading entities of an entity type, updating entities of an entity type, or deleting entities of an entity type. Collectively, these are often known as CRUD (Create, Read, Update, Delete) actions.

What are the expected effects of an execution of REGISTER GOLFER on the entity type GOLFER? This process is expected to Create an occurrence (entity) of the GOLFER entity type.

Follow these steps:

  1. To record this in the matrix, highlight the empty cell at the intersection of REGISTER GOLFER and GOLFER by selecting it.
  2. Select the Cell Values: C = Create in the upper-left corner of the matrix, and select the Add object… Examine Expected Effects icon from the Tool Bar.

    Note: If you made a mistake adding a value, remove the cell value by selecting the cell, selecting = Not Referenced from the upper-left corner of the matrix, and selecting the Add object… icon.

What are the expected effects of LOGIN GOLFER? It is expected to Read an occurrence of GOLFER to verify the User ID and Password.

  1. To record this in the matrix, highlight the empty cell at the intersection of LOGIN GOLFER and GOLFER.
  2. Select R = Read Only from the Cell Values: in the upper-left corner, and select the Add object icon on the Tool Bar.

What are the expected effects of ENTER SCORING RECORD? It is expected to Create an occurrence of SCORING RECORD and -, to associate that SCORING RECORD to the GOLFER that maintains it. It must get currency on the GOLFER, and to do that, it has to Read GOLFER.

  1. To record this in the matrix, select the empty cell value at the intersection of ENTER SCORING RECORD and GOLFER.
  2. Select R = Read Only from the Cell Values: in the upper-left corner, and select the Add object icon on the Tool Bar.
  3. Select the empty cell value at the intersection of ENTER SCORING RECORD and SCORING RECORD.
  4. Select C = Create in the upper-left corner, and select the Add object icon on the Tool Bar.

What are the expected effects of CALCULATE GOLFER HANDICAP? It is expected to Read SCORING RECORDs, calculate the handicap index, and Update the GOLFER that maintains them. To update the GOLFER, it must Read the GOLFER first.

  1. To record this in the matrix, select the empty cell at the intersection of CALCULATE GOLFER HANDICAP and SCORING RECORD.
  2. Select the R = Read Only cell value, and select the Add object icon.
  3. Select the intersection of CALCULATE GOLFER HANDICAP and GOLFER. Since R = Read Only is still selected, select the Add object icon.
  4. To add the update cell value to the same cell, select the U = Update cell value and select the Add object object icon.

    Note: Only the update is indicated in the cell value, not the read. If there are multiple CRUD actions for a single cell, it shows the value representing the greatest degree of involvement.

    In order from lowest to highest that would be R, U, D, and C. To verify that both values exist, use the following steps:

  5. In the Activity Hierarchy diagram, select the GOLFER MANAGEMENT function.
  6. Select the Expand Examine Expected Effects icon on the Tool Bar
  7. Select the elementary process CALCULATE GOLFER HANDICAP
  8. Select Detail from the Menu Bar
  9. Select Expected Effects on from the drop down menu.

    You can also maintain the expected effects from here.

What are the expected effects for DELETE GOLFER? It is expected to Delete the GOLFER. To delete the GOLFER, you first must read GOLFER to verify that it exists.

To record this in the matrix, follow these steps:

  1. Select the empty cell at the intersection of DELETE GOLFER and GOLFER.
  2. Select the R = Read Only cell value, and select the Add object icon.
  3. To Add the delete cell value to the same cell, select the D = Delete cell value and select the Add object icon.

How can this help you discover gaps in your analysis? We know that every object of interest to a business has at least two lifecycle states. A creation (create) state represents that point when an object becomes of interest to a business, and the termination (delete) state represents when the object is no longer of interest to the business. However, somewhere between these states a business typically needs to use, that is read and update, these objects. Examining the CRUD actions can help us identify missing processes.

  1. Use the Rotate Examine Expected Effects icon on the Tool Bar to rotate the matrix, and select GOLFER in the Entity Type axis. Your matrix should look like the following illustration:

    Entity Type and Elementary Porcess

    A GOLFER becomes of interest to the business when they register and they no longer are of interest when they remove themselves. Between these events, a GOLFER gets used when they login, enter their scoring records, and when we calculate their handicap index. It appears that a GOLFER receives the full treatment. However, only the golfer's handicap index is updated. What if the GOLFER changes their name or incorrectly enters their name? There is no provision to handle this change, or a change in the SCORING RECORD. Scoring records are created and read, but no provision exists for updating them if they were incorrectly entered, or for removing them.

    Some development methodologies suggest that common action blocks (CAB) can be created to handle these error correction routines. Most people prefer to see them as elementary processes on the Activity Hierarchy diagram. One technique is to take the elementary process where these error correction routines are most likely needed, mark them as non-elementary, and add them as new elementary processes following the original process.

    For example, REGISTER GOLFER can be marked as non-elementary, with ADD GOLFER and UPDATE GOLFER added as elementary processes underneath it.

    Register Golfer

    ENTER SCORING RECORD can be marked as non-elementary with ADD SCORING RECORD, UPDATE SCORING RECORD, and DELETE SCORING RECORD added following it.

    Enter Scoring Record

  2. Make these changes to the Activity Hierarchy diagram. Uncheck the Elementary checkbox from your processes before adding elementary processes to them.

    The improved activity hierarchy should look like the following illustration:

    EGolf Services

Our first level processes under GOLFER MANAGEMENT still represent the lifecycle of a golfer, and we have incorporated all of the activities to fully support the object. Each activity marked as an elementary process meets the guidelines set forth earlier for an elementary process.

To contract and expand portions of the diagram or the entire diagram, select an activity that has lower-level activities and select the Expand Examine Expected Effects or Contract Examine Expected Effects icons on the Menu Bar. When an object is contracted it shows °°°. This is true for many other diagrams as well, including the Data Model diagram.

The updated Elementary Process uses Entity Type matrix that look similar to the following example. You can sort or move columns around as necessary.

Examine Expected Effects

Each entity type now has a full complement of CRUD actions.