Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Form Filling

Revision as of 21:05, 29 August 2010 by Unnamed Poltroon (Talk) (Step 3)

{{#eclipseproject:technology.higgins|eclipse_custom_style.css}}
Higgins logo 76Wx100H.jpg

Introduction

This document describes how the Persona Data Model 2.0 can be used to support a Javascript form filling application (app-card) making API calls into the PDS Client of an active client. We will illustrate by walking through the following scenario rom a cold start (i.e. a clean install of a browser-integrated active client):

  1. Alice points her browser at staples.com and proceeds to try to buy a stapler. She eventually arrives at a checkout page
  2. Alice fills in the form and submits it
  3. Active client builds profile context data structures from what it has observed
  4. Active client builds persona data structures from profile context structures
  5. Alice points her browser at bestbuy.com and proceeds to buy a new CD
  6. Active client attempts to assist Alice in filling the form from persona data
  7. Alice edits/corrects form elements and submits it
  8. Active client builds persona structures from what it has observed

Data structures at start

At the start only the root context shown here exists:

 :_ContextSingleton
     rdf:type persona:RootContext .
 
 :RootMe
     rdf:type persona:Persona .

Step 1

Alice eventually ends up at this form:

Staples.com checkout.png

The form filling Javascript will make a getExAttributes() call into the PDS Client API (of the active client) passing (among other parameters) the above form's submit URL.

This causes the PDS Client to

  • Normalize the form submit URL into a role-name string
  • Find and load the mapping context whose name matches the domain of the site (e.g. staples.com) and find within it the HTMLForm subclass whose name matches the role-name string (normalized form submit URL). For example the staples.com ontology includes the mapping rules to map staples-specific HTML form elements into the PDM.
  • Find all contexts whose type is p:Dynamic and whose p:roleName matches role-name
  • If one or more of these did exist then we would use the attributes from the persona nodes of these contexts as the source attributes for form filling. However since this is a cold start no matching contexts exist.

Data Structures

Root Context

The root context is unchanged.

Staples.com mapping context

We assume that the staple.com mapping context exists and is loaded. In addition to the _ContextSingleton it defines a subclass of HTMLForm called "Office-supplies-StaplesCheckoutFlow":

Staples-com mapping v2.png

Note: all of the many of spin:rule attributes of the Office-supplies-StaplesCheckoutFlow class have been omitted above.

Step 2

Step 2: Alice fills in the form and submits it

Step 3

The Form Filler program calls setAttributes() and records the values Alice entered. These data are mapped into the PDM by mapping rules defined by the staples.com mapping context described above. The net result is the creation of two new contexts. One is a Buyer-class context. The other is a Recipient-class context.

Root Context

The RootMe gains two new p:subCorrelation links. The first points to the "Persona_1" node in the Buyer context. The other points to the "Persona_1" node in the Recipient context.


Staples-com step 4.png

Step 4

Step 4: Active client builds persona data structures from profile context structures

Here is the result. Note the new Persona-one:Persona_1 and descendants:

Form filing v1.png

Note: some objects omitted for clarity.

Back to the top