You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current implementation of WF2 is using the mappings.json that is manually inserted and hardcoded in the job code. To make the updating of the metadata mapping more dynamic and remove the manual copying and pasting of the mapping logic into the job code, we want to use the "mappings" object in the collections named metadata-mappings in the project to reference metadata mappings.
The specific request, in as few words as possible
Request Type: Change Request on WF2
Update Mappings step:
Change the Adaptor for this job to Common since we are no longer fetching anything using an API
Add code to fetch metadata from collections named metadata-mappings
collections.get('metadata-mappings', "mappings")
Remove the lines that are hardcoding the data(line: 28)) and replace them with what we get from metadata-mappings collection
Ensure that the data object is being saved in state and being referenced in the following steps.
**Error Handling: ** If the mappings object does not exist in collections, ensure that the error is handled properly. The workflow should't crash but it should fail and subsequent steps should not execute.
Collections
The collection that we are consuming in this step has already been created and populated on this issue in msf-lime-mosul-staging project
AishaHassen
changed the title
Update WF2 to use Collections for referencing mapping logic instead of embedded mapping JSON in job code #86
Update WF2 to use Collections for referencing mapping logic instead of embedded mapping JSON in job code
Feb 5, 2025
Background, context, and business value
The current implementation of
WF2
is using themappings.json
that is manually inserted and hardcoded in the job code. To make the updating of the metadata mapping more dynamic and remove the manual copying and pasting of the mapping logic into the job code, we want to use the "mappings" object in thecollections
namedmetadata-mappings
in the project to reference metadata mappings.The specific request, in as few words as possible
Request Type: Change Request on WF2
Mappings
step:Common
since we are no longer fetching anything using an APImetadata-mappings
data
(line: 28)) and replace them with what we get frommetadata-mappings
collectionstate
and being referenced in the following steps.mappings
object does not exist in collections, ensure that the error is handled properly. The workflow should't crash but it should fail and subsequent steps should not execute.Collections
msf-lime-mosul-staging
projectmetadata-mappings
mappings
Project and Branch
Project: msf-lime-mosul-staging
Branch:
staging
Testing Guidance
WF2
withmappings
populated and ensure that the mappings that are saved inCollections
are being used.WF2
withmappings
set to empty and ensure that the error is handled properly.Toggl
MSF 2024
The text was updated successfully, but these errors were encountered: