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

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:

new rest api /doucuments/revisionseq (replacement for /documents/list?)

Example:

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

Handling of non vanilla data in the Excel Client

Modifications to server sql

Currently the server returns data with matching revision types as per our vanilla case. However, to make the search consistent with the browser search, we should extend the data, with a union to the remaining data, that does not match our vanilla case. The additional data would be handled by the aforementioned changes to the Excel Client.

Modifications to /documents/revisionseq? 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

Get Document Detail

Get Revision Detail

Upsert Document and Revisions

Log


Server-Side Implementation

  1. The server-side implementation consists of a series of REST transactions
  2. You can find the actual code that implements each transaction by looking up the request URLs in the RestMap.

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.

Example SQL


Client-Side Implementation

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