• Print
  • Share

Building Query Expressions in Message Box

  • Updated on 09 May 2018
  • 8 minutes to read
  • Contributors

BizTalk360 offers similar capabilities as the BizTalk server administration console that allows administrators to query the message box database for all running and suspended service instances. The major difference from the admin console is the web-based look and feel of the Message Box (Queries) section. In addition, BizTalk360 offers few extended capabilities such as Integrated knowledge base where users can attach knowledge base articles next to a suspended service instance.

Building Query Expressions for Service Instances

BizTalk360 allows users to execute queries on the BizTalk Message Box database (BizTalkMsgBoxDb) to get the list of suspended service instances and running service instances. When the query is executed from the UI, BizTalk360 triggers a service call that retrieves the list of service instances and their current state. In addition, the service call will retrieve other information related to the service instance such as creation time, the error code associated with the error and its description. Follow the steps as shown below to query the message box database and retrieve the information:

  • Log into the BizTalk360 application
  • Click 'Operations' tab in the Navigation panel
  • Click the expand button next to 'Data Access' tab and select 'Message Box (Queries)'
  • In the Message Box (Queries) screen, under Build Query Expression:
  1. Select Query - Choose one of the options from the drop down (All In-progress service instances, running service instances, Suspended Service Instances) to retrieve the status of service instances
  2. Max Matches - Select the number of records to be fetched from the message box database. Ex. 10, 25, 50, 100....
  3. Add a filter - To filter the results based on different parameters. The parameters will vary while retrieving the status of In-progress service instances, running service instances, and suspended service instances. Once the filter criteria is selected, you will automatically see the values for the filter getting listed in the drop down. Ex. Host Name, Is Equal To, BizTalkServerApplication. When host name is selected from the drop down, the value BizTalkServerApplication & other host names will automatically be listed in the drop down. The user can select the required value.
  4. X - To delete the filter criteria
  • Click Execute Query. The Query Results section displays the list of All In-progress service instances, Running service instances, and Suspended Service Instances

-MSB-Service-instance.gif This example shows you build a query for all in-progress service instance with filter condition set for Orchestration service class.

When the queries are executed against the MessageBox database, BizTalk360 retrieves the list of suspended and running service instance information from the database. The query result section contains a Properties icon that will contain the properties of the service instance. The service properties section will contain general information about the service instance, the current state, information about the error and the error code, and the associated messages that are referenced by the service instance. To view the service instance properties information, follow the steps as shown below:

  • In the Query Results section, click the Properties icon (represented as an eye icon) to view the properties of the service instance
  • The Service Properties window contains information about the service instance
  1. The General tab contains information about the service instance, the current state, and the creation time
  2. The Error Information contains the error code and error description information
  3. The Messages tab contains the information of the messages that are referenced by the service instance. Click the Properties icon to view the message context and content properties

MSB-Service-Instance-properties.gif

This example shows you how to build a query for all in-progress service instances and view the Service properties for one of the Service Instances from the query results.

Building Query Expressions for Messages

In addition to retrieving the service instance state information, BizTalk360 allows users to execute queries and retrieve the information of the messages from the message box database. When the query is executed, BizTalk360 triggers a service call that will retrieve the message information such as Message ID, Message Status, Service Status, Service Name, Class, Instance ID, and so on. Follow the steps as shown below to query the message box database and retrieve the information:

  • Log into the BizTalk360 application
  • Click the 'Operations' tab in the Navigation panel
  • Click the expand button next to 'Data Access' tab and click the 'Message Box (Queries)' link
  • In the Message Box (Queries) screen, under Build Query Expression:
  1. Select Query - Select Messages from the drop down to retrieve the status of messages
  2. Max Matches - Select the number of records to be fetched from the message box database. Ex. 10, 25, 50, 100....
  3. Add a filter - To filter the results based on different parameters such as creation time, error adapter, error code, error description, host name, instance status, message ID, message status, message type, service class, service instance ID, service name, service type ID, and URI. Once the filter criteria are selected, you will automatically see the values for the filter getting listed in the drop down. Ex. Host Name, Is Equal To, BizTalkServerApplication. When hostname is selected from the drop-down, the value BizTalkServerApplication & other host names will automatically be listed in the drop down. The user can select the required value.
  4. X - To delete the filter criteria
  • Click Execute Query. The Query Results section displays the list of messages and their status

MSB-Message-query.gif

This example shows you build a query for Messages with filter condition set for Orchestration service class.

BizTalk360 has the capability where users can query the messages in the MessageBox database and view the message properties, content and context information. However, the users need to have the permissions to view this information. The Messages tab will be visible only if the 'Messages Content/Context' option is selected for the current user profile. To view the message information, follow the steps as shown below:

  • In the Query Results section, click the Message Properties icon (represented as a mail envelope icon) to view the properties of the message
  • The Message Properties window contains information about the message
  1. The General tab contains information about the message such as message ID, creation time, host name, service name, class, instance ID
  2. The Context Properties and Content Properties contain additional information about the message

-MSB-Message-properties.gif

Click the video, this example shows you build a query for Messages and view the Message properties and content.

Downloading the Messages

BizTalk360 offers the identical capabilities as the BizTalk server administration console with respect to querying the message box to list the suspended and running service instances. In addition, BizTalk360 offers an additional capability that allows users to download the message content and context (in zip format) and email to their team members to diagnose specific issues. The download and e-mail functionality is made available both at the Service Instance level and Message level.

Downloading the message as a file

  • Log into the BizTalk360 application
  • Click the 'Operations' tab in the Navigation panel
  • Click the expand button against 'Data Access' tab and select the 'Message Box (Queries)' link
  • Select the appropriate filter criteria (if any), and click Execute Query
  • Once the query results are populated, select the check box against a query result row. You will notice a Download button with a drop down arrow next to the Resume, Suspend, Terminate buttons
  • Click the 'Download' button and select As File from the drop-down. A file will be downloaded that will contain the XML file output of the message, and an associated OUT file

MSB-Download-file.png

Emailing the message information

  • Once the query results are populated, select the check box against a query result row. You will notice a Download button with a drop-down arrow next to the Resume, Suspend, Terminate buttons
  • Click the 'Download' button and select Send as Email from the drop down
  • In the Send messages as Email attachments pop up screen, enter the email addresses of the recipients to whom the email has to be sent
  • BizTalk360 allows the users to enter a maximum of 10 email addresses. The email addresses should be separated by a comma.
  • Once the email addresses are entered, click Send Email
  • The SMTP settings need to configured in BizTalk360 in order to be able to trigger email alerts.

MSB-Download-email.png

Operations that can be performed on Service Instance/Messages

In addition to querying the service instances, users can perform operations such as Suspend, Resume, and Terminating the service instances depending on the requirement. For instance, when a service instance is in the Suspended (Resumable) state, the administrator can choose to Resume the service instance or Terminate the service instance. Follow the same procedure to suspend/resume/terminate a service instance and message.

Resuming a Suspended Service Instance When a service instance gets suspended for some reason, it can either move into a resumable or a non-resumable state. When in the resumable state, the administrators have an option to manually start the service instance through the portal. Similarly, the administrator can choose to terminate the service instances that are in the non-resumable state.

  • In the Query Results section, select the check boxes against the service name(s). Click the Select All checkbox option to select all the service instances
  • Click Resume button to resume the selected suspended service instances
  • The user can perform the required operation in 2 different ways:
  1. Selecting the checkboxes against the service name(s) and clicking on the Operation buttons (Resume/Suspend/Terminate) at the top of the grid.
  2. Selecting check box against the service name. User will notice an inline operation showing up right next to the checkbox with the possible operations that can be performed on the service.

Resuming-Suspended-service-Instance.png

Terminating a Suspended Service Instance

  • In the Query Results section, select the check boxes against the service name(s). Click the Select All check box to select all the service instances
  • Click Terminate button to terminate the selected suspended service instances

Terminating-Suspended-Service-Instance.png

Suspending a Service Instance

  • Select the query as Running Service Instances from the drop down and appropriate filter criteria, and click Execute Query
  • In the Query Results section, select the check boxes against the service name(s). Click the Select All check box to select all the service instances
  • Click Suspend button to suspend the selected suspended service instances

Suspend-_Service-Instance.png