@Override
  public void deserialize(ByteBuffer byteBuffer) {
    super.deserialize(byteBuffer);
    int stateCount = byteBuffer.getInt();
    states.clear();
    if (stateCount > 0) {
      for (int i = 0; i < stateCount; ++i) {
        states.add(byteBuffer.getInt());
      }
      if (isEofState()) {
        stateFlow = Flow.NO_MORE_STATE;
      }
    }
    this.setStateDeserialized(true);
  }
Set the next state for the procedure.

@param stateId the ordinal() of the state enum (or state id)
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/StateMachineProcedure.java