I am agree with Maciej.
It is only happened when ProcessEngine is started as a part of console. It is the console's job to shutdown the processEngine when it was undeployed. All we could do on ProcessEngine is catch the Exception and print a log for IllegalStateException.