====== EntitySelector Alternatives for Flatfiles ====== ===== Problem: ===== Incoming Flatfiles **with identical structure** should be differentiated based on the file name and converted into various target types with the help of different mappings. ===== Standard Solution: ===== Define and name the different entity types[[prozessdefinition:repositorien:entitaetstyp:|]] all based on the same object class. Define the relevant recoignition components [[prozessdefinition:repositorien:Erkennungskomponenten:|]] and analyzers [[prozessdefinition:repositorien:analysator:|]]. Define the different file names as masks in the [[prozessdefinition:repositorien:Erkennungskomponenten:|]]. Assign the appropriate components [[prozessdefinition:repositorien:Erkennungskomponenten:|]] and entity types [[prozessdefinition:repositorien:entitaetstyp:|]] to the various analyzers.. In the INBOUND Job use a specific eintity selector [[prozessdefinition:jobs:jobsteps:allgemein:entityselector|]] for each analyzed entity type [[prozessdefinition:repositorien:entitaetstyp:|]]. **Advantage:** the possibility of clear separation based on types in message boxes.\\ **Disadvantage:** additional maintenance in the repositories. ===== Alternative Solution ===== In the INBOUND Job use an EntityIf Case [[prozessdefinition:jobs:jobsteps:allgemein:EntityIfCase]] for each type, to branch out each mapping. Define the expression in each [[prozessdefinition:jobs:jobsteps:allgemein:EntityIfCase]] corresponding with the object class structure /FlatFileNoHeader/FlatNoHeader_Line[starts-with( GetFileName(), 'Dateiname' )] and connect [[prozessdefinition:jobs:jobsteps:allgemein:entitytransformer]] with **OnTrue**. **Advantage:** low maintenance in the Jobs.\\ **Disadvantage:** no separation by types in the message boxes possible.