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

[IM] "server-side" costum actions possible?

JensN.
13-Aquamarine

[IM] "server-side" costum actions possible?

Hi @all,

we have developed some custom actions for our users, which will facilitate them their all-day-work. At the moment the users have to install and configure these custom actions for themself (with our help). So we now want to deliver these custom actions by a customized viewset, which the users could import from the server. No problem so far.

Now our question: some of these custom actions are little programs or scripts, and they have icons, and so on. Is it possible to store these scripts and icons at the server (maybe in the /data-directory)? I tried this first with an icon-file, which is stored at /data/public-html/icon.gif. So this icon is now reachable by a browser via http://<server>:<port>/icon.gif. I put this address into the custom action dialog, but it doesnt work:

CustomizeUserButton.png

I think the same problem will appear when i try to put my batch or script or program onto the server and want to use it in my custom action. Is this the case or are there some other options? We didnt want to deploy these files at every user-machine.

Thanks and kind regards, Jens

2 REPLIES 2
mrump
14-Alexandrite
(To:JensN.)

Hi Jens,

we are searching to a fix to that ICON problem for years.

Currently the created a openly shared directory and use that path for the images, e.g.

\\<aServer.at.your.net>\Custom_Addons\siHyperLinkWizard.jpg

Sharing the actual script there is a way that is a bit more tricky, but elegant

Basically it does the following:

use a shell for the "Program" setting: e.g. cmd.exe

use a "one line script" as "Parameter" : e.g.

/Q /D /C si projectco --quiet --project="#/MKS/CustomExtentions/" --overwriteExisting -u --hostname=<host> --port=<port> --user=%USERNAME% --targetFile="%USERPROFILE%\CustomButton1.jar" CustomButton1.jar && "%Integrity%\jre\bin\javaw.exe" -jar "%USERPROFILE%\CustomButton1.jar"

This script does the following:

1. it uses the si cli command "projectco" to download the custom script (in the example an jar file) to a dedicated location in the user's profile

2. then it executes the just downloaded file (using the same jre installed with the integrity client to have a defined environment)

This has some advantages.

You can use Version control and "roll-out" strategies even for your custom scripts.

Every time the user clicks the button he gets the very latest (member) revision of the script you want to share (including the option to roll-back script versions or fast bug-fixes)

This works even with "off-site" user connect via vpn, that cannot access other network drives of your company.

Disadvantage.

You have network-traffic everytime a user clicks a custom button.

The user might experience a little slower response when he clicks the button.

HTH Matthias

KaelLizak
14-Alexandrite
(To:JensN.)

Hello Jens,

We used a shared drive containing the icon files, much as Matthias did. I copied the designated folder of the shared drive to my workstation and pointed everything to there instead, but that wasn't mandated. It was just convenient insurance in case the file server went down, and let me personally avoid the disadvantages Matthias outlines. 🙂

Currently, there is no enhancement request to enable pointing to a URL instead of the file system. RFC 950338: Distribution mechanism for client-side add-ons or custom actions might solve the same issue, although this enhancement request seems to discuss the distribution of the scripts or executables specifically. Adding icon distribution to the mechanism seems like a quite reasonable extension of the existing use case.

Regards,

Kael


Kind Regards,
Kael Lizak

Senior Technical Support Engineer
PTC Integrity Lifecycle Manager
Top Tags