How to minimize the use of switches (BRANCH statements) within a flow while still allowing each customer to have its own mapping sequence easily located by the B2B Server.
A wm.db:query service polls a database for records satisfying certain criteria. If a record is found, it is processed as an outbound document to a customer. The customer is not known at the time of the query. After several generic steps (mapping the results to a record, logging the record to file, and some preliminary mapping), a node is queried to identify the target customer and, hence, the appropriate mapping sequence.
- Create a remote server with the name “localhost” whose parameters match your B2B Server.
- Do a remote invoke to call your mapping sequence. The $alias is “localhost” and the service is the generic namespace of your customer mapping flows. For example, my generic service is “Customers.%customerID%:mapFromXMLto%customerID%XML”.
The need to branch is eliminated and new customers can be added without bothering with adding additional switches to BRANCH statements.
When adding new customers, the mapping flows must reside in the generic path specified by your service call (e.g. “Customers.%customerID%:mapFromXMLto%customerID%XML”).
- Invoke the WmRoot service wm.server.xidl.adminui:testService. This service accepts the parameters “service” and “interface” and is the same service used by the Adminstration GUI to test services.
SOLUTION 1 is preferred because it allows the developer to maintain complete control of the pipeline.