| name | wrench | inputmeta | outputmeta | locations | packages | note |
|---|---|---|---|---|---|---|
| MapperTable | only converter expression | accountApp/instances (new+edit - in MapperReduxTable) |
IntegrationMapper | oldest, free text | ||
| MapperTableWithCustomization | advanced field editor with calculatedFields | uploaded file (table example data) | object type select -> meta | accountApp/partitions/dataUpload(new+edit) | PackageDataUploadFieldMappingContainer IntegrationCsvMapper |
|
| MultilevelMapperTable | Advanced field editor without calculated fields (need to sort out types on tree meta), but with Field tab | OptionsResourceSelect | OptionsResourceSelect | - | GeneralMapper | new design, missing features |
-
select entity type
-
for some entity types, needs to select entity name - for which ones is defined on FE
-
-> can fetch flat meta (options)
Can provide metadata (I/O options) for either pricefx or non-pricefx connection
For pricefx:
-
Select connection
-
display object type select (entity type + for some entity types entity name)
-
-> fetches flat options
For non-pricefx:
- Select connection
- display connection configuration select
- -> fetches tree options for cascader
- modal with some tabs, opened on wrench click
- FORMULA tab visible when number fields present
- COMPOSED tab visible when string fields present
- Possibility to change input + inputType + converter combination
- According to new story should be split into 2 tabs:
- converter only - input without input type (assumed to be
body) - expert options - textarea for input + dropdown for input type ("header", "property", "simple", "constant") + converter
- converter only - input without input type (assumed to be
- on most places
mapper, sometimes calleddefinitionorinitMapperwhen coming from api - array of object items, each item can have following properties:
| property | used by api | note |
|---|---|---|
| id | no? | row identification |
| input | yes | name of input option or json path (e.g. productId or products[].id) |
| inputType | yes | e.g. body (value from input data), groovy, constant, header, ... |
| value | NO | used for calculated fields, only FE representation, which needs to be converted to e.g. groovy |
| valueType | NO | used for calculated fields, only FE representation, can be e.g. FORMULA, COMPOSED, used only in MapperTableWithCustomization |
| output | yes | same as input, but for output options |
| converterExpression | yes | can be added by the user or automatically by FE - e.g. when output type is number - uploaded file cell needs to be converted |
| outputType | NO | used for validation and in UI to inform user when available |
- Mapper update logic extracted to
useMapperChangeHandlers(currentMapper: Mapper, setMapper: Function): MapperChangeHandlershook, MapperChangeHandlers passed to mapper table - => decoupled from initialization
- is done async - input meta / output meta needs to be fetched for init, params to get I/O meta can be changed - mapper is Loadable
- needs to cover two use cases - new mapper and edit mapper
- new mapper is created from I/O meta (options)
- edit mapper takes initMapper and adds output types from output meta (options) and ids
- unit tested pure data transformations
- stories with mocked services + cypress to cover behavior (with limitations)
- Hard to setup data on qa, which would enable us to test all customizations/variants/edge cases, as the data are coming from multiple sources (including external systems), (mocking)
- Components from UC not prepared for implementation-details-independent testing (testIds, dropdowns targetting - rendered thru portals in body, ...)
- Evolving features group with wide range of use cases - need to support original free text mapper input in MapperTable as well as tree meta in MultilevelMapperTable (keeping free text impacts refactoring of state management a lot)
- FE transforms mapper before sending to API - UI uses data representations, which are lost when mapper is submitted (inconsistent for the user)
-
documented only in code
-
hard to setup proper testing data on qa in packages for all use cases (stronger mocking would help) Challenges 1.
-
testable components wanted, currently created only in PM - should be migrated to UC Challenges 2.
-
table layout instead of form layout makes it impossible to use current UC Forms Challenges 2.
-
state management - mapper contains value,valueType which needs to be converted by FE but is never got from BE (cannot be inverted, user enters e.g. formula, then on mapper edit sees groovy generated by FE) Challenges 4.
-
missing design for Field tab -> 2. expert options
-
Multilevel mapper still missing features (waiting for API) - Test row, test connection, test+real URI (which can require future refactoring of transformations done by FE), also need to test submission and maybe refactor mapping fn logic
*[MapperChangeHandlers]: e.g. handleInputChange, handleInputTypeChange, addMapperItem, onCustomizeField