def write_basic_status()

in src/extension/src/ActionHandler.py [0:0]


    def write_basic_status(self, action):
        """ Writes a basic status file if one for the same sequence number does not exist """
        try:
            # read seq no, if not found, log error and return, as this code opportunistically tries to write status file as early as possible
            if self.seq_no is None:
                self.logger.log_error("Since sequence number for current operation was not found, handler could not write an initial/basic status file")
                return

            # check if a status file for this sequence exists, if yes, do nothing
            if os.path.exists(os.path.join(self.ext_env_handler.status_folder, str(self.seq_no) + Constants.STATUS_FILE_EXTENSION)):
                return

            # if status file for this sequence does not exist and enable is executed, read and use values from config setting file, else do not set those in status file
            operation = ""
            if action == Constants.ENABLE:
                config_settings = self.ext_config_settings_handler.read_file(self.seq_no)

                # set activity_id in telemetry
                if self.telemetry_writer is not None:
                    self.telemetry_writer.set_operation_id(config_settings.__getattribute__(Constants.ConfigPublicSettingsFields.activity_id))

                operation = config_settings.__getattribute__(Constants.ConfigPublicSettingsFields.operation)

            # create status file with basic status
            self.ext_output_status_handler.write_status_file(operation, self.seq_no)

        except Exception as error:
            self.logger.log_error("Exception occurred while writing basic status. [Exception={0}]".format(repr(error)))