BZ-1170281 - RuntimeException when completion condition of ad-hoc subprocess is empty

(cherry picked from commit f37cf2f6f16f00af6ae308bc5274352ed1a3fc51)