The Message Box Data Monitoring functionality of BizTalk360 allows administrators to set up monitoring on specific states of a service instance. In addition, the functionality also provides the unique capability of being able to take actions on the service instances. For instance, if the administrator sets up monitoring on service instances with Suspended (Resumable) state, they can additionally set up further level of monitoring by allowing the monitoring service to automatically take an action on these Suspended (Resumable) service instances. They can choose to either Resume/Terminate the service instances depending on the requirement. In the latest release v8.0, we have improved the way the 'Resume' operation and number of retries works in BizTalk360.
When you select the "Is Action Required" check box under 'Set Actions' section in Message Box Data Monitoring section, and choose "Resume" under 'What Action' section, you will notice the 'Number of Retries' section. You can select the number of times BizTalk360 monitoring service should try to resume the message.
To understand why we added the Retries option in Message Box Data Monitoring of BizTalk360, let us consider a scenario. A message reaches the BizTalk environment through the receive location, and moves to the orchestration for further processing. While the processing operation happens within the orchestration, there may be a delay for the process to execute due to various reasons. At this point of time, the message moves into a 'Dehydrated' state. BizTalk automatically tries to resume the message for 'n' times within a retry interval of 'n' minutes. This value is specified under 'Transport Advanced Options' of the corresponding Send Port. If the operation was not successful, the message moves into a Suspended (Resumable) state. When the BizTalk360 monitoring service runs at this instant (as per its normal execution cycle), the monitoring service will automatically try to resume the suspended message (as per the instructions defined in the message box data monitor). Since the processing is not complete within the orchestration, the resumed message once again rolls back to the Dehydrated state. However, the BizTalk360 monitoring service will return the notification with the 'Task Action' flag set to 'True', which is not the exact case.
To overcome this problem, we have improved the logic of BizTalk360 monitoring service to attempt a specific number of retries on the suspended messages. The monitoring service will first look into the tracking database to see how many times BizTalk has actually tried to resume the suspended message. Let's say (as in the above scenario), BizTalk has attempted a resume for 3 times, and the retry count of BizTalk360 monitor is set to 5. This means the BizTalk360 monitor will attempt the resume operation for 2 times. If the retry operation is successful, the message will be successfully processed out of BizTalk. The limitation on number of retries is to avoid resuming messages that could potentially be automatically resumed for ever which would hide a problem and avoid the business process to occur.
The foremost requirement for the retry functionality to work is to have Global Level Tracking and Send Pipeline Track Events to be turned on.
Setting Up The Message Box Data Monitor With Retries For Suspended Instances
Follow the steps as shown below to set up the Message box data monitor with the retry for suspended instances functionality -
- Log in to BizTalk360 (as a Super user)
- Click Monitoring tab from the Navigation panel
- If you haven't created a data monitoring alarm, Create a Data Monitor Alarm. Follow the steps as shown in the article to create a data monitor alarm
- Once you have created an alarm, click the expand button against Data Monitoring tab and select Data Monitoring option
- Select Message Box Data tab to create a message box data monitor
- Click Add New to create a new message box data monitor
- Enter the details in the fields as appropriate. Refer this article to understand about each field in the message box data monitor creation page.
- In the Set Actions section, select the Is Action Required check box
- Select When to action option from the drop down (depending on the requirement) - Every Time, On Error Condition, On Warning Condition
- In What Action option, select 'Resume' as the option from the drop down. When you select Resume, the Number of Retries option will appear below. Select the count of number of retries that the BizTalk360 monitor should attemptThe minimum value for Number of Retries is 0 and the maximum value for Number of Retries is 10
- Click Save & Close to save and close the data monitor
Data Monitoring Dashboard - Action taken
When the data monitor executes at the specified time (as defined in the data monitor), if there are any suspended service instances, the monitoring service will try to resume the service instance. If the action was successful, the data monitoring dashboard will display the status with a Green tick mark. You will notice a gear icon that indicates a specific action has been taken on the service instance. If the operation did not happen as expected, the gear icon will not be visible. When you click the gear icon, the message box data execution results screen will display the status of the action that has been taken on the service instance.