I'm trying to build a synchronous run program in guest (linux) since for some ridicules reason vRO doesn't provide this out of the box. All I need to do is figure out how to check if the exitCode or endTime of a process is null/undefined and I can't seem to figure out what it wants.
The process list task returns an array of:
{pid:number, name:string, owner:string, cmdLine:string, startTime:Date, endTime:Date, exitCode:number}
If I iterate over the return value, I can System.log(pid.exitCode) or pid[exitCode] and it says "__NULL__". If I try and do something like: if (pid.exitCode === null) ... or undefined ... it tosses out this error code:
Invalid JavaScript value of type ch.dunes.model.type.TypeConverter$NullObject
How can I check to see if endTime or exitCode are populated? once they have actual values I'll be able to assume the process has ended.
Rather than building out all this logic yourself, have you tried out the Guest Script Manager package we released here in the communities? If I'm not mistaken it already has code built in to handle what you are describing:
Rather than building out all this logic yourself, have you tried out the Guest Script Manager package we released here in the communities? If I'm not mistaken it already has code built in to handle what you are describing:
I didn't know it existed. Is there some centralized "app store" like thingy where I should be looking for these types of things? What you did is the sort of thing I expected to be "built-in". My workflow works, but your's is better, so I'll use that thanks.
Communities documents and flowgrab.com is where you will find a lot of these packages.