BizTalk Server Best Practices, Tips, and Tricks: #18 Orchestration Designer Shortcut Keys

BizTalk Server Best Practices, Tips, and Tricks: #18 Orchestration Designer Shortcut Keys

Welcome again to another BizTalk Server Best Practices, Tips, and Tricks blog post! In my previous blog posts, I discussed some essential tips and tricks for BizTalk Server administrators:

And for BizTalk Server Developers:

Today we are going to switch and speak about another critical Best practice, Tips, and Tricks, this time for BizTalk Server developers: Orchestration Designer Shortcut Keys

#18 Orchestration Designer Shortcut Keys

The Orchestration Designer design surface provides full accessibility using the keyboard. This accessibility begins when you open the design surface, which you can do in Visual Studio by selecting menu options starting with the New option on the File menu.

Accessibility is also supported within the design surface, where, for example, you can select different shapes and parts of shapes by pressing the Up and Down arrows. When a shape is selected on the design surface, it is highlighted on the design surface and in the Orchestration View window (if applicable). At the same time, the Properties grid also displays information about the selected shape.

Orchestration Designer supports accessibility by providing many shortcut keys. Different shortcut keys are available depending on what part of the design surface you use.

You can also use many of the existing shortcuts available in Visual Studio, for example, when you are using Microsoft IntelliSense in the BizTalk Expression Editor.

Shortcut Keys General to the Design Surface

Key Effect
TAB Moves the selection and focus to the shape with inactive selection in the next design surface area on the right (the Process Area or Port Surface). Example: Selection and focus are currently on a port in the left Port Surface. When the TAB key is pressed, selection and focus move to the shape with an inactive focus in the Process Area.
SHIFT + TAB Same as TAB, but in the opposite direction.
PAGE DOWN Scrolls the page down so that later parts of the orchestration are shown. Selection and focus do not change.
PAGE UP Same as the PAGE DOWN key, but in the opposite direction. Selection and focus do not change.
SHIFT + PAGE DOWN Horizontally scrolls the entire design surface to the left by set increments. Selection and focus do not change.
SHIFT + PAGE UP Same as SHIFT + PAGE DOWN except that the design surface scrolls to the right. Selection and focus do not change.
ENTER Performs the default action for the selection, which usually means shifting focus to the Properties grid.
SPACE Selects the shape that currently has the focus. There is no effect if the focus is on a shape connector.
CTRL + SHIFT + F1 Toggles between expansion and collapse of the Smart Tag of a selected shape. UP and DOWN ARROW can then be used to move through the items of a Smart Tag. When expanded, the Enter or Space keys execute the related action of a Smart Tag item (as well as collapsing the Smart Tag).
DELETE Deletes the current selection.

Shortcut Keys Specific to the Process Area

Key Effect
DOWN ARROW Moves the selection to the next connecting line or shape below. If the shape is connected to several branches below (as in the case of a Decide shape), the selection moves to the first shape in the leftmost branch. If selection is on the End shape for the orchestration, pressing this key has no effect because there are no more shapes below it. If selection is on the Return shape within a branch of a complex shape, the next shape is the endpoint of the complex shape.
UP ARROW Moves the selection to the next connecting line or shape above. If the shape is connected to several branches above, the selection moves to the last shape on the leftmost branch (even if the last shape of the branch is a Return shape). Pressing this key has no effect when the Start shape is selected.
LEFT ARROW If the selection is on a Send or Receive shape and the shape is connected to a port: If the shape has a port connector leading to a port in the Left Port Surface, focus and selection shift to the port connector of the shape. If the shape has a port connector leading to a port in the Right Port Surface, pressing this key has no effect. If the shape has no port connector, navigation is the same as with any other shape. For other shapes (or Send or Receive shapes not connected to a port): If the selection is in a branch, and a branch exists with shapes on it to the left of the current branch, the selection moves to the nearest shape on the branch to the left. The key has no effect anywhere else in the orchestration.
RIGHT ARROW Same as the LEFT ARROW key, but in the opposite direction.
HOME The selection changes to the connector that leads from the Start shape of the orchestration.
END The selection changes to the connector, leading to the orchestration’s End shape.
NUM LOCK + – Collapses the selected complex shape.
NUM LOCK + + Expands the selected complex shape.
NUM LOCK + * Expands the selected complex shape, plus any child complex shapes it may have.

Shortcut Keys Specific to the Port Surfaces

Key Effect
DOWN ARROW If a Role Link has the focus, it shifts to the first port inside. If no ports are inside the Role Link, the focus shifts to the next port or Role Link below it. If a port has the focus, it shifts to the next port or operation below it. If an operation has the focus, it shifts to its first operation part. For the template, the focus shifts to the next port. If an operation part has the focus, it shifts to the next operation part, operation, or port below it. There is no effect if no more objects exist below the current one.
UP ARROW Same as the DOWN key, but in the opposite direction. There is no effect if no more objects exist above the current one.
RIGHT ARROW Left Port Surface: If an operation part has the focus, it goes to the first port connector leading out of it. If there are no connections on the current operation part, pressing this key has no effect. If an operation has the focus, the focus goes to the first port connector of the operation’s first part that has a connection. If there are no connections in the operation, pressing this key has no effect. If a port connector gets the focus, whatever was selected in the Port Surface receives inactive selection. Right Port Surface: No effect.
LEFT ARROW Same as the RIGHT ARROW key, except in the opposite directions (that is, no effect for the left Port Surface, and the focus can go onto a port connector for the right Port Surface).
HOME Focus and selection shift to the first shape in the channel.
END Focus and selection shift to the last shape in the channel.

Shortcut Keys Specific to Port Connectors

Key Effect
RIGHT ARROW Port connectors leading to the Left Port Surface: Focus and selection shift to the connecting Send or Receive shape. The port connector is deselected. Port connectors leading to the Right Port Surface: Focus and selection shift to the connecting operation part. In this case, whatever has a selection in the Process Area now receives an inactive selection.
LEFT ARROW Same as the RIGHT ARROW key, except directions are reversed.
DOWN ARROW Focus and selection shift to the port connector on the next operation part. If the last connector on the last port has focus, pressing this key has no effect.
UP ARROW Same as the DOWN ARROW key, except in the opposite direction. If the first connector has focus, pressing this key has no effect.
HOME Focus shifts to the shape connector leading out of the Start shape.
END The focus shifts to the shape connector leading into the End shape.
DELETE The port connector is deleted. This clears the Port Operation property on the Send or Receive shape. Focus shifts to the affected Send or Receive shape.

I hope you enjoy this developer tip and stay tuned for the following BizTalk Server Best practices, Tips, and Tricks.

Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc.

He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.
View all posts by Sandro Pereira

JSON Document to JSON Schema Converter Tool

JSON Document to JSON Schema Converter Tool

In our Integration projects, especially nowadays on Azure Integration Services, we often work with JSON messages. And despite Logic App Designer allowing us to generate a JSON schema based on a JSON payload (or JSON message), there are many situations that we find ourselves in the need to create a JSON Schema outside the Logic App. One good example is when we are creating a map inside the new Data Mapper.

Unfortunately, there aren’t any out-of-the-box capabilities inside the new Data Mapper to generate a JSON Schema from a JSON Message, so we only have two options:

  • Create a dummy Logic App to generate the JSON Schema and then manually copy it and save in the Artifacts folder;
  • Or we will use free online tools like this one: https://www.liquid-technologies.com/online-json-to-schema-converter, but what annoys me about these online tools is that all data are stored in their log files, and sometimes for privacy/security concerns that can be a problem.

Mainly because of these reasons, I decide, along with my team, to start creating these free tools with the source code available on GitHub in order to not raise the same suspicions.

JSON Document to JSON Schema Converter Tool

JSON Document to JSON Schema Converter Tool is a straightforward Windows that allows you to generate a JSON Schema based on the sample JSON Document that we provide.
No data are stored in log files.

Where can I download

Hope you find this useful! So, if you liked the content or found it useful and want to help me write more content, you can buy (or help buy) my son a Star Wars Lego! 

Credits

  • Luis Rigueira | Member of my team and one of the persons responsible for developing this tool.
Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc.

He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.
View all posts by Sandro Pereira

Create a sample JSON document from a JSON Schema Tool

Create a sample JSON document from a JSON Schema Tool

In our Integration projects, especially nowadays on Azure Integration Services, we often work with JSON messages. And despite Logic App Designer allowing us to generate a JSON schema based on a JSON payload (or JSON message), but there are many situations we need the opposite! We want to generate a dummy message from the JSON Schema in order to test our Logic Apps solutions or now our Data Mapper maps.

Unfortunately, there aren’t any out-of-the-box capabilities inside Logic Apps or the new Data Mapper to generate a dummy message.

I’m doing a lot of demos and sessions on the new Data Mapper, and you cannot imagine the times I forget what the input message for each specific map is, and I find myself always looking for that information.

In order to accomplish that, we normally use free online tools like this one: https://www.liquid-technologies.com/online-schema-to-json-converter, but what annoys me about these online tools is that all data are stored in their log files, and sometimes for privacy/security concerns that can be a problem. Mainly because of this reason, I decide, along with my team to start creating these free tools with the source code available on GitHub in order to not raise the same suspicions.

Create a sample JSON document from a JSON Schema Tool

Create a sample JSON document from a JSON Schema Tool is a straightforward Windows tool that allows you to create a JSON Document based on the JSON Schema that we provide.
No data are stored in log files.

Download

Hope you find this useful! So, if you liked the content or found it useful and want to help me write more content, you can buy (or help buy) my son a Star Wars Lego! 

Credits

  • Luis Rigueira | Member of my team and one of the persons responsible for developing this tool.
Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc.

He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.
View all posts by Sandro Pereira

Logic Apps (Standard) Data Mapper: Basic Principles of Maps

Logic Apps (Standard) Data Mapper: Basic Principles of Maps

What are maps?

In a general and abstract way, we can say that Data Mapper maps are graphical representations of XSLT 3.0 (Extensible Stylesheet Language Transformation) documents that allow us to perform simple and visual transformations between XML and JSON messages (more formats will be added in the future). But in reality, Data Mapper maps are composed of two files: a Map Definition file (.yml) that basically is an abstraction of the underlying implementation. And one XSLT file (.xslt) contains all the transformation rules – This is the file that in runtime will be executed by the Logic Apps (standard) engine.

What types of transformation can we apply in Logic Apps?

Similar to BizTalk Server, we can define two types of transformations:

  • Syntax Transformations: In BizTalk Server, this type of transformation occurs in receive or send pipelines and aims to transform a document into another representation, e.g., CSV to XML. In Logic Apps, that will occur inside the Logic Apps by using an Integration Account or certain actions and expressions depending on which syntax transformation we need to perform. Here the document maintains the same data (semantics) but changes the syntax that is represented. I.e., we translate the document, but typically we don’t modify the structure. Normally, this type of transformation is bidirectional, since we still have the same semantic content, we can apply the same transformation logic and obtain the document in its original format.
  • Semantic Transformations: In BizTalk Server, this type of transformation usually occurs only in BizTalk maps. Inside Logic Apps (Standard), they will take place in the Data Mapper. Here the document can maintain the same syntax that is represented (XML or JSON) – not mandatory since Data Mapper supports at the moment JSON Schemas and XML Schemas – but changes its semantics (data content). These types of transformations are typically one-way. Since we add and aggregate small parts of the information that compose the document into another document, we may miss important details for its reconstruction.

Introduction to the Data Mapper

The Data Mapper enables us to perform transformations of complex messages visually and effortlessly, graphically represented by links that define the relationships between the various elements of messages.

These relationships between elements are internally implemented as XSL Transformations (XSLT – Extensible Stylesheet Language Transformation), the standard Worldwide Web Consortium (W3C) recommended to perform message transformations.

Data Mapper is a Visual Code extension that allows you to perform mapping transformations. Currently, it has its own extension, but that will be merged with the main extension in the future.

Essentially the editor consists of three main modules:

  • Source Schema view: this is the data structure of the source message and is on the left side of the main window;
  • Destination Schema view: this is the data structure of the target message and is on the right side of the main window; the links that define the mapping lead into the destination schema tree view from the grid view, and ultimately from the source schema tree view.
  • Mapping area view: is in the middle of the main window, between the two data structures (source and target); This area plays a critical role in the definition of maps, containing the links and Functions that control how data in a source instance message is transformed into an instance message that conforms to the destination schema. The mapping area can have multiple layers, each of them associated with a specific record on the destination schema, allowing us this way to organize complex maps in a better way.

Apart from these three modules, there are other important windows for the developer:

  • Function panel: At the left side of the source schema, providing access to all Functions we can use in the Data Mapper.
  • Function properties panel: in this panel, we can see and modify the properties of a selected function inside the Data Mapper.
  • Task List and Output windows: much of the time hidden, we can and must use these windows to examine the results of saving and testing we do in our maps. These windows normally appear underneath the Mapping area or the Function properties panel.
  • Code view Panel: On this panel, you can view Map definitions rules (abstraction of the underlying implementation). It is a read-only panel.

Basic maps functionalities (Document mapping)

There are several mapping functionalities that you can perform inside maps, like Data normalization, Transform Injection (XLST injection), calculating values covering math and scientific functoids, and so on. Still, most of the time, transformations are quite simple, and when we perform a transformation in the message 5 basic functionalities typically arise:

  • Simple mapping of a given value (direct copy)
  • Concatenation of values
  • Conditional selection
  • Custom scripts
  • Add new values (data)

Here we will take a simple transformation problem that will address each one of these functionalities or operations, providing a simple example of how to accomplish this inside the Data Mapper. Of course, there are plenty of other operations or transformation rules that we could do that will not be addressed here.

Hope you find this helpful! So, if you liked the content or found it useful and want to help me write more content, you can buy (or help buy) my son a Star Wars Lego! 

Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc.

He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.
View all posts by Sandro Pereira

Logic Apps (Standard) Data Mapper: What is a Function Chain (video)

Logic Apps (Standard) Data Mapper: What is a Function Chain (video)

Function Chain? What is a Function Chain? And how that works inside the Data Mapper?

When we use more than one cascading function to perform a transformation rule, we call it a Function Chain, or a chain of functions that are going to be executed in order. This way, we can apply more complex mapping rules inside the Logic Apps (Standard) Data Mapper. By the way, we had the same concept inside BizTalk Server Maps and Logic App Consumption Map (that is, the BizTalk Server Maps extracted and isolated)

The picture below shows us a Function Chain inside the Data Mapper. In this case, we are calculating national and international calls based on the phone number:

In this video, we will learn t what a Function Chain is inside the Logic Apps (Standard) Data Mapper and how it works.

Hope you find this helpful! So, if you liked the content or found it useful and want to help me write more content, you can buy (or help buy) my son a Star Wars Lego! 

Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc.

He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.
View all posts by Sandro Pereira

Data Mapper Tricks and Tips: Workaround to organize your functions (video)

Data Mapper Tricks and Tips: Workaround to organize your functions (video)

Time to start another series of blog posts about Logic Apps: Data Mapper Tricks and Tips! Where I will address simple tips and tricks, we can apply to our Data Mapper to be more productive, solve a problem, or help bypass some limitations or constraints.

For this first blog post, I decided to explain a simple workaround that we can use today to help us organize our maps better in order for them to be more readable. Unfortunately, at the moment, I’m writing this post when we add a Function to our map we cannot drag and drop the function into another position in the data mapper area. That means that often when we are applying the mapping rules, they will get overlap as you see in the picture below:

In this case, the To Integer Function is on top of the Concat function, which makes it difficult to read and work inside the Data Mapper. In this sort video, we will see a very useful trick and Tip to organize our functions inside the Logic Apps (Standard) Data Mapper – it may not work in all scenarios but is the best option we have for now.

P.S: Microsoft is working on adding this drag and drop capability, so in the future, we will be able to move the shapes, aka functions, in the mapping area.

Hope you find this helpful! So, if you liked the content or found it helpful and want to help me write more content, you can buy (or help buy) my son a Star Wars Lego! 

Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc.

He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.
View all posts by Sandro Pereira

How to integrate RabbitMQ with Logic Apps (video)

How to integrate RabbitMQ with Logic Apps (video)

Unfortunately, no Logic App connector can make the bridge to RabbitMQ, which makes this integration challenge a little bit more complicated. However, we have the ability to create an Azure Function by using the RabbitMQ trigger for Azure Functions to overpass this limitation.

And we saw and explained in our last blog post that Azure Functions integrates with RabbitMQ via triggers and bindings. The Azure Functions RabbitMQ extension allows you to send and receive messages using the RabbitMQ API with Functions.

The purpose of this video is to explain how you create a POC that allows you to receive a message in a RabbitMQ queue, and that event triggers the Azure Function that then will route the message to a Logic App.

This was a real problem presented by a client during one of our Logic Apps training courses, where they have RabbitMQ on-premises, and they did want to pull messages from a queue into a Logic App Consumption to integrate them with other systems.

Hope you find this helpful! So, if you liked the content or found it useful and want to help me write more content, you can buy (or help buy) my son a Star Wars Lego! 

Big thanks to my team member Luís Rigueira for creating this video.

Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc.

He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.
View all posts by Sandro Pereira

Logic Apps (Standard) Data Mapper: What is a function?

Function category
Category description
Functions in category Collection

Used to perform a variety of operations over collections, such as cumulative sum, short, or get distinct values.

Average, Count, Direct Access, Distinct Values, Filter, Index, Join, Maximum, Minimum, Reverse, Sort, Sub Sequence, Sum Conversion

Used to convert values to specific times.

To DateTime, To integer, To number, To string Date and TimeUsed to perform a variety of operations over Dates, such as retrieving the current date and time or adding dates. Add days, Add DayTime to Date, Add DayTime to DateTime, Add DayTime to Time, Add YearMonth to DateTime, Adjust Date, Adjust DateTime, Adjust Time, Current date. Current DateTime value, Current time, DateTime, Day from DAte, Day from DateTime, Equal Date, Equal DateTime, Equal Day, Equal Month, Equal MonthDay, Equal Time, Equal Year, Equal YearMonth, Greater Date, Greater DateTime, Greater Time, Hours from DateTime, Hours from Time, Less Date, Less DateTime, Less Time, Minutes from DateTime, Minutes from Time, Month from Date, Month from DateTime, Seconds from DateTime, Seconds from Time, Subtract Dates, Subtract DateTimes, Subtract DateTime from Date, Subtract DateTime from DateTime, Subtract DateTime from Time, Subtract Times, Subtract YearMonth from Date, Subtract YearMonth from DateTime, Time zone from Date, Time zone from DateTime, Time zone from Time, Year from Date, Year from DateTime. Logical comparisonUsed to perform a variety of logical operations, such as greater than and logical existence. Equal, Exists, Greater, Greater or equal, if, if else, Is date, Is DateTime, Is nil, Is null, Is number, Is string, Less, Less or equal, Logical AND, Logical NOT, Logical OR, Not equal MathematicalUsed to perform a variety of mathematical and scientific operations, such as addition and multiplication. Absolute, Add, Arctangent, Ceiling, Cosine, Divide, Exponential , Exponential (base 10), Floor, Integre divide, Log, Log (base 10), Modulo, Multiply, Power, Round, Sine, Square root, Subtract, Tangent String

Used to perform a variety of string functions, such as trimming and concatenation.

Codepoints to string, Concat, Contains, Ends with, Length, Lowercase, Name, Regular expression matches, Regular expression replace, Replace, Start with, String to codepoints, Substring, Substring after, Substring before, Trim, Trim left, Trim right, Uppercase Utility

Used to perform a variety of additional and distinct operations that don’t fit in the above Categories, such as stopping a transformation and returning the specified error code and description or format a number or a date.

Copy, Error, Format date, Format DateTime value, Format number, Format time
Azure Function to consume RabbitMQ messages

Azure Function to consume RabbitMQ messages

Unfortunately, no Logic App connector can make the bridge to RabbitMQ, which makes this integration challenge a little bit more complicated. However, we have the ability to create an Azure Function by using the RabbitMQ trigger for Azure Functions to overpass this limitation.

Azure Functions integrates with RabbitMQ via triggers and bindings. The Azure Functions RabbitMQ extension allows you to send and receive messages using the RabbitMQ API with Functions.

So we pretend here to have an Azure Function that triggers when a message enters the queue and then routes that message into a Logic App.

And what does this Azure Function do?

This Azure Function is triggered by a RabbitMQ message in a specified queue. When a message arrives, the function is executed and performs the following steps:

  • Logs an information message indicating that the function has been triggered.
  • Prepares the payload for a request by creating an object with a “Message” property containing the content of the RabbitMQ message.
  • Serializes the payload object into a JSON string.
  • Creates an HTTP request with the JSON payload as the content and sets the content type to “application/json“.
  • Defines the URL of a Logic App that will receive the HTTP request.
  • Sends the HTTP request to the Logic App using the URL and payload.
  • Check the response status of the request.
    • If the request is successful (status code in the 2xx range), logs an information message indicating that the request was sent to the Logic App successfully.
    • If the request fails (status code outside the 2xx range), logs an error message indicating the failure and includes the response’s status code.

In summary, this Azure Function acts as a bridge between a RabbitMQ queue and a Logic App. It receives messages from RabbitMQ, sends them as JSON payloads to a specified Logic App endpoint via an HTTP request, and logs the success or failure of the request.

To create the Azure Function, we need to:

  • In Visual Studio 2022, click on Create a new project.
  • On the project template, choose Azure Functions.
  • On the Configure your new project panel, give your Azure Function a name that makes sense to you and your coworkers, do not forget to start using proper names from day one! Choose the location of your Azure Function.
  • Click next, and now you need to configure some fields:
    • On the Function worker, choose .NET 6.0 (Long Term Support).
    • On Function, select the RabbitMQ trigger.
    • On the Connection string setting name, you can name the connection string as RabbitMQConnection.
    • On the Queue name, add the name of the queue you created previously.
  • Click on Create. After the project is created, use the following code you can find on GitHub here:

Add these NuGet packages to the solution.

Next on the file local.settings.json is where you will store the connection string that will make it possible to connect with RabbitMQ and to do that, this is how the file should look like:

{
   "IsEncrypted": false,
   "Values": {
      "AzureWebJobsStorage": "UseDevelopmentStorage=true",
      "RabbitMQConnection": "amqp://user:[email protected]:5672/my-vhost-v2"
   }
}

Notice that you need to apply the proper configuration to the RabbitMQConnection keyword.

  • amqp://user:[email protected]:5672/my-vhost-v2 is just an example, but only the password and IP are fictitious in this example because you should have your own.

Where can I download it?

You can download the complete Azure Functions source code here:

Hope you find this helpful! So, if you liked the content or found it helpful and want to help me write more content, you can buy (or help buy) my son a Star Wars Lego! 

Big thanks to my team member Luís Rigueira for helping me realize and implement this idea.

Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc.

He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.
View all posts by Sandro Pereira

Logic Apps (Standard) Data Mapper: String functions (video)

Logic Apps (Standard) Data Mapper: String functions (video)

In my last blog post, I explain in detail the String functions available in the new Data Mapper, and I endup documenting each of them.

String functions are used to manipulate strings in standard ways, such as conversions to all uppercase or all lowercase, string concatenation, determination of string length, white space trimming, etc. If you come from the BizTalk Server background or are migrating BizTalk Server projects, they are the equivalent of String Functoids inside BizTalk Mapper Editor.

The String functoids are:

  • Codepoints to string: Converts the specified codepoints value to a string and returns the result.
  • Concat: Combines two or more strings and returns the combined string.
  • Contains: Returns true or false based on whether the string input contains the specified substring.
  • Ends with: Returns true or false based on whether the string input ends with the specified substring.
  • Length: Returns the number of items in the specified string or array.
  • Lowercase: Returns a string in lowercase format.
  • Name: Returns the local name of the selector node, which is useful when you want to retrieve the name of the incoming message component, not the value.
  • Regular expression matches: Returns true or false based on whether the string input matches the specified regular expression.
  • Regular expression replace: Returns a string created from the string input by using a given regular expression to find and replace matching substrings with the specified string.
  • Replace: Replaces a substring with the specified string and return the new complete string.
  • Starts with: Returns true if the given string starts with the specified substring.
  • String to codepoints: Converts the specified string to codepoints.
  • Substring: Returns characters from the specified string, starting from the specified position.
  • Substring after: Returns the characters that follow the specified substring in the source string.
  • Substring before: Returns the characters that precede the specified substring in the source string.
  • Trim: Returns the specified string with all the leading and trailing white space characters removed.
  • Trim left: Returns the specified string with all the leading white space characters removed.
  • Trim right: Returns the specified string with all the trailing white space characters removed.
  • Uppercase: Returns a string in uppercase format.

In this video, we will see each of these String Functions in action. For each one, we will provide simple input data, and we will see what the expected output is.

Hope you find this helpful! So, if you liked the content or found it useful and want to help me write more, you can buy (or help buy) my son a Star Wars Lego! 

Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc.

He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.
View all posts by Sandro Pereira