Suppose we have a data integration scenario where we are receiving data from a system, let's say it's a CSV file that has Credit Card transactions per Partner, and based on the Partner ID processing rules, we need to process the file differently. For example, if the Partner ID field in the incoming data file has a value of XYZ we need to map, transform and route the output data into a specific queue and if another file has a different Partner ID then it will get processed differently.
In other words, the processing of Source data depends upon the Partner ID value in the file.
We can design a dynamic process flow in Adeptia Solution that can dynamically process a file based on its content.
Here's an example flow that fulfills the scenario explained above:
Activity 1: Get the file from source trigger. This can be any FTP, LAN trigger where Adeptia polls for the arrival of a new or modified source file.
Activity 2: Here the file is coming from Mainframe system. Text file is read by the Source Schema activity which would read and parse the file contents.
Activity 3: Repeater Service is used to clone the source data into multiple copies which can then be consumed by other activities in the process flow. In this example, there are two multiple streams that are getting created from the Source Schema. Data 1 goes to the Lookup mapping and Data 2 goes to Dynamic mapping.
Activity 4: Lookup mapping has database queries that retrieve the mapping, target schema and target message queue name from a lookup table and these will be assigned dynamically into the placeholder activities. As shown in the mapping snapshot below.
Activity 5: Use the Put Context Var action available in the Process Designer to set the values into the related placeholder activities.
Activity 6: Dynamic mapping activity is a placeholder that gets dynamically overwritten at run time based on the context values set in activity 5.
Activity 7: Dynamic Target schema activity converts the file into the actual output format for that Partner ID. The activity is set by the context value in activity 5.
Activity 8: Dynamic message queue activity is also set by the context value in activity 5.