app/workers/education_form/process10203_submissions.rb
# If there are multiple submissions for a user compare un-submitted to most recent processed
#   by EducationForm::CreateDailySpoolFiles
# Otherwise check submission data and EVSS data to see if submission can be marked as PROCESSED
If there are multiple submissions for a user compare un-submitted to most recent processed
by EducationForm::CreateDailySpoolFiles
Otherwise check submission data and EVSS data to see if submission can be marked as PROCESSED
If there are multiple submissions for a user compare un - submitted to most recent processed by EducationForm :: CreateDailySpoolFiles Otherwise check submission data and EVSS data to see if submission can be marked as PROCESSED
def process_user_submissions(user_submissions)
      user_submissions.each do |user_uuid, submissions|
        auth_headers = submissions.last.education_stem_automated_decision.auth_headers
        account = Account.where(idme_uuid: user_uuid).or(Account.where(logingov_uuid: user_uuid)).first
        claim_ids = submissions.map(&:id).join(', ')
        log_info "EDIPI available for process STEM claim ids=#{claim_ids}: #{auth_headers&.key?('va_eauth_dodedipnid')}"
        poa = submissions.last.education_stem_automated_decision.poa || get_user_poa_status(account, auth_headers)
        if submissions.count > 1
          check_previous_submissions(submissions, poa)
        else
          process_submission(submissions.first, poa)
        end
      end
    end
def process_user_submissions ( user_submissions ) user_submissions . each do | user_uuid , submissions | auth_headers = submissions . last . education_stem_automated_decision . auth_headers account = Account . where ( idme_uuid : user_uuid ) . or ( Account . where ( logingov_uuid : user_uuid ) ) . first claim_ids = submissions . map ( & :id ) . join ( ', ' ) log_info "EDIPI available for process STEM claim ids=#{claim_ids}: #{auth_headers&.key?('va_eauth_dodedipnid')}" poa = submissions . last . education_stem_automated_decision . poa || get_user_poa_status ( account , auth_headers ) if submissions . count > 1 check_previous_submissions ( submissions , poa ) else process_submission ( submissions . first , poa ) end end end
If there are multiple submissions for a user compare un-submitted to most recent processed
by EducationForm::CreateDailySpoolFiles
Otherwise check submission data and EVSS data to see if submission can be marked as PROCESSED
If there are multiple submissions for a user compare un - submitted to most recent processed by EducationForm :: CreateDailySpoolFiles Otherwise check submission data and EVSS data to see if submission can be marked as PROCESSED
# only check EVSS if poa wasn't set on submit
user_submissions