Create a url to only run a Form protocol to appear in the LHS web-port panel

Hello,

Is there a way to create a protocol url such that the output of the protocol appears in the left-hand panel of the web-port.

Use case: User in an external application clicks a button that triggers hyperlink to a PLP protocol that generates a custom Form protocol. The Form protocol, when complete and sibmitted runs a Work protocol. There are parameters that are passed from the external tool into the Form protocol.

Currently the link I have (provided by the Create Link dialogue in the PLP client) runs the Form protocol in the Web port results pane. If I set the Form Protocol parameter in the protocol to point to itself then the Protocol runs in both the LHS and Results panes of the webport.

I expect I could point the hyperlink to teh wrok protocol and have hte Form Parameter of hte work protocol point to hte Form protocol but then how could I pass parameters directly to the Form protocol?

 

Thanks in advance for the advice,

 

Best regads,

Tristan

Answers 2
AC
AC 2024-02-15

Hi @TM. I've tried various combinations of URL query parameters to get this working and I have to accept defeat. As you have noticed, any parameter values passed into the URL are passed to the protocol that you are running, but not passed on to the form protocol, if that is defined. You could run your form protocol directly and show its output on the left hand side by appending parametes={"_displayAs":"left pane"} to the URL, or rather the URL-encoded version parameters=%7B"_displayAs":"left%20pane"%7D, and you could also pass here any protocol parameters by adding them as extra attributes inside that JSON string, but when you execute that, the user will first see the generic form generated by Pipeline Pilot, then the protocol will execute and display its output in the left pane (as desired), but then Pipeline Pilot also submits that form without waiting for the user to change any values in the the form and click Run. Maybe someone else has another suggestion that might work.

AC
AC 2024-02-20

Hi @TM. I've thought of a workaround that does what you want but is not something I would recommend doing if you have lots of these protocols that you want to run in this way. Basically, what I did was create a third protocol ("WebPort Protocol Trigger") that can be run through a normal (non-webport) protocol link and can take a number of parameters in the URL. The URL would be something like this:

https://myserver/protocols/WebPort%20Protocol%20Trigger?$streamfile=$param1=value1¶m2=value2

The protocol executes and writes the parameter values passed in the URL to a user-specific cache and then redirects to the WebPort link for the work protocol.
The work protocol is no different than any other protocol and it has a form protocol defined. When the work protocol executes in WebPort, it will launch the form protocol. The form protocol looks for and reads the cache written by the trigger protocol and creates the form with values saved in the cache.
There are a couple of things to note: the cache is user-specific and the name should be unique for a protocol. This is so if you do decided to implement a couple of these, each has its own cache. The cache is set to save globals, so the data record that it writes doesn't matter more than just as a trigger to write the cache. The form protocol should normally have some checks that the globals are defined but I've gotten around this need by using the implementation parameter DeclareGlobals on that protocol, which will create empty globals that will be overwritten by the values in the cache if the cache exists and is read successfully. The cache is deleted after being read so it cannot be read by mistake by another execution.
As I said, I wouldn't necessarily recommend this as a generic method for executing protocols this way, but it might be useful if you only have one protocol.

comment imagecomment image