.equals(message.getTypedTgtSessionId())) {
continue;
}
ResourceId resourceId = message.getResourceId();
ResourceConfig resource = resourceMap.get(resourceId);
if (resource == null) {
continue;
}
if (!message.getBatchMessageMode()) {
PartitionId partitionId = message.getPartitionId();
Partition partition = resource.getSubUnit(partitionId);
if (partition != null) {
currentStateOutput.setPendingState(resourceId, partitionId, participantId,
message.getTypedToState());
} else {
// log
}
} else {
List<PartitionId> partitionNames = message.getPartitionIds();
if (!partitionNames.isEmpty()) {
for (PartitionId partitionId : partitionNames) {
Partition partition = resource.getSubUnit(partitionId);
if (partition != null) {
currentStateOutput.setPendingState(resourceId, partitionId, participantId,
message.getTypedToState());
} else {
// log
}
}
}
}
}
// add current state
SessionId sessionId = liveParticipant.getRunningInstance().getSessionId();
Map<ResourceId, CurrentState> curStateMap = liveParticipant.getCurrentStateMap();
for (CurrentState curState : curStateMap.values()) {
if (!sessionId.equals(curState.getTypedSessionId())) {
continue;
}
ResourceId resourceId = curState.getResourceId();
StateModelDefId stateModelDefId = curState.getStateModelDefId();
ResourceConfig resource = resourceMap.get(resourceId);
if (resource == null) {
continue;
}
if (stateModelDefId != null) {