perform script on server is
a) a FileMaker script with scriptsteps that are 'server capable'
b) about the same as a FileMaker script that is started using a schedule of FM Server
for b) there is quite some documentation (manuals, training series,)
nothing special - but some potholes (-:
- the script starts an own session (like human logged out and logged in again, no $$Vars etc.)
- it is always a good idea to do the first runson a test server before going productive..
Another caveat (I believe, someone back me up or correct me on this) is that if the client crashes, their PSOS session terminates, as well. I'm experimenting with using this for logging an audit trail, but if I don't wait for completion, the user could commit a change and crash, and not have their changes logged.
I think I'll still use PSOS, but I may need to wait for completion before making the commit, rather than just sending it to the server prior to commit.
Just a thought. Like I said, someone correct me if I'm wrong on this. It's still a work in progress.
Are there any clean examples of PSOS out there?
PSoS is not a technique, is just a bit of functionality so there won't be any example files. Its just a script with nothing but server compatible script steps that you ask FMS to run.
It sounds like you want it to interact with the user's session and that's where things get tricky. PSoS runs as a separate user session, it inherits nothing from the current user except its credentials and when it is done it does not change the user's session at all. If you want to create new records you can return the new IDs as a script result but you will have to do the scripting to make sure the user has those in his found set.
These articles from Beezwax should prove helpful: