Posts

Showing posts with the label Azure Logic Apps

XML Batching(Aggregation) in Logic App

Image
Introduction One of my connection on Linkedin asked for help  So basically his requirement is to send all the individual records in a group to CRM endpoint i.e. a Batch of individual records. This is called Aggregator or Batching pattern in Integration. When we say we want to group messages then comes a question as to how to  wrap them.In BizTalk we handle such scenario with help of Envelope schema (for Debatching and Batching).  In logic app there is a special trigger for grouping of the messages - Batch trigger. In last post  Batching(Aggregating) messages in Logic App we saw how to group JSON messages, in this post let's see how to batch XML message. One of the primary thing to consider is valid that XML document has single Root Node. We would create two logic app 1. XMLBatchProcessor 2.  BatchProcessCaller Steps to implement Aggregator/Batching Pattern in Logic App 1. Create a XMLBatchProcessor Logic App From the Azur...

Batching(Aggregating) messages in Logic App

Image
Introduction In last couple of posts   Debatching(Splitting) XML Message in Logic Apps - ForEach and SplitOn     and  Debatching(Splitting) JSON Message in Logic Apps - ForEach and SplitOn   we understood about Splitter pattern and how to use it to split/debatch messages. Batching or aggregation is opposite process of debatching/splitting where we group various individual message and send them as a single composed message for further processing. If you have worked on BizTalk, you can relate to the Parallel convoy - Which is used to receive multiple messages and act upon them based on certain condition.  Likewise , here the Aggregator/Batch Processor gets started as soon as it receives individual message and keeps on waiting and receiving for other individual messages till the time the Release condition is met. Release conditions are to set boundary to the compose message, like if size of composed message is reached to certain limit or if coun...

Removing ns0: prefix from xml output from BizTalk/Logic app XSLT map

Image
Introduction Xml, which stands for  stands for EXtensible Markup Language was designed to describe data and to do that you use tags. It's basic purpose is to focus on what data is  - self decsribing.  And as we have a provision to add our own tags, it becomes Extensible. Having this properties makes it very suitable for defining a message (Records, elements and attributes) and exchange it across, also data can be stored in it and can be refered/updated as an when needed (most of the configurations are xml based). In case of where XML is involved in messaging, it becomes vital to have Namespace as it helps in avoiding element name clashes/conflicts. A Namespace is a set of unique names. Namespace is a mechanisms by which element and attribute name can be assigned to a group. The Namespace is identified by URI(Uniform Resource Identifiers). An XML instance may contain element or attribute names from more than one XML vocabulary. If each vocabulary is given a ...

Logic Apps : Fetching ISA and GS Segment Values From Interchange Envelope and Mapping

Image
Introduction When we work with B2B using EDI standards in logic apps we use Decode component which does work of validation and decodes the EDI(flat file) and b ased on the settings we specify in Agreement, the Transaction sets are splitted ( one edi document comprise of segments contained in ST to SE) and is available in Payload of Decode component   for further use.  EDI X12 messages are wrapped with envelope, at header it has ISA segment (Interchange control header), GS (Functional group) and ST (Transaction Set) and at the trailer it has IEA, GE and SE. Enveloping segments work in pairs. ISA-IEA represents an interchange. GS-GE is a functional group inside of the interchange and ST-SE is a transaction inside the group. Most of the time, we need to map the individual edi documents( ST-SE)  to destination system's expected format. Read example about it -  Getting Started with Logic Apps - EDI X12 to XML   where following map was used ...