Hi HuiSheng,
please take a look at createExecution method in ExecutionImpl to verify if your fix is appropriate:
childExecution.save();
// make sure that child execution are saved before added to a persistent collection
// cause of the 'assigned' id strategy, adding the childExecution to the persistent collection
// before the dbid is assigned will result in identifier of an instance of ExecutionImpl altered from 0 to x
addExecution(childExecution);
// composeIds uses the parent so the childExecution has to be added before the ids are composed
childExecution.composeIds();
After your fix composeIds will be called twice, my concern is if that will not cause us any troubles. It is better to double check it.
Cheers
Maciej