This chapter provides an overview of contexts and discusses how to configure contexts.
Contexts are a key component of how the PeopleSoft Active Analytics Framework works—their purpose is to describe the computing environment from which the decision engine is invoked and select the appropriate term implementation at runtime.
Contexts can be online or generic. Online contexts must be associated with a PeopleSoft online page, whereas generic contexts can be used anywhere (including online pages).
The data elements within a context are called context variables. Online contexts have built-in context variables—they are the fields of the online page. However, the data elements in an online context are not limited to the online fields; both online and stand-alone contexts can have additional context variables defined.
Within a given context, all context variables must be assigned unique code names called aliases. Aliases are used to associate data with the input binds required by term implementations. For example, a field representing the customer ID may be named CUSTOMER_ID in the application page, but may have an alias of CUST_ID. Using aliases enables terms to be used in the largest possible set of contexts. Page variables exist on a one-to-one basis with their underlying fields; that is, two or more context variables may point to the same page field as long as the aliases of these context variables are distinct. This enables the context user to have aliases named both CUSTOMER_ID and CUST_ID, and thereby facilitate term re-use. Context variables are exposed to the user by corresponding term definitions.
At runtime, applications may request the data library engine to automatically populate the online context in memory, provided the request is made from the component from which the online context can be constructed. In case of generic contexts, applications can either construct the context explicitly by populating values for these context variables, or request the data library to automatically copy values from level 0 context variables of an online context to similar context variables of a generic context.
Page variables that correspond to fields within PeopleSoft application pages.
Page variables are also referred to as native context variables, as they are native to the pages from which their values come.
Note. Use caution when altering the component structure after generating page variables for an online context (using Generate Context component). Changes done to existing fields on the application page might invalidate the corresponding context variables and the terms from which they're resolved.
Constants.
Generic contexts usually consist of named constants. Constant-type context variables may not have specific values associated to them when the context is registered; some of these variables may get values at runtime.
Term variables.
These context variables are data library terms that have been inserted into the context. A context may have any number of terms included within it. However, if a term's implementations require binds, then the context must provide them from its page variables and constants. Term variables can be used to add extended data elements for implementation binds and actions without having to customize the application.
This section describes the components used to configure contexts.
Page Name |
Object Name |
Navigation |
Usage |
Generate Context Object |
EOCF_CTX_IMPORT |
Active Analytics Framework, Setup, Generate Context Object |
Used to generate context objects. |
Manage Context Object |
EOCF_CONTEXT_DEFN |
Active Analytics Framework, Setup, Manage Context Object |
Manages context objects. |
Access the Generate Context Objects page.
Component Interface Name |
Used to extract the contents of a PeopleSoft component for use in generating the context. A component interface is required to create an online context. |
Context Name |
Required, unique and descriptive name of a context. |
Description |
Required, appropriate description about the intent of this context. |
Library Subject Name |
Default subject area for terms created by this process. The prompt for this field shows the subject area selection list. |
Primary Context |
Select this checkbox to denote the context to be generated as the primary context for this online transaction. |
Review and configure the context variables and terms that were automatically generated based upon the component interface you selected. Select the Log checkbox to denote that the field should be logged when a context is persisted at runtime (this is a key to the transaction, and the process automatically sets this field).
Select the Term Options tab to create a new term for each context variable that is created. Also, you can add a contextual implementation to an existing term for this context variable
Select the Subject Area tab if you want to override the default subject area chosen on the first page.
Select Import to create the context and terms. The Generate Context Object screen appears listing the import details.
Access the Manage Context Object page.
Corresponding Generic Context |
This field is used to programmatically create a standalone context from its corresponding online context. Applications directly embedding data library terms need this information to supply context information to the data library runtime engine. |
Context Variables Page |
This section is used to define the page context variables.
|
Context Variables Term |
This section defines the context variables of type term.
|
Context Variables Constant |
This section defines the context variables of type constant.
Note. A constant value specified for a context variable cannot be overridden at run time. |
Operator Set |
Optionally, specify an operator set to be used for this context. This operator set is used to present the list of valid operators for selected terms in policy conditions. A default operator set is automatically filled in. |
Notes Tab |
Enter descriptive information in the text box. |