Creating an Entity Services instance

To create an Entity Services pattern instance follow these steps:

  1. Select the transaction in which the pattern needs to be applied.
  2. Select the patterns part.
  3. Select the Entity Services pattern

SelectingPatternInstanceToApply
Applying entity services pattern instance

Once the entity services patten is selected a dialog will appear, in which the developer is prompted to:

  1. Create the instance with the default template: The default pattern instance will be created if this option is selected. The developer can then configure the instance by editing the WorkWith, EntityManager, and Transaction (Entity Services) nodes and their children.
    K2BEntityServicesInstanceEdition
    Entity Services pattern instance edition

  2. Create based on template: A dialog will appear in which the developer can select a template for the WorkWith and the EntityManager interfaces. After executing the dialog's finish button the instance will be created. The developer can afterwards tweak the instance to adapt to its needs. For more information read Creating an EntityServices instance based on a template.

After executing one of these options and saving the transaction the instance will be saved and the pattern will be applied, generating its related objects.

GeneratedObjectsFolderView
Generated objects as a child of the transaction´s Entity Services instance

Notes:

  • The objects generated by the pattern should be maintained by the pattern, avoiding manual modifications. Code should not be added directly to generated objects, to do so Events nodes in K2BTools Patterns must be used. If an object part is manually modified it will no longer be generated and compatibility problems may arise. In that case the steps in "Part was manually modified by the developer" warning must be followed.
  • If you wish to maintain the generated objects without using the Entity Services pattern, you should delete the entity services pattern instance.
    DeletingK2BEntityServicesInstance
    Deleting K2BEntityServices instance