}
if (message.getBatchMessageMode() == false) {
// create currentStateDelta for this partition
String initState = _stateModelDefs.get(message.getStateModelDefId()).getInitialState();
TransitionHandler stateModel = stateModelFactory.getTransitionHandler(partitionKey);
if (stateModel == null) {
stateModel = stateModelFactory.createAndAddSTransitionHandler(partitionKey);
stateModel.updateState(initState);
}
// TODO: move currentStateDelta to StateTransitionMsgHandler
CurrentState currentStateDelta = new CurrentState(resourceId.stringify());
currentStateDelta.setSessionId(sessionId);
currentStateDelta.setStateModelDefRef(stateModelId.stringify());
currentStateDelta.setStateModelFactoryName(factoryName);
currentStateDelta.setBucketSize(bucketSize);
currentStateDelta.setState(
partitionKey,
(stateModel.getCurrentState() == null) ? State.from(initState) : State.from(stateModel
.getCurrentState()));
return new HelixStateTransitionHandler(stateModelFactory, stateModel, message, context,
currentStateDelta);
} else {