Thursday, November 5, 2009

Fabric modeling-How to

Fabric modeling How to
Websphere Business Services Fabric v612
Contact us...
  1. Click File\New\Project(). 
  2. In the Select a wizard window, select UML Project and click Next().
  3. The UML Modeling Project window appears().
    1. Enter a Project name(i.e VehicleLoanExtensions)
    2. Check Use default location
    3. Check Create new UML model in the project
    4. Select Standard template
    5. Click Next
  4. The Create a new UML model window appears().
    1. In the Templates section, select Blank Model
    2. Enter a File name (i.e VehicleLoanExtensionsModel). 
    3. Clear the Create a default diagram in the new model check box
    4. Click Next
  5. The Project window appears.  Select referenced projects if required.  Click Finish().
  6. If you are prompted to change the perspective to the Modeling perspective, click Yes().
  7. A new project (i.e VehicleLoanExtensions) and a new UML model (i.e  VehicleLoanExtensionsModel) are created().

Add a Profile 

  1. Double-click a model (i.e VehicleLoanExtensionsModel) to open it().
  2. Click the Details tab. In the Applied Profiles section, click Add.
  3. The Select Profile window appears().  Click Profile in Workspace and click Browse.
  4. In the Select Profile window(), expand the required profile folder (i.e glossary_profile) and select the required profile (i.e WBSFBusinessGlossaryProfile.epx).  Click OK.
  5. The Select Profile window re-appears showing the selected profile. Click OK.
  6. If you are prompted with a dialog box() with a warning message that tells you that the selected profile has not been released, click OK
A profile (i.e WBSFBusinessGlossaryProfile) is added().

Import Model library

  1. Double-click a model (i.e VehicleLoanOntologyModel) to open it().
  2. Click the Details tab. In the Model Libraries section, click Add.
  3. The Import Model Library window appears().  Click Deployed Library and select a library (i.e XSDDataTypes) from the pull-down menu.  Click OK.
A model library (i.e XSDDataTypes) is added().

Create a package

  1. To create a package, right-click a model (i.e VehicleLoanExtensionsModel) and select Add UML\package().  
  2. Re-name the default package name from «» Package1 as required (i.e glossary).  
  3. When a package is created, a Main diagram automatically opens ().

Create a class

You can create a class by using the Context menu or the Palette menu
  1. To use the Context Menu, right-click anywhere inside the Main diagram and select Add UML\Class().
  2. To use the Palette menu, expand the Class folder and drag Class from the Palette to the Main diagram
  3. In both cases, re-name the default class name (Class1) as required (i.e CustomerTypeEnumeration).
  4. A class is created ().

Duplicate a class

  1. Right-click on an existing class (i.e CustomerTypeEnumeration) and select Edit\Duplicate().
  2. Re-name the duplicate as required.  You can do the re-name either by clicking the class name or changing the name in the Properties\General\Name section().  You can also change the properties of the class as required.
  3. Class duplicates are created().

Create a class attribute

  1. Click a class (i.e CustomerTypeAssertion).  In the Properties section, click the Attributes tab and click the Insert New Attribute rectangle icon().  A default attribute is created.   Rename the default attribute as required (i.e hasCustomerType).  Click on the Type column and select the browse button.  In the Select Element for Type window() select the Search tab and enter a search character/s (i.e s).  All the Types that contains the search character/s appears in the seach result box.  Select the required Type (i.e XSDDataTypes::string) and click OK.
  2. A class attribute is addes ().

Apply a stereotype

You can apply a stereotype to the following artifacts:
  1. Package
  2. Class 
  3. Class attribute.
To apply a stereotype, proceed as follows:
  1. Select the package, class or class attribute (i.e ontology or CustomerTypeAssertion or hasCustomerType respectively) and click Properties\Stereotypes\Apply Stereotypes().
  2. The Apply Stereotypes window for a class attribute appears().  Select the required stereotype/s (i.e as shown) and click OK.
  3. The stereotype/s is/are applied ().

Set stereotype properties

You can set stereotype properties to the following artifacts:
  1. Package
  2. Class 
  3. Class attribute.

To set stereotype, proceed as follows():
  1. Select the package, class or class attribute (i.e ontology or CustomerTypeAssertion or hasCustomerType respectively) and click Properties\Advanced tab.
  2. In the Advanced tab window, select the Property you want to set and in the Value column enter the desired value.

Transform the glossary/ontology modelssformation

Run Ontology transformation to transform a UML model that is defined in one notation converted into another UML model or a text.

Run glossary transformation to transform glossary terms() so that they can be used as OWL classes() in the ontology model.
  1. From the Menu, select Modeling\Transform\New Configuration().
  2. In the Name and Transformation window(), do the following:
    1. In the Name field, enter a name (i.e VehicleLoanGlossaryTransform).
    2. Expand Fabric Transformations and select Glossary Transformation
    3. In the Configuration file destination click browse button.
    4. In the Folder Selection window(), select a project or folder (i.e VehicleLoanOntology) and click OK and then click Next in the Name and Transformation window.
  3. In the Source and Target window(), set the transformation's source and target:
    1. Select the source  (i.e VehicleLoanExtensions\Models\VehicleLoanExtensionsModel
    2. Select the target (i.e VehicleLoanOntology\Models\VehicleLoanOntologyModel)  
    3. Click Next.
  4. In the Properties window(), set the value of Target Package (i.e extensions).  Ensure that the other properties are set to spaces.  Click Finish.
  5. Click the Run Glossary Transformation button().
  6. After a successful glossary transformation, the OWL class definitions are created in the VehicleLoanOntology\Models\VehicleLoanOntologyModel\extensions package().
  7. After a successful ontology transformation, a new project is created that contains blah blah blah...

Extend the industry core model classes

Extend the industry core model classes to create new assertionchannel, and role types to meet your unique and specific requirements.  These classes are in the Fabric-Model-Stubs project().

Example:
Extend a core class (i.e Fabric-Model-Stubs\Models\Fabric-Core\Core Ontology\EnumeratedValue) as shown in this image().
  1. Open the Main diagram in an ontology model that will contain the extensions (i.e VehicleLoanOntology\Models\VehicleLoanOntologyModel\extensions\Main).
  2. Drag/drop a core class that you want to extend (i.e Fabric-Model-Stubs\Models\Fabric-Core\Core Ontology\EnumeratedValue) into the Main diagram.
  3. Drag/drop the class that will contain the extensions (i.e VehicleLoanOntology\Models\VehicleLoanOntologyModel\extensions\CustomerTypeEnumeration) into the Main diagram.
  4. In the Palette menu, click Class\Generalization, click the extension class (i.e CustomerTypeEnumeration) and drag/drop the connection to the core class (i.e EnumeratedValue).  The core class (i.e EnumeratedValue) is now extended by the extension class (i.e CustomerTypeEnumeration).

Directed association relationships

In UML models, directed association relationships are associations that are navigable in only one direction.

A directed association indicates that control flows from one classifier to another; for example an actor to a use case. This flow of control means that only one of the association ends specifies navigability.

If you use association end names, you do not typically need to name an association. You can, however, name any association to describe the nature of the relationship between the two classifiers.

A directed association is displayed as a solid line with an arrow that indicates the direction of navigation.

Here is an example():

  1. Open the Main diagram in the ontology package.
  2. Drag/drop VehicleLoanOntology\Models\VehicleLoanOntologyModel\extensions\CustomerTypeEnumeration into the Main diagram.
  3. Select Class\Directed Association in the Palette menu.
  4. Click CustomerTypeAssertion and drag/drop the connection to CustomerTypeEnumeration
  5. In the Label field, type hasCustomerType, and apply the fabricEnumeratedProperty stereotype to the connection().

Create class instance

In UML models, instance specifications are elements that represent an instance in the modeled system. When you instantiate a classifier in a model, the instance specification that you create represents an entity in the modeled system at a point in time, similar to a snapshot of the entity. You can model changes to the entity over time by creating several instance specifications, one for each snapshot.

Example:
Create the following class instances().
  1. From the Palette menu, click Instance\Class Instance().  Click anywhere inside the Main diagram and in the dialog box that appears click Select Existing Element.  
  2. In the Select Element window(), click the Browse tab and select a class you want to instantiate (i.e CustomerTypeEnumeration).  Click OK. A new class instance is created.
  3. Select the new class instance() by clicking it (i.e CustomerTypeEnumerationInstance). 
  4. Click on the Properties\General tab and do the following:
    1. Name = Change the name of the class instance as required  (i.e to CustomerTypeEnumerationInstance:Premium).  
    2. Value = Enter a value as required (i.e Premium).
  5. You can create as many instances of the same class as required (i.e Regular and New instances).

Export an Archive file

  1. Click File\Export().
  2. In the Select window, expand General, select Archive File and click Next().
  3. In the Archive file window, select the project/s you want to export (i.e FabricOWLProject, etc).
  4. In the To archive file, specify the name and location of the zip file that will hold the exported projects (i.e D:\proj-rsa70\export\fabricitsobank.zip)
  5. Click Finish().

Export a Project Interchange file

  1. Click File\Export().
  2. In the Select window, expand Other, select Project Interchange and click Next().
  3. Select the project/s you want to export (i.e Fabric-Model-Stubs, etc).
  4. Select derived files if you also want to export them.
  5. In the To zip file, specify the name and location of the zip file that will hold the exported projects (i.e D:\proj-rsa70\export\FabricModellingTool.zip)
  6. Click Finish().

Import a Project Interchange file

  1. Click File\Import().
  2. Expand Other, select Project Interchange and click Next().
  3. Click Browse (From zip file), and specify the location of a file you want to import, i.e fabric-core-stubs-project-interchange.zip file().
  4. Select the required project interface file and click Open().
  5. Select the required project/s and click Finish().

Change text file encoding to UTF-8

OWL files generated by the WebSphere Business Services Fabric Modeling Tool must be encoded as UTF-8 text files to be acceptable for import by the IBM WebSphere Business Services Fabric. 
To ensure this, change the Rational Software Architect workspace text file encoding as follows:
  1. Select Window\Preferences from the RAS main menu.
  2. Expand General tab and select Workspace().
  3. In the Text file encoding section, select Others
  4. Select UTF-8 from the drop-down list
  5. Click OK.

Related links


No comments:

Post a Comment