setSubmission(submission, flags = {}) {
        flags = {
            ...flags,
            fromSubmission: _.has(flags, 'fromSubmission') ? flags.fromSubmission : true,
        };
        return (this.onSubmission = this.formReady
            .then(
                (resolveFlags) => {
                    if (resolveFlags) {
                        flags = {
                            ...flags,
                            ...resolveFlags,
                        };
                    }
                    this.onSetSubmission(submission, flags);
                    return this.submissionReadyResolve(submission);
                },
                (err) => this.submissionReadyReject(err)
            )
            .catch((err) => this.submissionReadyReject(err)));
    }
Sets a submission and returns the promise when it is ready.
@param {any} submission - The submission to set.
@param {any} flags - Any flags to apply when setting the submission.
@returns {Promise} - The promise that is triggered when the submission is set.