2.5.3.4 Locate and Establish a Connection to a Print Queue in a Workgroup Environment -- Print Client

Goal: To make a connection to a shared print queue in a workgroup environment so that documents can be printed by the user.

Context of Use: The user wants to print a document and does not have a printer attached to the local computer, but the user is member of a workgroup and knows that there are shared print queues in the workgroup that are available for use. The user decides to use one of the shared print queues in the workgroup and initiates this use case.

Direct Actor: The direct actor is the print client.

Primary Actor: The primary actor is a user.

Supporting Actors: The supporting actors are print clients performing a print server role.

Stakeholders and Interests:

  • Print client: The print client displays a list of shared print queues from which a user selects a print queue, and then the print client establishes a connection to the selected print queue.

  • Print clients that perform a print server role: In this use case, the print server role is performed by print clients that have shared print queues. After a user shares a print queue on the computer, the computer performs print server functions, including providing printer drivers to print clients, and accepting and printing print jobs from print clients. These print servers announce themselves to all other computers acting as print servers in the workgroup, as well as storing a list of all the other computers performing the print server role.

  • User: The user wants to view a list of available shared print queues and selects a print queue to which to send a print job.

Preconditions: The print server has used the CIFS Browser Protocol [MS-BRWS] to find other computers that act as print servers and print clients in the workgroup, and then used the Print System Remote Protocol [MS-RPRN] to push the list of shared print queues to all print servers in the workgroup. The print server has also notified all other computers in the workgroup that it is a print server itself by using the CIFS Browser Protocol. The print spooler service is operational on the print server and the print client. Both are connected through a network connection.

Minimal Guarantee: The print queue is located but the user is informed via the print client user interface that a connection cannot be established due to insufficient permissions.

Success Guarantee: A connection to a shared print queue has been established by the print client and the connection can be used to submit print jobs to the print server.

Main Success Scenario:

  1. Trigger: A user initiates this use case by clicking the Add a printer command in the print client user interface.

  2. The print client queries print servers in the workgroup for lists of shared print queues.

  3. The user of the print client selects a print queue from a displayed list of shared print queues in the workgroup.

  4. The print client opens a handle to the selected print queue by using the Print System Remote Protocol.

  5. The print client queries the print server for information about the print queue, such as which printer driver (and version) is being used, and the hardware ID of the printer that is represented by the print queue.

  6. If the print client already has a copy of the printer driver installed, the print client creates a local print queue proxy object representing the connection to the print queue on the print server. See Extension (a) for a description of the case of where the print client does not already have a copy of the printer driver installed.

Extension (a) – The print client downloads a printer driver:

Step 4: After opening a handle to the selected print queue, if the print client does not have a copy of the printer driver installed, the print client downloads the printer driver from either (a) Windows Update, by using the hardware ID of the print queue that was obtained earlier, or (b) from an administrative printer share of the print server or other print client in the workgroup. The print client then locally installs the printer driver before proceeding with the rest of the use case.

Extension (b) – The print client registers for notifications of the print queue status:

Step 4. When the print queue representing the connection has been created, the print client opens a handle to the selected print queue by using the Print System Asynchronous Remote Protocol. The print client then registers with the print server or another print client for some or all supported notifications on that handle, which are sent when they become available.

The print client updates the local print queue object with changes to the server print queue, including error state, online/offline state, and the list of queued jobs; changes in an associated printer driver when a different or updated driver is retrieved and installed; and changes in printer state, such as when a printer paused. The print client unregisters for notifications when it no longer has to issue notifications; for example, because the user closes the user interface that shows status changes.

Variation (a) - Performing the use case by using the protocol as described in [MS-PAR]: All details are identical to the use case that is described in this section except that the Print System Asynchronous Remote Protocol [MS-PAR], is used instead of the Print System Remote Protocol.