'This method is used to schedule a new state on a different worker.
This is basically the same as CallFlow() except we are calling
ourselves. The state will be invoked in a later time and receive all the
messages we send.
Args:
messages: A list of rdfvalues to send. If the last one is not a
GrrStatus, we append an OK Status.
next_state: The state in this flow to be invoked with the responses.
request_data: Any dict provided here will be available in the
RequestState protobuf. The Responses object maintains a reference
to this protobuf for use in the execution of the state method. (so
you can access this data by responses.request).
start_time: Start the flow at this time. This Delays notification for
flow processing into the future. Note that the flow may still be
processed earlier if there are client responses waiting.
Raises:
FlowRunnerError: if the next state is not valid.'

def CallState(self, messages=None, next_state='', request_data=None, start_time=None):

    if (messages is None):
        messages = []
    if (not getattr(self.flow_obj, next_state)):
        raise FlowRunnerError('Next    state    %s    is    invalid.')
    request_state = rdf_flows.RequestState(id=self.GetNextOutboundId(), session_id=self.context.session_id, client_id=self.runner_args.client_id, next_state=next_state)
    if request_data:
        request_state.data = rdf_protodict.Dict().FromDict(request_data)
    self.QueueRequest(request_state, timestamp=start_time)
    if ((not messages) or (not isinstance(messages[(-1)], rdf_flows.GrrStatus))):
        messages.append(rdf_flows.GrrStatus())
    for (i, payload) in enumerate(messages):
        if isinstance(payload, rdfvalue.RDFValue):
            msg = rdf_flows.GrrMessage(session_id=self.session_id, request_id=request_state.id, response_id=(1 + i), auth_state=rdf_flows.GrrMessage.AuthorizationState.AUTHENTICATED, payload=payload, type=rdf_flows.GrrMessage.Type.MESSAGE)
            if isinstance(payload, rdf_flows.GrrStatus):
                msg.type = rdf_flows.GrrMessage.Type.STATUS
        else:
            raise FlowRunnerError(('Bad    message    %s    of    type    %s.' % (payload, type(payload))))
        self.QueueResponse(msg, start_time)
    self.QueueNotification(session_id=self.session_id, timestamp=start_time)
