cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

How to open a URL using Trigger?

ptc-4672719
1-Newbie

How to open a URL using Trigger?

Hi,

Currently I've a requriement, whenever a defect or item is created I need to open one url via trigger. Let me know what is the code to open an URL via trigger?

Thanks & Regards,

shankar

9 REPLIES 9

Do you want to open up the Integrity web client to a specific item/object or do you want to open a browser to an external website?

Hi,

I want to open a external website(JIRA URL)

Hi,

Anyone know how to open a URL from a remote machine?

Regards,

Shankar

khoppe
14-Alexandrite
(To:ptc-4672719)

Is it a fixed URL or a dynamic URL, depending on infos from out of the item itself?

Greetings,

Klaus

mrump
14-Alexandrite
(To:ptc-4672719)

Hi Shankar,

I'm looking for a similar solution in a different use-case.

I would like to trigger my build server (Jenkins) when checkpoint is created in Integrity (and the project meed some special conditions).

So basically I need a way to KICK-OFF the "run build URL" on my Jenkins from inside my Integrity java script source trigger.

Of course the trigger must be non blocking.

Did you find a solution so far?

Regards Matthias

Hi Matthias,

I can provide a solution for your use case (we have the same use case):

var eb = bsf.lookupBean("siEnvironmentBean");

var pb = eb.createProcessBuilderBean();

pb.setCommand("wget -q --spider --no-check-certificate --http-user=xxx --http-password=yyy https://zzz);

pb.start();

Regards, Ingo

mrump
14-Alexandrite
(To:imontermann)

Thanx Ingo, you just saved my day

KaelLizak
14-Alexandrite
(To:imontermann)

Shankar,

What was it about this answer that did not resolve your request? Maybe we can tailor it to meet your needs?

Regards,
Kael


Kind Regards,
Kael Lizak

Senior Technical Support Engineer
PTC Integrity Lifecycle Manager
mrump
14-Alexandrite
(To:imontermann)

Here's an alternative for those users on Windows Servers that do/can not want to use "wget".

It's the same command in PowerShell and works just great for us:

var eb = bsf.lookupBean("siEnvironmentBean");

var pb = eb.createProcessBuilderBean();

pb.setCommand("powershell.exe -command \"$client = new-object System.Net.WebClient;$client.Credentials = New-Object System.Net.Networkcredential('xxx','yyy');$client.DownloadFile('"https://zzz/"' , 'c:\\temp\down.html' ); \" ");

pb.start();

HTH Matthias

Top Tags