====== Selective data switch ====== Example of an additional((or parallel)) forwarding of incoming messages to another system with selection by TradingPartner GLN. This variant can, for example, be used in migration scenarios to provide a new system to be set up with messages that enable a pilot operation with selected trading partners. ===== Required components ===== - [[en:prozessdefinition:variablendefinition:start|]] with name e.g. "dataswitch", of type text and bindable to system partner. - instantiate this variable at the system partner with the list of GLNs of the trading partners to be considered. - any [[en:kommunikation:kanal:start#outgoing_communication_channels|send channel]] - Job object [[en:prozessdefinition:jobs:jobsteps:allgemein:messageselector|]] in the standard inbound job following normal processing - in the XPATH expression enter the following expression/SelectionBase/InputMessages[@MessageBoxName='from.Partner' and contains(GetSystemPartnerVariable('dataswitch'), @PartnerGLN)]This selects the incoming messages in the specified message box((The data element @MessageBoxName is compared with the message box name, which contains the effectively incoming messages.)), which have the GLN of the trading partner in the list of GLNs and which are defined in the variable instance "dataswitch" at the system partner. - Only messages whose state is less than "Sent (800)" are considered. - Job object [[en:prozessdefinition:jobs:jobsteps:allgemein:delegatorjob|]] to delegate to the - Send job with job object [[en:prozessdefinition:jobs:jobsteps:kommunikation:channelsender|]] that uses the send channel defined under 2, and sets the message state to [[en:kommunikation:nachrichtenkoerbe:taskstates|"Sent(800)"]].