Currently, in scanCommand, the exception is swallowed inside try{} catch{}, so, the transational is not working as expected.
https://github.com/apache/incubator-dolphinscheduler/blob/dev-db/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/ProcessDao.java#L146

If the lines (marked in red rectangle) throws exception. The processinstance will still be saved. but no thread will be created to handle this one.
I will provide PR for this.