def CallFlow(self, flow_name=None, next_state=None, request_data=None,
               client_id=None, **kwargs):
    base_session_id = None
    if client_id:
      # The flow is stored in the hunt namespace,
      base_session_id = self.urn.Add(client_id.Basename())

    # Actually start the new flow.
    # We need to pass the logs_collection_urn here rather than in __init__ to
    # wait for the hunt urn to be created.
    child_urn = self.runner.CallFlow(
        flow_name=flow_name, next_state=next_state,
        base_session_id=base_session_id, client_id=client_id,
        request_data=request_data, logs_collection_urn=self.logs_collection_urn,
        **kwargs)

    if client_id:
      # But we also create a symlink to it from the client's namespace.
      hunt_link_urn = client_id.Add("flows").Add(
          "%s:hunt" % (self.urn.Basename()))

      hunt_link = aff4.FACTORY.Create(hunt_link_urn, "AFF4Symlink",
                                      token=self.token)

      hunt_link.Set(hunt_link.Schema.SYMLINK_TARGET(child_urn))
      hunt_link.Close()

    return child_urn
Create a new child flow from a hunt.
dataset/ETHPy150Open google/grr/grr/lib/hunts/implementation.py/GRRHunt.CallFlow