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”. View all posts by Mekala Ramesh

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

Recruitment drive at Sri Eshwar College of Engineering – 2019 graduate batch

Recruitment drive at Sri Eshwar College of Engineering – 2019 graduate batch

For a Software Product company, People are the valuable assets. To keep the business sustainable, we need to take care of the workforce, upskill them and retain the talent. As the years pass by, besides all efforts to retain existing workforce, there will be a churn due to various reasons – personal, circumstantial and business related. You need to reinforce your workforce with new people to:

  1. Refill the open position due to the exit of existing team member
  2. To grow your business, build new features, products, extend support to customers, market etc

Refilling a position cannot be an overnight activity unless there is an emergency. Any business should be prepared for emergencies by having a possible back up. Even experienced professionals cannot replace immediately as there is always a learning curve to get up to speed for the opened-up position.

It is not practically viable to always hire experienced people for all the positions in an organization and on the other hand one cannot run the business with all junior people. There should be a right mix of talent at all levels. Having a strong supply at the bottom layer provides any organization with multiple benefits:

  1. Add young and energetic talent
  2. Can train them easily on the business needs of the organization
  3. They can scale up over a period
  4. Moulding them into the organizational culture is also easy

Running operations in India, which is a major supplier of Knowledge workforce to many businesses worldwide, there are a lot of opportunities to hire talent. Many organizations partner with professional educational institutions to hire, train and intake fresh talent. It is important to find a right partner for this engagement. Not all engagements between businesses and institutions become successful. There are various factors:

  1. The stage in which the business is – opportunities, needs, scale, revenue, funding, possibility to invest in hiring
  2. The stage at which the institution is – are the really welcoming, trusted partner, serious about supplying and supporting needs of businesses who approach them for talent
  3. The mindset of students – honour the offer made, respect the opportunity, passion for career, belief in the organization

In the past, we tried various recruitment and training methodologies and finally resorted to partner with an engineering college, like what most of the MNCs do. We were trying to reach out to multiple institutions, though all were really welcoming, we found a right partner with (SECE) Sri Eshwar College of Engineering, Coimbatore

  1. The management was very approachable, listen to our requirements and take necessary actions to support to train their students for our needs
  2. Faculty members of the college extend valuable support in grooming the fresh talent based on the training requirements we share
  3. Students respect and understand the potential opportunity that lies ahead with a growing and promising organization like us

The institution has got a lot of initiatives to provide industry-student linkage. They invite organizations to set up Centre of Excellence, labs, extended office as a remote location. We have signed an MoU and set up a Center of Excellence with them since 2017.

We struck a right sync with this institution for our growth at this stage and decided to recruit fresh graduates from this institution. In 2017, we hired 5 students and they underwent rigorous training which helped them to be readily deployable into products – Serverless360, Atomic Scope, and Document360. Within a few weeks into their job, their contribution is being used by multiple enterprises across the world.

Here are few throwbacks to the 2017 recruitment drive

Recruitment driveOrganisation overview to the aspiring candidates

Recruitment driveCandidates taking up the programming challenge at SECE IT Center

Recruitment drivePersonal Interview

Recruitment drive
2018 batch – welcome aboard BizTalk360

We came back to this institution again in 2018 for our future requirements.

Prior to the interview process, here are the messages that 2018 batch sent to the prospects from 2019 batch.

Recruitment drive
Recruitment drive
Recruitment drive
Recruitment drive
Recruitment drive

Based on our plans to market our products and exploring how other product companies work, this year we also came up with a new role – Technical Product Marketing and we offered an internship to two students. Within a couple of days, those interns showed very good capabilities to explore Serverless computing and they came up with a blog:

Serverless Computing and Enterprise Application Integration (EAI)

Basics of Serverless Computing

For the Software Engineer requirement, we considered various factors to assess the candidates:

  1. Cumulative performances in programming activities in their academic period
  2. Performance in Logical Reasoning and programming using a testing platform
  3. Approach to few problems by identifying right Data Structures & Algorithm
  4. Interview on programming knowledge
  5. Capability to explore latest technologies – Cloud Computing, Azure Integration Services, Serverless Computing
  6. Personality assessment

After rigorous assessments, we offered 4 candidates (in banner image) to join us as interns from late 2018.

We extend all the selected candidates a warm welcome and promise them a wonderful career!

Author: Arunkumar Kumaresan

Technical Lead – Product Engineering at BizTalk360 India. Working on Microsoft technologies for more than 10 years, focusing on Windows Azure and Integration platform. As Microsoft Certified Professional and a Trainer, has conducted training for professionals and graduates. Actively involved in organizing global and User Group events on Microsoft technologies. View all posts by Arunkumar Kumaresan

BizTalk WCF-SQL Error: Microsoft.ServiceModel.Channels.Common.ConnectionException: Cannot open database “Database-Name” requested by the login. The login failed

BizTalk WCF-SQL Error: Microsoft.ServiceModel.Channels.Common.ConnectionException: Cannot open database “Database-Name” requested by the login. The login failed

To finalize, maybe, these series of Errors and Warnings… Causes and Solutions let’s describe and address a fairly simple one that from time to time appears: Login Failed. While trying to communicate to a SQL Server database to invoke a stored procedure thru BizTalk WCF-SQL adapter I got this following error:

A message sent to adapter “WCF-Custom” on send port “STAGING_SQL_WCF_SEND” with URI “mssql://SQL-SERVER-NAME//AsyncTransactions?InboundId=ins” is suspended.

Error details: Microsoft.ServiceModel.Channels.Common.ConnectionException: Cannot open database “AsyncTransactions” requested by the login. The login failed.

Login failed for user ‘DOMAINBTSHostSrvc’. —> System.Data.SqlClient.SqlException: Cannot open database “AsyncTransactions” requested by the login. The login failed.

Login failed for user ‘DOMAINBTSHostSrvc’.

at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling)

at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)

at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)

at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)

at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)

at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)

at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)

at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)

at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)

at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)

at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)

at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)

at System.Data.SqlClient.SqlConnection.Open()

at Microsoft.Adapters.Sql.SqlAdapterConnection.OpenConnection()

— End of inner exception stack trace —

Server stack trace:

at Microsoft.Adapters.Sql.SqlAdapterConnection.OpenConnection()

at Microsoft.Adapters.Sql.ASDKConnection.Open(TimeSpan timeout)

at Microsoft.ServiceModel.Channels.Common.Design.ConnectionPool.GetConnection(Guid clientId, TimeSpan timeout)

at Microsoft.ServiceModel.Channels.Common.Design.ConnectionPool.GetConnectionHandler[TConnectionHandler](Guid clientId, TimeSpan timeout, MetadataLookup metadataLookup, String& connectionId)

at Microsoft.ServiceModel.Channels.Common.Channels.AdapterRequestChannel.OnOpen(TimeSpan timeout)

at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)

at Microsoft.BizTalk.Adapter.Wcf.Runtime.OneWayOperationSendPortRequestChannel`1.OnOpen(TimeSpan timeout)

at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)

at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)

at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)

at System.ServiceModel.Channels.CommunicationObject.Open()

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.ICommunicationObject.Open()

at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.GetChannel[TChannel](IBaseMessage bizTalkMessage, ChannelFactory`1& cachedFactory)

at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.SendMessage(IBaseMessage bizTalkMessage)

MessageId: {71CDC883-AE8D-4303-A72E-ADA9ECE91981}

InstanceID: {1EA7B77C-924F-4C74-87DE-BCC4D1AD8E6A}

The cause of the problem is quite obvious and the error message, this time because sometimes is not quite true like we saw in my last post, the error message clearly identifies the origin of the problem.

This problem occurs because the user account that you used to access the database, in my case the BizTalk Host Instance Account, don’t have permissions to connect the database.

Simple problem, simple solution. You need to grant permission to the user to access database

Once again, given “sysadmin” or “db_owner” would solve all our problems but it goes against security best practices and sometimes these tables contain sensitive data or personal data, and nowadays with General Data Protection Regulation (GDPR) in EU this sometimes can be a backdoor for other possible problems and teams need to start taking into considerations these security policies.

You always should give the minimum rights to a certain user for him to do the necessary tasks. Nothing more, nothing less… as things should be.

Setting the time zone in the BizTalk360 BAM Portal and other BAM improvements

Setting the time zone in the BizTalk360 BAM Portal and other BAM improvements

The BAM Portal in BizTalk360, provides the option for querying BAM views, perform activity searches, check user permissions and to view the query results of Related Activities and Documents the same as in the out of the box BAM Portal of BizTalk Server. However, the user couldn’t view the query results in their respective time zone in BizTalk360, like in the original BAM portal. We brought a number of improvements to the BAM Portal in BizTalk360; setting the time zone is just one of them.

Time Zone in BizTalk BAM portal

Some of our customers requested the functionality to view the query result on their respective time zone. In BizTalk360 v8.8, we came up with the solution, by implementing “BAM Time Zone”. With the help of this, the user can choose the time zone specifically to their requirement.

In the BizTalk BAM Portal, the query result is displayed according to the local Time Zone, while the actual data in the BAMPrimary database is stored in the UTC time zone. BAM captures milestones such that they are automatically recorded in Coordinated Universal Time (UTC) format (this is also referred to as Greenwich Mean Time). When you send date/times to BAM using the APIs, they are received in the format sent without  conversion to UTC format.

Time Zones in BizTalk360 BAM portal

Earlier versions of BizTalk360 automatically picked up those data in the BAMPrimaryImport database and display it. BizTalk360 won’t convert any time zone as might be user required; the product will display UTC time zone the same as in BAMPrimaryImport database. From this version on, BizTalk360 will pick up the UTC time in the BAMPrimaryImport database and then convert that into the user required time zone. The user can set the required time zone using the BAM Time Zone.

Configure time zone in BizTalk360 BAM portal

Usability of BAM Time Zones

The available time zones are displayed in the BAM Time Zone dropdown and the user can choose the specific time zone according to the system Timezone/ local time zone. Through this, the user can view the date time as in the original BAM portal.

Configure time zone: time zones drop down

The BAM Time Zone also includes Day Light savings, so query result is displayed according to the Day Light Savings.

Can Other Users set the BAM Time Zone?

Only the Super User will have the permission to set the BAM Time Zone. If other users also have that permission, that could create confusion, so to avoid this we have given permission to set the BAM time Zone only to Super Users.BAM Portal time zones: read-only for Normal users

Other users can view which time zone has set, but they have not access to change the set BAM Time Zone.

Related Documents Improvements

In version v8.6, we have implemented the Related Activities and Related Documents Functionality. After this release, we came to know some new workaround from our customers, who noticed an issue in Related Activities view and Related Documents Download Functionality, like

BizTalk360 Feedback portal: download Related documents

The above issue is because, when the “Activity Id” has any special characters or it is custom created, the user could not view the detailed information. This has been solved in the current version of BAM. The user can now view the detailed information and Related activities without any constraints.

BAM portal: Detailed information

Handling the XML Message in BAMPrimaryImport Database

We came across another new workaround with Related Documents Download functionality. The Related Document is not getting downloaded when the XML message is stored in BAMPrimaryImport Database.

In the BizTalk BAM portal, the user can capture the whole XML Data in LongReferenceData column in the BAMPrimaryImport Database. This can be done by using the AddReference method of the BAM Orchestration Event Stream to log the complete xml message.BAM data in BAMPrimaryImport database

BAM can store up to 1 MB of data through the AddReference method (using longReferenceData field with type NTEXT) on the event stream, a great well-performing solution for message-bodies which enables the storage of message bodies alongside the data that describes how it was processed.

Handling the XMLMessage in BizTalk360 BAM Portal

In the BizTalk360 BAM Portal, the Related Documents are only downloaded from the archive folder. From this version of BizTalk360 v8.8, the Related documents will get downloaded either from archive folder and from the database. It checks the XML message either in Archive folders or in the database, if it is found, it downloads the XML File in Zip File Format as shown below.

BAM Portal: Related documents

If the file is not available in both archive folders or database, it will throw a “File Not Found exception” as below.

Downloading Related documents: File not Found exception

Filter Improvements

In the previous version, we received a feedback from customers that some filter conditions are not working as expected in the BizTalk360 BAM Portal.

BAM Portal: Filters

In the current version of BizTalk360, we have fixed the below mentioned filter conditions in BizTalk360 BAM.

  1. String Filter
  • Starts with
  • Ends with

BAM Portal: Fixed Filters

2. Date Time Filter

  • Later
  • On or Later

BAM Portal: Fixed Filters

We improved those filters, so it will be working from BizTalk v8.8. We have implemented above functionality in the BAM Portal by keeping our customer feedback and understanding the consequence of users on execution. This implementation will highly optimize the BizTalk360 BAM Portal.

If you are interested, you can read more on our Documentation portal.

BizTalk WCF-SQL Error: Microsoft.ServiceModel.Channels.Common.MetadataException: Object [dbo].[StoredProcedureName] of type StoredProcedure does not exist

BizTalk WCF-SQL Error: Microsoft.ServiceModel.Channels.Common.MetadataException: Object [dbo].[StoredProcedureName] of type StoredProcedure does not exist

I told you in my last blog post an error never comes alone … when an error appears, it always appears two or three. Or that, or I have a tendency to attract, or find weird errors! This time I was completely stunned: StoredProcedure does not exist, while trying to invoke a stored procedure thru BizTalk WCF-SQL adapter:

Microsoft.ServiceModel.Channels.Common.MetadataException: Object [dbo].[InsertTransaction] of type StoredProcedure does not exist

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)

StoredProcedure does not exist: BizTalk WCF-SQL adapter

or in the event viewer:

A message sent to adapter “WCF-Custom” on send port “STAGING_SQL_WCF_SEND” with URI “mssql://SQL-SERVER-NAME//AsyncTransactions?InboundId=ins” is suspended.

Error details: Microsoft.ServiceModel.Channels.Common.MetadataException: Object [dbo].[InsertTransaction] of type StoredProcedure does not exist

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)

MessageId: {71CDC883-AE8D-4303-A72E-ADA9ECE91981}

InstanceID: {1EA7B77C-924F-4C74-87DE-BCC4D1AD8E6A}

StoredProcedure does not exist: BizTalk WCF-SQL adapter Event Viewer

As I normally say, doubt what you read – even if it is on my blog – because there are many conspiracy theories, and we can find so-called solutions by googling it… but a lot of them are just that: conspiracy theories.

Cause

Personally, I usually like to start with the simplest thing: If it says that doesn’t exist… let’s check, and in this case, the error raised by the adapter it’s just stupid because the stored procedure exists in that specific database as you may see in the picture below:

StoredProcedure does not exist: Stored Procedure exist

At a first glimpse, it seems that was not a security issue because I was able to connect to the database, otherwise, I would get the following error:

Error details: Microsoft.ServiceModel.Channels.Common.ConnectionException: Cannot open database “AsyncTransactions” requested by the login. The login failed.

Again, some conspiracy theories may let you think that:

  • you should regenerate schemas;
  • or that may be a mismatch in the namespaces;
  • the operation is not properly set;
  • that the “?” character that you normally find in the URI is causing this problem;
  • and my favorite is that you should give “sysadmin” rights to the service account that is running the host instance.

Lucky, I remembered to double check the security permission directly on SQL Server, so I opened the SQL Server Management Console with the service account and try to execute the stored procedure and… guest what… I didn’t have permissions!

When I double check the permissions to that service account, it had: db_datareader and db_datawriter… that in some situations are enough:

StoredProcedure does not exist: Service Account Role Permissions

Of course, given “sysadmin” or “db_ower” would solve all my problems but sometimes you are not allowed to do that for security reasons and also is not a best practice, special now with GDPR.

So the problem was clear that the service account that is running the host instance bind to that send port didn’t have the right permissions to execute the stored procedure… unfortunately, the error raised by the adapter is out of context.

Solution

The best approach for you to solve this problem is to create a new server role, for that particular database, in SQL Server:

  • In Object Explorer, access to your database and expand it.
  • Expand the Security folder.
  • Right-click the “Database Roles” folder and select “New Database Role…”
  • In the “New Database Role” window
    • On the “Role name” property, on the General page, enter a name for the new database role, for example, “db_spexecution”
    • On the “Owner” property, inherit from db_datareader and db_datawriter (optional)

StoredProcedure does not exist: Select database User or Role

  • On the Securables page, under Securables, click “Search” button.
    • On “Add Objects” window, select “Specific objects…” and click “OK”

StoredProcedure does not exist: add objects

    • On “Select Objects” windows, click “Object Types…” and then select “Stored Procedures”

StoredProcedure does not exist: Select objects type Stored Procedures

    • After selecting the object type, click “Browse…” and from the “Browser for Objects” windows select the stored procedures you want to invoke. (only the one that you need)

StoredProcedure does not exist: browse objects Stored Procedures

    • Click “Ok” and again “OK” to return to the main “New Database Role” window.
  • The last step, on the Securables page, is to give Execute permissions “Grant” and “Grant with”.

StoredProcedure does not exist: new role securables tab

  • And finally give, on the General tab, add the service account that is running the host instance to the Role Members for that role.

StoredProcedure does not exist: new role General tab

  • Click “OK” to finish.

You can now try to resend the suspended messages or send new ones, and you will be able to communicate and execute the stored procedures without any problem.

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

BizTalk Schema Problems: The type or namespace name ‘SerializableAttributeAttribute’ does not exist in the namespace

BizTalk Schema Problems: The type or namespace name ‘SerializableAttributeAttribute’ does not exist in the namespace

An error never comes alone … When an error appears, it always appears two or three, and I still have thousands to published, but this one but this one made me crazy for a few minutes: The type or namespace name ‘SerializableAttributeAttribute’ does not exist in the namespace!

Yes, you read it right, while I was trying to compile a RosettaNet schemas projects, in this particular case a PIP3B2 Advance Shipment Notification I got thousands of errors, 3054 to be exact saying:

Error 1 The type or namespace name ‘SerializableAttributeAttribute’ does not exist in the namespace

RosettaNet.Common.Schemas._3B2.System’ (are you missing an assembly reference?)

C:TFS…RosettaNet.Common.Schemas.3B2DomainLogisticsCodeListRN_FreightPaymentTerms_01_03.xsd.cs 9 13 RosettaNet.Common.Schemas.3B2 …

Error 3054 The type or namespace name ‘NonSerializedAttribute’ does not exist in the namespace ‘RosettaNet.Common.Schemas._3B2.System’ (are you missing an assembly reference?) C:TFS… RosettaNet.Common.Schemas.3B2DomainProcurementINT_Procurement_02_07_01_09.xsd.cs 5072 21 RosettaNet.Common.Schemas.3B2

… and several other schemas as you may see in the picture below.

namespace name 'SerializableAttributeAttribute' does not exist in the namespace

But do not be fooled into thinking this is a problem related exclusively to RosettaNet, it is not, and it can happen with any “normal” or any kind of schemas.

Cause

There are certain keywords, type names, and identifier names that you should use because they are internally used by BizTalk and it way enter in conflict and sometimes originate problems and errors, keywords like activate, atomic, body, task, compensate, method and several ones, you can see the full list here XLANG-s Reserved Words. But there are other keywords that depending on the artifact, may give you problems like:

  • BTS (associated with Microsoft.BizTalk.GlobalPropertySchemas assembly)
  • “-“ in RootNode Typename inside schemas

And “System”!

If you use the keyword “System” inside a schema namespace like:

  • RosettaNet.Common.Schemas._3B2.System
  • “MyNamspace.System.Schemas”

You will not be able to compile your schema project.

The problem, if you download from the GS1 RosettaNet Standards certain PIP’s they will have the following structure:

namespace name 'SerializableAttributeAttribute': RosettaNet PIP3B2 Sctructure

And as you see, there is a folder “System” that inside have several schemas and normally the schema namespace is composed by the project name or (assembly name) and the path to the schema, for example in this case:

  • RosettaNet.Common.Schemas._3B2.System.CodeList
  • Or RosettaNet.Common.Schemas._3B2.System

And this is causing all of these problems because in this case, “System” is a reserved keyword that shouldn’t be used.

Solution

The difficult part of this error was finding the cause of the problem. Once you know what is causing the problem the solution is quite simple. You just need to:

  • Change the “Namespace” property on all the schemas the word “System” to another name, for example, “_System” (to maintain the consistency but it can be other word/value)

In my case, I hade the change the “Namespace” property of the schemas in the “System” folder

namespace name 'SerializableAttributeAttribute': Change schema namespace

You can now rebuild your schema solution and this error should go away.

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

Setup multiple Maintenance Windows in BizTalk360

Setup multiple Maintenance Windows in BizTalk360

Introduction

BizTalk360 allows you to setup monitoring on many artifacts and also allows you to auto-correct artifacts which have hit an unexpected state. During day to day operations it is very helpful to have this monitoring in place as it will save the BizTalk administrator(s) a lot of time because they don’t have to do that monitoring manually.

However, there are also times that you don’t want this monitoring to be active. Think of for example during maintenance windows because of deployments or installation of security patches. To temporarily stop monitoring, BizTalk360 provides a feature called ‘Stop Alerts for Maintenance’, which enabled the user to set up a single maintenance window. This feature can be found in the Settings area of the product.

In BizTalk360 v8.8, we have extended that feature by adding the capability to allow the user to setup multiple future maintenance windows. So during these periods the alarms will be disabled and no notifications will be sent.

In this article, we will take a detailed look at few end-to-end scenarios of settings up maintenance windows with a real-time scenario.

Scenario: Regular Maintenance windows

Let’s say, weekly on a Saturday some work involving performing weekly maintenance checks of the reliability, administration, security, and performance of a BizTalk Server system are done.
When the ports are down, you might continue to get notifications from BizTalk360 as it continues to monitor the BizTalk environment. In this case you would like to setup a maintenance window to stop all alerts during that period.

Follow the below steps as shown:

1. Log in to the BizTalk360 application
2. Go to the Settings page by clicking the Gear icon on top left hand side.
3. Navigate to ‘Monitoring & Notifications‘ and then ‘Stop Alerts for Maintenence
4. Select the environment which you wish BizTalk360 to stop monitoring and the correct date and start time of maintenance and the duration of the window. Also provide a Comment for Auditing purposes and click ‘Save’

Setup multiple Maintenance Windows: configuration settings

5. Here you can set up future maintenance schedules. As these are saved in the BizTalk360 database, they are displayed in the Grid below the configuration section

The Alert Maintenance Schedule grid shows you the list of scheduled maintenance windows for that environment. You can also delete schedules in this table by clicking on the small bin icon on the right-hand side of each of the schedules. If you wish to see the Historical Maintenance Schedules that have gone past, you can switch Tabs and view the results there.

Scenario: Emergency maintenance window

In case some emergency is happening and you don’t want to receive falsified notifications from BizTalk360, you can also set this up.

1.  Select the environment which you wish BizTalk360 to stop monitoring and the correct date and start time of maintenance and the duration of the window

2. Use the Immediate slider option for the maintenance window to start immediately

Setup multiple Maintenance Windows: Immediate setting

3. Define how long the Maintenance window must remain active

4. Give comment for Auditing purposes and click ‘Save’

Now the maintenance window is started immediately, and BizTalk360 notifications will cease while maintenance is on.

When the maintenance period is on

You will be alerted that the maintenance period is currently going on with an informational message both in the Operational dashboard as well as in the Stop Alerts screen as well.

Setup multiple Maintenance Windows: Maintenance window is active

Information regarding the start & end times of maintenance window will also be provided.

Setup multiple Maintenance Windows: Date/time details

This feature is very useful to keep track of the maintenance schedules that are upcoming and those that have already passed. It also shows some form of auditing as you can see the person who scheduled a maintenance window in BizTalk360.

As soon as the maintenance window finishes, BizTalk360 will start sending notifications again based on the monitoring.

Purging maintenance windows

We have also set in place some purging policies to help manage the table size of the historical maintenance schedules.

To view this configuration

1. Log in to the BizTalk360 application
2. Go to the Settings page by clicking the Gear icon on top left hand side.
3. Navigate to ‘BizTalk360 Health‘ and then ‘Data Purging‘.

Setup multiple Maintenance Windows: Purging policy

The default value is 15 days, so every 15 days the Alert & maintenance history is purged, but this can be changed as per your requirements.

Conclusion

If you want to read more about this and all the other features BizTalk360 provides, check out our Documentation portal.

Improvement of the existing ‘Stop Alerts for Maintenance’ feature was implemented based on the voting and requests on our feedback portal. If you feel there is any feature that would benefit you, please make a note in the feedback portal.

Author: Rochelle Saldanha

Rochelle Saldanha is currently working in the Customer Support & Client Relationship Teams at BizTalk360. She loves travelling and watching movies. View all posts by Rochelle Saldanha

BizTalk Deploy operation failed… Assembly “XY” references the following assemblies that must be deployed before deploying this assembly Assembly “YZ”

BizTalk Deploy operation failed… Assembly “XY” references the following assemblies that must be deployed before deploying this assembly Assembly “YZ”

I’m back with “Errors and Warnings, Causes and Solutions” and this time targeting developers – BizTalk Deploy operation failed – that work until late and they are a bit tired… believe me, It’s never a good recipe!

Today will I was deploying a BizTalk Server Solution from Visual Studio I had a rookie problem that, because I was tired, I took 20 minutes to find out the problem:

Severity Code Description Project File Line

Error Assembly “Finance.Orchestrations, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d149e7c1ed8e238f” references the following assemblies that must be deployed before deploying this assembly:

Assembly “Staging.Orchestrations, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d149e7c1ed8e238f”.

Deploy operation failed…

At Microsoft.BizTalk.Deployment.BizTalkAssembly.PrivateDeploy(String server, String database, String assemblyPathname, String applicationName)…

BizTalk Deploy operation failed

… a rookie problem that if you read carefully the error message you will know the problem.

Cause

Basically, this is a dependency problem… “Finance.Orchestrations” assembly references certain “Staging.Orchestrations” artifacts, and for this reason, this last assembly (Staging.Orchestrations) must be deployed before deploying the assembly that references these artifacts (Finance.Orchestrations).

When you deploy BizTalk assembly you must ensure that any referenced assembly is deployed first. BizTalk actually, helps you out, by enforcing that “deployment rule” by not letting you applying adding resource action without deploying all its references and that is the reason why this error is happens

Although I’m almost sure that I had deployed all the resources – common schemas, maps, and orchestrations – that was being consumed in this BizTalk Solution. When I decide to check if they were actually deployed in the environment, I found out that they weren’t… again a rookie mistake.

Solution

The solution to this problem is easy, make sure that all the dependencies are deployed before you deploy your solution.

In my case, I deployed the “Staging.Orchestrations” assembly and then I was able to indeed deploy the “Finance.Orchestrations”.

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

Microsoft Integration Weekly Update: July 2, 2018

Microsoft Integration Weekly Update: July 2, 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