4 Replies Latest reply on May 22, 2019 4:54 AM by GeirJohan Birkeland

    how to report on "Added By BMC Discovery"

    Mikael Sandstrom
      Share This:

      Hi,

       

      How can I report on "Added By BMC Discovery"?

      It would be great to get a short list with all the model definitions that has nodes/relationships to nodes that has been "Added By BMC Discovery".

       

      Model Definition NameAdded By DisocoveryReview Suggested
      My PetstoreWebMethods Integration Server 9.12 on Server1Yes
      FinanceMicrosoft SQL Server 2012 on Server2No

       

        • 1. Re: how to report on "Added By BMC Discovery"
          Duncan Grisby

          The information about whether a node in a model was saved by a user, and whether it caused the model to go into review suggested state is stored in attributes on the DefinitionContainment relationships. user_saved is set True if the user saved the node in the model; review_suggested is set True if the node caused it to be put into review suggested. Both can be not set if the condition is not true, rather than set to False.

           

          This query gives the result you want. It's not very likely to be a short list, however. (The strange-looking double not expression is used to convert review_suggested from not-set to false.)

           

          search flags (find_relationships) DefinitionContainment

          where not user_saved and #:IncludedItem:.name

          show

          nodeLink(#:Definition:ModelDefinition, #:Definition:ModelDefinition.name) as "Model Definition Name",

          nodeLink(#:IncludedItem:, #:IncludedItem:.name) as "Item added by BMC Discovery",

          (not not review_suggested) as "Review Suggested"

          3 of 3 people found this helpful
          • 2. Re: how to report on "Added By BMC Discovery"
            GeirJohan Birkeland

            Hi Duncan

             

            Revisiting this thread again now, as one of my customers have a usecase where they need to notify model owners when the models are set to "Review Suggested". I'm thinking this probably could be done with a pattern resulting in sending an email to the email of the model owner, but what would be the triggering condition? Is it even possible to trigger on the Review Suggested flag?

            • 3. Re: how to report on "Added By BMC Discovery"
              Duncan Grisby

              The easiest way to do it would be to trigger on ActivityRecord being created where needs_attention is true.

              • 4. Re: how to report on "Added By BMC Discovery"
                GeirJohan Birkeland

                Thank you! I'll give that a try