Restore/undo

Hello,

I'm finally going to attempt to start creating a restore baseline/undo changes script. If any anyone has such a script and is willing to share it. It would be greatly appreciated. See the attachment for my initial attempt aka work in progress.. I have a few questions.

mostly on the undo function is it possible to restore an object using the 'history' to be 100% before changes where made or are they conditions were it would be impossible to get 100%.  If an object has ole within it how would one store it using it's 'history'?

Also,

not sure why i'm getting the following error:

-R-E- DXL: <Line:161> cannot move object: object is a table row
Backtrace:
    <Line:210>
    <Line:227>

Thank you,

Jim


EHcnck - Fri Jan 10 14:53:16 EST 2014

Re: Restore/undo
SudarshanRao - Mon Jan 13 04:23:18 EST 2014

If you have attributes which are set to not generate history (Generate History option is unchecked in the attribute definition), then you wouldn't be able to rely on history. If that's the case, you may have to rely only on the last baseline.

The DXL Error suggests you are attempting to move row header object (not visible in module). You may have to try moving the entire table or just the cells as appropriate. There are perms that would help you determine if the object is a row header, or table header or a cell, which you could use before attempting to move.

Cheers,

Sudarshan

Re: Restore/undo
HazelWoodcock - Mon Jan 13 04:23:22 EST 2014

It is possible to set some attributes to not affect the history, so any changes will not be recorded in the history record.

There is a wizard in the menu to compare modules, one of the options with this is to compare the current version to a baseline version. It would be a more complete exercise if you took the baseline content as one of your inputs to your script.

OLEs can either be embedded or linked.  If they are embedded then previous versions should be available in the history.  If they are linked then you will only have the reference to the external location.

I will leave others to comment on the DXL.

 

Hazel

Re: Restore/undo
EHcnck - Mon Jan 13 12:20:25 EST 2014

Hi,

 

See attachment for my latest version of the script... I typical don't delete with DOORS tables via DXL.  How would I go about modifying the script so that if the table(s) change I can move them around, delete and undelete where appropriate? So am attempting to recreate object if purged by copying the 'Absolute number' into the ATTR[rAbsNo] and substituting when needed(mainly within skip list). Any help would be greatly appreciated. Thank you.

-Jim


Attachments

restore.dxl

Re: Restore/undo
llandale - Tue Jan 14 16:13:02 EST 2014

You can create a table by inserting one (recomended) and can also do so by making a normal hierarchy and then converting it to a table (not recomended).  But once created you cannot "un-make" a table, which would include moving the rows around.  I presume you may not also move a cell.

In this scripts case, I think, you want to avoid moving rows and cells, but you can indeed go ahead and move the entire table.  Consider the following:

  • if (table(o))   then o is a hidden "table" object
  • elseif(row(o)) then o is a hidden "row" object
  • elseif(cell(o)) then o is a visable "cell" object
  • else o is a normal object

I'm guessing that DOORS firsts creates the table hierarchy and then converts to a table, and you are trying to un-do that part.

-Louie