Skip to content
BluAge Documentation

BluAge Wizards

This page explains the usage of BluAge Wizards, which help you through some advanced manipulation of your UML model.

BluAge Wizards

TODO : This section is incomplete and should be enhanced.

MagicDraw Contextual Wizards (BluAge Products 5.5)

Containment Wizards

Initial Packages Creation

You can automate the creation of your UML model architecture by using the following steps :

  1. Create the package hierarchy leading to your root package using the MagicDraw Containment view, then add the PK_TARGET stereotype to this package.

    Wizard55_InitialPackages1

  2. Right-click on your PK_TARGET package and select the BluAge - Create initial packages entry, or press Alt+Maj+I;

    Wizard55_InitialPackages2

  3. The project structure will be added to your MagicDraw model.

    Wizard55_InitialPackages3

Getters / Setters Creation

You can automate the creation of getters and/or setters operations for an attribute by using the following steps :

  1. Right-click on the attribute on which you want to create related getters and/or setters operations, then select the entry menu you want depending on if you want to create only the getter, only the setter or both operations;

    Wizard55_GetterSetter1

  2. An information popup appears displaying the result of given operation. In the following case, it informs us that both operations have been successfully created;

    Wizard55_GetterSetter2

  3. The newly created operations are added to your Entity.

    Wizard55_GetterSetter3

NOTES :

  • This wizard handles multi-selection, meaning that you can select multiple attributes and applying this wizard on all of them at once.
  • This wizard only works on attributes of PK_MODEL Entities. Please consider using the Business Objects to PK_MODEL Entities Migration wizard described next before using this one, otherwise it won't work correctly.

Property Shifting With Mappings (COBOL)

You can move a property to an other class, including its legacy mappings for COBOL products, by using the following steps :

  1. Right-click on the property you wan to move and select the BluAge - Move with mappings entry;

    Wizard55_MoveProperty1

  2. On the displayed wizard, you can select the target element among all classes stereotyped with Bean or Entity in your model;

    Wizard55_MoveProperty2

  3. When your choice is made, click on Finish. The property is moved to the target class and its mappings are moved as well. Using the above example, here is the before/after :

    Wizard55_MoveProperty3 Wizard55_MoveProperty4

Business Objects to PK_MODEL Entities Migration

PK_MODEL Entity is the recommended way to model your persisted entities in your UML model. You may however already have modeled your business layer using Entity / Business Object couple modeling, and the following steps will help you automatically migrate your entities into the PK_MODEL Entity standard without breaking anything :

Wizard55_PkModelMigration1

  1. Right-click on your PK_BUSINESS_OBJECT package and select the BluAge - Migrate BOs to PK_MODEL Entities entry;

    Wizard55_PkModelMigration2

  2. An information popup appears displaying the result of the migration;

    Wizard55_PkModelMigration3

  3. The resulting PK_MODEL Entities are added to your model with the following rules :

    • Attributes from the Entities are moved to their associated BO;
    • Generalizations of the Entities are moved to their associated BO;
    • Entity stereotypes from the Entities are moved to their associated BO;
    • BO suffixes are removed if present;
    • The PK_BUSINESS_OBJECT stereotype is replaced by the PK_MODEL stereotype.

    Wizard55_PkModelMigration4

NOTE : Some elements may still be present in the old PK_ENTITY package after the migration, so this package is not automatically removed by the migration process. You may want to handle remaining elements in it and then remove it manually.

Value Object Creation

You can automate the creation of the Value Object associated to an Entity by using the following steps :

  1. If you don't have any, create a package stereotyped PK_VALUE_OBJECT in your model, which will contain your VO;

    Wizard55_VOCreation0

  2. Right-click on the Entity on which you want to create its associated VO and select the BluAge - Create associated VO entry, or press Alt+Maj+V;

    Wizard55_VOCreation1

  3. The following wizard appears :

    Wizard55_VOCreation2

    1. The Target package dropdown allows you to choose the PK_VALUE_OBJECT package in which you want to create your VO, in case you have multiple ones in your model;
    2. The attributes table allows you to specify which attributes have to be mirrored in the associated VO. Each non-String attribute also has its fieldAsString corresponding attribute suggested for display purpose.
  4. When you selection is completed, click on Finish. An information popup appears displaying the result of the process;

    Wizard55_VOCreation3

  5. The newly created VO has been added to your model.

    Wizard55_VOCreation4

NOTE : This wizard only works on PK_MODEL Entities. Please consider using the Business Objects to PK_MODEL Entities Migration wizard described next before using this one, otherwise it won't work correctly.

CRUD Service Creation

You can automate the creation of the CRUD Service associated to an Entity by using the following steps :

  1. If you don't have any, create a package stereotyped PK_SERVICE in your model, which will contain your service layer. You also have to create at least one Interface in your PK_SERVICE package in order to use this wizard;

    Wizard55_CRUDCreation1

  2. Right-click on the Entity on which you want to create its associated CRUD Service and select the BluAge - Create CRUD service entry, or press Alt+Maj+S;

    Wizard55_CRUDCreation2

  3. The following wizard appears :

    Wizard55_CRUDCreation3

    1. The Target service dropdown allows you to choose the Interface in which you want to create your CRUD Service, in case you have multiple ones in your model;
    2. The checkbox table allows you to specify which CRUD operations you want to create in your CRUD Service.
  4. When you selection is completed, click on Finish. An information popup appears displaying the result of the process;

    Wizard55_CRUDCreation4

  5. The newly created CRUD Service has been added to your model.

    Wizard55_CRUDCreation5

NOTE : This wizard only works on PK_MODEL Entities. Please consider using the Business Objects to PK_MODEL Entities Migration wizard described next before using this one, otherwise it won't work correctly.

Value Object Service Creation

You can automate the creation of the VO Service associated to a VO by using the following steps :

  1. If you don't have any, create a package stereotyped PK_VO_SERVICE in your model, which will contain your VO service layer. This package must be located under a PK_SERVICE package . You also have to create at least one Interface in your PK_SERVICE package in order to use this wizard;

    Wizard55_VOServiceCreation1

  2. Right-click on the VO on which you want to create its associated VO Service and select the BluAge - Create VO service entry, or press Alt+Maj+S;

    Wizard55_VOServiceCreation2

  3. The following wizard appears :

    Wizard55_VOServiceCreation3

    1. The Target service dropdown allows you to choose the Interface in which you want to create your VO Service, in case you have multiple ones in your model;
    2. The checkbox table allows you to specify which VO operations you want to create in your VO Service.
  4. When you selection is completed, click on Finish. An information popup appears displaying the result of the process;

    Wizard55_VOServiceCreation4

  5. The newly created VO Service has been added to your model.

    Wizard55_VOServiceCreation5

Process Operation Creation

You can automate the creation of a process operation and its associated Activity Diagram by using the following steps :

  1. Create the prototype of your operation with its parameters and returned value;

    Wizard55_ProcessCreation1

  2. Right-click on this operation and select the BluAge - Convert to process operation entry, or press Alt+Maj+P;

    Wizard55_ProcessCreation2

  3. An information popup appears displaying the result of the process;

    Wizard55_ProcessCreation2

  4. The process stereotype is added to your operation and an Activity Diagram is created next to it with an empty skeleton.

    Wizard55_ProcessCreation4

    Wizard55_ProcessCreation5

Working Bean Creation / Management

You can automate the creation of a program Working bean by using the following steps :

  1. Select all the entities you would like to add in a Working bean in the containment tree, then right-click and select the BluAge - Create Working entry, or press Alt+Maj+W;

    Wizard55_WorkingCreation1

  2. Your newly created class is generated in a generatedModel folder, with the bean stereotype applied to it. It contains a property and an association for each bean you have previously selected;

    Wizard55_WorkingCreation2

  3. In COBOL BluAge products, if the beans you have selected contain mappings, mappings are created in the Working bean to reflect the container. For instance, if the class BeanOne contains mappings which look like :

    PARENT-BEAN.BEAN-ONE.ATTRIBUTE-ONE<=>BeanOne.attributeOne
    PARENT-BEAN.BEAN-ONE.ATTRIBUTE-TWO<=>BeanOne.attributeTwo

Then your newly created Working bean with the property beanOne will contain the following mapping :

PARENT-BEAN.BEAN-ONE<=>Working.beanOne

NOTE : For more information about the mappings mechanism, please refer to the COBOL Mappings page.

You can also automate addition to an existing Working bean by using the following steps :

  1. Select all the entities you would like to add to the Working bean in the containment tree, then right-click and select the BluAge - Add To Working entry, or press Alt+Maj+A;

    Wizard55_WorkingManagement1

  2. On the displayed wizard, you can select the target Working bean among all classes stereotyped with Bean in your model;

    Wizard55_WorkingManagement2

  3. When your choice is made, click on Finish. A property and its association are created for each selected entity in your target Working bean, and appropriate mappings are added to the existing ones using the pattern explained above.

    Wizard55_WorkingManagement3

Web Screen Creation (Spring MVC Hibernate)

You can automate the creation of a web screen by using the following steps :

  1. If you don't have any, create a package stereotyped PK_WEB in your model, which will contain your web layer. You can also create a Use Case which must be located under a PK_WEB package;

    Wizard55_WebScreenCreation1

  2. Right-click on your PK_WEB package or directly on the Use Case and select the BluAge - Create screen diagram entry, or press Alt+Maj+N;

    Wizard55_WebScreenCreation1

  3. On the displayed wizard, you can specify the Use Case name (this field is automatically filled if you have directly clicked on the Use Case to trigger the wizard) and the Screen name;

    Wizard55_WebScreenCreation1

  4. When you configuration is completed, click on Finish. An information popup appears displaying the result of the process;

    Wizard55_WebScreenCreation1

  5. Your newly created Screen is added to your model and displayed.

    Wizard55_WebScreenCreation1

NOTE : This wizard is only useful for the old BluAge stacks which don't rely on the RichUI modelization, such as Spring MVC Hibernate.

Activity Diagram Wizards

Activity Diagram If Creation

You can automate the creation of a if switch with BAGS guards by using the following steps :

  1. Create the Decision Node which will be the starting point of your if switch, then right-click on it and select the BluAge - Create Switch entry;

    Wizard55_IfCreation1

  2. On the wizard which appears, you can click on the Add branch button until you get the correct number of branches you want in your future if. Then, for each branch, you can specify the BAGS condition by typing on the displayed input fields. Weights are increasing from top to bottom with a step of 10, meaning the default case is the most bottom input field;

    Wizard55_IfCreation2

  3. When your configuration is completed, click on Finish. Your newly created if switch is added to your Activity Diagram with each desired branch filled with the correct guard and the BAGS language and a merge node.

    Wizard55_IfCreation3

Activity Diagram Loop Creation

You can automate the creation of a loop (for each / while / for) by using the following steps :

  1. Create the Expansion Region which will be the enclosing region of your loop, then right-click on it and select the BluAge - Configure expansion region entry;

    Wizard55_IfCreation3

  2. You can select the kind of loop you want in the top dropdown of the wizard which appears :

    • For Each : for a for each loop, you have to specify the type and name of the element as well as the collection to iterate upon;
    • While : for a while loop, you have to specify the stop condition;
    • For : for a for loop, you have to specify the count and counter names.

    Wizard55_LoopCreation2ForEach Wizard55_LoopCreation2While Wizard55_LoopCreation2For

  3. When you configuration is completed, click on Finish. The Expansion Region is configured and updated in your Activity Diagram :

    Wizard55_LoopCreation2For

Activity Diagram Comment Creation

You can automate the creation of a comment attached to an UML element by using the following steps :

  1. Right-click on an UML element of your Activity Diagram and select the BluAge - Create Comment entry;

    Wizard55_CommentCreation1

  2. You can type the body of your comment in the wizard which appears next;

    Wizard55_CommentCreation2

  3. Click on Finish. The Comment is added to the owned comments of the UML element, displayed in your Activity Diagram and attached to the UML element;

    Wizard55_CommentCreation3

Activity Diagram BAGS Creation

You can automate the creation of a BAGS Opaque Action by using the following steps :

  1. Right-click on a Control Flow in your Activity Diagram and select the BluAge - Create BAGS here entry;

    Wizard55_BagsCreation1

  2. An empty Opaque Action is added to split the the Control Flow you have selected, with the BAGS language automatically applied;

    Wizard55_BagsCreation2

Activity Diagram BAGS Merge

You can merge multiple successive BAGS Opaque Actions by using the following steps :

  1. Right-click on a BAGS Opaque Action in your Activity Diagram and select the BluAge - Merge successive BAGS entry;

    Wizard55_BagsMerge1

  2. All BAGS Opaque Actions which directly follow the one you selected are automatically merged in the first one;

    Wizard55_BagsMerge2

Activity Diagram Optimization

To generalize the previous wizard and adding other benefits to it, you can also globally optimize an Activity Diagram by using the following steps :

  1. Right-click on one or multiple Activity Diagram(s) and select the BluAge - Optimize Activity Diagram(s) entry;

    Wizard55_ActivityOptimizer1

  2. The benefits of this optimization are as follow :

    • All non-commented consecutive BAGS Opaque Actions are merged into a single one;
    • All shapes are recomputed to exactly fit their contents;
    • A default layout is then applied to the result of previous transformations.

Here is an example of an Activity Diagram (left) and the result of its optimization (right):

Wizard55_ActivityOptimizer_before Wizard55_ActivityOptimizer_after

NOTE :

  • This optimization can also be configured to be the default layouting of generated activity diagrams by the BluAge Legacy Modernization layer.