department-of-veterans-affairs / va.gov-team

Public resources for building on and in support of VA.gov. Visit complete Knowledge Hub:
https://depo-platform-documentation.scrollhelp.site/index.html
281 stars 202 forks source link

SPIKE | Determine approach for Benefits Intake Service #75700

Closed tblackwe closed 7 months ago

tblackwe commented 8 months ago

Problem Statement:

Currently we have 4 teams leveraging the Benefits Intake API from Lighthouse

Our plan is to have the following forms also submit to the Benefits Intake API

The Request:

Evaluate the approaches taken by the existing 4 implementations, and determine if it would be appropriate to refactor benefits_intake_service to suit everything except Simple Forms (Simple Forms changes are out of scope).

Known similarities:

Known variations

micahaspyr commented 8 months ago

Trying to understand exactly what is meant by the BDD documentation used by 526. Need a little clarity

sortizsh commented 8 months ago

in 526 backup submission it has its own config and adds an additional form (bdd) tells the vet rep how they're supposed to work. we have a static version in code. @tblackwe can add more context here

micahaspyr commented 7 months ago

Looking into this over the past couple of days I believe the service she house everything BI related, including the SimpleForm metadata validator. What I mean by that is calls to the service should consider everything needed to submit DATA should be handled by the service, not necessarily the process for submission. For instance, I see a direct to SimpleFormsApiSubmission::MetadataValidator.validate(metadata) within the PensionBenifitIntakeJob. I think I'll move that call into the BI service to keep everything related to BI, in the BI service. So, moving that call to be reference in the service keeps the service as is.

Passing the 'source' i.e. (metadata[:source]) in to the generate_metadata method is fairly straightforward. If a source is passed in to the generate_metadata method, it will enter the source and if not it will default to 'va.gov backup submission'