Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Form Filling"

(Step 2)
(Data Structures)
Line 43: Line 43:
 
After Alice sumbits the form, the Form Filler calls setAttributes() and records the values Alice entered. These data are mapped into the PDM by mapping rules defined by the staples.com ontology. Thee result is a populated ProfileContext. For clarity we omitted the entire "shipping" data objects and show only the "billing" objects. We also omitted the class objects shown in the diagram above.
 
After Alice sumbits the form, the Form Filler calls setAttributes() and records the values Alice entered. These data are mapped into the PDM by mapping rules defined by the staples.com ontology. Thee result is a populated ProfileContext. For clarity we omitted the entire "shipping" data objects and show only the "billing" objects. We also omitted the class objects shown in the diagram above.
  
[[Image:Alice-step2b.png|center]]
+
[[Image:Alice step 3.png|center]]
  
 
The top two objects live in the root context, all below live in the alice-staples ProfileContext.
 
The top two objects live in the root context, all below live in the alice-staples ProfileContext.

Revision as of 16:28, 26 July 2010

{{#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. Active client attempts to fill the form (this will fail as the active client has no data about Alice at this point)
  3. Alice fills in the form and submits it
  4. Active client builds persona structures from what it has observed
  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

RootContext

Contents of the RootContext: the context itself, and the RootMe p:Persona:

Initial state.png

Note: no other contexts exist!

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 instantiate a new ProfileContext whose name is derived from the form submit URL (and Alice's id) and whose schema (ontology) is "staples.com.owl" (which in turn is based on PDM (persona.owl)). This staples.com.owl ontology includes the mapping rules to map staples-specific HTML form elements into the PDM.

Alice's staples ProfileContext is (other than the ontology definitions) empty.

Data Structures

The root context is unchanged. We now have a second context, a ProfileContext that has no instance data in it:

Alice-step1.png


Note: the "containedBy" links are only to illustrate that objects are contained in contexts. These links are not explicitly represented in the actual data structures, and only a selected few are shown.

Step 3

Alice fills in the form and submits it.

Data Structures

After Alice sumbits the form, the Form Filler calls setAttributes() and records the values Alice entered. These data are mapped into the PDM by mapping rules defined by the staples.com ontology. Thee result is a populated ProfileContext. For clarity we omitted the entire "shipping" data objects and show only the "billing" objects. We also omitted the class objects shown in the diagram above.

Alice step 3.png

The top two objects live in the root context, all below live in the alice-staples ProfileContext.

Back to the top