Generating Microsoft Word Documents

This topic describes the steps that you use and the system actions for generating documents. The steps also apply to amendment document generation. Generally, this information applies to both creating documents and creating separate amendment files for which you specify an amendment configurator ID.

To generate a Microsoft Word document:

  1. You invoke the document generation process.

    To begin the generation process, you can create the Microsoft Word document through the Document Management page. For purchasing contracts, the transaction contract must already exist. Using document types, a number of methods exist that lead up to the generation of a document. For example, you might use a configurator selection wizard to select the configurator. Or, the document type might specify to allow automatic document creation where the system launches the generation process with minimal user involvement.

    See Understanding Document Types.

    Use the following links for more information about invoking the document generation process for ad hoc, purchase order, and purchasing contract documents.

    See Creating Authored Documents.

    See Creating Authored Documents for Purchasing Contracts.

  2. You specify document attributes to incorporate into the Microsoft Word document.

    As you define a document, you can define additional attributes that are related to the authored document. You can optionally define a document administrator and a sponsor and sponsor's department for the document, along with begin and expiration dates for ad hoc documents, and a document description. You can also define any external contact information for the document at this point.

    Attributes can serve as additional information for the document which, in turn, the system can use to evaluate and include in the generation process when using bind variables. For example, you can specify a sponsor for the contract and reference the sponsor in the contract by using a transactional bind that represents the sponsor. After the system generates the document, you can update several of the attributes.

    Note: The system has several predefined bind variables. Many of the binds that are related to document attributes have a DOC_ prefix. You set up bind definitions and then map them to source transactions.

    See Understanding Bind Variables.

  3. You specify a configurator ID, and click the Create Document button.

    The system evaluates the document configurator ID and invokes the document creation process. Then, if a document creation wizard is specified in the configurator definition, the system initiates the wizard and presents the questions to document authors.

    The document creation wizard is a tool that enables you to prompt and store values that are related to groups of questions that you define specifically for each document configurator. These questions can result in wizard bind values that the system can use during the document generation process to place values in the contract, or as values referenced in rules to determine contract content. The configurator selection wizard, on the other hand, is a group of questions the system uses to select the configurator. After selecting a configurator using the configurator selection wizard, then the system might use a document creation wizard to create the document.

    Note: If you use the Copy Document feature to create a document, the system does not use a document configurator. Rather, the system makes a copy of the existing document. Also, if you use the Import Document feature, you can create a document within the document authoring system from an external document. After importing the document, you can perform a limited number of life-cycle tasks for it, and the system marks it as an imported document.

    See Understanding How to Copy Documents.

    See Importing Documents.

  4. The system uses the document configurator to expand the content of the document.

    During the expansion process, the system finds all elements that are linked to the document configurator and expands the content into a draft version of the Microsoft Word document. The system evaluates document creation wizard bind values, rules, alternate rules, and repeating elements to expand the document.

    In addition to wizard bind values, the system can reference additional transactional bind values from purchasing contract or ad hoc source transaction that is defined in the setup. The expansion process applies to both the initial document and the separate amendment files.

    During the expansion process, the system:

    1. Expands the content within the document configurator.

      Using the begin date of the purchasing contract or the ad hoc document to select active and approved content, the system incorporates all directly referenced sections and clauses, section child structures, and clause dependents that are included on the configurator. The expansion includes the children of those elements, such as dependent clauses or clauses that are attached to sections and children of those elements.

      Note: The system automatically excludes content from the document that is not approved, is inactive, or is approved, but future-dated beyond the contract begin date.

      See the Document Configurator Definition Page.

      Note: If the contract begin date changes after the system generates the document and then you re-create the document, the system uses the new contract begin date to expand the content during the re-creation process. Changing the begin date alone does not affect the document.

    2. Applies rules that are attached directly to the configurator or to a section element.

      During document generation, the system evaluates each rule that has been attached directly to the configurator or section element for a simple true or false result. If the rule is true, the system attaches all elements and their children to that rule and includes them in the Microsoft Word document.

      If the rule is false, the system does not include the related elements, but saves the rule with the document in case a future refresh of the document causes the system to invoke the rule again.

      You nest rules in the configurator. For example, you can attach a rule to a section that itself was included by a rule on the configurator. The system evaluates rules for each instance of repeating data that it includes as children of a repeating structure. For example, suppose that the repeating information is a section that includes procurement contract items. The system can attach a rule to include additional contract clauses that are specific to the item category of that particular item. When generating the document, the system reevaluates the rule for each contract item to determine whether the additional clauses should be included for that particular item.

    3. Resolves binds.

      During document expansion, the system determines which binds to resolve for use in document clauses, sections, or rules. The system resolves transactional binds using source transaction definitions and bind mappings to map the binds to transactional sources, such as the transactional purchasing contract. All document creation wizard binds and many transactional binds are typically nonrepeating, level zero binds, for which only one occurrence of the bind value is available during document generation. A contract number is an example of a nonrepeating bind.

      For binds that repeat, such as contract items on transactional purchasing contracts, the system resolves the binds based on how many occurrences exist in the contract transaction. An example of a repeating bind might be the items that exist on the purchasing contract. The system logs resolved bind values as part of the generation process.

    4. Expands repeating sections or clauses that may exist.

      If the document configurator contains repeating sections or clauses, the system expands these during the generation process. For example, suppose a configurator contains a nonrepeating section defined as S_PRODUCTS01 (products and services) and within that section a repeating child section S_CONTRACT_LINES (contract lines) exists with a title or body that references bind variables for items in the transactional purchasing contract. During document generation, the system repeats the child section S_CONTRACT_LINES in the document for each instance of the item information that is contained on the transactional contract. The system evaluates each instance based on the bind mappings for bind variables that are defined within the section S_CONTRACT_LINES.

      A section, such as S_PRODUCTS_01, might also contain additional clauses or sections within it, depending on how you define the section. The system expands the section according to its contents. Furthermore, if the system finds nested repeating structures, it expands them in each child section. For example, if the S_CONTRACT_LINES child section contains a repeating child with line-level milestone information, the system repeats the appropriate line-level milestone information directly beneath the corresponding contract line.

      See Understanding Bind Variables.

      See Bind Variables and Repeating Clauses.

    5. Builds table clauses when they exist.

      Table clauses enable you to create a table using Microsoft Word and to insert repeating binds within the table columns as you need. During document generation, the system expands the rows within the table clause based on repeating bind data that exists within the transaction system.

    6. Applies rules that are attached to alternate clauses.

      The system uses rules that are attached to alternate clauses to determine which alternate clauses to use in the Microsoft Word document. Each alternate clause can have a rule attached to it. The system checks the alternates in sequenced priority order to find the first alternate for which the rule is true starting with the highest priority.

      During document generation, the system substitutes an alternate clause and its dependent clauses for the primary clause and its dependents in the document when one of the alternate clause rules renders true. Thus, when using multiple alternate clauses, you should typically list the most restrictive rules first followed by the least restrictive.

      For example, suppose that the contract specifies that a clause be substituted if the supplier is located in a specific state, and substituted with a different, more restrictive clause, if the supplier is located within a specific county of that state. The highest priority rule and alternate clause should evaluate the combination of the county and state first, followed by the second rule that evaluates just the state so that the system evaluates alternate clauses in the correct sequence.

      If the system doesn't find any alternate rule that is true, it does not substitute an alternate. The system evaluates alternates during contract generation once for a clause. For example, if an alternate clause is selected during contract generation, and it, in turn, has alternate rules and clauses defined (alternates for the alternate), the system does not evaluate the rules or alternates for the alternate clause.

      Alternates can exist for nested elements within the configurator. The system evaluates those nested alternate clauses. For example, if an alternate clause has dependent clauses which, in turn, have alternates, the system evaluates the alternate clauses as the document is expanded.

  5. The system creates a Microsoft Word XML Document.

    After the system creates the draft Microsoft Word document, it stores it on the FTP server and links it back to the Document Management page as version 0.0.

    The filename the system uses to generate the document uses this format: <SetID>_<contract/ah-hoc ID>_<version number>. So, for example, the first time you check out a newly generated document for procurement contract 0000000000000000000000023, the file name might be SHARE_0000000000000000000000023_0.00. You can change this default filename by renaming the file on the local system during check out.

    The system does not change the name of the document during check in, check out, or refresh because it displays document names during dispatch and can be referenced within the document itself as Microsoft Word headers or footers.

    Note: You specify the location for the file transfer protocol using the Administer File Attachments page. To access the page, select Set Up Financials/Supply Chain > Common Definitions > File Attachments.

    See Setting Up Servers and Directories.

    To create an XML-based document during document generation, the system:

    1. Creates a memory resident XML structure to contain the new document.

    2. Expands and resolves the .xml versions of sections and clauses.

      The system checks for section and clauses on the document configurator and assembles these elements in the memory-resident XML structure. It applies Microsoft Word paragraph styles and content from the Microsoft Word template that are associated with the document configurator.

    3. Stores and moves the XML-based document to the FTP server and folder that is defined in the File Attachments component.

      This action takes place after the system fully expands the XML document.

    4. Associates the XML file with the Document Management page by version number.

      The system displays the current version on the Document Management page. You can access previous versions of documents that have been generated using the Document Version History link on the Document Management page. The system displays the Document Management page upon completion of the generation process along with any logging messages.

  6. The system generates a log.

    The system generates a log for the initial document generation and displays a message if any serious logging warnings occur such as bind values that it could not resolve in the document. After you initially generate the document, the system does not use the document configurator for document editing, unless you select to re-create the document. Changes that you make to the document at this point are to the draft document, either through application pages or Microsoft Word. For each generation the system performs against the document, it provides a logging history. You access the history using the Document Version History link on the Document Management page.

  7. You select to re-create the document.

    After the system generates the document, you can click the Recreate Document button to re-create the document. This action indicates that you want to create the document again. The system completely erases the original document and generates a new document using the same processing as it did for the original document generation. Document re-creation does not include any edits that you have made to the existing current document. If you re-create the document and use a new version number, you can use the Document Version History link to view prior versions of the originally generated document.

    Warning! When you re-create a document, the system creates a new document using the latest transactions and document elements that are in effect as of the begin date of the source transaction. This is either the purchasing contract begin date or ad hoc begin date. You lose all changes to the original document.

    Note: The Re-create feature can also apply to amendments when you are maintaining separate amendment files for the contract. You can also re-create documents for imported documents and their amendments. Depending on the process options you use to import the legacy document, the Recreate Document button may or may not appear.

    Note: Features of the generation process are also used for creating executive summary documents. You can create and refresh a single executive summary document for a main contract document based on setup within the document type.

    See Understanding Amendments for Imported Documents.

    See Importing Documents.