Working with Design Patterns

In Design Studio, design patterns are wizards that can be used to create preconfigured entities (and the relationships among the entities) in a workspace. Design patterns automate complex, repeatable tasks, and enable team members with varying levels of skill to complete these tasks using a wizard interface. Your teams can use design patterns to reduce errors, simplify modeling, and increase productivity.Solution design teams install design patterns as Design Studio features and, using wizards, apply the patterns to their workspace. These wizards ensure compliance with the best practices and reduce the need for coding and complex configuration.

See "Applying Design Patterns" for more information. See the Design Studio Developer's Guide for more information about developing your own design patterns.

Applying Design Patterns

You apply design patterns using the Design Pattern wizard.

Note:

Design patterns can overwrite existing resources in the workspace, and the results of a design pattern can vary, depending on the current state of the workspace and the configuration details defined in the design pattern. See Design Studio Developer's Guide for more information about design patterns. See "Realizing Conceptual Model Entities into Application Entities" for information about using design patterns with conceptual model entities.

To apply a design pattern:

  1. Do one of the following:

    • In Design Studio, from the Studio menu select Design Pattern.

      The Design Pattern wizard appears.

    • Select an entity or data element from a Design Studio view, right-click and select Design Pattern.

      The Design Pattern wizard appears, displaying the context in focus. For example, if you selected and right-clicked an Order entity in the Solution view, the wizard displays design patterns that are related to OSM orders. If no design patterns are related to the selected entity or data element, Design Studio displays design patterns that are similar. For example, if there are no design patterns registered for OSM orders, the wizard displays patterns related to OSM projects.

  2. Do one of the following:

    • Select a design pattern from the list that appears in the dialog box.

    • Select a design pattern from your local file system.

  3. Click Next.

    The Design Pattern Wizard Introduction page appears.

  4. Read the information about the contents of the design pattern and click Next.

    The wizard displays the first group of fields defined in the design pattern. These fields may be populated with a default value if the design pattern was launched from a selected entity or data element. For more information about token groups, tokens, and input, see the Design Studio Developer's Guide.

  5. Enter information into the wizard, as prompted.

    Each page in the wizard displays a set of fields defined in the design pattern. The Design Pattern wizard prompts you for all information required to apply the pattern.

  6. Navigate through the wizard to completion, then click the Summary button.

    The Summary page displays the following:

    • All field values that you provided.

    • All resources to be copied to the workspace. The original name, new name, resource type, and target project displays for each resource. This section also indicates whether any resources with identical names exist in the workspace and whether the design pattern will overwrite the existing values. For example, if a resource with the same name and type exist in the workspace and the resource override value is defined as true, when the design pattern is applied the local resource file will be overwritten.

    • All actions. The source entity, target entity, and action type appear for each action. This information includes whether the relationships and parameters in existing entities can be overwritten by the design pattern. Restricted actions that cannot be performed because of the configuration appear in the Restricted Actions section.

    • All inputs. The input entity or element appears for each input.

  7. Click Finish.

    After the wizard collects all of the information, Design Studio copies the resources generated by the design pattern into your workspace.

  8. (Optional) Review the design pattern log file.

    The log file contains the same information that appears on the Summary page. Design Studio copies the log file to the workspace when the design pattern processing completes.

  9. (Optional) In the Help view, use the cheat sheet to review the contents of the design pattern, or to complete any remaining manual steps.

    Design Studio may launch an Eclipse cheat sheet after the design pattern is applied, if a cheat sheet is included in the pattern. Design Patterns are built automatically after you apply them.

After you apply the design pattern, you can modify the configuration the design pattern generated and you can modify the resources the design pattern copied to your workspace. See the Design Studio Developer's Guide for more information about design patterns.