if (wrapper == null) {
wrapper = stateModelFactory.createAndAddBatchMessageWrapper(resourceId.stringify());
}
// get executor-service for the message
TaskExecutor executor = (TaskExecutor) context.get(MapKey.TASK_EXECUTOR.toString());
if (executor == null) {
LOG.error("fail to get executor-service for batch message: " + message.getId()
+ ". msgType: " + message.getMsgType() + ", resource: " + message.getResourceId());
return null;
}