Hi Mark,
This is already implemented since version 1.7.4 as the following static methods of the ProcessInstance object:
Array ProcessInstance.icons()
Returns an array of strings with the identifiers of all currently defined process icons. Returns an empty array if there are no icons.
Array ProcessInstance.iconsByProcessId( String processId )
Returns an array of strings with the identifiers of all process icons transporting instances of the specified process. Returns an empty array if there are no icons, or if no icons transport instances of the specified process.
ProcessInstance ProcessInstance.fromIcon( String iconId )
Returns the instance transported by the specified icon, or null if no icon exists with the iconId identifier.
Example:
var id = "Process02";
var p = ProcessInstance.fromIcon( id );
if ( p == null )
console.writeln( "No such icon: " + id );
if ( p instanceof PixelMath )
console.writeln( "The icon \'", id, "\' transports a PixelMath instance" );