5 Replies Latest reply on Oct 11, 2018 5:08 AM by Aakanksha Bhandare

    SAAM

    Angel Lyman
      Share This:

      I am new to SAAM and so started by trying to redo one of my CAM models with SAAM.  I noticed the SAAM does not generate TPL for the model.  So is there anyway you can add things to the model after it is published?  For instance we add the Manufacturer to all the models after we build them in CAM as it helps later when we bring them into Remedy.  Thanks

        • 1. Re: SAAM
          Mikael Sandstrom

          Could the attributes option be what you are looking for?

          Editing the model definition

          The model definition is now saved and is open in the application editing view. The application editing view is the same as the visualization, but is always maximized and has additional saving and publishing workflow controls at the top of the window.  When you have saved a model, it is considered a favorite, which is denoted by a blue star under the workflow bar. Clicking the star toggles whether the model is a favorite or not. A blue star shows a favorite, a gray star shows a model that is not a favorite. You can see a list of your favorites on the the Model > Applications page.

          In addition to the workflow controls at the top of the window, the sidebar controls differ from the visualization view.

          • The Display control no longer contains Focus options. You cannot change the focus away from the application view.
          • The Export control provides an additional option. You can now export the model definition. Exported model definitions can be imported using the Model > Applications page.
          • The Attributes control enables you to set the default and custom attributes of the application model. The default attributes are:
            • Description
            • Type
            • Version
          • To add a custom attribute, click Add Attribute.
            Enter the attribute details in name/value pairs. You can add as many attributes as needed. Attribute names must start with a letter or underscore and can only contain ASCII letters, numbers, and underscores. Click OK to apply the changes.
          • To leave the editing view, click Stop Editing.
          • To resume editing, click Edit.

           

           

          Creating an application model - BMC Discovery 11.3 - BMC Documentation

          3 of 3 people found this helpful
          • 2. Re: SAAM
            Angel Lyman

            Thanks Mikael!  That seems to be exactly what i needed.

            • 3. Re: SAAM
              Rajesh G

              Hello Everyone,

               

              How to sync these custom added attributes created in SAAM to CMDB?

               

              Regards,

              Rajesh

              • 4. Re: SAAM
                Andrew Waters

                If you are adding custom attributes you would need to write a syncmapping to push them to the CMDB.

                • 5. Re: SAAM
                  Aakanksha Bhandare

                  Hello Andrew,

                   

                  We have tried creating custom TPL for Custom Attributes(Serial Number & Environment Specification) by importing BAI_Application. Due to lack of exposure on TPL we are not able to sync attributes to CMDB. Kindly help.

                   

                  We are adding attributes in SAAM as shown below :-

                                                             

                   

                   

                  tpl 1.12 module CMDB.BAI_Application_Attributes;

                   

                  from CMDB.BAI_Application                       import BAI_Application 2.1;

                   

                  syncmapping BAI_Application_Attributes 1.0

                      """

                      Extend the default BAI_Application values to 

                      include custom attributes.

                      """

                      overview

                          tags CMDB, Extension;

                      end overview;

                   

                      mapping from BAI_Application.bai as contained_node

                   

                          traverse ContainedSoftware:SoftwareContainment:SoftwareContainer:BusinessApplicationInstance as bai

                   

                              application -> BMC_Application;

                   

                          end traverse;

                   

                          traverse IncludedItem:DefinitionContainment:Definition:ModelDefinition where state="published" as def_containment, model_def

                   

                              traverse Definition:Maintainer:Element:BusinessApplicationInstance as md_bai

                                  md_application -> BMC_Application;

                              end traverse;

                   

                          end traverse;

                   

                      end mapping;

                   

                      body

                          contained_ci := BAI_Application.application;

                   

                          if contained_ci = none or contained_ci = void then

                              stop;

                          end if;

                   

                          skip   := table();

                          direct := table();

                   

                          for each model_def do

                   

                              if def_containment.review_suggested then

                   

                                  for each md_bai do

                                      log.info("Exclude review-suggested '%contained_node.name%' from '%md_bai.name%'.");

                                      md_application   := none;

                                      skip[md_bai.key] := true;

                                  end for;

                   

                              end if;

                   

                          end for;

                   

                          direct[contained_node.key] := true;

                   

                          for each bai do

                   

                              if bai.key not in skip then

                                  direct[bai.key] := true;

                   

                                  application := sync.shared.BMC_Application(

                                      key              := md_bai.key,

                                      SerialNumber     := bai.serialnumber,

                                      EnvironmentSpecification := bai.environmentspecification

                                  );

                   

                                  sync.rel.BMC_Component(

                                      Source          := application,

                                      Destination     := contained_ci,

                                      Impacted        := application,

                                      Name            := "APPLICATIONSYSTEMHIERARCHY"

                                  );

                   

                              else

                                  application := none;

                              end if;

                   

                          end for;

                   

                          for each model_def do

                   

                              for each md_bai do

                   

                                  if (md_bai.key not in direct) and (md_bai.key not in skip) then

                   

                                      md_application := sync.shared.BMC_Application(

                                          key              := md_bai.key,

                                          SerialNumber     := md_bai.serialnumber,

                                          EnvironmentSpecification := md_bai.environmentspecification

                                      );

                   

                                      sync.rel.BMC_Component(

                                          Source          := md_application,

                                          Destination     := contained_ci,

                                          Name            := "APPLICATIONSYSTEMCOMPONENT"

                                      );

                   

                                  else

                   

                                      md_application := none;

                   

                                  end if;

                   

                              end for;

                   

                          end for;

                   

                      end body;

                   

                  end syncmapping;