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: Counting the number of times a script is executed
Topic Summary:
Created On: 8-Aug-2008 19:44
Status: Post and Reply
Linear : Threading : Single : Branch
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.
 8-Aug-2008 19:44
User is offline View Users Profile Print this message


Pranav Chandrasekhar

Posts: 101
Joined: 16-May-2006

I am not sure if this question has been answered elsewhere but I figured I should ask it anyway. I have deployed a collection of DXL scripts in a shared location for a group of users. Is there anyway I can monitor (with some type of reporting capability) the number of times these scripts have been used? Has anyone here implemented something like this. Please do let me know. Thank you.

Regards,

Pranav
Report this to a Moderator Report this to a Moderator
 8-Aug-2008 20:09
User is offline View Users Profile Print this message


Pekka Mäkinen

Posts: 276
Joined: 18-Mar-2004

Maintain the a text file in the same shared location. When the the script starts, read the text file containing a number on the executions of the script. Add one to to number and rewrite the file.

-------------------------
Pekka.Makinen@softqa.fi
SoftQA Oy -http://www.softqa.fi/
Report this to a Moderator Report this to a Moderator
 11-Aug-2008 16:10
User is offline View Users Profile Print this message


Tony Goodman

Posts: 97
Joined: 6-May-2008

You could also use a configuration file in the same way.

-------------------------
Tony Goodman
Smart DXL limited
www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 15-Aug-2008 01:02
User is offline View Users Profile Print this message


Pranav Chandrasekhar

Posts: 101
Joined: 16-May-2006

Hi Pekka,
My sincere apologies for not having acknowledged your prompt and helpful response. I was just curious, have you actually tried this before? Furthermore, have you tried a method in which a text file can contain the number of script executions for multiple scripts? Please do let me know if you have. Thank you once again.

Pranav
Report this to a Moderator Report this to a Moderator
 15-Aug-2008 01:04
User is offline View Users Profile Print this message


Pranav Chandrasekhar

Posts: 101
Joined: 16-May-2006

Hi Tony,
I was wondering if you could say a little more about the configuration file. Thanks in advance.

Regards,

Pranav
Report this to a Moderator Report this to a Moderator
 15-Aug-2008 08:14
User is offline View Users Profile Print this message


Pekka Mäkinen

Posts: 276
Joined: 18-Mar-2004

I have done text-based logs which append to a text file startup information from specific scripts. These were though some non-interactive scripts started through task scheduler. The possible problem with this approach of using files is file locking, if you have many users starting scripts simultaneously then some startups might not be included in the file.

-------------------------
Pekka.Makinen@softqa.fi
SoftQA Oy -http://www.softqa.fi/
Report this to a Moderator Report this to a Moderator
 15-Aug-2008 13:54
User is offline View Users Profile Print this message


Tony Goodman

Posts: 97
Joined: 6-May-2008

Configuration files provide you with a mechanism to store information that persists between doors sessions. These can be user-specific or global. This is the mechanism used to store user settings such as favourites. The files exist within the doors data directory.
They are explained... well mentioned... in the help files.

Here is an example.

-------------------------
Tony Goodman
Smart DXL limited
www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 15-Aug-2008 17:47
User is offline View Users Profile Print this message


Pranav Chandrasekhar

Posts: 101
Joined: 16-May-2006

Thank you very much Tony!!!!

Regards,

Pranav
Report this to a Moderator Report this to a Moderator
 15-Aug-2008 18:14
User is offline View Users Profile Print this message


Pranav Chandrasekhar

Posts: 101
Joined: 16-May-2006

Hi Tony,
I was wondering if the COUNTER CONFIG DIRECTORY can be set as registry entry. Please do let me know. Thank you.

Regards,

Pranav
Report this to a Moderator Report this to a Moderator
 15-Aug-2008 19:01
User is offline View Users Profile Print this message


Pranav Chandrasekhar

Posts: 101
Joined: 16-May-2006

Hi Tony,
I tried incorporating your script to count the number of executions of my script. For some odd reason, on the confmkDir statement, it tags on my directorypath to that of the path of my data folder of the DOORS database that I am logged on to via my client. Any ideas why this might be happening? PLease do let me know. Thanks in advance.

Regards,

Pranav
Report this to a Moderator Report this to a Moderator
 26-Aug-2008 12:45
User is offline View Users Profile Print this message


Tony Goodman

Posts: 97
Joined: 6-May-2008

Configuration files are stored inside the data folder.

The directory name you provide should just be a directory name e..g "fred" and not include a full windows path.

-------------------------
Tony Goodman
Smart DXL limited
www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 26-Aug-2008 15:50
User is offline View Users Profile Print this message


Pranav Chandrasekhar

Posts: 101
Joined: 16-May-2006

Thank you once again for your response.
Report this to a Moderator Report this to a Moderator
 28-Aug-2008 20:34
User is offline View Users Profile Print this message


Grant Cyboron

Posts: 6
Joined: 28-Jan-2004

I was not aware of the configuration file method, so I wrote a simple dxl file that would write the information I wanted into a common file. It writes the username, the current date and a "logFileName" string, which in most cases is just the filename of the script. I can read this into Excel and use pivot tables to analyze which scripts are being used. In cases where a "Cancel" button was included in the GUI of the script I included a second version of the logFileName string that had "-CANCELED" at the end so that I could tell if someone started it and then canceled without letting it complete. The logFile function in attached below. The line "string useLogFileName = ..." must specify a file that all of your users have write access to or they will get errors. I included the test for my username since my job is DOORS support and I don't need to know how many times I run the scripts .

--------------------------------------------
Grant Cyboron
L-3 Communication Systems East

--------------------------------------------

-------------------------
Grant Cyboron
L-3 Communication Systems East
mail grant.cyboron@l-3com.com
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.