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

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

How to open a URL using Trigger?

ptc-4672719
1-Visitor

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
15-Moonstone
(To:ptc-4672719)

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

Greetings,

Klaus

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

imontermann
2-Explorer
(To:mrump)

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

Thanx Ingo, you just saved my day

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

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

Announcements


Top Tags