Massive refactoring of Root package

Current root packages inherit some decisions made long time ago when we started ORIGAM (2004). Most important:

  • Some entities have fields mapped as elements in Xml (notably anything deriving from IOrigamEntity, notably Attachment and BusinessPartner
  • User management split between BusinessPartner and OrigamUser entities
  • Some system tables not having Origam* prefix (e.g. Attachment)

The best would be to refactor – change elements to attributes on some entities and remove BusinessPartner from the internally used tables.

The process can be split to the following phases:

  1. Getting rid of BusinessPartner entity
  2. Element to Attributes migration
  3. Renaming tables

Getting rid of BusinessPartner entity

We can move BusinessPartner to an outside package (along with some other unused entities like Organisation,Resource or OrigamSync* entities. This package can still be included by those who depend on it. New projects would not use it. We would also move out IOrigamEntity so it would not be used by us anymore.

Internally we would change the code to only use OrigamUser for user management.

IMPORTANT: All RecordCreatedBy and RecordUpdatedBy fields point to BusinessPartner.Id now. It would have to point to OrigamUser.Id

Element To Attribute Migration

All remaining entities that depend on IOrigamEntity would be changed to be based on IOrigamEntity2. Most of them is not expected to be used in XSLTs except of Attachment.

All transformations on Attachment entity would have to be checked manually and updated to use attributes instead of elements.

Mail.Sender and Mail.Recipient are set to Element for no obvious reason. They should be changed to Attribute, too.

Renaming Tables

We should consider to rename the following tables to Origam*:

  • Attachment
  • Mail
  • Counter
  • CounterDetail
  • Language

The only remaining would be WorkQueue, which I would leave as is.