Excel Integration - Internal Documentation and Implementation Notes

Definitions

Revision Sequences

Legacy browser data is problematic for the new Excel tool. The Excel tool expects each document that can be managed to be one of the following revision sequences:

Notes:

Client-Server Interface

The following client-server transactions exist:

  1. Login
  2. Logout
  3. Refresh Metadata
  4. Refresh User Role Metadata
  5. Document Search
  6. Get Document Detail
  7. Get Revision Detail
  8. Get List of Document Links
  9. Add Document Link
  10. Delete Document Link
  11. Upsert Document and Revisions
  12. Log

Notes:

  1. Transactions are always initiated by the Excel client
  2. Requests are HTTP requests, consisting of a URL and CGI encoded variables
  3. Responses are delivered as HTTP responses and contain data encoded in XML
  4. Character set:
    1. Requests: UTF-8
    2. Responses: UTF-8

The semantics, requests and responses associated with these transactions are described in the following sections.

Error Messages

Response

Login

Logout

Refresh Metadata

Refresh User Role Metadata

Proposal for new rest api /doucuments/revisionseq

Example:

The following URL: http://.../documents/revisionseq?contractId=120&maxRecords=200&siteClassification2Id=2 gives the response:

Request

Using sql, we have produced a prototype query that could be used as a design spec for a new rest transaction. The tool currently uses the following rest api to return a list of drawings

The following is an example query:

Response

Definition for the result set to be returned from a Excel search.

Result set contents: (basically the fields in the key set)

  1. Document part
    • documentId
    • document record update count
    • classification fields -- are they necessary?
    • title -- how to fill in title? From last revision?
  2. Last revision part: (only needed when a blank-blank-blank sequence is returned)
    • revisionCode
    • revisionNo
  3. RevA part: (could be empty)
    • revisionId
    • revisionTypeId
    • revisionCode -- not currently in the key set
    • revisionNo -- not current set by the VBA code
    • revision record update count
  4. RevB part: (could be empty)
    • revisionId
    • revisionTypeId
    • revisionCode -- not currently in the key set
    • revisionNo -- not current set by the VBA code
    • revision record update count
  5. RevC part: (could be empty)
    • revisionId
    • revisionTypeId
    • revisionCode -- not currently in the key set
    • revisionNo -- not current set by the VBA code
    • revision record update count

Excel currently uses the request /documents/list to produce a search response for vba code to process. This requires some ugly vba to parse the response in reverse, attempting to identify the latest revision sequence. Tibor has produced some sql that accurately identifies the latest revisions in a revision sequence. I would propose the sql be wrapped by a rest api called /doucuments/revisionseq. The api would take the same parameters as /documents/list and return an xml structure similar to the one below.

<?xml version="1.0" encoding="UTF-8"?>
<recordSet name="revisionSequences" idFieldName="drawingId">
  <record type="" key="drawingId">
    <drawingCode>LA2-E-6-03-330-211-10_1002</drawingCode>
    <drawingId>33099</drawingId>
    <updateCountDoc>0</updateCountDoc>
    <revisionIdA>27058</revisionIdA>
    <revisionIdB/>
    <revisionIdC/>
  </record>
</recordSet>

Get Document Detail

Get Revision Detail

Upsert Document and Revisions

Log

Server-Side Implementation

The server-side implementation consists of a series of transactions

Document Search

Proposal for processing valid revisions server side

The prototype query consists of an outer query with 4 sub queries:

An improved server side solution should help performance and simplify the Excel VBA code.

SQL Proposal

Client Site

Requirements Notes

Requirement Notes for VBA functions and routines:

  1. Probably need to store (in the key set) the last revision code and number (at least for blank-blank-blank revision sequences), depending on the implement details. The client does noeed to know the last revision number, but may not need to store it
  2. Recognise the delivery of a document with a blank-blank-blank revision sequence
  3. Recognise delivery of documents with open (e.g. undefined) tail-end revisions. E.g. where the RevC or RevB and RevB are missing

  4. Be able to initialise RevB user defined fields/flags, when not already present
  5. Be able to initialise RevC user defined fields/flags, when not already present
  6. Be able to initialise user defined fields (mainly the vorabzugFlag) when the RevA is not present in an otherwise valid revision sequence. But also be able to flag an error if the revision code/number does not conform to what is describe in the specification
    1. Routine to create a new revision sequence based on the latest revision's revision number and code
    2. Search form: Checkbox to only return valid revisions? By default returns all documents, even those that do not conform to accepted revision sequences

Excel Worksheets

The Excel client is mainly data-driven and relies on a number of worksheets for defining the processing of incoming and outgoing data. The primary controlling worksheets are:

  1. Header Structure

  2. Layout Sheet

  3. Record Headers

Header Structure

Formula definitions

Example formula:

The formula is split on the '_' character, which results in the following array:

For the example values given above, the result is the following formula:

Layout Sheet

Record Headers

Forms

VBA Modules

Copyright 2008-2014, SoftXS GmbH, Switzerland