Filtering and gathering results from accepted/rejects varaibles.

Hello,

I am trying to gather metric from our database and I have create a filter and would like to gather the result from the entire database. Is there a way of gather this information from current view or do I need to create the filter in DXL? If this is the case I have a question with creating a complex filters in DXL. Below is the filter I created in DOORS the only thing is, how would you I go about creating it in DXl mannly the "is empty" and "is not empty" functionality?

Thank you,
Jim
 

(((((((((_NC+ Req is empty) OR (_NC Req is empty)) OR (_Level 2 Req is empty)) OR (_Criticality is empty)) OR (_1E Req is empty)) OR (_Req Type is empty)) AND (_Req Eval == R - Requirement)) 
OR (((((((_Req Type is not empty) OR (_NC+ Req is not empty)) OR (_NC Req is not empty)) OR (_Criticality is not empty)) OR (_Level 2 Req is not empty)) OR (_1E Req is not empty)) AND 
(_Req Eval is empty))) OR (((((((_Req Type is not empty) OR (_NC+ Req is not empty)) OR (_NC Req is not empty)) OR (_Criticality is not empty)) OR (_Level 2 Req is not empty)) OR 
(_1E Req is not empty)) AND (_Req Eval != R - Requirement))) OR ((_Req Type is empty) 
AND (_Req Eval == R - Requirement))

SystemAdmin - Sun Oct 09 15:50:07 EDT 2011

Re: Filtering and gathering results from accepted/rejects varaibles.
llandale - Mon Oct 10 12:31:59 EDT 2011

I don't think I've every deployed any sort of 'Filter' from DXL. For metrics, it doesn't seem reasonable to be creating
a bunch of filters anyway. All my metrics script just open the module, go through the objects and determine if the object
qualifies or not, incrementing a counter.

I'm trying to make sense of your filter and I think I get it. Let me scribble:

int  CountModule(Module mod)
{  // Count how many objects have attributes indicating XYZ
   bool ReqShould  // Object has values indicating is 'should' be a requirement
   bool ReqIs      // Object is marked as being a requirement
   int  CountNeedBe = 0 // How many objects 'should' be requirements but are not
   int  CountNotBe  = 0 // How many objects are marked as requirement, but should not be
 
   for obj in entire(mod) do
   {  if (isDeleted(obj))   continue
      ReqShould = any of those obj.attr values are not null
      ReqIs     = obj."_Req Eval" "" == "R - Requirement"
      if ( ReqShould and !ReqIs) CountNeedBe++
      if (!ReqShould and  ReqIs) CountNotBe++
   }  // end objects in the module
}  // end CountModule()


Having said that, perhaps you WANT filters in the module that show these values.
Even so, having your metrics script open each module visibly, loading a view, and counting displayed
objects is quite ineffective, and doesn't work in nightly batch-mode.

 

 

  • Louie

 

 

Re: Filtering and gathering results from accepted/rejects varaibles.
SystemAdmin - Mon Oct 10 14:02:39 EDT 2011

llandale - Mon Oct 10 12:31:59 EDT 2011

I don't think I've every deployed any sort of 'Filter' from DXL. For metrics, it doesn't seem reasonable to be creating
a bunch of filters anyway. All my metrics script just open the module, go through the objects and determine if the object
qualifies or not, incrementing a counter.

I'm trying to make sense of your filter and I think I get it. Let me scribble:

int  CountModule(Module mod)
{  // Count how many objects have attributes indicating XYZ
   bool ReqShould  // Object has values indicating is 'should' be a requirement
   bool ReqIs      // Object is marked as being a requirement
   int  CountNeedBe = 0 // How many objects 'should' be requirements but are not
   int  CountNotBe  = 0 // How many objects are marked as requirement, but should not be
 
   for obj in entire(mod) do
   {  if (isDeleted(obj))   continue
      ReqShould = any of those obj.attr values are not null
      ReqIs     = obj."_Req Eval" "" == "R - Requirement"
      if ( ReqShould and !ReqIs) CountNeedBe++
      if (!ReqShould and  ReqIs) CountNotBe++
   }  // end objects in the module
}  // end CountModule()


Having said that, perhaps you WANT filters in the module that show these values.
Even so, having your metrics script open each module visibly, loading a view, and counting displayed
objects is quite ineffective, and doesn't work in nightly batch-mode.

 

 

  • Louie

 

 

Hello,

Is there a way of loading an existing view and gathering the accepted and rejected data from DXL that would be the most efective way of going rather than writing additional code to do the same thing.

Thank you,
Jim