Deploy bpmn with Java api fails to start the prcess after re deployment /server restart

Thanks @Iangfr

I have already made the changes and tested it. It is working now.