Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: How to know the max abs num of a module
Topic Summary:
Created On: 2-Nov-2005 17:34
Status: Post and Reply
Linear : Threading : Single : Branch
1 2 Next Last unread
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
Answer This question was answered by Iftakher Uddin, on Saturday, February 21, 2009 2:16 AM

Answer:
Hello All,

I got a reply from support.

==========
Unfortunately there is no DXL function that will allow you to give the maximum absolute number of a module. However would you like this logged as a future enhancement request?

Our case ID is SH5013185.
==========

Perhaps in near future!!!

Thank you all for your idea, time and participation.

Many Greetings,
Rony
 2-Nov-2005 17:34
User is offline View Users Profile Print this message


Iftakher Uddin

Posts: 56
Joined: 16-Sep-2004

Anyone know how do I know the maximum Absolute Number occupied by a DOORS formal module?

For example, I have one module as follows:

1. first object

2. second object

3. third object

4. this is purged object

Int getMaxAbsNum(Module modTheModule) should return 4!

I think it already exists and using by the function "create(object) or newObjecAfter() or newObjectBelow()".


Thank you in advance.
Rony
Report this to a Moderator Report this to a Moderator
 3-Nov-2005 08:23
User is offline View Users Profile Print this message


Robert Swan

Posts: 86
Joined: 14-Apr-2005

The quick and dirty way is just to create a new object and determine what its abs number is.
Report this to a Moderator Report this to a Moderator
 3-Nov-2005 09:40
User is offline View Users Profile Print this message


Iftakher Uddin

Posts: 56
Joined: 16-Sep-2004

Thanks... :-)

But it is not allowed to create a new object and get the max num by -1. Lets consider the module is read only. The other work around could be copy that module in a temporary place and after examining the max abs num delete/purge that module. But this may cause performance issue (for example, consider the module has related with 20 link modules). So, need how telelogic find it during creation of a new object!



Report this to a Moderator Report this to a Moderator
 3-Nov-2005 09:52
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

Why would you care what the last absolute number used was?

Anyway, there is no way to determine the last number used, other tha creating a new object as Robert says.

As an aside, absolute numbers are consumed, even if new objects are not saved.
Open an empty module, create a new object. it has abs no. 1. close module without saving.
open modue again. create new object again. it has abs no. 2.

-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 3-Nov-2005 10:12
User is offline View Users Profile Print this message


Hubertus Grobbel

Posts: 58
Joined: 3-May-2005

Hi all,

one reason i encountered this idea was when a module was passed to a customer and returned afterwards. This in the scope of synchronizing two modules. But for this only the highest number of objects was of interest, who cares about the next to be used number.

Just an idea: When objects are managed within a script you can fill a module attribute with the highest number.

Regards
Hubertus
Report this to a Moderator Report this to a Moderator
 3-Nov-2005 15:40
User is offline View Users Profile Print this message


Iftakher Uddin

Posts: 56
Joined: 16-Sep-2004

We have to care about the last abs num because for the following scenario:
Every month Customer XYZ supplies the same module with modifications. Now we have to syncronize the module based on the initial version. In order to do that we have to copy the new object to the initial version with same abs number. If there is a purge object at the end then the process fail!

Now,
- creating a new object will not fit.
- the idea (store highest number in an attribute) is good but its too late to say the customer to do that.

So,
- only the easiest way to do that - is knowing the hidden getMaxAbsNo() or getNextAbsNo() function.

By the way, it is possible to manipulate abs number; atleast for a new object. For example, it is possible to create two objects with same abs num 3 for example!!

Regards,
Rony

Report this to a Moderator Report this to a Moderator
 3-Nov-2005 16:08
User is offline View Users Profile Print this message


Hubertus Grobbel

Posts: 58
Joined: 3-May-2005

Hi Rony,

I see your scenario, but why will the exchange fail if there is a purge in the Away-DB?

I hope following is not confusing ... :-)

Definition: Home-DB is master (maybe on customer site in your scenario)m, Away-DB is slave and i assume this is yours to be updated!

Show deleted objects in away and home DB to exactly detect every change.

When starting your sync process you search for the highest ID in the home-DB. You do the same in the remote DB and generate as much objects as necessary to have both values equal.

Then you create a skip list DELETElist with all object ID's of your away-DB in and delete from the DELETElist on occurence during further processing if its state is non-deleted .

Modified hierarchie of home-DB has to be checked and corrected in your away-DB

... do some organisation and copiing attributes ...

All objects in the DELETElist are to be deleted from leaves to nodes now!

Check in your synchronisation, whether the object is softdeleted (do so too) or no longer existing (assume it is purged, do so too or give a logwarning, whoever cares).

I hope this framework helps and it is stable against purged objects.

Nice project:-)

Regards
Hubertus

Edited: 3-Nov-2005 at 16:14 by Hubertus Grobbel
Report this to a Moderator Report this to a Moderator
 3-Nov-2005 17:06
User is offline View Users Profile Print this message


Iftakher Uddin

Posts: 56
Joined: 16-Sep-2004

Hi Hubertus,

thanks for the idea :-)

The exchange fails because the way of doing the solution is different than you mentioned :-)

If we look to the data base folder \DOORS 7.1\data\v6data\40\50\m00005e4a.mod\current.ver as an example we can find two files absno.XXX which are responsible to generate the next abs number. So there is a hidden function which read these files and generate the actual one (perhaps when we create a new object then these files are being read automatically). But unfortunately the data inside those files are encrypted.

If it is not possible to know a suitable function for knowing maxAbsNo then the existing solution have to change :-(

Regards,
Rony

Report this to a Moderator Report this to a Moderator
 3-Nov-2005 17:39
User is offline View Users Profile Print this message


Ken Mcguffie

Posts: 63
Joined: 3-Feb-2004

I may be missing the point, but could you not create a partition containing the module. The customer can work on the partition in their database and send sync files back to update your database?

Or just take archives from them, that way you will alwyas have objects with the same Absolute numbers

Edited: 3-Nov-2005 at 17:41 by Ken Mcguffie
Report this to a Moderator Report this to a Moderator
 3-Nov-2005 17:44
User is offline View Users Profile Print this message


Iftakher Uddin

Posts: 56
Joined: 16-Sep-2004

thanks...

Another idea... But also not suitable as we already have several delivery from customer.

Regards,
Rony
Report this to a Moderator Report this to a Moderator
 3-Nov-2005 20:22
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

//LargestKnownAbsoluteNumber
/*Demo gives Largest Known Absolute Number which may not be one less than
next allocated Absolute Number
*/
Object o
Module m=current
int i,iMax=0

for o in entire m do
{ i=o."Absolute Number"
if(i>iMax) iMax=i
}
ack "Largest Known Absolute Number =" iMax ""
Report this to a Moderator Report this to a Moderator
 3-Nov-2005 23:24
User is offline View Users Profile Print this message


Iftakher Uddin

Posts: 56
Joined: 16-Sep-2004

Hi,

the given code will give the known max number. But it will ignore if the last abs number is purged!!

Regards,
Rony
Report this to a Moderator Report this to a Moderator
 4-Nov-2005 08:31
User is offline View Users Profile Print this message


Hubertus Grobbel

Posts: 58
Joined: 3-May-2005

Hi Rony,

It is app. really impossible to retrieve the next max abs no for user.

So, I think it's time to clarify your concept in a precise way to allow help. Nonetheless it is not yet clear for me, what your problem *really* is and what you would like to do with the information :-)

Regards
Hubertus
Report this to a Moderator Report this to a Moderator
 4-Nov-2005 12:14
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

The script doesn't ignore last number if purged--- that number is not able to be obtained from the current and past implementation of DOORS.

The last Absolute Number used is stored withing the DOORS database and Telelogic says there is no undocumented dxl command to retrieve the last Absolute Number.

I turned in a reguest to have the last Absolute Number be returnable to the user -- but you know those request fall on deaf ears.
Report this to a Moderator Report this to a Moderator
 4-Nov-2005 13:02
User is offline View Users Profile Print this message


Ken Mcguffie

Posts: 63
Joined: 3-Feb-2004

Why don't you take a different approach. You could restore the module from an archive from the customer in your database , then move all your attributes and links from the old to the new module?

Edited: 4-Nov-2005 at 13:04 by Ken Mcguffie
Report this to a Moderator Report this to a Moderator
 4-Nov-2005 16:46
User is offline View Users Profile Print this message


Iftakher Uddin

Posts: 56
Joined: 16-Sep-2004

Hi Hubertus and All,

I am trying to express the REAL problem using the following example:

Let's consider the following module:

Old Version: Module A
========
1. object 1: this is ok
2. object 2: this is also ok
3. object 3: this is deleted
4. object 4: this is purged

New Version: Module A
========
1. object 1: this is ok
2. object 2: this is also ok
3. object 3: this is deleted
4. object 4: this is purged
5. object 5: this is purged from new version
6. object 6: this is a new object

When we are in "Old Version: Module A" then we get the max abs num as 3 (shouldn't be 4?)...

Now we ask to the module "New Version: Module B"- is there any new object inserted after the max number of "Old Version: Module A"? If we get any object greater than the max abs number (in this case 3) of old version, we check whether this object exists or not. If it exists we create the new object according to its kind (normal or table). And if it is not found in the new version, it means this is purged from new version and then we create a dummy object because it is mandatory to have the abs num same in both versions. And we repeat this process until the max abs num of new version (here we have to consider also the max abs number of new version in order to create the object upto the real max abs number).

So, if we know what is the real max abs num then at the beginning we can consider this number (4 instead of 3 in this example) and problem will never occur!

Hope now it makes sense why max abs number is required.

(how the functions "create(object) or newObjecAfter() or newObjectBelow()" know the actual abs num?)

Thanks for participating...

Have a nice time!
Rony

Report this to a Moderator Report this to a Moderator
 4-Nov-2005 17:18
User is offline View Users Profile Print this message


Roy Bond

Posts: 39
Joined: 25-Mar-2003

Another approach is not to try and synchronise your Object IDs directly with those of your Customer at all, but to have an Object Attribute which contains your Customer Object ID.

This will allow you to simplify your process of tracking change by using Baselines, or some other script which reads Object History from a given date, to identify those Objects which your Customer has modified.

If you need to reproduce documents, print the pseudo ID in the document and not the Object ID.

Roy Bond
MTU Aero Engines
Munich
Report this to a Moderator Report this to a Moderator
 4-Nov-2005 19:15
User is offline View Users Profile Print this message


Iftakher Uddin

Posts: 56
Joined: 16-Sep-2004

Thanks Roy for the idea...

But the problem is, we are doing something with existing solution. And creating a new object attribute is not possible at this stage. BTW, I also tried to get the information from History but it was not possible to get which object was created/purged last time.

Interesting thing is what I am looking for some how written/hidden in \DOORS 7.1\data\v6data\40\50\m00005e4a.mod\current.ver\absno.xxx file (this is an example for a particular module) but we are not able to get that!

I am sure if some one try to do the same task in future he will consider our discussion :-)

Many greetings,
Rony
Report this to a Moderator Report this to a Moderator
 7-Nov-2005 09:21
User is offline View Users Profile Print this message


Robert Swan

Posts: 86
Joined: 14-Apr-2005

From your reply It seems yours is the master module, otherwise you could just transfer any of your work, links to the new version of the module, synched on the abs no., and then delete the previous one. (After archiving to save the history of course.) I don't see why creating a new attribute is impossible, you could make its contents = the abs no, but it is your system. As the country yokel replied when asked the route to the station, "I wouldn't start from here?". So you'll plan for this situation in the future.
Report this to a Moderator Report this to a Moderator
 7-Nov-2005 12:15
User is offline View Users Profile Print this message


Iftakher Uddin

Posts: 56
Joined: 16-Sep-2004

Answer Answer
Hello All,

I got a reply from support.

==========
Unfortunately there is no DXL function that will allow you to give the maximum absolute number of a module. However would you like this logged as a future enhancement request?

Our case ID is SH5013185.
==========

Perhaps in near future!!!

Thank you all for your idea, time and participation.

Many Greetings,
Rony
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 1 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.