Aptify GDPR Utility

Personal Information: View and Export, Forget

The Aptify GDPR utility has a Persons search, and after selecting a Person, displays the personal information for that Person and whether or not the Person can be forgotten.  If the Person cannot be forgotten, shows the reason(s) why.  Provides an Export button that will create an XML document with the Person's information when clicked.  If the Person can be forgotten, provides a Forget Person button that, when clicked, asks for confirmation and, after confirmation, will execute the Forget Person routine.

Notes:

  • Fields added after the utility was created will not be included in the core stored procedures.  It can be added by the customer or, if different versions of the utility are created for different versions of Aptify, the later versions can include those fields. 
  • Utility supports configuration because many customers will have additional personal information that needs to be included.
  •  

Generate HTML from a DataSet

A component that converts the dataset to HTML, suitable for display in the utility

  • Implementation converts a DataSet to XML and then uses XSLT to transform the XML to HTML.
    • Logic is in the GenerateHTMLTextFromDataSet method in Aptify.Utilities.PersonalInformation.Common.  
    • The DataSet that is passed to the method is first processed by the method, UpdateDataSetWithRelationships, which is also in Aptify.Utilities.PersonalInformation.Common.  
    • There is default XSLT in Common as well which can be updated to improve the output of the DataSet and the Process Components accept an optional parameter, XMLtoHTMLTransform, which can be passed in to provide a different transform.

Generate XML from a DataSet

Create a component that converts the dataset to XML, suitable for export.

  • Initial implementation converts a DataSet to XML.  Logic is called from the Process Components and isn't a separate Process Component.  Going forward, I think there is an opportunity to separate the logic into its own Process Component so that it could be used by other Process Flows across the system.
    • Logic is in the GenerateXMLTextFromDataSet.  It's very simple, calling the DataSet's GetXml method.
    • The DataSet that is passed to the method is first processed by the method, UpdateDataSetWithRelationships, which is also in Aptify.Utilities.PersonalInformation.Common.  

Update DataSet With Relationships and Exclusions

In order to improve the format of the XML and HTML generated from a DataSet, the DataSet should have DataRelations and other information. A method in Aptify.Utilities.PersonalInformation.Common, UpdateDataSetWithRelationships, has been created to perform this function.  It uses information in a metadata table which is the last table returned in the dataset to create the DataRelations, nesting and exclusions.  Using a metadata table provides flexibility.  Additional tables can be returned and integrated into the DataSet and be displayed properly in the XML and HTML output.

Metadata Table

When the last table in the DataSet matches the definition of the Metadata Table (see below), UpdateDataSetWithRelations will create DataRelations based on the information in that Table.  Each DataTable, except for the Metadata Table, should have a row in the Table to define the Name of the Table, its relationship with an earlier table in the DataSet and if there are any columns to be excluded from the XML and HTML data.

DECLARE@MetadataTableTABLE
(   TableIndex TINYINTNOTNULL,
TableName NVARCHAR(128)NOTNULL,
ParentTable NVARCHAR(128)NULL,
ParentColumn NVARCHAR(128)NULL,
RelatedColumn NVARCHAR(128)NULL,
NestedBITNOTNULLDEFAULT0,
ColumnsToExclude NVARCHAR(MAX)NULL
);

 

  • TableIndex: The index for the table in the DataSet.  Starts at 0 for the first table.
  • TableName: A unique name for the table.  The XML and HTML will use this as the name of the element for each row in the table.
  • ParentTable: When the data in the table is related to another table in the DataSet, ParentTable provides the link to that other table.  The ParentTable value must match the TableName of an earlier table in the DataSet.
  • ParentColumn: The name of the column in the Parent table that links to the RelatedColumn field in the current table.
  • RelatedColumn:  The name of the column in the current table that links to the ParentColumn in the Parent table.
  • Nested:  When true, the data within this table will be nested inside its parent data.  When false, the data within the table will be at the same level as the first table.
  • ColumnsToExclude is an optional field.  It can hold a comma-separated list of fields that exist in the table and those fields will not be included in the XML or HTML generated from the DataSet.
EXAMPLE:  GET PERSONAL INFORMATION

The child table entries that hold the plural names, like Addresses and Phones, are bridge tables that are used to generate hierarchy in the DataSet.  Without it each Address record would appear in the Person element, one level down.  Each Phone entry would also appear at the same level, one level down.  The bridge tables allow for all Address entries to be contained inside Addresses.

EXAMPLE XML OUTPUT AFTER UPDATEDATASETWITHRELATIONSHIPS
<PersonalInformation>
<Person>
<ID>1</ID>
<NameWCompany>Baldwin, Aiesha/Danube Partners</NameWCompany>
<Title>Marketing Senior Director</Title>
<PreferredAddress>Business Address    </PreferredAddress>
<PreferredBillingAddress>Business Address    </PreferredBillingAddress>
<PreferredShippingAddress>Business Address    </PreferredShippingAddress>
<PreferredPhone>Business Phone</PreferredPhone>
<Email1>Aiesha.Baldwin@demodata.aptify.com</Email1>
<Birthday>1936-07-27T00:00:00-07:00</Birthday>
<Gender>1</Gender>
<MailExclude>false</MailExclude>
<FaxExclude>false</FaxExclude>
<EmailExclude>false</EmailExclude>
<DirExclude>false</DirExclude>
<CESScore>30</CESScore>
<PhotoOnFile>1</PhotoOnFile>
<SocialSecurityNumberOnFile>0</SocialSecurityNumberOnFile>
<Addresses>
<Address>
<AddressType>Business Address</AddressType>
<Sequence>1</Sequence>
<FormattedAddress>910 Southwest Union Avenue
Palo Alto, CA, 94301
Santa Clara, United States</FormattedAddress>
<BadAddress>false</BadAddress>
</Address>
<Address>
<AddressType>Billing Address</AddressType>
<Sequence>2</Sequence>
<FormattedAddress>3818 Benton Street
Suite 230
Blythe, CA, 95012
United States</FormattedAddress>
<BadAddress>false</BadAddress>
</Address>
</Addresses>
<Phones>
<Phone>
<PhoneNumberType>Business Phone</PhoneNumberType>
<Sequence>1</Sequence>
<FormattedPhone>(650) 750-9187</FormattedPhone>
</Phone>
<Phone>
<PhoneNumberType>Fax</PhoneNumberType>
<Sequence>2</Sequence>
<FormattedPhone>(650) 169-4139</FormattedPhone>
</Phone>
</Phones>
<TopicCodes/>
<MembershipsAndSubscriptions>
<MembershipOrSubscription>
<Product>National Aardvark Society Membership</Product>
<SubscriptionType>Subscription</SubscriptionType>
<Subscription>Subscriber and Recipient</Subscription>
<Status>Active                                            </Status>
<NumberOfPurchases>1</NumberOfPurchases>
<IssuesPurchased>12</IssuesPurchased>
<IssuesSent>0</IssuesSent>
<StartDate>2013-05-17T00:00:00-07:00</StartDate>
<EndDate>2014-05-16T00:00:00-07:00</EndDate>
<AutoRenew>true</AutoRenew>
<Comments>Subscription Record created by Subscription Save module on 5/17/2013 11:57:28 AM.</Comments>
<CancelReason>Not Cancelled</CancelReason>
<CancelComments/>
</MembershipOrSubscription>
</MembershipsAndSubscriptions>
<OrderHistory>
<OrderHistoryItem>
<OrderID>10088</OrderID>
<OrderRelationship>Order Bill To and Ship To</OrderRelationship>
<OrderDate_NoTime>2013-09-04T00:00:00-07:00</OrderDate_NoTime>
<OrderType>Regular                                           </OrderType>
<OrderStatus>Shipped                                           </OrderStatus>
<OrderSource>Walk-In                                           </OrderSource>
<CurrencyType>US Dollar</CurrencyType>
<SubTotal>1250.0000</SubTotal>
<GrandTotal>1250.0000</GrandTotal>
<Balance>0.0000</Balance>
<OrderLineDescription>General Fund</OrderLineDescription>
<NumberOfOrderLines>1</NumberOfOrderLines>
</OrderHistoryItem>
</OrderHistory>
<Companies>
<Company>
<CompanyName>Danube Partners</CompanyName>
<Sequence>1</Sequence>
</Company>
</Companies>
<Functions>
<Function>
<FunctionName>Marketing (Primary)</FunctionName>
<StartDate>2007-12-09T00:00:00-08:00</StartDate>
</Function>
</Functions>
<Committees/>
</Person>
</PersonalInformation>

PersonalInformation comes from the Name of the DataSet, which is set in code by the Process Component.

Get Personal Information Process Component

Retrieves personal information linked to a single Persons record, based on the ID in PersonID.  Information is populated in Output properties in a DataSet and then the dataset is converted to XML and that XML is used to generate HTML.  A stored procedure is called to create and return the DataSet.  That stored procedure can be overridden with the optional input property, StoredProcedureName.  The stored procedure must accept the @PersonID parameter.  The HTML is generated by transforming the XML with XSLT.  There is default XLST but the Process Flow can provide different XSLT via the XMLtoHTMLTransform input property.

Assembly: Aptify.Utilities.PersonalInformation

Class: Aptify.Utilities.PersonalInformation.GetPersonalInformationComponent

Source Code Location:  $/Aptify Product Code Base -- 5.x/Utilities/Aptify.Utilities.PersonalInformation

Can Person Be Forgotten? Process Component

Determines whether or not a Person can be forgotten by executing a stored procedure that contains the logic that determines whether or not a Person can be forgotten. If the Person cannot be forgotten, an explanation of why the Person is unforgettable will be provided in summary and with details.  The Summary information is available as an Output parameter as a string.  Summary and Detail information is also available in a DataSet, as XML text and as HTML text, which are defined as output properties.  The stored procedure that is executed can be overridden with the optional input property, StoredProcedureName.  The stored procedure must accept the @PersonID parameter as input as well as @PersonIsForgettable (bit) and @UnforgettableSummary (nvarchar(max)) as Output parameters.  The XML is generated from the Unforgettable DataSet and the HTML is generated by transforming the XML with XSLT.  There is default XLST but the Process Flow can provide different XSLT via the XMLtoHTMLTransform input property.

Assembly: Aptify.Utilities.PersonalInformation

Class: Aptify.Utilities.PersonalInformation.CanPersonBeForgottenComponent

Source Code Location:  $/Aptify Product Code Base -- 5.x/Utilities/Aptify.Utilities.PersonalInformation

Forget Person Process Component

Remove the personally identifying information from a Persons record, based on the PersonID Input Property.  This is done by executing a stored procedure.  The stored procedure that is executed can be changed by providing the name of the stored procedure in the optional Input Property StoredProcedureName.  The stored procedure must accept the @PersonID parameter.

Assembly: Aptify.Utilities.PersonalInformation

Class: Aptify.Utilities.PersonalInformation.ForgetPersonComponent

Source Code Location:  $/Aptify Product Code Base -- 5.x/Utilities/Aptify.Utilities.PersonalInformation

GDPR Utility Wizard

Select a Person to display the personal information and determine if the Person can be forgotten.  Display the personal information in HTML and XML, allowing the user to copy the contents and paste them somewhere else.  If the Person cannot be forgotten, display the reasons why.  If the Person can be forgotten, allow the User to indicate that the Person should be forgotten and forget the Person.

Walkthrough
  1. Select a Person to retrieve and click Next
  2. Personal information will be retrieved and a check will be made to see if there Person can be forgotten.  Personal information is displayed as HTML and as XML.  If the Person is not forgettable, information documenting why the Person cannot be forgotten will be displayed.  If the Person can be forgotten, a Forget Person check box will be displayed.  If the Person is not being forgotten, there is no need to proceed further.
    1. The XML information can be copied to the clipboard and pasted into an editor like Notepad or Notepad++ and saved with an XML extension.  This file can then be delivered to the person requesting the information.  This is in lieu of an Export button that would generate the file.  This is an improvement that can be added in the future but it also needs to be supported in Aptify Web as well as the Aptify Windows Desktop Client.
  3. If the Person is to be forgotten, check Forget Person and click Next.
  4. One final step to forgetting a Person requires that the Confirm Forget Person check box is checked and then the User can click Finish to forget the Person.  If the User doesn't check Confirm Forget Person and clicks Finish, the Person will not be forgotten but the operation will end.  An improvement could be added to warn the user that the Person will not be forgotten, allowing the User to cancel the message, check Confirm Forget Person and then click Finish again to forget the Person.
  5. User will be asked whether or not to start the Wizard again.

Layout Control for Personal Information Form Template used in the Wizard

Hides Forget Person check box if the Person cannot be forgotten and hides the Unforgettable Tab if the Person can be forgotten.

Assembly: Aptify.Utilities.PersonalInformation.UI

Class: Aptify.Utilities.PersonalInformation.UI.PersonalInformationLayout

Source Code Location:  $/Aptify Product Code Base -- 5.x/Utilities/Aptify.Utilities.PersonalInformation/UI

Web Browser Form Component

Used to display the HTML fields (PersonalInformationHTMLText and UnforgettableHTMLText).  Uses the WinForms WebBrowser control to display the HTML Text (not a URL).  URLs are also supported but not used in this Wizard.

Assembly: Aptify.Utilities.PersonalInformation.UI

Class: Aptify.Utilities.PersonalInformation.UI.WebBrowserFormComponent

Source Code Location:  $/Aptify Product Code Base -- 5.x/Utilities/Aptify.Utilities.PersonalInformation/UI

Personal Information Utility Runs Entity

Staging Entity used by the GDPR Utility, a metadata wizard.  It supports selecting a Person, retrieving personal information, whether or not the Person can be forgotten, information explaining why the Person cannot be forgotten, if they cannot, and flags that indicate that the information should be exported or if the Person should be forgotten and when the Person was forgotten.

It is used to facilitate the GDPR Utility Wizard where the fields are bound to the controls on the Form Templates used on the Wizard pages.  

Because the information in several fields is sensitive personal information, the Entity will be configured so that PersonalInformationHTMLText, PersonalInformationXMLText, Unforgettable Summary, UnforgettableXMLText, and UnforgettableHTMLText will not be persisted in the database.  This is done by making the spCreate and spUpdate stored procedures non-generated and editing the SQL so that the field values are not persisted in the database.  In addition, Record History is turned off for this Entity.

 

Create a Process Flow that Retrieves Personal Information

Create a Process Flow determines if a Person can be Forgotten

Create a Process Flow that will Forget a Person, by default have it first check if a Person can be Forgotten and only proceed to Forget the Person if the Person can be Forgotten.  Provide an override parameter that will bypass the check and proceed directly to the Forget.  There may be times when the administrator needs to or wants to Forget a Person that doesn't fulfill all the rules in "Can a Person be Forgotten"

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.