Hi , |
Re: Help need to setup regular copy of a Project from one DOORs Db to another You should be able to write a simple DXL script that performs the archive. That may look like this:
void DoArchive(string NameProject, NameFolder)
{ string ErrMess = archive (NameProjBase, NameFolder "/" NameProject, false)
if (!null ErrMess) print "error archiving '" NameProject "' '" NameFile "': " ErrMess)
}
string NameTargetFolder = "c:/MyArchives/Archives_2011-Oct-10"
mkdir(NameTargetFolder)
current = folder("/") // make sure DB root is current
DoArchive("MyProject1", NameTargetFolder)
DoArchive("MyProject2", NameTargetFolder)
DoArchive("MyProject3", NameTargetFolder)
|
Re: Help need to setup regular copy of a Project from one DOORs Db to another |
Re: Help need to setup regular copy of a Project from one DOORs Db to another OurGuest - Mon Oct 10 14:01:46 EDT 2011 Thanks for the help I will give it a go. The two DOORs systems are very remote to each other and the network is not the fastest between us. Add the slow network to the latency and working across it is impossible. Citirx is set up at the other end but its still too slow to be workable over our network. I have been trying to convince the other side to get DWA licences but they won't do it. We have them here and they work fine now I have got it setup as a service. Thanks Janet |
Re: Help need to setup regular copy of a Project from one DOORs Db to another SystemAdmin - Sun Oct 16 23:25:23 EDT 2011 |
Re: Help need to setup regular copy of a Project from one DOORs Db to another Here is a script I wrote to automatically do the following:
This is the script...
//Archive Projects - CheckLocks
/*
Archive projects, after first checking to make sure they aren't locked - email results
NOTE: Replace email address and email server (Lines 12 & 13 below) with your actual address and server
*/
//Created 09/07/2011 - Saab Sensis Corp - C. Annal
/*******************************************************************************
* Global constants
*/
const string targetAddress = "put your email address here"
const string emailServer = "put your email server here"
const string emailAccount = "DOORS"
const string fromDescription = "DOORS"
const string subject = "Archive Results"
/*******************************************************************************
* Global Variables
*/
Lock lockItem
LockList lcklist
string sProjectName
string message = ""
Project pX
Buffer bx1=create, bx2=create
/*******************************************************************************
* Function Declarations
*/
bool bLockedByAnyUser=true, bLocked
/*******************************************************************************
* Script
*/
for pX in database do {
sProjectName = name pX
Project parent = getParentProject(pX)
if(null parent && !isDeleted pX){
lcklist = getLocksInFolder(pX,true,bLockedByAnyUser)
bLocked=false
for lockItem in lcklist do {
bLocked=true;
string lckuser = lockItem.user
bx1+=sProjectName " locked by " lckuser "\n";
break
}// End for lockItem in lcklist do
if(bLocked)continue
bx2+= sProjectName " was processed \n"
string proj_archive = archive (sProjectName,"c:\\DOORS_Projects\\"(sProjectName)".dpa",false,true,allBaselines,false)
if (!null proj_archive)
{
ack proj_archive
halt
}// End !null proj_archive
}// End if(null parent && !isDeleted pX)
}// End for pX in database do
message = bx1 "\n" bx2""
sendEMailNotification(
fromDescription,
targetAddress,
subject,
message)
//halt
|