Setting Up Publishing Tasks

Publishing tasks displayed to authors in the Authoring Connector Wizard are defined in a publishing task list that is set up by a site administrator. The publishing task list is an XML file called PublishingTasks.xml, located on the target server. This enables all clients connecting to the server to view the same list of publishing tasks. In order for a specific task list to be displayed in the Authoring Connector Wizard, the author must have rights to the channel and the template that are specified in the PublishingTask.xml document on the server. The default location of the XML document is <installation drive>:\Program Files\Microsoft Content Management Server\Server\IIS_CMS\OfficeWizard\PublishingTasks.xml.

NOTE: When multiple servers in a Web farm are used for authoring, copy the same PublishingTasks.xml file on all authoring servers to enforce consistency.


Publishing Tasks Document Structure

The XML tasks list document is composed of a root element, <tasks>, and child elements, <task>. Each <task> element should contain four child elements, as follows:

  • The <name> element contains the name of the publishing task; it must be less than 132 characters in length.

  • The <description> element contains a short description of the publishing task; it must be less than 1,024 bytes in length.

  • The <template>, or <templateGuid>, element identifies which template should be used by the Authoring Connector, by the full path or GUID, respectively.

  • The <channel>, or <channelGuid>, element identifies in which channel the page should be created, by the full path or GUID, respectively

For example, the following task list defines two publishing tasks, for creating a research page and for creating an article.

 <?xml version="1.0" ?> <tasks>   <task>     <name>Create a new research page</name>     <description>       This task creates a new research page     </description>     <template>/Templates/BOTS Consulting/Research</template>     <channel>/Channels/botsconsulting/knowledge/research/</channel>   </task>   <task>     <name>Create a new article</name>     <description>This task creates a new article</description>     <templateGuid>       {ECF2A30B-7FBD-4771-B311-6C9551B2C2CF}     </templateGuid>     <channelGuid>       {B5626CE8-CFA2-4578-86B8-7C2A2649A6FA}     </channelGuid>   </task> </tasks> 

The schema for the PublishingTasks.xml document is contained in the schema file PublishingTasks.xsd, located by default within the same folder. Each task has to follow the name, description, template, and channel order. The <name> and <description> elements can contain HTML escape markup. However, you need to make sure that all characters are properly escaped; otherwise, the XML document will not be valid.

If any of the required elements are not defined or are defined wrongly, an error will occur and no tasks will be shown in the publishing task list. For example, if the <channel> element refers to a channel that does not exist, the publishing task will not be displayed to the authors.

NOTE: Searches by GUIDs are faster and require fewer resources on the server. Therefore, it is more efficient from a performance point of view to provide ChannelGUID and TemplateGUID values, rather than the virtual path locations of the channel and the template. Using GUIDs to define channels and templates also ensures that any naming changes to the site do not require modifications to the task list.


When you create publishing tasks, ensure that the task names and descriptions clearly define the tasks for the nontechnical users.

Creating and Modifying the Publishing Tasks

The task list is an XML file that can be created or modified in Notepad or any XML editor. Also, you can download a GUI tool called the Publishing Task Editor from www.microsoft.com. The Task Editor is shown in Figure 7-21; it enables easier creation and modification of the PublishingTasks.xml file.

Figure 7-21. Publishing Task Editor

graphics/07fig21.gif

There are two files that are required for the Task Editor: TaskEditor App.exe and tasklist.xsd. These two files must be located in the same directory. Also, CMS 2002 must be installed on the same computer; otherwise, the Task Editor will not function properly.

NOTE: The tasklist.xsd file, which is in the same directory as the Task Editor, is not exactly the same as PublishingTasks.xsd. However, both files adhere to the same standards for specified tasks.


The Task Editor provides the following functionality:

  • Creating, copying, and deleting tasks.

  • Selecting a valid channel and template by a path or GUIDs. When the Channel or the Template browse button is clicked in the Task Editor, either the Select a Channel or the Select a Template window appears, which allows navigating to the channel or template, and selecting the format: Path or GUID. For example, the Select a Channel window shown in Figure 7-22 has an Articles channel selected, which is specified by GUID.

    Figure 7-22. Select a Channel window in the Publishing Task Editor

    graphics/07fig22.jpg

  • Checking for duplicate task names that are not allowed.

  • Checking length restrictions for elements' values.

  • Validating and saving the XML document. A task file cannot be saved in the Task Editor unless each of the tasks is valid and the generated file is valid.

NOTE: When you save the file in the Task Editor, the .xml extension is not automatically added; you need to type it in manually.


The location of the PublishingTask.xml and PublishingTask.xsd documents can by modified by changing the web.config file in the Authoring Connector Web application. By default, they are located in the same directory as OC.aspx. This directory is mapped to the virtual directory /MCMS/CMS/OfficeWizard. However, for security reasons, it is recommended that you put these two files outside a virtual directory and specify their absolute path in the web.config file. System administrators may also choose to change the names of the files.

The default location of the Authoring Connector's web.config file is <installation drive>:\Program Files\Microsoft Content Management Server\Server\IIS_CMS\OfficeWizard. The <appSettings> section within the <configuration> container defines the location and name of the publishing tasks and schema files. If this section is not present, the default location is used. However, the settings can be easily modified; for example:

 <appSettings>   <add key="Publishing Tasks XML File Path"    value="C:\secure\tasks.xml" />   <add key="Publishing Tasks Schema File Path"    value="C:\secure\tasks.xsd" /> </appSettings> 

NOTE: The value for the key attribute must be specified exactly as in the preceding code.


Restricting Authors to Predefined Publishing Tasks

By default, the Authoring Connector allows authors to manually select the template on which the page will be based and the channel into which the page will be posted. However, this manual override feature can be disabled, effectively restricting authors to use of the predefined tasks in the publishing task list.

To disable the manual override option in the Authoring Connector Wizard, you need to make changes to the OC.aspx file.

NOTE: The modifications to the OC.aspx file are not supported by Microsoft, which means that changes to the OC.aspx file may be lost when you are applying service packs, hotfixes, or upgrades. Therefore, back up the original and modified version of the OC.aspx file before proceeding with any CMS update. After the update has been completed, you may be able to reapply your modifications in the appropriate sections.


Using Visual Studio .NET or a text editor, open the <installation drive>:\Program Files\Microsoft Content Management Server\Server\IIS_CMS\OfficeWizard\OC.aspx file, and then locate and modify line 145 by adding the keyword disabled, so that it reads as follows:

 <td style="PADDING-TOP: 12px"><asp:checkbox      disabled accessKey="M" runat="server" AutoPostBack="True"     Text="<u>M</u>anual entry of channel and template">     </asp:checkbox></td> 

After you make this change, the "Manual entry of channel and template" check box in the Authoring Connector Wizard will be disabled, as shown in Figure 7-23.

Figure 7-23. Manual override disabled

graphics/07fig23.gif



Microsoft Content Management Server 2002. A Complete Guide
Microsoft Content Management Server 2002: A Complete Guide
ISBN: 0321194446
EAN: 2147483647
Year: 2003
Pages: 298

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net