In my junit test case, I would modify a process definition before the start of the process for example, adding an exclusive gateway. Is there some api to do it in JBPM 6.1?