Previous Topic: Add the Process Logic to ADD SCORING RECORDNext Topic: Edit Action Diagram


Add the Process Logic Using Action Block Synthesis

Now that we know what we want, we can add the process logic to the ADD SCORING RECORD process action diagram. However, rather than manually adding the logic as we have been doing, we will use action block synthesis to add the logic for us.

Action Block Synthesis is similar to Process Logic Analysis in that, after selecting the primary entity type and action, it walks the neighborhood for us, making assumptions about the other entity types and actions. The difference is that, once it has finished walking the neighborhood, the Toolset will automatically generate the action diagram statements based on its assumptions. Therefore, it is important to know what we want, because while action block synthesis is effective, it does not always synthesize the action diagrams exactly as we need them. Often times, the action diagram will need to be modified.

Follow these steps:

  1. Select the ADD SCORING RECORD process and open it is action diagram.
  2. From the Main Menu, select Generate, and then Action Block Synthesis to open the following Action Block Synthesis dialog:

    Add the Process Logic Using Action Block Synthesis

  3. The Action Block Synthesis dialog is made up of three parts:

    In this case, we know that the scoring record is the primary entity type, and that we want to create an occurrence of it. Select SCORING RECORD.

  4. The default action for Mode is a Create. Looking at the options, when it walks the neighborhood, it makes some assumptions regarding the relationships to other entity types. We want to Review these Default Actions and make changes if necessary. We have already done a consistency check on our entire data model and corrected the problems, so it is not necessary to do that again on individual entity types. Un-check Consistency Check on Entity Type. Finally, we can let it Automatically Select the Attributes to be set in the Create, or we can opt to be prompted to select them ourselves. We will go with the default, which is to let it select them for us. Select OK.
  5. In the create of the scoring record, the Toolset recognizes that scoring record has a mandatory relationship to golfer, which means that the scoring record must be associated to a golfer. To associate the two, we must establish currency on the golfer. Currency can be established either by creating a new occurrence of golfer, or by reading an existing occurrence of golfer. Looking at the following dialog, we can see that it is assuming that we are not going to create an occurrence of golfer, but instead read an existing occurrence. The No under the Create column and a YES under the Read column indicate this. Select the OK push button to create the action diagram.

    Add the Process Logic Using Action Block Synthesis