BizTalk Scheduled Task Adapter for BizTalk Server 2016 available on GitHub

BizTalk Scheduled Task Adapter for BizTalk Server 2016 available on GitHub

After many requests and many postponements, due to my unavailability and free time to take these tasks, BizTalk Scheduled Task Adapter is finally officially available and optimized for BizTalk Server 2016 on GitHub!

BizTalk Scheduled Task Adapter

This became more critical because Codeplex closed and community members were not finding mainly the installation files so I was getting a lot of emails requesting them. Note that despite Codeplex is closed you can still download the source code from the archive.

At the moment is only available the installation files of BizTalk Scheduled Task Adapter v6.0 for BizTalk Server 2016 and the following reported issue was solved:

  • In some scenarios, in the first trigger event, multiple messages were sent at the same time – Solved

You can download this “new” version of the adapter in BizTalk Scheduled Task Adapter from GitHub:

The BizTalk Scheduled Task Adapter is an in-process receive adapter that executes a prescribed task on a daily, weekly or monthly schedule. The adapter is configured entirely within BizTalk, all configurations are stored within the SSODB and can be exported and imported via binding files.

Soon I will add the source code for BizTalk Server 2016 and the same for previous versions: BizTalk Server 2013 R2, BizTalk Server 2013, BizTalk Server 2010, and so on.

Question?

Should I do a BizTalk Scheduled Task Adapter commercial version that will guarantee full support to this adapter (reported bugs and/or issues quietly fixed) and new features?

BizTalk Scheduled Task Adapter for BizTalk Server 2016 available on GitHubBizTalk Scheduled Task Adapter for BizTalk Server 2016 available on GitHub
Microsoft | GitHub

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.

BizTalk WCF-SQL Error: System.Data.SqlClient.SqlException (0x80131904): Procedure or function ” expects parameter ‘@

BizTalk WCF-SQL Error: System.Data.SqlClient.SqlException (0x80131904): Procedure or function ” expects parameter ‘@

Today while trying to test a solution where it was supposed to invoke a SQL Server Stored Procedure with optional parameters thru the BizTalk Server WCF-SQL adapter I got this following error: Procedure or function expects parameter which was not supplied.

A message sent to adapter “WCF-Custom” on send port “WcfSendPort_SqlAdapterBinding_Procedures_dbo_Custom” with URI “mssql://.// AsyncTransactions?” is suspended.

Error details: System.Data.SqlClient.SqlException (0x80131904): Procedure or function ‘InsertTransaction’ expects parameter ‘@TransactionId’, which was not supplied.

Server stack trace:

at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)

at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult result)

at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)

at System.ServiceModel.Channels.ServiceChannel.EndRequest(IAsyncResult result)

Exception rethrown at [0]:

at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)

at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)

at System.ServiceModel.Channels.IRequestChannel.EndRequest(IAsyncResult result)

at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.RequestCallback(IAsyncResult result)

ClientConnectionId:2731f081-b009-4ba5-a420-95efe7307e71

Error Number:201,State:4,Class:16

MessageId: {746C3B89-A7ED-4C12-8548-0FE174ACA2CB}

InstanceID: {FF06027F-BB96-498B-9515-1E2D55FEAC5A}

BizTalk Server WCF-SQL Adapter: Procedure or function expects parameter

Followed by other similar warning messages:

The adapter failed to transmit message going to send port “WcfSendPort_SqlAdapterBinding_Procedures_dbo_Custom” with URL “mssql://.// AsyncTransactions?”. It will be retransmitted after the retry interval specified for this Send Port. Details:”System.Data.SqlClient.SqlException (0x80131904): Procedure or function ‘InsertTransaction’ expects parameter ‘@TransactionId’, which was not supplied.

The adapter failed to transmit message going to send port “WcfSendPort_SqlAdapterBinding_Procedures_dbo_Custom” with URL “mssql://.// AsyncTransactions?”. It will be retransmitted after the retry interval specified for this Send Port. Details:”Microsoft.ServiceModel.Channels.Common.XmlReaderParsingException: The start element with name “Request” and namespace “http://BizTalkTesting.SQLBulkOperations” was unexpected. Please ensure that your input XML conforms to the schema for the operation.

BizTalk Server WCF-SQL Adapter: Procedure or function expects parameter - Event Viwer

Cause

The cause of this problem is, once again, quite obvious and the error message present clearly identifies the origin of the problem. The stored procedure is expecting a certain field or several fields that are not being passed maybe because they are marked on the schema as optional fields.

Solution

Of course, the simple problem is to pass all the parameter presented and required by the stored procedure. You should pass them:

  • as NULL, if they are nillable;
  • or as empty strings;

Having said that, my problem was not that quite simple because the parameter described in the error above needs to be optional. After I analyze the stored procedure contract I realized that all of them are set as mandatory fields that need to be passed:

ALTER PROCEDURE [dbo].[InsertTransaction] 
    -- Add the parameters for the stored procedure here
    @SourceSystem  VARCHAR(50),
    @DestinationSystem VARCHAR(50),
    @TransactionId uniqueidentifier,
    @MessageId uniqueidentifier,
    @DocumentType VARCHAR(50),
    @DocumentId VARCHAR(100),
    @BodyMessage ntext,
    @BodyType VARCHAR(5),
    @Priority int
AS
BEGIN
...

When I say that all of them are mandatory, of course, I can set it as NULL but in terms of BizTalk Server, I need to send all the fields in the XML message.

To make it actually optional, we need to change the contract of the schema to something like this:

ALTER PROCEDURE [dbo].[InsertTransaction] 
    -- Add the parameters for the stored procedure here
    @SourceSystem  VARCHAR(50),
    @DestinationSystem VARCHAR(50),
    @TransactionId uniqueidentifier  = null,
    @MessageId uniqueidentifier  = null,
    @DocumentType VARCHAR(50),
    @DocumentId VARCHAR(100),
    @BodyMessage ntext,
    @BodyType VARCHAR(5),
    @Priority int
AS
BEGIN BEGIN
...

Once we modify the stored procedure to have default NULL values the problem will be solved. Now we don’t need to send these fields as NULL or blank, now we actually can omit them from the message – optional fields!

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.

Exploring data just got easier in BizTalk360

Exploring data just got easier in BizTalk360

Do you have a BizTalk environment which handles huge volume of transactions? With the BizTalk admin console, It is nearly impossible to go through those data. In the past, BizTalk360 solved this problem by allowing to filter various data based on parameters associated with the data. But for some cases, even if you filtered the data, you might end up having lot of rows in the grid which may not be user friendly. It seems to be slow, while visualizing large set of data in a single grid.

While searching the result with large dataset, the browser seems to jump around while scrolling, providing a not smooth and unnatural experience. This has led that, from a user experience standpoint, scrolling is no longer considered as functional.

Apart from that, even the most modern browsers will eat up lot of memory when rendering all those data in the UI. To overcome this, it’s absolutely necessary to split the results of a query into subsequence’s to achieve constant response times.
At the splitting process, it is very important to keep paging transitions fluently. That means, rows can’t appear twice or miss completely in the result. For this purpose, the so-called Pagination comes into play in BizTalk360.

What pagination really does?

Pagination is an excellent way to navigate through large amounts of content. E.g., when we search for something that returns many records, which cannot be displayed on a single web page, those records are split into number of pages that can be accessed through links via the Pagination mechanism. It enables the user to navigate to the next page one after the other and even jump forward to several pages. Pagination allows you to make large amounts of content easy to find and breaks up several entries or web content into multiple pages, allowing you to toggle through content with ease.

What is improved due to pagination in BizTalk360?

In this version of BizTalk360, we have optimized the grids by providing you the power of pagination. We have implemented pagination for each grid available in the BizTalk360. It is an easy and standard practice, that prevents you from having to load the entire result set all at once.

The grid supports both preloaded and dynamically loaded data. By using pagination, the rows in the grid gets dynamically separated into pages. The grid will automatically display 25 rows in each page, by default. The user can increase the maximum number of result rows by selecting the Max Match size in the drop down.

Basic navigation

Pagination can further be customized for different circumstances, like when a user approaches to an end or the beginning, or indicating the current page number to the user. Pagination dynamically separates the rows on each page, as shown below. By listing out the page number, users are allowed to skip ahead, one page at time.

The page numbers which are shown in grey are disabled (or inactive) and the other page numbers are shown in blue, since they are enabled (or active). The user can use the previous and next page buttons, as these can be considered a more intuitive interface for showing the previous/next records.

Sometimes you may simply require Last page and First page links, which provide simple and quick navigation to the beginning and the end of the result set, to the user. These are implemented, as shown below, to further improve the usability.

The First, Previous, Next and Last page links are appended at the bottom of each grid.

Customizing row count in System Settings

By default, the grid will automatically display 25 rows per page, the user can customize the row display by adding the desired row count in Setting->System Settings->Max Matches.

The added Max Matches are displayed in a dropdown at the bottom of each grid. According to the selection of the dropdown, the row count will be changed dynamically on the resulting grid.

Through this, we can reduce the load time on each execution. For instance, it is used by executing the result, where the user can customize grid for displaying a limited number of results on each search, or showing a limited number of rows per page. This way, the overall performance to display the result, will highly be improved.

Row count display

The total grid row count of the current page compared to the overall row count will be displayed at the bottom end of the grid.

At BizTalk360, we believe that a beautiful grid and listing data interactively to user, will make our product stand out and keep customers engaged. Keeping our customer feedback and understanding the consequence of users on execution, the amount of load time increases proportionally to the growth of data. To overcome this issue, we have provided a better solution for our customers, by implementing this type of content grids, which will highly optimize the performance and reduce the customer effort to visualize the result. A major advantage of this approach, is that now an execution can be used to happen in the lower time limit.

Why we implemented Grid Column Filtering and Export to Excel in BizTalk360?

Why we implemented Grid Column Filtering and Export to Excel in BizTalk360?

Being a support person/Administrator, who would not be happy if there is a functionality to retrieve the data very easily and quickly? In a high-volume data store scenario, there will always be challenges to quickly filter and retrieve desired data. The latest version of BizTalk360 has this fantastic capability to filter the grid columns and get the results. Yes, all the grid columns in BizTalk360 have got new makeover!!!

Additionally, the Export to Excel functionality is not new in BizTalk360 there are features which already have this capability., but the new implementation is different than the existing one. How? In case there is a different set of data on the multiple tabs of the page (Eg: Tracking manager), earlier, the data in the all the grid columns will be exported to a single Excel sheet. It’s not the same now. Let’s take a deep look at the various filters implemented in the coming sections, but first, we’ll discuss the Grid Filter options.

Grid Column Filtering and Export to Excel: Grid Column Filtering

Grid Column Filtering

Let’s talk about what are all the types of filters we are using in the BizTalk360. We have implement mainly 4 types of filter in BizTalk360. The grid supports two types of filtering, in one of the user can write a filter value and choose the filter function (Contains, Is Equal to, Less than etc.). These types are:

  • Text Filter
  • Checklist Filter

Text Filter

Text filter is the default filter. Using a text filter, you can filter the text input. The text filter is already implemented in the BizTalk360 in various sections. User should enter the text in the filter text box what they want to filter. After clicking on the filter button, the grid displays only the records matching the filter criteria.

Grid Column Filtering and Export to Excel: Text Filtering

Grid Column Filtering and Export to Excel: Text Filtering

Checklist Filter

The second type of filtering is the Checklist filtering. Using this filtering type, the grid shows a checkbox list with predefined values. The user can select some of the values and apply the filtering. The grid will show only records that match any of the selected values in the list. In BizTalk360, we use checklist filtering with the following types,

  • Status Filter
  • Boolean Filter
  • Date Time filter

Status Filter        

A Status filter allows to filter the different status in the column. BizTalk360 already binds the available statuses in the drop down and based on the selected user can filter the status. For example, a BizTalk application has different statuses, like Started, Stopped and Partially started.

Grid Column Filtering and Export to Excel: Status Filtering

Grid Column Filtering and Export to Excel: Status Filtering

Boolean Filter

The Boolean filter is another type of custom filter we introduced in the BizTalk360. Say for example, in the Search Artifacts section, we have a checkbox column to check for the receive port, if it’s a two-way port or not. Using the Boolean filter for this column, the user can filter for the two-way receive location.

Grid Column Filtering and Export to Excel: Boolean Filtering

DateTime Filter

In the BizTalk360 UI, we also have date/time columns. For filtering this field, we have introduced the DateTime filter. This filter is very useful for customers to filter dates from the grid. A user can select the date from the date/time picker, which is available in the filter itself and select the time from the drop-down. Users can filter for all types of date format based on the user profile settings.

Grid Column Filtering and Export to Excel: DateTime Filtering

Clear Filter

What if you have selected a filter option and want to clear it? Here is the Clear option, which is newly introduced in this release. If the user filters multiple columns, it is very difficult to clear each filter manually. So the Clear Filter functionality is very useful to clear the all filters in a single click.

Export to Excel

When using the grid, it is often useful and important to export your data in the MS Excel to make it accessible offline. BizTalk360 already has the feature to export to Excel for grid data in Operations section. From this version onwards, we have extended this functionality to export the grids which contain multiple information or tab pages to a single sheet in both Operations and Monitoring sections. The purpose of exporting multiple grids in a single sheet is that the user can easily navigate through the information in a single sheet.

For the EDI Report Manager, Tracking Manager and the Monitoring section we have implemented this functionality. It is implemented as a drop-down, which has options like All and the distinct grid names. If the user selects the ‘All’ option, all grid information is exported to a single Excel sheet with multiple tabs. The user can also export individual grids by clicking the grid name from the drop-down.

Grid Column Filtering and Export to Excel: Export to Excel

Conclusion

At BizTalk360 we believe that both functionalities make our product stand out and keep the customer engaged. Now the customer can easily search and export data in a convenient and user-friendly method.

Author: Swetha Mohandas

Test Engineer at BizTalk360. Software Test Engineer having good knowledge of SDLC and STLC. Love to test the software product.

July 10, 2018 Microsoft Security Updates cause errors on the BizTalk Administration Console: An internal failure occurred for unknown reasons (WinMgmt)

July 10, 2018 Microsoft Security Updates cause errors on the BizTalk Administration Console: An internal failure occurred for unknown reasons (WinMgmt)

If you follow the BizTalk Server hashtag #msbts on social media like twitter or if you follow BizTalk Server MSDN forum, you will notice one disturbed thread recently: Security Updates released by Microsoft in July 10, 2018 will break you BizTalk Server Administration Console and as a result, you will not be able to access to BizTalk Server “Platform Settings”, getting the following error:

TITLE: BizTalk Server Administration

——————————

Failed to create a BizTalkDBVersion COM component installed with a BizTalk server.

Class not registered (WinMgmt)

——————————

BUTTONS:

OK

——————————

An internal failure occurred for unknown reasons (WinMgmt)

You will not be able for example to: restart the host instances from the BizTalk Server Administration console.

As far as I notice in my clients and in my dev machine, the BizTalk Server engine will still work properly as if nothing happened, it will still be able to receive, process and send all your messages.

Cause

The cause of the problem is still unclear, and Microsoft is still working on how to solve it. And this problem will happen depending in witch SO or BizTalk Server you will have. It has already been registered problems in BizTalk Server 2010, 2013, 2013 R2 and/or BizTalk Server 2016.

What is causing the problem are security updates that were released by Microsoft on July 10, 2018.

Solution

For now, there isn’t a fancy solution, Microsoft is working on a resolution and estimates a solution will be available mid-July.

With that said, the only “solution” or let us call workaround to solve this issue is to uninstall all the “critical” security updates that were installed: in my case, uninstalling the “KB4284833” solved my case.

An internal failure occurred for unknown reasons (WinMgmt) KB4284833

To do that you need to:

  • Press the “Windows key” to open the Start menu and type “Control Panel” and click on “Control Panel” option from the Search window
  • On the “Control Panel” windows, select “Programs” and then “Programs and Features” option.
  • On the “Programs and Features” panel, select “View installed updates” option.

An internal failure occurred for unknown reasons (WinMgmt) uninstall security updates

  • And then you just need to select the update you want to uninstall and then right-click and select “Uninstall”.

In the end, you will need to reboot your machine.

You can always check this forum thread: Microsoft Security Updates cause BizTalk Admin Console errors: An internal failure occurred for unknown reasons (WinMgmt) to check to have an idea what updates you should uninstall depending on your OS version:

  • BizTalk Server 2013 R2: KB4338600 and/or KB4338601
  • BizTalk Server 2010: KB4338602
  • Others: This includes KB4338600, KB4338605, KB4338613, KB4338614, KB4338424, KB4338419

All of them to be checked in your environment and analyzed by your internal teams.

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.

Microsoft Integration Weekly Update: July 16, 2018

Microsoft Integration Weekly Update: July 16, 2018

Do you feel difficult to keep up to date on all the frequent updates and announcements in the Microsoft Integration platform?

Integration weekly update can be your solution. It’s a weekly update on the topics related to Integration – enterprise integration, robust & scalable messaging capabilities and Citizen Integration capabilities empowered by Microsoft platform to deliver value to the business.

If you want to receive these updates weekly, then don’t forget to Subscribe!

Feedback

Hope this would be helpful. Please feel free to reach out to me with your feedback and questions.

Advertisements

Using Azure Tags to make managing your Azure Spend Easier

Using Azure Tags to make managing your Azure Spend Easier

By: Bill Chesnut

Tags have been around in Azure for a long time, but only recently have they been brought to the portal has a 1st class citizen.  They are now on the overview page of almost every resource type

image

This is an example of a Virtual Machine, and Tags are now visible on the Overview Page

One of the best practices that some Azure users have been following is to Tag the Resource groups that resources are in, one assumption here is that those Tags would be available in the billing portal and/or billing files, but that is not the case, since Resource groups have no billing information associated with them they don’t appear in the billing files and cannot be used to separate the bills by Resource group Tags.  This is a top request for most products that deal with reporting on Azure consumption.  Until these products add support for rolling down the Tag from the Resource groups, there is a manual way to make this happen, but it could be lots of work for large Azure subscriptions.

image

In your Resource group select all the resources you want to Tag, Click “Assign tags”

image

Add the Tags to assign at the top and click ‘Assign”

image

Select one of the resources to verify the tags have been assigned

You can now go into the Azure Portal Billing and Cost Analysis and select the Tag you have assigned and see the costs associated with that tag

image

Hope this blog post helps you manage your Azure environment easier.

Note: The feature to roll down Tags from Resource groups is being added to SixPivot’s Cloud Control Product in the near future, please go and try Cloud Control

image

Trial for Free today

Cross posted to http://www.sixpivot.com.au

BizTalk Server Tips and Tricks: How to properly configure the connection string inside the Database Lookup functoid

BizTalk Server Tips and Tricks: How to properly configure the connection string inside the Database Lookup functoid

It’s fair to say that we all know the default Database Lookup functoid. It allows you to connect and extract information from a database. This functoid requires four input parameters in the following order:

  • A lookup value – value for which to search in the specified database, table, and column (next parameters);
  • A database connection string – The full connection string for the database with a provider, machine name, database and authentication (an ActiveX Data Objects .NET (ADO.NET) connection string);
  • A table name – name of the table in the database in which to search
  • A column name for the lookup value – name of the column in the table in which to search – the first parameter

The functoid is quite simple to use, however, the main problem that developers face when they use it, refers to the second parameter: the connection string.

How to know the correct value of the connection string to be set in the Database Lookup Functoid

Is hard to remember the correct syntax/value to specify in the connection string to be used inside the Database Lookup Functoid.

Database Lookup functoid: parameters

For you to be sure that you don’t make any mistakes, which could  lead to future waste of time by diagnosing and rectifying the connection string, the simple and easy way to guarantee that we are using the correct connection string value – but also for not having to remember this by head – is to:

  • Create a simple Universal Data Link (.udl) File
  • Set the OLE DB provider connection parameters
  • And finally, test the connection to check if everything is correct

To accomplish this, we need to:

  • Create a text file and name it “ODBCConnectionTest.udl” on your file system
    • Preferably on the BizTalk Server machine
    • The name of the file is not important, the important part is the extension, it must be “.udl”
  • Double-click the Universal Data Link file that you just created
  • On the Provider Tab, select the appropriate OLE DB provider for the type of data you want to access and then Next
    • In my case, it is “Microsoft OLE DB Provider for SQL Server”

Database Lookup functoid: Universal Data Link

  • In the Connection tab, specify:
    • The SQL Server instance that hosts the database
    • The authentication method: Use Windows NT integrated security or Use a specific user name and password
    • And finally, the database name to which you want to connect

Database Lookup functoid: Universal Data Link Connection

  • After specifying these properties, you then should click on “Test Connection…” button to attempt a connection to the specified data source. If no connection is made, review the settings. Otherwise, click “Ok”

Now that we have our Universal Data Link file created and properly configured, you can open the UDL file in Notepad and you will have access to the connection string value that you should use inside the Database Lookup Functoid. You just need to copy and paste it inside the second parameter of the Functoid.

Database Lookup functoid: Connection string

Note: you should paste the connection string statically inside the Database Lookup Functoid but that is a different topic that we will address in another BizTalk Server Tips and Tricks.

I hope this small trick will the useful, enjoy and stay tuned for new BizTalk Server Tips and Tricks!

Author: Sandro Pereira

Sandro Pereira is an Azure MVP and works as an Integration 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.

How we solved daylight saving issue?

How we solved daylight saving issue?

DST in General

It is a universal practice around the world to observe daylight saving time(DST). We all moved our clocks one hour forward this last March. We woke up an hour sooner, had some additional espresso and tried to adjust to the jet-lag. Every spring we set the clocks forward and winter we turn the clock back. Most nations do not participate in DST and even within the USA, not all the states are participating in DST.

Real business scenario

In the software business, it is fundamental part to deal with business situations cautiously during the DST time. For instance, a company has rules created in an order taking system, that the order depends on the time of the order – if the clock changes, the rules might not be as clear. Like this, there are infinite scenarios we can consider.
In the integration business arena, a flow of the business information may happen from one end of the world to another. For this kind of situations, the business decision logic may work based on the time. Likewise, in BizTalk Server, administrators dependably should watch out for the deployed applications, its artifacts states and flow of the information. In case of anything turns out badly, there may be a huge effect on the mission-critical business (Eg: Banking, Insurance, Healthcare, Logistics etc.,). To stay away from these issues, BizTalk360 is used as an integral tool in 500+ business in 30+ nations.

Advanced Monitoring in BizTalk360

In BizTalk360, we have powerful monitoring capabilities to monitor the business information using the query builder functionality, which is looking for the information about suspended service instances, running service instances, tracked Service instances and tracked message events. Similarly, you can query BAM views, perform activity searches, filter out ESB exceptions, query the event logs and monitor Azure Logic apps.

Daylight Saving: Data Monitoring Dashboard

While monitoring this data, BizTalk360 will send notifications to many notification media. These media contain Email, SMS, inbuilt notification channels like Slack, ServiceNow, and Webhook. Customers can also create their own notification channels to receive the alerts from BizTalk360. To know more about our advanced data monitoring capability click here “https://assist.biztalk360.com/support/solutions/folders/1000221446”.

Problem Statement

We wanted to share our experience in solving a daylight-saving issue in our application for a specific scenario, where the email alerts are sent from the application properly during the normal days, whereas false alerts will be sent once during the daylight-saving time. We started investigating the scenario in deep to nail down the problem.

Forward Scenario

Consider below EST (Eastern Time Zone, UTC-5:00) DST change as an example.

Daylight Saving: Forward example

Set the system time zone settings as (UTC-08:00) Pacific Time (US & Canada) in BizTalk360.
Sunday, 11 March 2018, 02:00:00 clocks were turned forward 1 hour, to 03:00:00.
Let’s consider a scenario where Message Box data monitor is configured to monitor the suspended service instances for a purchase order application on an hourly basis. There is a column to show “Next Run At“ time which populates the next expected cycle for the data monitor. For an hourly based scenario, it will populate data consistently to notify the next run cycle. At the time of DST, in the 1:00 am cycle, next run time should be calculated as 3:00 am. Instead of this, Next run cycle is computed as 2:00 am. The BizTalk360 monitoring service will pick this time and try to convert the invalid time for further processing. Due to the invalid time, an exception appears in the email for only that monitoring cycle.


Daylight Saving: Email notification

Backward scenario

Sunday, 4 November 2018, 02:00:00 clocks are turned backward 1 hour to 01:00:00.
In the Fallback scenario, the issue won’t appear since the clock will be turned backward 1 hour and the monitoring service will come to look for the Next run time and wait until that time for further processing.

Code Snippet

As the problem stated above, DST adjustment has not been handled in the inbuilt .Net libraries. BizTalk360 properly calculates DST from V8.8 version onwards. In the below code snippet, in the highlighted text you can find the logic.

TimeZoneInfo timeZoneInfo = TimeZoneInfo.FindSystemTimeZoneById(regionalSetting.timezone.timezoneId);
if (timeZoneInfo.SupportsDaylightSavingTime)
{
    DateTime dateTime = nextRunDateTime;

    if (timeZoneInfo.IsAmbiguousTime(dateTime))
    {}

    if (timeZoneInfo.IsInvalidTime(dateTime))
    {
        DateTime adjustedDateTime = Helper.AdjustDateTimeForDSTChange
       (dateTime, regionalSetting);
    }
}

public static bool IsValidDateTime(DateTime dateTime, SystemRegionalSetting regionalSetting)
{
    TimeZoneInfo timeZoneInfo = TimeZoneInfo.FindSystemTimeZoneById
    (regionalSetting.timezone.timezoneId);

    return timeZoneInfo.IsInvalidTime(dateTime) ? false : true;
}

public static DateTime AdjustDateTimeForDSTChange(DateTime dateTime, SystemRegionalSetting regionalSetting)
{
    TimeZoneInfo timeZoneInfo = TimeZoneInfo.FindSystemTimeZoneById
    (regionalSetting.timezone.timezoneId);

    return dateTime.Add(timeZoneInfo.GetUtcOffset(dateTime.AddDays(1)) - timeZoneInfo.BaseUtcOffset);
}

Testing

Time conversion is much more complicated than you imagine, because different countries/locales switch to daylight saving time at different dates, it is not just one sweep change. Hence, we have thoughtfully derived the scenarios for testing to cover all the combinations.

Following are the test scenarios which we need to take care of during the DST testing:
1. UTC (Coordinated Universal Time)
2. GMT time zones which observers DST during summer time (Eg: British Summer Time)
3. UTC –(Minus) time zones which observe DST (Eg: Pacific Time US & Canada)
4. UTC –(Minus) time zones which don’t observe DST (Eg: Arizona)
5. UTC + (Plus) time zones which observe DST (CEST)
6. UTC +(Plus) time zones which don’t observe DST (IST)

Conclusion

We took a just more efficient way to solve the DST issue in our recent version 8.8. Happy migrating and try BizTalk360!!! Get started with the free 30 days trial. For any queries/feedback please write to us support@biztalk360.com.

Author: Mekala Ramesh

Test Lead at BizTalk360 – Software Testing Engineer having diverse exposure in various features and application testing with a comprehensive understanding of all aspects of SDLC. Strong knowledge to establish the testing process from the scratch. Love to test the software product to deliver it with good quality. Strongly believes on “Testing goes beyond just executing the test protocol”.

Microsoft Integration Weekly Update: July 9, 2018

Microsoft Integration Weekly Update: July 9, 2018

Do you feel difficult to keep up to date on all the frequent updates and announcements in the Microsoft Integration platform?

Integration weekly update can be your solution. It’s a weekly update on the topics related to Integration – enterprise integration, robust & scalable messaging capabilities and Citizen Integration capabilities empowered by Microsoft platform to deliver value to the business.

If you want to receive these updates weekly, then don’t forget to Subscribe!

Videos

Podcasts

How get started with iPaaS design & development in Azure?

Feedback

Hope this would be helpful. Please feel free to reach out to me with your feedback and questions.

Advertisements