Hi All,
I have a Module1 with 3000 objects, each object has a outlink to "TWO" different module Module 2 & Module 3. Now I need a script to check whether all objects is linked with module 2 & Module 3 objects or not..... and need to publish the objects which are not linked.
Link module is only one
Ex:
Module 1 Object 1 is linked to ---> Module 2 Object 1
---> Module 3 Object 1
Module 1 Object 2 is linked to ---> Module 2 Object 2
---> Module 3 Object 2
Module 1 Object 3 is linked to ---> Module 2 Object 3
---> Module 3 Object 3
Module 1 Object 4 is linked to ---> Module 2 Object 4
---> Module 3 Object 4
Note: Module 1 object (must have 2 outgoing links) must be linked to Module 2 & Module 3. Using the link module "Requirement". I need to check this condition for all objects in the module..
Please advice...
Regards,
Raj, S
SystemAdmin - Tue Jul 28 13:24:39 EDT 2009 |
|
Re: How to check links exists or not? SystemAdmin - Tue Jul 28 14:00:18 EDT 2009
Anyhelp much appreciated... Thanks in Advance!
Regards,
Raj, S
|
|
Re: How to check links exists or not? llandale - Tue Jul 28 15:00:51 EDT 2009
You open the target modules of the link refs, as shown in the DXL manual. You loop through the Mod1 objects. You loop through the outgoing links. If the module(lnk) tells you the name of the target module, which you check for Mod2 or Mod3.
Maybe you need to browse for some link scripts, such as generated by the analysis Wizards.
|
|
Re: How to check links exists or not? gpolley - Mon Aug 03 09:29:23 EDT 2009 llandale - Tue Jul 28 15:00:51 EDT 2009
You open the target modules of the link refs, as shown in the DXL manual. You loop through the Mod1 objects. You loop through the outgoing links. If the module(lnk) tells you the name of the target module, which you check for Mod2 or Mod3.
Maybe you need to browse for some link scripts, such as generated by the analysis Wizards.
Couldn't (s)he just use the Analsis->Wizard function on all objects and see which object is linking to which module? Seems pretty straight forward to me...
@thread starter: or do you explicity require a DXL script to do this?
|
|
Re: How to check links exists or not? SystemAdmin - Mon Aug 03 09:38:48 EDT 2009 gpolley - Mon Aug 03 09:29:23 EDT 2009
Couldn't (s)he just use the Analsis->Wizard function on all objects and see which object is linking to which module? Seems pretty straight forward to me...
@thread starter: or do you explicity require a DXL script to do this?
Yes, As part of automation we need to validate each cus.req module obj has been linked to other module(*PD and SFS*) requirements before exporting as xml.
I developed a code and woked for me. Thanks!!!
for srcModName in o<-"*" do
{
if((cistrcmp(srcModName, "PD") == 0) || (cistrcmp(srcModName, "SFS") == 0))
{
if(cistrcmp(srcModName, "PD") == 0)
pdExists = true
else if(cistrcmp(srcModName, "SFS") == 0)
sfsExists = true
else
pdExists = null
}
else
exportflag = false
isTypeNull = true
ack "PD and SFS in-links do not exist for option: " objectID
}
|
|
Re: How to check links exists or not? gpolley - Tue Aug 04 02:51:24 EDT 2009 SystemAdmin - Mon Aug 03 09:38:48 EDT 2009
Yes, As part of automation we need to validate each cus.req module obj has been linked to other module(*PD and SFS*) requirements before exporting as xml.
I developed a code and woked for me. Thanks!!!
for srcModName in o<-"*" do
{
if((cistrcmp(srcModName, "PD") == 0) || (cistrcmp(srcModName, "SFS") == 0))
{
if(cistrcmp(srcModName, "PD") == 0)
pdExists = true
else if(cistrcmp(srcModName, "SFS") == 0)
sfsExists = true
else
pdExists = null
}
else
exportflag = false
isTypeNull = true
ack "PD and SFS in-links do not exist for option: " objectID
}
just 2 things I noticed with your code:
for srcModName in o<-"*" do
1. This is looking at the "in-links" not the "out-links". Is this really want you want?
"Note: Module 1 object (must have 2 outgoing links) must be linked to Module 2 & Module 3. Using the link module "Requirement"
2. Your code looks at any link module not just "Requirement". This is because you specify "*". Is this also want you want?
Thanks.
|
|