The BatchTerminator utility enables you to terminate all live batching orchestrations being used to batch EDI interchanges. This utility could prove useful if you have a large number of batching orchestration instances running, and you need to terminate all the batches in order to perform maintenance on the BizTalk server system.
The BatchTerminator utility is located in the drive:\Program Files\Microsoft BizTalk Server 2xxxSDK\Utilities\MicrosoftEDI\BatchTerminator folder. When you run the utility to terminate the batching orchestration instances, the utility will log the results in the batchterminator.log file in the <drive>:\Documents and Settings\<user name>\Application Data folder.
The BatchTerminator utility is only supported on 32 bit systems. BatchTerminator uses components in the Microsoft.BizTalk.ExplorerOM namespace, which is only supported if used from a 32 bit process.
Restarting the Terminated Orchestration Instances
After you terminate a group of batching orchestrations, you can do a bulk restart of those orchestration instances. You do so with the /Activate switch and the name and path of a file that indicates the batches that were stopped. When you run the utility to terminate a group of orchestration instances, the utility will create this stopped-batches file. The stopped-batches file is batchSettings-<GUID>.xml in the <drive>:\Documents and Settings\<user name>\Application Data folder. The path and name of the stopped-batches file is also saved in the log file. When the utility runs with the /activate switch, it validates the input file against a schema.
Run the BatchTerminator utility in a command-line window with the following syntax:
You can run the BatchTerminator utility with the following switches. If no switch is provided, the /terminate option is used. As indicate below, you can enter the full name of the switch, such as /terminate, or the shortened form, in this case, /t.
|/terminate -log:<log file>|
or /t -log:<log file>
|Sends terminate control messages to all active X12 or EDIFACT batching orchestration instances. It displays the results of the operation, including a list of all active batch orchestration instances that it terminated, the number of active batch orchestrations that it found, and the number of terminate control messages that it sent. It logs the results into the batchterminator.log file in the <drive>:\Documents and Settings\<user name>\Application Data folder.|
The optional -log: parameter enables you to specify the name of the log file and/or the path of the folder that you want the log file to be saved to. An example of using the parameter to specify the path and file name is the following:
|Displays a listing of the current active batching orchestration instances without sending terminate control messages|
batchSettings-<GUID>.xml -log:<log file>
batchSettings-<GUID>.xml -log:<log file>
|Reactivates the previously terminated orchestration instances that are listed in the batchSettings-<GUID>.xml file. The utility will validate the input file against a schema embedded in the code. If the input file does not match the schema, an error message will be printed to the screen and the program will exit.|
This operation writes information about the restarting action in the log file if you include the -log: switch.
Format of the Batch Activation File
To reactivate previously terminated batch orchestration instances by using the /activate switch, you must provide a batch activation file (batchSettings-<GUID>.xml). This file must be in the following format:
<?xml version="1.0"?> <xs:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003" elementFormDefault="qualified" id="BatchInfo" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="BatchTerminator"> <xs:complexType> <xs:sequence> <xs:element minOccurs="1" maxOccurs="unbounded" name="Batch"> <xs:complexType> <xs:attribute name="PartyName" type="xs:string" /> <xs:attribute name="PartyID" type="xs:int" use="required" /> <xs:attribute name=”BatchName” type=”xs:string” /> <xs:attribute name=”BatchID” type=”xs:int” use=”required” /> <xs:attribute name="EdiMessageType" type="xs:string" use="required" /> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:schema>
The following are prerequisites for performing the procedures in this topic:
- You must be logged on as a member of the BizTalk Server Administrators group.
In Windows Explorer, move to the drive:\Program Files\Microsoft BizTalk Server 2xxxSDK\Utilities\MicrosoftEDI\BatchTerminator folder.
Enter BatchTerminator, including any desired switches, and then click Enter.
In Windows Explorer, move to <drive>:\Documents and Settings\<user name>\Application Data folder, and open the batchterminator.log file to see a log of the results.