Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic SYNERGY (steve huntington)
Decrease font size
Increase font size
Topic Title: Creating a hyperlink to a CS Report
Topic Summary:
Created On: 4-Aug-2005 17:48
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
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.
 4-Aug-2005 17:48
User is offline View Users Profile Print this message


Kristan Hatch

Posts: 8
Joined: 4-Sep-2003

Is there a way to use a hyperlink to directly access a Change Synergy Report?

Report this to a Moderator Report this to a Moderator
 8-Aug-2005 12:54
User is offline View Users Profile Print this message


Boris Baldassari

Posts: 3
Joined: 30-Apr-2004

hello;

yes, there is. given a few variables, an url can be built which leads directly to the report page. There are indeed several ways to build such an url, depending on the type of repot you want. The best way to guess these is to dump network traffic between a web host and the server and to request the corresponding report thourgh the web interface. The url can then be rebuilt from the TCP stream (this is how i can answer you question).

my (${ip_add}, ${report_name}, ${querystring}, ${/path/to/db}, ${role})

http://${ip_add}:8600/servlet/...o/db}&role=${role}

best regards,

--
Boris
Report this to a Moderator Report this to a Moderator
 26-Aug-2005 09:00
User is offline View Users Profile Print this message


Andre Quillen

Posts: 13
Joined: 10-May-2005

That is not necessary.

Save a CS report to your hard-drive, then inspect the java code to determine the URL parameters.  Or ask somebody who has already done this.


There seem to be two ways to access forms/attachments through direct URL links:

By specifying the database to use

By specifying a valid token to use

Pros/Cons of specifying the DB in the URL:

Pro - Each user who follows the link can edit the form per her account priviledges.

Pro - Once a user logins to the ChangeSynergy database, they will be remembered on future visits for the rest of the day or week.

Con - Users must login to follow the link.

Con - Users are required to login regardless of whether they want to edit or just quickly view the form.

Pros/Cons of specifying a Token:

Pro - Anybody with access can follow the link and view the form or download the attachment.

Pro - Users never need to login, and don't need accounts.

Con - Token created with a 'no_privs' account will not allow editing of forms.

Con - Cron job, etc., needs to be created to set up Token. Then Token needs to *somehow* be integrated into the URL links.

Specifying a token is more work for the programmer, but easier and quicker for users who do not want to edit forms.

 

Using Perl I was able to easily start a daily Token generation system.

 

 

Examples of such URLs:

URL to a form with DB specified:

http://<IP_ADDRESS>:<PORT>/servlet/com.continuus.webpt.servlet.PTweb?ACTION_FLAG=frameset_form&TEMPLATE_FLAG=ProblemReportView&database=<DB_PATH>&role=User&problem_number=31

URL to a form with Token specified:

http://<IP_ADDRESS>:<PORT>/servlet/com.continuus.webpt.servlet.PTweb?ACTION_FLAG=frameset_form&TEMPLATE_FLAG=ProblemReportView&role=User&problem_number=31&token=<19_DIGIT_TOKEN>

Download URL with DB specified:

http://<IP_ADDRESS>:<PORT>/servlet/com.continuus.webpt.servlet.PTweb?ACTION_FLAG=object_show_form&TEMPLATE_FLAG=DownloadAttachment&database=<DB_PATH>&role=User&cvid=10188

Download URL with Token specified:

http://<IP_ADDRESS>:<PORT>/servlet/com.continuus.webpt.servlet.PTweb?ACTION_FLAG=object_show_form&TEMPLATE_FLAG=DownloadAttachment&cvid=10188&role=User&token=<19_DIGIT_TOKEN>


You can get really creative and use reports.  In the case below 'Simple2' is a special format that I created and then shared for the database.

http://<IP>:<PORT>/servlet/com.continuus.webpt.servlet.PTaction?ACTION_FLAG=incremental_report&CHOSEN_REPORT=Simple2&INCREMENT_SIZE=32&role=User&database=%2Fapps%2Fccmdb%2F63%2F<DB_NAME>&QUERY_STRING=crstatus%3D%27scr_submitting%27

Enjoy,

Andre Quillen
Raytheon

Report this to a Moderator Report this to a Moderator
 30-Aug-2005 20:43
User is offline View Users Profile Print this message


Kristan Hatch

Posts: 8
Joined: 4-Sep-2003

Thanks for the input, Andre! I will give it a try!

Kristan
Report this to a Moderator Report this to a Moderator
 31-Aug-2005 22:34
User is offline View Users Profile Print this message


Andre Quillen

Posts: 13
Joined: 10-May-2005

If you try what I mentioned, and then still have trouble, I could assist you with more specific information.  Just let me know!

Andre' A Quillen
Raytheon
Report this to a Moderator Report this to a Moderator
 3-Nov-2006 15:18
User is offline View Users Profile Print this message


Coman Wakefield

Posts: 18
Joined: 1-Jun-2005

I'm doing integration work between another of our corporate IS systems (salesforce) and Change/Synergy including creating CRs in synergy from the other system.

I'm interested in building a URL to a Change/Synergy CR that can be clicked/embedded in the source  system, allowing the user to click on the URL and be presented with the synergy CR.

I hit upon your e-mail thread about constructing URLs and found it interesting.

What is a token? some sort of unique session ID generated by synergy that represents a log in or something?

Ideally I'l like to allow anybody to view the synergy CR, but I don't know if this means we will need a read-only synergy account to be created and the credentials/role for that account hard-coded in to the URL?



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


Andre Quillen

Posts: 13
Joined: 10-May-2005

Hello Coman,

Yes, a token is an unique ID generated by Synergy.  The token for a particular user does not change for the whole day regardless of how often the user logs in and out.  The token changes each time the <something on the server> is reset/rebooted. 

You could create a guest account to use for anybody to use and you could hardcode the token for that day in the URLs.  (This means that you would need to recreate the URL(s) and token(s) each morning.

If you need help generating tokens, just holler back.

Luck,

Andre'
Raytheon
Report this to a Moderator Report this to a Moderator
 6-Nov-2006 11:23
User is offline View Users Profile Print this message


Coman Wakefield

Posts: 18
Joined: 1-Jun-2005

Is it possible to use an explicit username & password in the URL instead of a token?

The URL will be generated when information from synergy is extracted and imported in to the other system; therefore the URL will remain static, and from what you have said sessions IDs are not guaranteed to last forever.

So if we were to create a read-only limited synergy account, could we embed the username and password for this account in the synergy URL?
Report this to a Moderator Report this to a Moderator
 6-Nov-2006 20:14
User is offline View Users Profile Print this message


Andre Quillen

Posts: 13
Joined: 10-May-2005

"I can neither confirm nor deny" the possibility of putting the password in a URL query.  This URL functionality was never designed to be used by the public, so naturally there is no documentation on any of it. 

After giving it some thought, providing a username and password seems like an extra step.  The other operations that we discussed were only for a single report.  This operation would be first a login and then a report.  With that in mind, I'm not feeling like such a thing would be possible in general. 


If you do find anything out, please let us know!


Good Luck,

Andre'
Raytheon



Edited: 6-Nov-2006 at 20:29 by Andre Quillen
Report this to a Moderator Report this to a Moderator
 11-Dec-2006 17:10
User is offline View Users Profile Print this message


Michael Bourla

Posts: 10
Joined: 24-Jul-2003

Andre - You said (a year ago!) that you'd set things up to generate a token each day using Perl. I'm very keen to find out how to do this. Would you be able to let me have the Perl script you used? I'm wondering if this will still work with newer versions of Synergy, as I know the way tokens are used changed going from 4.3 to 4.4.

Many thanks
Michael
Report this to a Moderator Report this to a Moderator
 11-Dec-2006 20:53
User is offline View Users Profile Print this message


Andre Quillen

Posts: 13
Joined: 10-May-2005

Hello Micael (and Boris, and all),

Please find below the contents of my token generating file.  You can use this as a basis for your implementation; hopefully the program is easy enough to read and understand.  Let me know if I can be of any assistance,

Andre' Quillen
Raytheon


Here is a script that I "cron" so that the token is generated on a regular basis:

/usr/bin/perl_solaris/bin/perl ./GetTokenPRC.pl >> ./output/token_status.txt



Here is the perl file itself:


#! /usr/bin/per_solaris/bin/perl
#Include the ChangeSynergy csapi module.

use ChangeSynergy::csapi;

#Create a new instance of the csapi object.
my $csapi = new ChangeSynergy::csapi();

$host = "hostname";
$database = "databasename";

$user = "guest";
$pswd = "guest1";

$port = 86xx;

#Eval block is used for error handling.
eval
{
 #Setup the connection parameters for connecting to the ChangeSynergy Server.
 #Note however that no connection to the server is made at this point.
 $csapi->setUpConnection("http", $host, $port);

 #Login to the ChangeSynegy server. (user, password, role, database);
 my $aUser = $csapi->Login($user, "$pswd", "User", "/path/$database");
 
 #Open a file called token.html for output.
 open (OUTPUT, "> ./output/token.html");

 #Write the contents of the returned result to the report.html file.
 print(OUTPUT $aUser->getUserToken());

 #Write the contents to standard output also:
 print $aUser->getUserToken() . "\n";
 print "Today's user token for guest has been generated." . "\n";

 #Close the output stream.
 close(OUTPUT);
 
};

#If any errors occured, print them to the screen.
if ($@)
{
 print $@;
}

Report this to a Moderator Report this to a Moderator
 12-Dec-2006 16:03
User is offline View Users Profile Print this message


Michael Bourla

Posts: 10
Joined: 24-Jul-2003

Thanks for that, Andre - worked fine!
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic SYNERGY forum.
There are currently 1 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 15:34.
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.