Not sure, but you may want a new version of "getPkgSetRegistry" called something like "getMatchingPkgSetRegistry".  the parameter to getPkgSetRegistry is a processMask,.. i.e. "myr*".  the new function would take a process i.e. "myroxie1" and find the first package set with a matching processMask.