Managing Contexts

This chapter provides an overview of contexts and discusses how to configure contexts.

Click to jump to parent topicUnderstanding 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.

Online and Generic Contexts

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.

Context variables can be:

Click to jump to parent topicConfiguring Contexts

This section describes the components used to configure contexts.

Click to jump to top of pageClick to jump to parent topicPages Used in This Chapter

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.

Click to jump to top of pageClick to jump to parent topicGenerating 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.

Click to jump to top of pageClick to jump to parent topicManaging Context Objects

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.

  • Select Component Field. Click to select a component field from the displayed component buffer hierarchy.

  • Type. This column specifies the object type of the selected component field. Valid values are Field, Record, Rowset.

  • Data Type. Specifies the PeopleSoft data type of the selected component field.

  • Level. Specifies the scroll level of the selected component field.

  • Alias. Unique identifier for a context variable.

  • L0 Key. Specifies whether a component field is a key field for this component.

 

Context Variables Term

This section defines the context variables of type term.

  • Term name. Select a term name from the prompt. The resolved value of this term is used as the value of this context variable.

  • Data Type. Specifies the data type of the term selected.

Context Variables Constant

This section defines the context variables of type constant.

  • Constant Value.

    • Specify a constant value to be used as the runtime value for this context variable.

    • Leave blank and a value has to be supplied at runtime.

  • Data Type. Specify the data type of this context variable.

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.