def initialize_flow_service(self, options):
     """Initializes the Flow Service by logging into the user
     account and starting up the Flow session.
     """
     self.flow_initialized = False
     try:
         self.flow_username = options.username
         self.flow_service = Flow("", "", options.flowappglue,
                                  options.debug, options.server,
                                  options.port, options.db, options.schema,
                                  options.attachment_dir)
         if not self.flow_username:
             self.flow_username = self.get_local_account()
         if not self.flow_username:
             raise Flow.FlowError("Local account not found.")
         self.flow_service.start_up(self.flow_username, options.uri)
         self.flow_initialized = True
     except Flow.FlowError as flow_err:
         self.print_error("Flow Initialization: '%s'" % str(flow_err))