Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos
This blog gives a complete technical insite in the practical implementation of the solution to Shortest Path Problem in finding the shortest distance.   h2. Input XSD Structure describing city routes and distances       h2. Diagrammatic representation of the cities and routes         I had given some city names in my country for easy understanding. I want to find the shortest distance from the capital, Delhi to my native, Tuticorin.    h2. The Input XML      h2. Designing the scenario in Integration Builder     First we had to create nine message mappings for all the nine cities. All these message mappings differ only by a constant mapped to source tag in the input.    h3. What does a single message mapping does?   A single message mapping for a city populates the complete result tag in input xml and gives as output. When it populates, it makes sure that the final value before the xml goes out of message mapping, is not from the source in message mapping to the destinations, but from the original source to the destinations in the tags. The value for a source to destination is lookup from the data in database tag and populates it in the result tags in XML. Before populating, it makes sure that, the value is least in the possible routes.    h3. How to design the required message mapping?         Take a sample message mapping for example. Both the input and structures are same. Only one field namely, target is mapped.    h3. How target node is mapped?       h2. The four user-defined functions     In all the below functions, tgt = target (result tag), src = source (result tag), db_tgt = target (database tag), db_src = source (database tag)    h3. Populate         The source in results tag is just an attribute. The above function creates ‘target’ number of elements as output.    h3. GetTargetValue           h3. ReverseRoutes         The above function enables the algorithm to work for source to target as well as target to source while processing.      h3. ContextChg         In the database tag in input XML, you can find that there is only one source tag for ‘n’ number of target tags. The above function duplicates the source tags equal to no of target tags.    h3. The Only Difference     The only thing that differs within all the nine message mappings is the source attribute mapping. The corresponding city is mapped to source attribute.      h2. Message Interface(s)         Create nine different message interfaces resembling the same content and two for input and output.      Also create nine interface mappings with the corresponding message interfaces.          h2. The BPM configuration(s)         Add all the abstract message interfaces in container and select it in the corresponding transaction step.    h2. Configuration of the scenario in Integration Builder     The configuration is nothing but a simple file to file scenario using BPM.          The above diagram shows the snap of the objects in Integration Directory.    h2. The output   
2 Comments