The System Manager is the root object exposed by the engine. This COM+ component is configured in the XLANG Scheduler COM+ application, which is the default host for XLANG schedules.
In Visual Basic, this root object is referred to as SYSMGRLib.SysMgr when you add a reference to skedsmgr.dll nominally located at Program FilesMicrosoft BizTalk ServerXLANG Schedulerskedmgr.dll. Note that this type library is called XLANG Scheduler – System Manager and is not listed among other BizTalk Server library references. Figure 11.7 shows the two type libraries of interest.
The following code fragment shows how to get a reference to the System Manager:
Dim oMgr As SYSMGRLib.SysMgr Set oMgr = GetObject("sked://")
The properties and methods of the System Manager are described in this section. Table 11.1 summarizes the properties, and Table 11.2 summarizes the methods of the System Manager.
Property | Description |
---|---|
Count | Number of group managers in server |
FullyQualifiedName | Full moniker for the System Manager, with DNS style name of the server |
IsWorkflowHost | True, if COM+ application is enabled for XLANG Scheduler Engine |
Item | Reference to collection of group managers |
UseFileDSN | Type of DSN used for the persistence database |
Method | Description |
---|---|
ShutdownAll | Controlled shutdown of all group managers |
ShutdownApp | Controlled shutdown of the named group manager |
StartUp | Asynchronous rehydration of schedule instances |
TestAdminStatus | Method to test access |
Each property and method is described in the order listed in Tables 11.1 and 11.2. The property or method is identified with a bolded label; this is followed by a signature and description.
Property Count
Property Count As Long
The Count property returns a Long that contains the number of group managers (that is, XLANG hosting COM+ applications) running on the server.
This is a read-only property.
Property FullyQualifiedName
Property FullyQualifiedName As String
The FullyQualifiedName property returns a String that contains a moniker for the System Manager object. The moniker contains the fully articulated DNS style name, even though the local machine name is optional when you use the moniker to get a reference to the System Manager.
This is a read-only property.
Property IsWorkflowHost
Property IsWorkflowHost(varApplicationName As String) As Boolean
The IsWorkflowHost property controls whether the named COM+ application is an XLANG Scheduler Engine host. The returned value of the property is a Boolean indicating whether the named application is a host.
This is a read/write property. However, you cannot set this property on COM+ applications that have been marked Disable changes, in the Advanced tab of the property pages of the COM+ application. Also, this property cannot be set on the default XLANG Scheduler application.
Property Item
Property Item(name As String) As Unknown
The Item property is the default member of the System Manager object and returns a reference to a collection of running group managers. You also can get a reference to a specific group manager by using its name to index the collection. Code fragments that illustrate the usage are in the section “Group Manager” later in the chapter.
This is a read-only property.
Property UseFileDSN
Property UseFileDSN(varApplicationName As String) As Boolean
The UseFileDSN property controls whether the named COM+ application uses a file DSN to access the persistence database.
This is a read/write property; however, the changes in this property do not take effect until the application (group manager) is restarted.
Method ShutdownAll
Sub ShutdownAll()
This method performs a controlled shutdown of all XLANG hosting applications.
This is a synchronous call. When the call returns, all applications are shut down and the machine may be safely rebooted, for example.
Method ShutdownApp
Sub ShutdownApp(varApplicationName As String)
This method performs a controlled shutdown of the named XLANG host application. If called on the default host, XLANG Scheduler, then it is equivalent to calling the ShutdownAll method, and all applications are shut down.
Method StartUp
Sub StartUp()
This method starts up all configured XLANG host applications.
This is an asynchronous call. The rehydration process is initiated for schedules in each of the host applications; however, the call will return before the process is completed. See the “XLANG Event Monitor” section later in the chapter to see whether rehydration is complete.
Method TestAdminStatus
Sub TestAdminStatus()
A process can use this method to check whether the identity it is running under complies with the role membership as configured for the XLANG Schedule Administrator security role. This method is used internally by XLANG hosting COM+ applications (that is, group managers) that you configure and is not of much use to other applications.