Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

Gliffy
nameDesktop Contract Data Model

This part  

Note that the DSP Group of a user is derived from this data via business logic that exists outside of the data model is newly normalized in the wake of a previous scheme, which copied the DSP Group to the User record as an attribute. Currently we import user and org data from canonical sources and endeavor not to extend the user object (or other imported objects) to implement business logic.

Business logic can usually be implemented in business rules, UI Actions, script includes, scheduled jobs, and other code. This can make end user reporting more difficult, but building reporting structure on top of a primarily transactional database is not a good idea, precisely because it encourages denormalization and introduces complexity and the potential for confusion about what data to use (imagine 3 fields in different tables all representing the same object type but with different logic).

We already warehouse data with third parties for reporting purposes, so any attempt to denormalize transactional tables purely for reporting purposes is discouraged.. The pseudocode is as follows:

Code Block
if User->Fasit
  "CTS DSP Team FASIT"
else
  User->Org->Contract->DSPGroup.Name

 

Here is example SNow JS for obtaining the correct DSP Group for a given user in the absence of a denormalized field reference or store proc:

Code Block
// if user is FASIT, use FASIT group, else use the org's group
// gr = user's GlideRecord 
if(gr.u_facit == true) {
    gs.addInfoMessage('Assigned to FASIT DSP Group');
    current.assignment_group = sys_user_group_by_name('CTS DSP Team FASIT');
} else {
    current.assignment_group = gr.u_organization.u_service_contract.u_assignment_group.sys_id;
}