BZ-1034400, JBPM-4175 - Sub Process Entry/Exit scripts don't run

(cherry picked from commit f65ad51a74abd3c677d8936c8a602e1578bf8c1d)