Having found this some time ago and been able to replicate repeatedly, I've now found the time to demonstrate data loss using PSOS.
We have always been very cautious with PSOS and to better understand the process, set up a test where a calling script, an OnFirstWindowOpen script trigger and a PSOS script set a field to record details about the account names in use, system information, temporary path info, etc. for each stage of the process. The OnFirstWindowOpen script sets the first set of data, the PSOS sets the field to itself and the additional info, then the calling script does the same.
'Commit record' was used between each 'set field' to ensure record locking wasn't a factor.
What concerned us was that despite 'wait for completion' being set within the 'perform script on server' script step, the data set by it was being lost or overwritten by the final 'set field' from the calling script. We tried various additions post PSOS including refresh window, flush cache, commit record, but the only thing that worked was to put a pause script of 3 seconds in place, then the correct data appeared. With a 2 second pause it did not. Using the script debugger resulted in the correct information.
We've replicated this on FMP/FMS14 and 15, but these results has only reaffirmed our nervousness for using PSOS. A sub 2 minute video demonstrating this is at:
This would appear to be a problem with the 'wait for completion' option, but a 3 second pause to get it to work does seem extreme.
Has anyone else experienced issues like this?