since this command is for aborting, you can check the workunit states here and only add the ones that are in states that require/support aborting.  Although regression suite uses unique job names, other uses may not.