In this section, we will see how to set up monitoring on the Orchestrations in a BizTalk application.
Orchestrations in BizTalk server are used as work flows to compose business processes. In majority of the instances, Orchestrations will become key part of the solution you have deployed, and it's important to make sure the orchestrations are in healthy expected state to avoid any downtime.
BizTalk360 assists administrators by monitoring the Orchestrations against a predefined status. For instance, you want to monitor the health of the Orchestration and want to be alerted when the status is not in a Started state. You can easily configure this in BizTalk360 by setting the expected state of the Orchestration to Started. By doing this, BizTalk360 will trigger an alert as soon as the Orchestration status is not in the Started state.
BizTalk360 allows you to set up monitoring for any desired state, which is not necessarily just the healthy running (Started) state. When it comes to BizTalk, it's fairly normal that, for example, you have some Orchestrations in the Stopped state for some reason and you do not want someone to accidentally start it.
So, when you are configuring monitoring for Orchestration, you can select one of the expected state from the drop down. The meaning of the states are:
- Started – The Orchestration is expected to be in started state
- Stopped – The Orchestration is expected to be in stopped state
- Unenlisted – The Orchestration is expected to be in unenlisted state
- Do not monitor – Selecting this option will disable monitoring for the selected Orchestration
Setting Up Alerts For Orchestrations
- Log in to the BizTalk360 application
- Click 'Monitoring' in the navigation panel
- Click the expand button against 'Manage Mapping' tab and select 'Applications' link
- Select the Application for which you want to set up the monitoring
- Select the Alarm name (see Creating an alarm) from the drop down for which you would like to associate the alerts
- Choose the Orchestration(s) that you wish to monitor and receive the alerts
- Select the check box against the orchestration, and
- Set the value of Expected State by selecting from the value from drop down. For instance, if you want to be alerted when the Orchestration is not in Started state, then you need to set the expected value in the drop down to Started
Auto Correct Functionality
With the Auto Correct functionality, administrators can set up monitoring on any "State-based" artifact and let the monitoring service try to automatically heal the artifact any time when there is a mismatch between the "Expected State" and "Current State". For instance, administrators can set up monitoring on the Orchestration(s) of an application and additionally set up the auto correct functionality for the Expected State of the artifact (which should be "Started"). Whenever the orchestration goes gets stopped or unenlisted, there will be a mismatch in the state and the auto correct will try to bring the artifact back to the expected state. If the operation is successful, the artifact will come back to the Expected State within the next monitoring service cycle (60 seconds). Assuming you are still on the Orchestrations screen, follow below steps to setup Auto Correct for Orchestrations:
- Select the check box of the orchestration(s) for which you want to setup Auto Correct, click Auto Correct drop down, and select Started
- Auto Correct will be enabled for the orchestration(s) with the default values for Max Retry as 5 and Retry Count as 0
From the Health Monitor alarm, all Orchestrations of the BizTalk EDI application need to be monitored, to be in the Started state. Also, Auto Correct needs to be Enabled
When an Orchestration is not in the Expected State
Attempt 1 - Auto correct will attempt to bring the orchestration in the expected state for the first time during the monitoring cycle. (Max Retry : 5, Attempt Count : 1). Let's assume the attempt was unsuccessful. You will receive an Auto Correction Alert email with the information. At this point, the monitoring dashboard will display the state of the artifact as Critical (2). When you click on the count, you will notice the auto correction steps that have been performed on the artifact Attempt 2 - Auto correct will attempt a retry for the second time during the next monitoring cycle (Max Retry : 5, Attempt Count : 2). Let's again assume the attempt was unsuccessful. You will receive the second auto correction email with the information Attempt 3 - Auto correct will attempt a retry for the third time during the next monitoring cycle (Max Retry : 5, Attempt Count : 3). Let's assume this attempt was successful. You will receive the third auto correction email with the information. Within the next few seconds, the monitoring dashboard will display the state of the artifact as healthy. Lastly, the attempt count will reset to 0 (Max Retry : 5, Attempt Count : 0)
Remove Orphaned Orchestrations
BizTalk360 provides the ability to remove Orphaned Artifacts from the UI. Say for instance, you have configured monitoring for artifacts like receive locations, send ports, orchestrations, SQL jobs etc., and later you either rename them or remove them completely in your environments. By doing so, the artifacts configured for monitoring move to an Orphaned state. These orphaned artifacts can be removed right from the UI by clicking the 'Remove Orphaned' button.