Hello,
I'm looking for a way for a forward a protocol automatically to another. ie. without user intervention.
An example is using a custom filter that checks for a variable. If the variable exists the protocol continues on and if it doesn't another protocol is called automatically.
My intention is to use this for login forms (ie. whether the user has logged in or not).
Thanks!
I'm looking for a way for a forward a protocol automatically to another. ie. without user intervention.
An example is using a custom filter that checks for a variable. If the variable exists the protocol continues on and if it doesn't another protocol is called automatically.
My intention is to use this for login forms (ie. whether the user has logged in or not).
Thanks!

I gave that a try but it doesn't seem to work.
If I understand the runProtocol() correctly, it runs the specified protocol and then returns the data back to calling protocol.
What I need is to "fully move" to the next protocol.
Basically protocol shortcuts work the same way as subprotocol shortcuts. If you update the parent protocol, the shortcut gets updated. It's a pretty simple way of implementing workflow within PP.
If you told us more details about how you're using this, it might be clearer. How are your users calling these protocols? Solely through Web Port, or do you have some other web framework that serves forms generated by Pipeline Pilot? One option you might consider is using runjob.pl to initiate your form-creation protocols, since that will automatically redirect users to a login page if they are not yet authenticated.
IMO, the main attraction to workflow is the ability for an arbitrary automated business process to hibernate and be resurrected and continue at any time when new information becomes available. I don't really see how you could accomplish this very well in PP without some sort of external framework to help execute the right protocols at the right time.
And IIRC, components are resolved as required at initialization time, so if you don't have data entering a component for a particular run of the protocol, it wouldn't ever have to get the full xml content for that component.
What I want is a persistent login. I have a set of 5 protocols, A calls B, B calls C, etc. Protocol D displays an HTML page of compound names, and clicking on one calls protocol E which displays information on that compound. This information is restricted, however, and requires the user to log in to my database.
The persistent auth details need to be stored in protocol D. Since I can't back-add properties I am using filters in Protocol D.
Filter 1 checks if a compound name is specified:
No --> Display the list of compounds (the "default" when protocol is first called)
Yes --> Recalls protocol D (See below)
The "yes" case calls another filter
Filter 2 checks if login details are present:
No --> login form presented (will again call protocol D when submitted)
Yes --> forward to protocol E ****** Here is the protocol forwarding! ******
The flow for protocol D is therefore:
Display compound list
Login
Call protocol E
This is all done through Web Port. I'm not sure how to utilize runjob.pl to accomplish this (if possible). Any help would be appreciated.
Thanks!
I believe that they are only resolved when actually called, but don't quote me on that.
Right, and real "workflow" within PP has been requested for at least the past five years, possibly more. I guess protocol flow would have been a better term.
June,
Thanks for this, it has been staring me in the face all the time and I did not see it. One question though: Are all protocol shortcuts resolved when loading the top protocol? If I have shortcuts to multiple protocols, the protocol that is loaded in memory can become prohibitively huge. If shortcuts are only resolved when actually called this would not happen.
Also, what do you mean by "I can't back-add properties"?
As for runjob, I had thought that would be a good way for you to automatically take advantage of the built-in authentication and cookie management. But, it sounds like you're talking about a database login that is independent of a domain login, so I don't think you'd gain anything by trying to use runjob.pl. There was another discussion on this forum about using runjob, though, and Andrew LeBeau gave some pointers on how to take advantage of it. But it is a much more manual (and undocumented) process than using Web Port.