Академический Документы
Профессиональный Документы
Культура Документы
SAS® Documentation
The correct bibliographic citation for this manual is as follows: SAS Institute Inc. 2016. SAS® Real-Time Decision Manager 6.5:
Administrator’s Guide. Cary, NC: SAS Institute Inc.
SAS® Real-Time Decision Manager 6.5: Administrator’s Guide
Copyright © 2016, SAS Institute Inc., Cary, NC, USA
Chapter 1 / Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
About SAS Real-Time Decision Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
SAS Real-Time Decision Manager and SAS Customer Intelligence Studio . . . . 2
SAS Real-Time Decision Manager and the SAS Customer
Intelligence Studio User Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
SAS Real-Time Decision Manager and SAS Decision Services . . . . . . . . . . . . . . 6
Administration Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Working with Decision Campaigns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Chapter 2 / Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Architecture of the SAS Intelligence Platform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Architecture of SAS Real-Time Decision Manager . . . . . . . . . . . . . . . . . . . . . . . . 18
Recommendations for Designing SAS Real-Time Decision
Manager Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Tiers in the SAS Real-Time Decision Manager Architecture . . . . . . . . . . . . . . . . 29
Operational, Development, and Test Environments . . . . . . . . . . . . . . . . . . . . . . . 49
Life Cycle of a Decision Campaign . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
SAS Decision Services Repositories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Metadata Objects in the SAS Repositories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
General I/O Activities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Stored Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Dependent SAS Products . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Connection Points in the SAS Real-Time Decision Manager Architecture . . . . 73
Integrating SAS Real-Time Decision Manager with Other SAS Products . . . . . 79
Accessibility
Accessibility Notice
For information about the accessibility of this product, see SAS Real-Time
Decision Manager: User's Guide.
viii Accessibility / Accessibility Notice
1
1
Overview
About SAS Real-Time Decision Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
SAS Real-Time Decision Manager and SAS Customer Intelligence Studio . . . . 2
SAS Real-Time Decision Manager and the SAS Customer
Intelligence Studio User Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
SAS Real-Time Decision Manager and SAS Decision Services . . . . . . . . . . . . . . . . 6
Administration Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Working with Decision Campaigns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Information Flow for a Decision Campaign . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Calculated Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Offers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
your customers and to capitalize on customer interactions. You can use SAS
Real-Time Decision Manager to do the following:
n coordinate marketing communications across all channels
1 The first step in the process is that your organization receives customer
information or direct communication via an inbound channel (email, text
message, direct call, browsing history, and so on).
2 Once the inbound information from the channel is received, your organization
sends this information to the SAS Customer Intelligence solution, which
includes SAS Real-Time Decision Manager. SAS Real-Time Decision
Manager then executes a decision campaign, using either real-time actions
or batch process actions that you have previously defined.
3 SAS Real-Time Decision Manager can draw from existing data and
applications to gain insights into the customer. Insights draw upon historical
customer behavior stored in your customer contact and response history, as
well as contextual data and predictive analytical models. This customer
behavior can take the form of transactions, contact history, CRM or sales
systems, and score models. SAS Real-Time Decision Manager then applies
these insights to the real-time or batch actions, which helps it determine
which actions it should implement. SAS Real-Time Decision Manager also
applies rules to these actions. Rules include budget or channel restrictions,
contact rules, constraints, and priorities. SAS Real-Time Decision Manager
can apply these rules to a single customer, or across channels, departments,
and an entire organization.
4 Once actions, insights, and rules have been applied, SAS Real-Time
Decision Manager makes the decision about the optimal outbound offer to
communicate to the customer, and returns its decision to your organization’s
external system (such as a call center). SAS Real-Time Decision Manager
4 Chapter 1 / Overview
5 Your organization’s external system then sends the decision to the customer
in the form of an outbound offer type or message.
The role of SAS Real-Time Decision Manager within this process is to fulfill the
re-evaluation and delivery of offers in the real-time and inbound channels. SAS
Real-Time Decision Manager works closely with SAS Marketing Automation, a
product that enables you to send out communications by demographic group.
The customer information that SAS Marketing Automation stores in your contact
database is later used by SAS Real-Time Decision Manager. For example, if a
SAS Marketing Automation campaign determines that a customer is eligible for a
particular offer, then you can use SAS Marketing Automation to store these
results as staged treatments. A treatment is any response to an event that has
completed the decision campaign flow. If the customer then contacts your
company, SAS Real-Time Decision Manager checks to see whether this
customer has any staged next-best offers from SAS Marketing Automation. If
there are any, then SAS Real-Time Decision Manager verifies that they have not
already been offered, and then delivers them to your company’s call center,
branch systems, and online system.
SAS Real-Time Decision Manager also integrates closely with SAS Customer
Experience Targeting and SAS 360 Discover. You can use the information that
both of these products gather from a customer’s browsing of your company’s
website to customize next-best actions using SAS Real-Time Decision Manager.
n The Workspace Bar displays the different workspaces that you select.
n The Tile Pane contains the items that are open in the current workspace.
n The Status Bar displays alerts, the current business context, and the current
user.
You use the Decision Campaigns, Decision Treatment Campaigns, Decision
Treatment Campaign Sets, and Treatments selections in the Designer
workspace to manage decision campaigns in SAS Real-Time Decision Manager.
You use the Decision, Custom Details, and Response Definitions selections
in the Definitions workspace to define decision campaigns in SAS Real-Time
Decision Manager.
You manage business contexts, channels, environment variables, and diagram
tools that are provided with the application in the Setup workspace.
In the Administration workspace, you can release locks on decision campaigns
and other items, log off user sessions, and manage deployments. For more
information about managing deployments in the Administration workspace, see
“Managing Deployments” on page 229.
For information about using the SAS Customer Intelligence user interface to
perform activities in SAS Real-Time Decision Manager, see SAS Real-Time
Decision Manager: User’s Guide.
6 Chapter 1 / Overview
Administration Tasks
SAS Real-Time Decision Manager administrators perform the following tasks:
n set up, customize, and maintain the SAS Customer Intelligence Studio
environment and the supporting SAS Intelligence Platform environment
n maintain the operational and development environments
n create DS2 code for advanced manipulation of the customer channel data
n create an information map that can be used to identify which fields will be
used in the prompts for contact history-related tasks in SAS Customer
Intelligence Studio
n define a strategy for backing up and restoring information maps and
campaigns
n monitor and tune SAS Decision Services performance, resource usage, and
output
n troubleshoot problems by setting logging levels
For information about integrating SAS products with other applications in your
enterprise, see “Integrating SAS Real-Time Decision Manager with Other SAS
Products” on page 79.
Working with Decision Campaigns 7
Overview
A decision campaign is the basic campaign vehicle for SAS Real-Time Decision
Manager. A decision campaign is a container for the processing of an incoming
request, which is received from a channel that triggers the decision campaign,
and for the processing of the output that SAS Real-Time Decision Manager then
sends as a reply back to the channel. This input could be an email from a
customer, and the output could be an email reply offer that is sent to the
customer. The metadata object that describes this input and output for a
decision campaign is called an event. The event lists the name and data type for
each input and output variable of a decision campaign.
Note: This guide uses the term decision campaign to distinguish a campaign
that you create in SAS Real-Time Decision Manager from campaigns that you
create in other SAS Customer Intelligence solutions. For example, if you are
using SAS Marketing Automation, then you would create a selection campaign.
Note: A decision campaign might serve as a sub-diagram to another campaign,
where it performs sub-processing logic. Such sub-diagram campaigns are
defined by a separate event. For more information, see “Flows” on page 60.
6 Your organization’s application receives this decision and then sends a reply
back to the customer channel in the form of an outbound message, offer, or
next-best offer.
The following diagram presents a more detailed look at the flow of information in
the decision process stage (shown in step 4 in Figure 1.3 on page 7) within a
decision campaign. Specifically, it shows what happens within SAS Real-Time
Decision Manager during a decision campaign. SAS Real-Time Decision
Manager receives inbound customer information from your organization’s
system, makes a decision about the customer and the best response (actions,
rules, insight), returns the decision as an outbound web service response to your
organization system, and updates the contact history.
Working with Decision Campaigns 9
The start node in a decision campaign receives the request from a customer
channel and maps the event variables (such as customer ID) to the input
variables for the decision campaign. Each decision campaign has one start
node.
Decision nodes enable you to define the business logic that determines the
decision that is sent in the reply node to the customer. These nodes are where
SAS Real-Time Decision Manager queries the database for the following:
n obtain customer information (such as age, credit rating, or propensity score)
category. SAS Real-Time Decision Manager assigns marketing cell nodes based
on insights and rules that best apply to that customer.
Figure 1.4 on page 9 does not display the following optional node types. These
types can be useful during the course of a decision campaign:
n process nodes enable you to include custom DS2 code, which enables SAS
Real-Time Decision Manager to perform more complex logic than can be
described in a campaign diagram. For example, you could create a loop that
reads every customer account balance before routing the decision to
downstream nodes.
n data nodes enable SAS Real-Time Decision Manager to receive data from
the database.
n web service nodes enable SAS Real-Time Decision Manager to
communicate with external applications to obtain information that might be
needed in a decision campaign. For example, SAS Real-Time Decision
Manager might communicate with your organization’s inventory-management
database to determine how much inventory is available. This enables your
organization’s customer service representative to know whether he or she
can present an offer that includes that item.
Your organization’s business rules determine how you apply decision nodes and
cell nodes. For example, you might use a filter node to filter out customers
younger than 19 who apply for your bank’s credit card, with a resulting action of
no treatment or offer. You might use a branch node to divide customers into
those with a credit score above 720 and those with a credit score below 720.
Those with a credit score above 720 receive an offer of the Upgrade to More
Reward credit card with an annual fee, and those with a credit score below 720
receive an offer of the No Annual Fee credit card.
The reply node maps internal variables to the output variables defined by the
campaign’s event. Internal variables are variables that SAS Real-Time Decision
Manager uses as inputs and outputs to each node, or as identifiers that last for
the duration of a single decision campaign. Examples of internal variables are
customer information retrieved from the event input, results from a query in a
data process node, and calculated variables. Output variables are the variables
that SAS Real-Time Decision Manager sends in the reply.
The reply node then generates the response to the customer channel and
updates the contact history. The reply node can send only one reply in response
to a given event. Each time a decision campaign is executed, only one reply
node is used.
Included in the reply is an offer that includes one or more treatments. An offer is
a response to an event that has completed the decision, and could be as simple
as a thank-you. A treatment is a specific component included within an offer, and
can be an enticement (a discount, free gift, and so on) to the customer.
In some cases, a Standard reply (a reply that is not customized for the
customer) is returned. If the customer does not fit into any categories defined by
a branch node, or if the customer does not meet the filter node criteria, then that
customer receives a Standard reply. If the execution for the decision campaign
times out before the execution logic has completed, then an Error reply (if it has
been defined) is returned.
The start, cell, and reply nodes enable you to guide a customer through to the
desired reply, and they are required in every decision campaign.
Working with Decision Campaigns 11
Variables
Most nodes in a decision campaign have both input and output variables. These
variables pass data to and between nodes in the decision campaign. Some
decision nodes have output variables that can be used by downstream nodes.
For example, an output variable from a process node can be used in a branch
node to determine which of two paths the decision flow should follow during
campaign execution. Input variables are mapped from previous or new
variables, and include the following:
n predefined and user-created global variables. In SAS Customer Intelligence
Studio, these variables are managed in the SAS Decision Services design
repository. In SAS Management Console, these variables are managed in
the SAS Decision Services engine repository. These values are available to
every decision campaign. For more information, see SAS Real-Time
Decision Manager: User’s Guide and “Managing Global Variables in SAS
Management Console” on page 89.
n variables from upstream nodes (upstream nodes are prior nodes in the
campaign usage).
n incoming event variables, whose values are provided with an incoming web
service request (an event). For more information, see “Integrating with
External Web Services” on page 161.
n identifiers, which are generic variable names that you can assign to an input
variable or an output variable. Identifiers enable input variables to be mapped
in advance, can be auto-generated, and are data-type specific. For more
information, see SAS Real-Time Decision Manager: User’s Guide.
n output variables, which are computed from the input variables as a prediction
of the value of a target variable.
Data Types
The types of data in a decision campaign are Java-based, and include the
following:
Boolean
specifies a value of 1 or 0.
Within custom SAS activities, Boolean values must be represented as the
numerics 0 and 1, as opposed to True and False.
Boolean List
is a list of Boolean values.
Data Grid
is a table. Table data can come from any source, but only SAS data sets can
be used as data grids in test cases. Data grids can contain no more than
32000 characters. Column names in double-byte character sets are not
supported.
Date
specifies a date value.
SAS Decision Services I/O recognizes SAS DATETIME rather than SAS
DATE.
12 Chapter 1 / Overview
Note: A SAS DATE value is a value that represents the number of days
between January 1, 1960, and a specified date. A SAS DATETIME value is a
value that represents the number of seconds between January 1, 1960, and
an hour/minute/second within a specified date.
SAS data sets can store dates as DATETIME or DATE. SAS Decision
Services supports a single datetime data type. When datetime values are
passed from SAS Decision Services to SAS, they are always converted into
SAS DATETIME values. When these values are used to insert or update a
value in a SAS data set, they update the value as the number of seconds
from January 1, 1960, rather than the number of days. If the data set column
is then viewed with a DATE format for that column, then the value is
displayed incorrectly. Always use a DATETIME format to view such columns.
CAUTION! SAS Decision Services interprets DateTime values that are
stored in a database or in SAS data sets as being in the Greenwich Mean
Time (GMT) time zone. A default time zone (GMT) is associated with values that
are read from a database because time zone information is not persisted with the
data. As a best practice, always store DateTime values using the GMT time
zone. This practice enables compatibility with SAS Decision Services and
removes ambiguity.
Date List
is a list of date values
Double
specifies a floating-point number that is 64 bits long.
Double List
is a list of floating-point numbers that are each 64 bits long.
Integer
specifies an integer.
Integers, such as reply variables, that are used during run-time generation
have a maximum value of 9007199254740991 and a minimum value of
-9007199254740991.
Integer List
is a list of integers.
Character
specifies a character string.
Character List
is a list of character strings.
Lists are one-dimensional arrays. An array is a temporary grouping of variables
that have the same data type, are arranged in a particular order, and are
identified by an array name. In SAS Real-Time Decision Manager, an array
could group the available colors for a free item that is included in a particular
offer.
To manage the input variables and output variables that you have previously
defined, you open the Properties window for a node in SAS Customer
Intelligence Studio. In the Properties window, you can filter the variables table by
comparable data types. For more information, see “Creating Nodes” in SAS
Real-Time Decision Manager: User’s Guide.
Working with Decision Campaigns 13
Calculated Variables
Calculated variables are used in SAS Real-Time Decision Manager, and are
variables that are created by a node using other variables (such as global
variables or upstream variables) inside an expression. An example of a
calculated variable is SUM<<Process1.bankBalances>>, where
bankBalances is a double list type variable created from an upstream node
named Process1. For more information, see “Creating Nodes” in SAS Real-
Time Decision Manager: User’s Guide.
Offers
An offer is the enticement (a free gift, discount, and so on) that you present as a
reply to the customer. The types of offer that you present are determined by the
customer’s profile and actions. Offers can be delivered in real time
synchronously to a channel or can be staged for future delivery by the
configuration of the decision campaign. An offer can consist of multiple
treatments, some of which might have been previously staged. Staged
treatments ensure that the right offer is delivered in the right channel at the right
time. Staged treatments might be used in the following circumstances:
n An offer does not need to be made immediately after the segmentation and
eligibility rules are executed.
n An offer might not be appropriate for the channel in which a campaign is
executed.
n Delivery of the offer should be delayed to reduce the perception of spam.
To use staged treatments, staging must be configured on your system. For more
information, see “Flows” on page 60.
14 Chapter 1 / Overview
15
2
Architecture
Architecture of the SAS Intelligence Platform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Architecture of SAS Real-Time Decision Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Recommendations for Designing SAS Real-Time Decision
Manager Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Overview of Environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Overview of Designing SAS Real-Time Decision Manager Architecture . . . . . . . 19
SAS Deployment Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Platform Suite for SAS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
SAS Visual Analytics Administration and Reporting . . . . . . . . . . . . . . . . . . . . . . . . . 20
Load Balancer for SAS Real-Time Decision Manager . . . . . . . . . . . . . . . . . . . . . . . 20
Storage Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Estimating Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
High Availability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Scalability and Failover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Server Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Best Practices for SAS Decision Services Performance and High Availability . . 24
SAS Real-Time Decision Manager Deployment Scenarios . . . . . . . . . . . . . . . . . . . 25
Tiers in the SAS Real-Time Decision Manager Architecture . . . . . . . . . . . . . . . . . . 29
SAS Metadata Tier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
SAS Client Tier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Data Tier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
SAS Server Tier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
SAS Visual Analytics Tier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
SAS Real-Time Decision Manager Server Design Middle Tier . . . . . . . . . . . . . . . . 41
Operational Middle Tier for SAS Real-Time Decision
Manager Server or SAS Real-Time Decision Manager Run-Time Server . . . . 45
Reverse Proxy Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
About the Object Spawner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
About the SAS Workspace Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
About the SAS Stored Process Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
About the SAS Pooled Workspace Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Operational, Development, and Test Environments . . . . . . . . . . . . . . . . . . . . . . . . . 49
About the Environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Production Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Development Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Test and Production Environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Choosing Environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
A Typical Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
16 Chapter 2 / Architecture
Clients The client tier provides users with access to intelligence data and
to functionality through web-based interfaces.
For more information about the client tier for SAS Real-Time
Decision Manager, see “SAS Client Tier” on page 31.
Middle tier The middle tier enables users to access intelligence data and
functionality via a web browser. This tier provides web-based
interfaces for report creation and information distribution, while
passing analysis and processing requests to the SAS servers.
For more information about the middle tier for SAS Real-Time
Decision Manager, see “SAS Real-Time Decision Manager Server
Design Middle Tier” on page 41 and “Operational Middle Tier for
SAS Real-Time Decision Manager Server or SAS Real-Time
Decision Manager Run-Time Server” on page 45.
SAS servers SAS servers perform SAS processing on your enterprise data.
Several types of SAS servers are available to handle different
workload types and processing intensities. The software
distributes processing loads among server resources so that
multiple client requests for information can be met without delay.
For more information about the SAS server tier for SAS Real-Time
Decision Manager, see “SAS Server Tier” on page 36.
Data sources Data sources store your enterprise data. All of your existing data
assets can be used, whether your data is stored in relational
database management systems, SAS tables, or enterprise
resource planning system (ERP) tables.
For more information about the data tier for SAS Real-Time
Decision Manager, see “Data Tier” on page 32.
18 Chapter 2 / Architecture
For more information about the SAS Intelligence Platform, see SAS Intelligence
Platform: Overview at http://support.sas.com/documentation/onlinedoc/
intellplatform/index.html.
Overview of Environments
There are two types of environments that can be configured for SAS Real-Time
Decision Manager:
n SAS Real-Time Decision Manager Server
Note: By design, the planning application does not allow you to configure these
together in the same plan. They must be separate because they each have their
own SAS Metadata Server.
Known as the design environment, SAS Real-Time Decision Manager Server
includes design components such as SAS Customer Intelligence Studio and
SAS Decision Services Design Server, and run-time components such as the
Recommendations for Designing SAS Real-Time Decision Manager Architecture 19
SAS Decision Services Engine Server. All of these components use a single set
of SAS Application Servers and SAS Metadata Server in one environment.
Known as the run-time or operational environment, SAS Real-Time Decision
Manager Run-Time Server includes software required only for the SAS Decision
Services Engine Server. The operational environment is separate from the
design environment. The operational environment contains its own SAS
Metadata Server and SAS Application Server and does not include any SAS
Customer Intelligence components.
Storage Architecture
The storage for SAS Customer Intelligence components is organized into the
following categories:
n SAS installation files and binaries
n Customer data
The first three areas are typical of any standard SAS deployment. Many SAS
Customer Intelligence processes are driven by stored processes and large
customer data sets. It is important to size the SAS workspace. Typically,
customer data already exists. Storage parameters for those databases are
defined. The common data model is stored in a relational database. Consider
the space that must accommodate the expected volume of data such as contact
history, response history, and presented treatment history tables.
When you run some functions in SAS Real-Time Decision Manager, one or more
single row transactions of the customer data might be initiated every time a
campaign is executed. In these cases, make sure that the database is
appropriately tuned and adequate for row-level transactions. The database must
support the latency requirements of the campaign.
Estimating Size
When you plan SAS Real-Time Decision Manager configuration, consider the
volume of transactions and complexity of decision flows that are processed by
the SAS Decision Services Engine. You should also plan for the number of
customer or model processes that are handled by SAS Federation Server.
High Availability
SAS 9.4 improves the availability of the SAS platform. The areas of improved
availability are SAS Metadata Server and middle-tier servers. These servers can
be clustered with the SAS Deployment Wizard. The planning application
automatically generates additional server node instances that can be used to
create a cluster. For more information, see SAS Intelligence Platform: Web
Application Administration Guide at http://support.sas.com/documentation/
onlinedoc/intellplatform/index.html.
Not all web applications are candidates for clustering. The SAS Decision
Services Monitor application is on the middle tier, but it is not capable of being
clustered.
SAS Federation Server, SAS Decision Services Engine, SAS Customer
Intelligence Reporting, and related SAS servers can be replicated to distribute
workload for SAS Real-Time Decision Manager while providing higher
availability for those components. Each operational server should be configured
with a co-located SAS Federation Server and SAS Decision Services Engine
Server.
22 Chapter 2 / Architecture
Lateral Cache
SAS Federation
Server
DBMS
Node (Cluster)
Lateral Cache
SAS Federation
Server
Server Hardware
The choice of server hardware depends on the SAS Customer Intelligence
solutions, volume of customer data and broadcasts, complexity of
communications and campaigns, and expected response time. Larger volumes
of data might require additional servers to ensure acceptable response time. A
separate server is recommended for default SAS Visual Analytics Administration
and Reporting. If clustering of the middle tier servers or SAS Metadata Server is
configured, each clustered node equates to a physical server. A customer who
has licensed all of the SAS Customer Intelligence solutions might have ten or
more servers in the production environment if clustering is configured. In many
cases, development environments might fit on a single server.
24 Chapter 2 / Architecture
W eb S erv er Ti er
n workspace server, for publishing activities and other DS2 assets to SAS
Federation Server
n (Optional) SAS Stored Process Server for the execution of SAS BI Web
Services
Middle Tier
SAS Customer
Intelligence Core
SAS Customer
Intelligence Studio
SAS Tier
Base SAS
Here are examples of the factors that affect hardware capacity planning:
n peak transaction volume
n analytic complexity
o the user ID
o the SAS long version number
o the SAS Metadata Model version
o the directory where SAS Metadata Server was started
o configuration file options
n user connection and disconnection events
Data Tier
Within the SAS data tier, campaign managers use SAS Information Map Studio
to build information maps. The maps are used to identify which fields will be
used in the prompts for the contact history-related tasks in SAS Customer
Intelligence Studio. Information maps are also used by the self-learner process
Tiers in the SAS Real-Time Decision Manager Architecture 33
Data Sources
Customer data is typically stored in a supported relational database
management system (RDMS). It is likely that this data already exists and is
available before a deployment. The second key data source, the SAS Customer
Intelligence common data model, is also stored in a relational database. This
might be in the same database system or in a system provided by a separate
provider. To prevent cross-database joins and performance problems, store the
common data model in the same database as the customer data. The common
data model is created after the software deployment. Initially, it contains no data.
If the data provider is a SQL Server database, the hardware must support the
Windows operating system.
Components
Your data tier might include several sources of data for SAS Customer
Intelligence processes. The sources of data are determined by the objectives of
your organization and by company resources.
You can access almost any type of data source by using SAS LIBNAME
statements.
Note: Some databases, such as PostgreSQL, perform a case-sensitive
comparison of table or column names when the names are enclosed in
quotation marks. For these databases, set the following options to No:
n Preserve the column name as in the database management
system
n Preserve the table name as in the database management system
n DB2
n Teradata
n Netezza
34 Chapter 2 / Architecture
n (optional) libraries to contain lists and custom details. These libraries are
specified in the business context
If a user ID in Microsoft SQL Server is mapped to more than one database,
specify the name of the initial database as the default database in the data
source definition. To specify the name of the initial database:
1 In SAS Management Console, select the SQL server name from the Server
Manager plug-in.
4 In the ODBC Data Source Administrator, specify the name of the default
database.
Figure 2.5 Specify Default Database Name
SAS Customer Intelligence requires several SAS libraries that contain SAS
metadata and operational data. Most of the required libraries are defined when
the product is installed. The reporting libref library location is specified on the
Settings tab of the business context.
The metadata library is specified on the Metadata tab of the business context.
Verify that all SAS Customer Intelligence users, including saswbadm, have both
Read and Write access to the physical location of the library.
36 Chapter 2 / Architecture
You can specify the location of a libref in any preferred physical path. The
physical path is represented in the following sections as <plan-area>.
Note: Librefs in metadata are used for all libraries in a SAS Customer
Intelligence Studio data process. These librefs are not used after a flow is
deployed. For information about using general I/O resources to identify data, see
“Flows” on page 60.
Data process definitions require SAS libraries that are defined in Data Library
Manager in SAS Management Console. This requirement makes it possible to
select a table. The list of libraries is then filtered to show only those libraries in
the corresponding SAS Decision Services Design repository folder for the
current business context. For more information, see SAS Intelligence Platform:
Data Administration Guide at http://support.sas.com/documentation/onlinedoc/
intellplatform/index.html.
the SAS System as a batch job. For more information, see “About the SAS
Workspace Server” on page 47.
SAS Pooled Workspace Server
uses server-side pooling and provides access to SAS features such as the
SAS programming language and libraries. Server-side pooling means that
the spawner directs clients to a server that they are allowed to use as
specified in the metadata.
SAS Stored Process Server
provides storage, access locations, and execution for stored processes. SAS
Stored Process Servers are part of SAS Integration Technologies. A stored
process is a SAS program that is stored on a server and can be executed as
required by requesting applications. You can use stored processes for web
reporting, analytics, building web applications, delivering packages to clients
or to the middle tier, and publishing results to channels or repositories.
Stored processes can also access any SAS data source or external file and
create new data sets, files, or other data targets supported by SAS.
You must use SAS Metadata Server to administer SAS Stored Processes. To
make a stored process accessible to client applications, you must allocate a
storage location that your server can access. Then, use SAS Business
Intelligence Manager to create metadata that describes the stored process
and its location. SAS Business Intelligence Manager stores this metadata on
SAS Metadata Server so that it can be accessed by client applications. For
more information, see “About the SAS Stored Process Server” on page 48.
SAS/CONNECT Server
provides computing resources on remote machines where SAS Integration
Technologies is not installed. SAS/CONNECT links a SAS client session to a
SAS server session. The SAS/CONNECT client session is the initial SAS
session that creates and manages one or more server sessions. The
SAS/CONNECT server sessions can run on the same computer as the client
(for example, an SMP computer) or on a remote computer across a network.
SAS/ACCESS
is a solution for integrating SAS and third-party databases. You can read,
write, and update data regardless of the database or platform. This solution
enables organizations to bring different source system data together into a
cohesive and unified environment.
SAS Web Infrastructure Platform Data Server
is the default location for middle-tier data such as alerts, comments, and
workflows, as well as data for SAS Content Server. The server, which is
stored in PostgreSQL, is provided as an alternative to using a third-party
DBMS. (The server cannot be used as a general-purpose data store.) The
SAS Web Infrastructure Platform is a collection of services and applications
that provide common infrastructure and integration features to be used by
SAS web applications.
SAS Web Infrastructure Platform Scheduling Services
is a collection of middle-tier services and applications that provide
infrastructure and integration features that are shared by SAS web
applications and other HTTP clients.
SAS Environment Manager Agent
is a web-based component in Base SAS software that enables you to
visualize, monitor, and manage your SAS deployment using advanced
monitoring and management capabilities. SAS Environment Manager
38 Chapter 2 / Architecture
collects alerts, notifications, and data from your servers and presents that
information in a dashboard.
SAS Federation Server
is a data server that executes SAS Decision Services activities that are
written in the DS2 programming language. For more information, see SAS
Federation Server Administrator’s Guide. SAS Federation Server Manager is
used to configure and manage the SAS Federation Server DSNs and data
services.
n vocabulary management
n the databases that are managed by the SAS Web Infrastructure Platform
Data Server. By default, all of the databases are backed up. You can
modify the backup configuration so that only selected databases are
backed up.
n additional directories under SAS-configuration-directory/Levn, as
specified by the administrator.
By default, the SAS Deployment Backup and Recovery tool backs up these
items automatically each Sunday at 1:00 a.m. Backup files are retained for a
period of 30 days. Batch commands are available on each host machine to
use in administering backups and recoveries.
The following SAS software components are also installed on the SAS Real-
Time Decision Manager Server Design Middle Tier:
SAS Web Server
is an HTTP server. The server is based on Pivotal Web Server. SAS
configures the server with the following features:
44 Chapter 2 / Architecture
the same time, the model controls access to protected resources based on
privileged-user status and group membership.
Note: SAS Environment Manager Agent and clustered SAS web applications in
the SAS Web Application Server can be installed on an optional middle-tier
node.
A SAS Application Server knows its server context (the context in which it is
being used) and makes decisions based on that knowledge.
SAS Object Spawner
is an application that initiates the workspace servers and stored process
servers. An object spawner runs on each machine where you want to run a
workspace server or stored process server, listens for requests, and
launches the servers as necessary. For more information, see “About the
Object Spawner” on page 47.
SAS Pooled Workspace Server
uses server-side pooling and provides access to SAS features such as the
SAS programming language and libraries. Server-side pooling means that
the spawner directs clients to a server that they are allowed to use as
specified in the metadata.
SAS Stored Process Server
provides storage, access locations, and execution for stored processes. SAS
Stored Process Servers are part of SAS Integration Technologies. A stored
process is a SAS program that is stored on a server and can be executed as
required by requesting applications. You can use stored processes for web
reporting, analytics, building web applications, delivering packages to clients
or to the middle tier, and publishing results to channels or repositories.
Stored processes can also access any SAS data source or external file and
create new data sets, files, or other data targets supported by SAS. For more
information, see “About the SAS Stored Process Server” on page 48.
You must use SAS Metadata Server to administer SAS Stored Processes. To
make a stored process accessible to client applications, you must allocate a
storage location that your server can access. Then, use SAS Business
Intelligence Manager to create metadata that describes the stored process
and its location. SAS Business Intelligence Manager stores this metadata on
SAS Metadata Server so that it can be accessed by client applications.
SAS Environment Manager Agent
is a web-based component in Base SAS software that enables you to
visualize, monitor, and manage your SAS deployment using advanced
monitoring and management capabilities. SAS Environment Manager
collects alerts, notifications, and data from your servers and presents that
information in a dashboard.
Deployment Wizard can automatically configure the SAS Web Server to provide
secure communications (HTTPS).
The SAS Web Server serves as the proxy, or entry point, to the SAS Web
Application Servers. The Web Infrastructure Platform and related services, SAS
Deployment Backup, SAS Studio and standard EBI applications reside in
SASServer1 and SASServer2. The JVM for SASServer7 houses the SAS Real-
Time Decision Manager applications. Applications for SAS Visual Analytics
Administration and Reporting are located in SASServer12_1, and SAS
Federation Server Manager is located in SASServer13_1. If you also licensed
SAS Enterprise Decision Manager, SAS Marketing Automation, or SAS
Enterprise Miner, SAS Enterprise Miner is deployed to SASServer11_1.
Executable
You can find the name and location of your workspace servers by using the
SAS Server Manager in SAS Management Console.
Log
Workspace servers are not initially configured to produce log files. For
troubleshooting purposes, workspace server logs can be helpful because
they capture calls that are made to the database. In these situations, you can
use the alternative logging configuration file (logconfig.trace.xml) that is
provided in each workspace server’s configuration directory.
For information about managing logs for the workspace server, see SAS
Intelligence Platform: System Administration Guide at http://support.sas.com/
documentation/onlinedoc/intellplatform/index.html.
Each stored process server process handles multiple users, and by default each
server uses multiple server processes. A load-balancing algorithm distributes
client requests between the server processes.
By default, the object spawner starts the processes of the stored process server
by authenticating the SAS Spawned Servers user ID, sassrv.
For information about load balancing, see SAS Intelligence Platform: Application
Server Administration Guide at http://support.sas.com/documentation/onlinedoc/
intellplatform/index.html.
Production Environment
The production environment consists of either a single instance or multiple
instances of the following servers, depending on performance and availability
requirements.
n SAS Metadata Servers contain artifacts such as global variables, SAS
activities, events, and flows.
n SAS Decision Services Engine Servers are configured in an application
server cluster. These servers execute the decision flows that provide the
real-time analytical decisions.
n SAS Federation Servers primarily run the SAS activities and score code that
are based on DS2.
n SAS Web Servers are HTTP servers that are used to provide load-balancing
solutions for the real-time decision cluster enterprise. Using Service-Oriented
Architecture (SOA) integration through web services, SAS Web Server is
used as an integration point between external applications and a SAS
Decision Services cluster. For more information, see the SAS Intelligence
Platform Middle-Tier Administrator’s Guide.
n SAS Web Application Server can be configured as a cluster and used for
deployment of the SAS Decision Services Engine Server.
n Database Servers store data and DS2 packages that implement SAS activity
methods. SAS servers can be used to run BI web services for applications
that require the execution of procedures or macro code.
The SAS Decision Services cluster enterprise uses open standards extensively
in order to simplify integration and maximize interoperability.
Development Environment
The development environment enables business users to create, test, edit, and
delete campaigns. The SAS Decision Services Design Server provides this
functionality through a web service API. SAS Real-Time Decision Manager uses
the SAS Decision Services Design Server on SASServer7 to execute the above
functionality on the users' behalf.
Decision flows and their building blocks (events, activities, global variables, and
system resources) are stored in a repository folder. Each repository folder
Operational, Development, and Test Environments 51
Choosing Environments
At a minimum, install one development and one production environment. You
can install one or more test environments, depending on your organization's
testing policies. Decision flows can be unit tested in the development
environment. A test environment is used to test decision flows in an environment
that is similar to production. The test and production environments have only a
few differences:
n The test environment is not connected to live channels or customer-facing
systems.
52 Chapter 2 / Architecture
A Typical Configuration
A typical installation consists of development, test, and production environments,
although the number of environments is configurable to accommodate process
standards that reference internal approval. Decision flows are created and
functionally tested in the development environment by business users. When a
business user is satisfied that a decision flow is ready for deployment, an
administrator promotes the flow to either a test or production environment. A test
environment is optional and can be used to conduct performance testing on
decision flows in an environment that is similar to the production environment.
The production environment serves live channels or customer-facing systems.
Each environment includes a repository of decision flows, their building blocks,
and other resources.
In SAS Customer Intelligence Studio, you can use the Deployment category in
the Administration workspace to promote artifacts from one repository to another
repository. For more information, see “Managing Deployments” on page 229.
You can also use the SAS Management Console import and export functionality
to promote artifacts. For more information, see “Importing and Exporting SAS
Packages” on page 222. In these cases, decision flows and other artifacts are
promoted between development, test, and production environments.
The Decision Services Manager plug-in also operates on these repositories and
is used to monitor and control SAS Decision Services run-time systems from a
central location.
After a flow is promoted, you can use the Deployment category in SAS
Customer Intelligence Studio or the Decision Services Manager plug-in to
activate the flow, putting it into production. For more information, see “Activating
and Deactivating Selected Campaigns” on page 243.
You can also use the SAS Decision Services Administrative API to automate
activation. For more information, see Appendix 7, “SAS Decision Services
Administration,” on page 443.
Overview
The following examines the stages of the decision flow life cycle.
channel. Test the campaign by executing it using the test data in the Test mode
in SAS Customer Intelligence Studio. The SAS Decision Services Design Server
executes the campaign logic and activities during this stage in the same way
that the SAS Decision Services Engine Server executes the campaign in
production.
Promotion
Use the Deployment category in SAS Customer Intelligence Studio to promote
the campaign by exporting the campaign from the SAS Decision Services
Design Server repository and importing it into a test or production repository. You
can also use SAS Management Console to promote, or manually deploy, the
campaign. You might want to initially promote the campaign to a test repository
to verify the results. For more information, see “Deploying and Undeploying
Selected Campaigns” on page 237.
DS2 packages, which implement SAS activity methods, should be promoted to
production less frequently than campaigns. Promoting DS2 packages every time
a campaign is promoted can break decision flows that used older versions of
activities. When you consider whether to promote a DS2 package, keep in mind
the potential impact this might have on existing campaigns in production that use
the same DS2 package code.
Activation
Each decision flow in a test or production environment is either active or
inactive. Only active flows are loaded by a SAS Decision Services Engine
Server. To make a flow ready to process events (or to make it ready for testing in
a test environment) the administrator must activate it. To remove a flow from
production, the administrator deactivates it. For more information, see
“Activating and Deactivating Selected Campaigns” on page 243.
Note: In SAS Real-Time Decision Manager, all of the activities in a single flow
execution are executed one at a time, rather than concurrently. When used for
54 Chapter 2 / Architecture
Monitoring
The SAS Decision Services Monitor provides an API for querying activity hit
counters and execution performance statistics. The Monitor also controls
production batch execution, and provides access to batch job progress, status,
and results. For more information, see “SAS Decision Services Monitoring” on
page 279.
n decision flows ( )
n events ( )
n global variables ( )
n system resources ( )
For more information about the objects, see “Metadata Objects in the SAS
Repositories” on page 56.
A repository does not have to be associated with a server; it can be used simply
as a storage area for the objects.
A repository resides in SAS Metadata Repository. However, each Decision
Services development, test, and production environment maintains a repository
where the objects of the environment are kept.
SAS Decision Services Repositories 55
Data process definitions require SAS Libraries that are registered in the SAS
Data Library Manager for selecting a table. The list of libraries is then filtered to
show only those libraries in the corresponding SAS Decision Services Design
repository folder for the current business context.
3 Right-click the folder where you want to create your repository, and select
Create repository.
7 Verify that your repository was created correctly by expanding your repository
folder.
Overview
Metadata objects are provided with the product and are typically configured by
on-site SAS support personnel when your system is installed. On-site SAS
support personnel can also work with your IT department to define the external
events that are appropriate to your processing needs. Each external event
defines the data that is exchanged between your system and SAS Decision
Metadata Objects in the SAS Repositories 57
Activities
When you create a self-learner process, a SAS process, a web process, or a
model process (if you licensed SAS Model Manager) in SAS Customer
Intelligence Studio, a SAS Decision Services activity is generated that can
perform an operation (such as executing custom DS2, executing a model,
executing a rules definition, calling a web-service, and so on). To execute the
operation, you must add a Process node that references that definition to a
campaign and then execute the campaign. An activity is a component of
business work such as computing a credit score, or performing a market basket
analysis.
In SAS Real-Time Decision Manager, an activity XML is created each time you
define a process for your campaign. Activities are represented as the nodes of a
decision flow diagram. Each activity contains a set of actions. For example, the
General I/O activity contains the actions READ, INSERT, and UPDATE. Each
action contains a set of inputs and outputs that are mapped to process variables.
The activities that are provided with SAS Decision Services contain a rich set of
functionality. The activities within a flow can execute sequentially or concurrently
as specified by the containing flow. For more information about creating
campaign definitions, see SAS Real-Time Decision Manager: User’s Guide.
SAS Decision Services provides a rich set of activities for constructing decision
flows that automate real-time decisions and actions. Activities perform work
actions, such as executing SAS programs on a SAS server, storing and
accessing information from a relational database, sending web service requests
to external systems, executing business rules, and executing scoring models.
If your organization has a special processing need that is not covered by the
provided activity set, new activities can be added. This is accomplished by
developing custom SAS code and publishing it to the SAS Decision Services
environment. The activity publishing step assembles metadata. Metadata is
necessary in order for the activity to be recognized by a SAS Decision Services
engine and to be rendered and tested in a client environment, such as SAS
Customer Intelligence Studio or SAS Enterprise Decision Manager. The user
interface that is used to publish activities is provided by the SAS solution, such
as SAS Customer Intelligence, which in turn makes SAS Decision Services API
calls in order to publish a new activity.
SAS Decision Services uses the following classifications of configurable
activities:
n SAS activity
For more information, see “Integrating with External Web Services” on page
161.
n general I/O activity
Events
An event represents an action that triggers the decision process, such as a
customer call to a hot line to request product information. In SAS Customer
Intelligence Studio, you use the Decision category in the Definitions workspace
to define a web service event to determine the variables that begin a diagram
flow. You then use a Start node in a diagram to select the event that you have
defined.
The SAS Decision Services Engine web service accepts messages called
events. Each request for a decision is presented to the system as an event.
These events and their associated decision flows are presented to external
clients as web services. An event definition specifies a request message format
and a reply message format. Events that are designed only to receive
information can omit the reply message. An event makes up the contract
between an external system and a decision flow, specifying the types of
information that is contained within the request and reply. Typically, your IT
department sets up your systems to make web service requests to the SAS
Decision Services Engine, and on-site SAS support personnel define the events
that map the data.
Events and global variables are shared across business contexts that point to
the same SAS Decision Services repository. In those instances, events or global
variables that are created in one business context appear in the Events and
Global Variables tables in only the business contexts that share the same SAS
Decision Services design repository. If you want to separate events and global
variables between business contexts in the design repository, then you must
specify a separate SAS Decision Services repository on the Settings tab for
each business context. For more information, see “Data Options Settings for
Decision Campaigns” in SAS Real-Time Decision Manager: User’s Guide, or
contact SAS Technical Support at https://support.sas.com/techsup/contact/.
Metadata Objects in the SAS Repositories 59
The following table lists and describes the default events that are automatically
generated in the SAS Decision Services design repository by SAS Customer
Intelligence Studio.
When the SAS Customer Intelligence Studio user creates an event or a global
variable, the definition is stored in a SAS Decision Services design repository.
You display the code by right-clicking the event or variable and selecting View
SAS Decision Services content.
unique value be provided for every call to track issues. This value is also
returned as the value of the correlation ID for the EventResponse. The
method getEventIdentity() returns the value of this input header element.
ClientTimeZoneId
This is a string value that contains the time zone ID of the client that is calling
the engine. This value is used by certain SAS Decision Services functions to
interpret date and time values that do not contain the time zone information.
The valid values of this field are the time zone IDs that are supported by
Java, and are based on the IANA time zone database. The method
getEventIdentity() returns the value of this input header element.
SimulationDate
This is an optional element that has two attributes: date, an XML datetime,
timeZoneID, a string. The valid values for the time zone ID are the same as
described in ClientTimeZoneID. If the SimulationDate element is not present,
the default is the value of the StartTime element, returned in the event output
header, plus the value of the input header element ClientTimeZoneID. The
method getEventSimulationDate() returns a calendar that is constructed from
these values.
The event response header contains the following data items:
CorrelationId
This is a string field that contains the value of the Identity field of the event.
StartTime
This is a timestamp that shows when the message was received by the
engine.
CompletionTime
This is a timestamp that shows when the engine finished processing the
event.
Body
The body contains data that is the input for, or output of, the engine when it is
executing a specific event. The schema for this section is generic. Depending
on the requirements of the EventDefinition, this section might contain zero or
more data items that contain the input or output values.
In some cases, you might want to allocate a longer processing time to an event.
You can change the time-out setting for the following events. For more
information, see “Set an Event Time-Out in SAS Management Console” on page
84.
Flows
A flow (also called a decision flow) defines the set of decisions and actions to
take when a third-party system, such as a website or a call center, sends a
request to SAS Decision Services. A decision flow includes activities and
business logic that determines the order in which the activities are processed.
Each individual type of request has one decision flow that is associated with it.
Multiple copies of each decision flow can process multiple requests concurrently
and are available to field a high volume of transactions.
When a user marks a campaign, treatment campaign set, or treatment campaign
for deployment or tests them, SAS Customer Intelligence generates a decision
services flow. This flow contains the SAS Decision Services code that is used to
implement the campaign. When one campaign calls another campaign via a
sub-diagram node, the code that Customer SAS Intelligence generates has one
Metadata Objects in the SAS Repositories 61
decision services flow calling to another decision services flow. Similarly, the
decision services flows that are generated for SAS Customer Intelligence
treatment campaign sets or for treatment campaigns call each other. These
types of call-outs are often referred to as sub-flows. Sub-flows can also refer to
utility decision services flows that are called by the decision service flows
generated for a campaign. The sub-flow used to call the contact history web-
service is an example of such a sub-flow. These flows begin with _SAS_*.
In the engine, the contact history flow that is used is determined by which flow is
marked Active.
There are no distinctions between flows and sub-flows other than the fact that
sub-flows are called by other flows. Sub-flows are event-driven like any other
flows. To invoke a sub-flow, the user includes a sub-flow activity that enables the
user to select the event that drives the desired sub-flow, and to map the event
request and reply fields to process variables in the parent flow.
A sub-flow within a particular flow might execute sequentially or concurrently,
depending on how the parent flow is configured.
Here are several benefits of using sub-flows:
n removing instances of duplicated code across decision services campaign
flows, which decreases the memory footprint and increases performance
n enabling you to implement the same functionality (such as contact history)
using different flows. Switching between flows does not require you to
regenerate or redeploy the decision services flows. This capability can be
helpful in those instances where a web-service version of the flow cannot be
used. Here are some examples of switching flows:
o _SAS_CONTACT_HISTORY_DS2_FLOW,
_SAS_CONTACT_HISTORY_WS_FLOW, and
_SAS_CONTACT_HISTORY_NULL_FLOW populate the CDM contact
history tables. They all implement the
_SAS_CONTACT_HISTORY_EVENT interface. Therefore, you can
activate whichever flow best meets your current needs, and turn off the
other flows. In this example, you might use the
_SAS_CONTACT_HISTORY_DS2_FLOW if you wanted to update the
contact history before the flow completes.
o SAS_ADD_STAGED_TREATMENTS_GIO_FLOWand
_SAS_ADD_STAGED_TREATMENTS_NULL_FLOW add treatments to
the staging area. You can activate the GIO flow if storing the staged
treatments in the CDM table and the NULL flow if you want to temporarily
stop treatments from being staged. If you activate the NULL flow, the
campaigns will continue to run normally, returning results to the caller,
and any staged treatments will be discarded.
n Using SAS Customer Intelligence sub-diagram mode to factor out common
customer intelligence nodes into a separate campaign, and calling the
separate campaign via a sub-diagram node. For example, instead of having
the same 10 nodes in 50 campaigns, you can create a new campaign that
has those 10 nodes, and place a sub-diagram node into each of the 50
campaigns to call that new campaign. The 50 decision services flows will all
call the same decision services sub-flow. This simplifies maintenance. If the
user needs to make a change or fix to one of those 10 nodes, she can make
the change in one place instead of in 50.
62 Chapter 2 / Architecture
n simplifying campaigns so that they are easier to read. Having easily read
campaigns, diagrams, and sub-diagrams reduces errors and later
maintenance issues
n improving the flexibility of your campaign by enabling you to edit and promote
sub-diagrams without having to edit or promote the entire campaign
n increasing the reusability of sub-diagrams for segments of logic (such as
Compute Propensity Scores, Determine Credit Score, and so on)
Web service, general IO, and DS2 activities are generated as packaged sub-
flows (that is, flows that are invoked by other flows) that call the pertinent events.
Sub-flows support recursive composition that enables complex flows to be
produced by combining simpler, easier-to-understand flows that perform a
targeted set of tasks.You can deploy and activate different versions of these
flows independently of the campaign flows.
All flows are available for activation in the engine repository. If flows share the
same event, only one flow can be active. Activating one flow deactivates the
previously active flow.
If you activate an empty flow, records are no longer written. For example, if the
contact history table is corrupted, you can activate
_SAS_CONTACT_HISTORY_NULL_FLOW to stop writing contact history.
The following tables lists and describes the flows that are called by campaigns
that are automatically generated by SAS Customer Intelligence Studio.
Global Variables
In SAS Customer Intelligence Studio, you use the Decision category in the
Definitions workspace to create global variables. Global variables are used to
control the behavior of flows at execution time. For example, by modifying the
value of a global variable that contains a customer risk threshold, the boundary
between a medium-risk customer versus a high-risk customer can be adjusted at
run time without changing any expressions or redeploying the flow. For
information about creating global variables in SAS Customer Intelligence Studio,
see SAS Real-Time Decision Manager: User’s Guide. For information about
managing global variables in a SAS Decision Services repository, see
“Managing Global Variables in SAS Management Console” on page 89.
Unlike process variables, global variables are Read-only with respect to flows
and are cluster scoped rather than flow scoped. The value of a global variable
affects the behavior of every flow within an engine server cluster that references
the global variable.
_SAS_LIST_REMOVED_STAGED_TREATMENTS
When set to True, this variable enables you to review staged treatments that
were removed during testing. Select the Remove Staged node to view the
removed treatments on the Treatments tab. The default value is False.
_SAS_RECORD_HISTORY
When set to True, this variable writes history records to the common data
model. History processes are prepared and validated during testing. When
set to False, history processes are prepared and validated during testing, but
the records are not written to the common data model. The default value is
True.
_SAS_STAGING_VARIABLE
This variable enables you to use subject IDs to share data between individual
tests in production, or to process isolated data. The default value for test
cases is the user ID of the user who is currently logged on. The initial
production value is generated during installation.
The purpose of this variable is to prevent users of the SAS Real-Time
Decision Manager test interface from interfering with each other or the flows
running in production. In production, the default value that was generated at
installation time for _SAS_STAGING_VARIABLE is used. In this case, if one
flow stages a treatment for a client, then any other flow that picks up the
staged treatments for that client would see the treatment that was staged by
the first. Both testers might be staging treatments for the same client and
depending on the tests, each of the testers’ flows that picked up staged
treatments might see the treatments staged by the other tester in addition to
their own, or might not see any treatments at all. To prevent this, from the
test interface, the default for the _SAS_STAGING_VARIABLE must be set to
the user ID. When the variable is set to the user ID and multiple users are
using the test interface, a tester can view only the treatment that he staged,
and the other tester would view only the treatments that she staged. If they
want to see each other’s staged treatments in the test interface, they must
override the default setting and both set the _SAS_STAGING_VARIABLE to
the same value.
This variable is also used is when the staging table that is used in production
is the same as that used by test so that the treatments staged during testing
do not interfere with the production flows retrieving staged treatments.
Because the _SAS_STAGING_VARIABLE value used in production is
different from that used by default by the test interface, the treatments staged
during testing will never be seen by flows that are run in production.
Specify Separators
The following predefined global variables set the delimiters that are used by SAS
Decision Services run-time flows.
_SAS_CAMPAIGN_TREATMENT_SEPARATOR
The delimiter that separates treatments.
_SAS_CCS_VALUE_SEPARATOR
The delimiter that separates treatment custom detail values when using the
web service method for updating contact history.
Note: This delimiter is not used for DS2 contact history updates
_SAS_CAMPAIGN_LIST_SEPARATOR
The delimiter that separates lists.
General I/O Activities 65
System Resources
System resources are artifacts that provide activities with access to external
resources within their environment, such as relational databases, SAS servers,
or web services. For example, many activities rely on running a SAS DS2
program to produce results. Because flows execute in SAS Web Application
Server in the middle tier, these activities must communicate with SAS Federation
Servers.
The fact that activities reference system resource information (rather than
contain system resource information) makes flows portable between systems.
SAS Decision Services supports configurable design, test, and production
environments. Typically, the set of SAS Federation Servers that is used by
development and production environments is different. System resources enable
the correct set of servers to be used in each environment without modification to
the decision flow.
Library Resources
Library resources are special optional system resources that can assist
database operations in certain circumstances. Library resources can hold an
alias to a database schema name, allowing the alias name to be used to access
tables within the schema. Library resources are optional and are not required for
SAS Decision Services operation.
Overview
SAS Decision Services is shipped with a General I/O activity that can read or
write to any supported database table or SAS data set. A General I/O activity
uses a JDBC Connection resource. This resource specifies which database the
activity uses. At least one JDBC Connection resource was configured when your
system was installed.
Note: SAS data sets exhibit file-level locking. If multiple threads of execution
attempt to simultaneously read from or write to a SAS data set, deadlocks can
occur. Therefore, the use of a relational database management system is highly
recommended for real-time (non-batch) processing.
A system-level time zone can be used when reading or writing date and time
from a database using General I/O activity. To interpret the value in the database
or to write a timestamp objects to the database, you must supply a time zone
value. The time zone ID is supplied as the value of the two system properties
sasds.designserver.default.timezoneid and sasds.engine.default.timezoneid, for
design server and engine respectively. If the value is not set, the default is
Greenwich Mean Time (GMT). If the supplied value is not a valid time zone ID,
then an error is logged and the GMT value is used instead.
66 Chapter 2 / Architecture
Operations
Read
Method name: SCReadTable.
Properties
G_IO_WHERE_Clause - WHERE clause. The WHERE clause property is a
static string that is set on the General I/O Activity instance when it is inserted
into a flow.
A WHERE clause is a SAS Decision Services (not SQL) Boolean expression.
Logical (AND, OR, NOT), relational (EQ, NE, GT, GE, LT, LE), and arithmetic
(+, -, /, *) operators can be used. Here is an example: CustomerInfo.Income
GT 50000.0. As in a DATA step, a . (period) denotes a missing value.
Note: To ignore trailing blanks, use the operators SQL_EQ, SQL_NE,
SQL_GT, SQL_GE, SQL_LT, SQL_LE. These operators are valid only for
strings.
Process parameters can be referenced as :{Process parameter name}. Here
is an example: CustomerInfo.LastName EQ :PV_CustomerLastName
Note: '=' and '!=' are not supported in General I/O WHERE clauses. EQ and
NE are used instead.
Input Parameters
n G_IO_libraryName - Library or schema name.
Insert
Method name: SCInsertIntoTable.
Input Parameters
n G_IO_libraryName - Library or schema name.
n G_IO_tableName - Database table name.
Update
Method name: SCUpdateTable.
General I/O Activities 67
Properties
G_IO_WHERE_Clause - WHERE clause. The WHERE clause property is a
static string that is set on the General I/O Activity instance when it is inserted
into a flow.
A WHERE clause is a SAS Decision Services (not SQL) Boolean expression.
Logical (AND, OR, NOT), relational (EQ, NE, GT, GE, LT, LE), and arithmetic
(+, -, /, *) operators can be used. Here is an example: CustomerInfo.Income
GT 50000.0. As in a DATA step, a . (period) denotes a missing value.
Note: To ignore trailing blanks, use the operators SQL_EQ, SQL_NE,
SQL_GT, SQL_GE, SQL_LT, SQL_LE. These operators are valid only for
strings.
Process parameters can be referenced as :{Process parameter name}. Here
is an example: CustomerInfo.LastName EQ :PV_CustomerLastName
Note: '=' and '!=' are not supported in General I/O WHERE clauses. EQ and
NE are used instead.
Input Parameters
n G_IO_libraryName - Library or schema name.
Insert Update
Method name: InsertUpdateTable
Properties
G_IO_WHERE_Clause - WHERE clause. The WHERE clause property is a
static string that is set on the General I/O Activity instance when it is inserted
into a flow.
68 Chapter 2 / Architecture
Increment Update
Method name: IncrementUpdateTable
Properties
G_IO_WHERE_Clause - WHERE clause. The WHERE clause property is a
static string that is set on the General I/O Activity instance when it is inserted
into a flow.
A WHERE clause is a SAS Decision Services (not SQL) Boolean expression.
Logical (AND, OR, NOT), relational (EQ, NE, GT, GE, LT, LE), and arithmetic
General I/O Activities 69
Delete
Method name: DeleteFromTable
Properties
G_IO_WHERE_Clause - WHERE clause. The WHERE clause property is a
static string that is set on the General I/O Activity instance when it is inserted
into a flow.
A WHERE clause is a SAS Decision Services (not SQL) Boolean expression.
Logical (AND, OR, NOT), relational (EQ, NE, GT, GE, LT, LE), and arithmetic
(+, -, /, *) operators can be used. Here is an example: CustomerInfo.Income
GT 50000.0. As in a DATA step, a . (period) denotes a missing value.
Note: To ignore trailing blanks, use the operators SQL_EQ, SQL_NE,
SQL_GT, SQL_GE, SQL_LT, SQL_LE. These operators are valid only for
strings.
Process parameters can be referenced as :{Process parameter name}. Here
is an example: CustomerInfo.LastName EQ :PV_CustomerLastName
70 Chapter 2 / Architecture
Note: '=' and '!=' are not supported in General I/O WHERE clauses. EQ and
NE are used instead.
Input Parameters
n G_IO_libraryName - Library or schema name.
Stored Processes
A stored process is a SAS program that is stored on a server and can be
executed as required by requesting applications. The following table lists the
stored processes for SAS Real-Time Decision Manager.
* This stored process is used only for the web service method for updating contact history.
To invoke a SAS BI web service from SAS Decision Services, include a web
service activity in your decision flow. SAS BI Web Services are useful if you want
to execute DATA or PROC steps, or if you want to use SAS macro code.
However, keep in mind that these code constructs carry significant performance
penalties.
DataFlux Secure
If you use SAS/SECURE for your SAS servers, then you must license DataFlux
Secure. The reason is that encryption must be set consistently across all SAS
server components. For example, if you use AES encryption for SAS Metadata
Server, then all SAS servers must be configured with AES encryption.
Install Types
When you deploy SAS, you can automatically install and configure SAS Real-
Time Decision Manager in a development environment or an operational
environment.
Cloud
Web
Call Center service
1 Web
3 1
SAS Customer SAS Email SAS
Intelligence – Decision Mobile Decision
create objects Services IVR Services
and campaigns POS/ATM
6 4
2 4 5 2 3
You use the development installation type for the development environment, the
test environment, or both the development and test environments. If you use the
development installation type, campaigns are executed in the following order.
1 Campaigns and campaign objects are created in SAS Customer Intelligence
Studio.
2 The campaigns and campaign objects are saved as metadata objects in the
metadata server.
3 The execution of the campaigns as flows is initiated in the SAS Decision
Services Design Server. The SAS Decision Services Design Server executes
campaigns that are being executed within the development environment in
SAS Customer Intelligence Studio. You use SOAP or a REST API to send an
event to the SAS Decision Services Engine Server, which then executes a
flow.
4 To execute flows, the SAS Decision Services server communicates with SAS
Metadata Server.
74 Chapter 2 / Architecture
5 If DS2 code is required in the execution of the flows, SAS Decision Services
communicates with SAS Federation Server.
6 After SAS Decision Services completes the execution of the flows, the results
are returned to the user interface in SAS Customer Intelligence Studio.
You typically use the operational installation type if you want to simulate
production as closely as possible. The operational installation type does not
include SAS Customer Intelligence Studio user interface or the SAS Customer
Intelligence middle-tier applications. If you use the operational installation type,
campaigns are executed in the following order.
1 The customer channel sends a web service request to the SAS Decision
Services Engine Server to initiate the execution of flows.
2 To execute flows, the SAS Decision Services server communicates with SAS
Metadata Server.
3 If DS2 code is required in the execution of the flows, SAS Decision Services
communicates with SAS Federation Server.
4 After SAS Decision Services completes the execution of the flows, the results
are returned to the customer channel.
SAS Metadata
3a Server
Auto-generated
event objects
4
3b
2 6
SAS Decision Services
Provide Engine Server
UI
SAS Customer SAS Customer SAS Decision Services Monitor
Intelligence Studio 1 Intelligence Studio
Test interface SAS Decision Services
7 (optional) CustIntelReporting Component Administration
JDBC Connections
DBMS
SASServer7 A
SAS Decision Services Design Server
and/or
SAS Decision Services Engine Server
JDBC Connections
DBMS
B
JDBC Connections
SASServer7 SAS Federation Server
SAS Decision Services Design Server
Federated_DSN
and/or
SAS Decision Services Engine Server Base_DSN
Streaming XML DS2_My Arbitration My_DSN
DS2_MyScoring A B C
DS2_MyComputation
SAS
Customer SAS Customer
Intelligence Intelligence Core
Studio
Execute campaign
Activity Definition
Activity definition contains DS2 model code. New DATA step code Collect data
This model code is used to generate a treatment
score when the definition is assigned to a
marketing cell (reply node) of a campaign in the Feed responses back
Training
Treatments Scoring page.
For more information about self-learner processes, see SAS Real-Time Decision
Manager: User’s Guide.
Business Rules Manager must be configured for the SAS Federation Server so
that SAS Real-Time Decision Manager can access the lookup tables. For
information about configuring SAS Business Rules Manager for SAS Federation
Server, see SAS Customer Intelligence: Deployment Guide.
3
Setting Up the Environment
Customizing the Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Use a Single Install Account . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Use Fully Qualified Server Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Support Double-Byte Character Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Set a Session Time-out Value for SAS Customer Intelligence Studio . . . . . . . . . 83
Set an Event Time-Out in SAS Management Console . . . . . . . . . . . . . . . . . . . . . . . 84
Prevent Users from Adding Attachments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Enable Staging of Treatments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Set JVM Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Lock Down a SAS Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Set the Delimiter for Multiple Treatments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Set the Size of Character Fields in Batch Simulation Tables . . . . . . . . . . . . . . . . . . 88
Import the Sample Definitions and Campaign . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Managing Global Variables in SAS Management Console . . . . . . . . . . . . . . . . . . . 89
Security Administration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Overview of Security Administration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
How the LOCKDOWN Statement Affects Campaigns . . . . . . . . . . . . . . . . . . . . . . . 92
Administering SAS Identities for Users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Administering Roles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Administering Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Administering Group and Role Membership . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Administering Permissions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Modifying Access Permissions for Promoting Objects . . . . . . . . . . . . . . . . . . . . . . 108
Enable Integrated Windows Authentication in Firefox . . . . . . . . . . . . . . . . . . . . . . . 110
Additional Configuration Required When Using Integrated
Windows Authentication (IWA) or Web Authentication . . . . . . . . . . . . . . . . . . . . 110
Password Updates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
WS-Security Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
System Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Standard System Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
JDBC Connection System Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Specify a New System Resource as a JDBC Connection . . . . . . . . . . . . . . . . . . . 123
Specify a New System Resource as a Web Service Connection . . . . . . . . . . . . 125
Specify a New System Resource as an HTTP Connection . . . . . . . . . . . . . . . . . . 126
Library Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
82 Chapter 3 / Setting Up the Environment
Introduction
See your on-site SAS support personnel for installation instructions. You can
also obtain useful information about the configuration of each machine, including
log locations and setup scripts, in the instructions.html file for each machine
where the components were installed.
To view the deployment instructions for SAS Real-Time Decision Manager,
including the default ports used in deployment, see the SAS Customer
Intelligence: Deployment Guide at http://supportprod.unx.sas.com/software/ci/
index.html. To access this page, log on as user ID sas, and use password
CIadmin123.
Customizing the Environment 83
For information about SAS Federation Server, see SAS Federation Server:
Administrator’s Guide at http://support.sas.com/documentation/onlinedoc/
fedserver/index.html.
Incorrect joesmachine
Edit and correct any server machine names that are not fully qualified by
modifying the server’s properties in the Server Manager folder in SAS
Management Console.
for SAS Customer Intelligence. For information about setting time-out values,
see your SAS documentation.
To change the session time-out value, edit these files. The path on your system
is determined by the SAS Web Application Server.
1 In <SAS-configuration-directory>/Levn/Web/WebAppServer/
SASServer6_1/sas_webapps/sas.customerintelligencestudio.war/
config.xml, edit the session time-out value in the following code:
<timeout>
<enabled>true</enabled>
<!-- Default to 7 days. Must match timeout in web.xml -->
<maxInactiveInterval>604800</maxInactiveInterval>
</timeout>
2 In <SASConfigDir>/Levn/Web/WebAppServer/SASServer6_1/
sas_webapps/sas.customerintelligencestudio.war/WEB-INF/
web.xml, edit the following code:
<session-config>
<!-- default is 7 days -->
<session-timeout>10080</session-timeout>
<!-- this deploys fine into TCServer -->
<cookie-config>
<path>/</path>
</cookie-config>
</session-config>
redeploy your entire campaign (and all linked objects) to override the settings in
the production environment. Setting the time-out in the Start node can cause test
cases with small time-out values (for example, the web channel) to fail. These
test cases fail because the SAS Decision Services design server cannot execute
the flows as quickly as the SAS Decision Services Engine server. Therefore, use
the default event time-out on the design server when testing campaigns and use
SAS Management Console to set the event time-out value on the engine server.
Time-out values can be set at three levels (from lowest to highest): system,
event, and flow. Event and flow time-out values are optional.
n The system time-out value can be set during the installation and
configuration of the SAS Decision Services design server and engine. If no
value is specified by the user, then a default value is set. The value can be
viewed in Configuration Manager in SAS Management Console. If you
change the value through Configuration Manager, the new setting will not
take effect until the system is restarted. Here are the property names for
system time-out:
o Engine server: sasds.engine.execution.system.timeout.ms
o Design server: sasds.designserver.test.system.timeout.ms
n Use the Decision Services Manager plug-in of SAS Management Console to
set the time-out value at the event level.
n The flow time-out value supersedes the event and system time-out values.
Use the SAS Customer Intelligence Plug-in for SAS Management Console to
set the time-out at the flow level.
Note: Specify all time-out values in milliseconds.
If a sub-flow is called, then the time-out value of the top-level flow or event is
used. If the time-out values of the flow or the event are not specified, then the
system time-out value is used.
Set the event time-out value by using the Decision Services Manager plug-in for
SAS Management Console. To set the time-out value for an event, follow these
steps:
3 Right-click the event that you want to change, and select Set Timeout.
86 Chapter 3 / Setting Up the Environment
4 Select Enable to edit the time-out value, enter the value in milliseconds, and
click OK. If Enable is cleared, then the time-out value for the event is
disabled.
Greenwich Mean Time (GMT) before you run the campaign. For information
about setting the time zone for a campaign, see SAS Real-Time Decision
Manager User’s Guide.
To specify what folders the SAS server can write to, modify the
autoexec_usermods.sas file by creating (or adding the folder to) an entry in the
following form:
88 Chapter 3 / Setting Up the Environment
lockdown path=
"<sas-configuration-directory>\Lev1\Applications\SASDecisionServicesServerConfig\
DS2Conversion\design";
Monitoring
You can use the SAS Decision Services Monitor to query activity hit counters
and execution performance statistics. The Monitor also controls production batch
execution, and provides access to batch job progress, status, and results.
The SAS Decision Services Monitor collects performance statistics from SAS
Decision Services engines, saves them in a database, and supports querying
this data. The following describes the implementation of the SAS Decision
Services Monitor.
SAS Decision Services engines expose the following statistics for monitoring:
n Event counts — The number of times an event is executed.
Note: The maximum length that is supported by SAS data sets is 32767.
2 Create a business context where users can access the sample campaign
and definitions. For more information, see SAS Real-Time Decision
Manager: User’s Guide.
4 On the Folders tab of SAS Management Console, right-click the folder that
contains the business context and select Import SAS Package.
To change the value of a global variable in the SAS Decision Services engine
repository:
2 On the Plug-ins tab, expand Decision Services Manager and the SAS
Decision Services servers folder.
3 Expand the system that contains the global variable that you want to update.
Expand the repository, and select Global Variables.
Customizing the Environment 91
4 Right-click the global variable that you want to change, and click Set Value.
5 Enter the new value and click OK. Use either single or double quotation
marks to indicate a string value.
The global variables in the design repository that are used for testing can be
modified by using the Event category in the Definitions workspace in SAS
Customer Intelligence Studio. For more information, see SAS Real-Time
Decision Manager: User’s Guide.
92 Chapter 3 / Setting Up the Environment
Security Administration
Administering Roles
Overview of Roles
In SAS Customer Intelligence applications, certain actions are available only to
users or groups that have a particular role. A role is a set of capabilities that
correspond to particular application features such as menu items and plug-ins.
Any user or group who is a member of a role has all of that role’s capabilities.
Roles can contribute to one another. A role automatically includes all of the
capabilities of a role that contributes to it. For example, the Customer
Intelligence: Usage role contributes the Edit comments capability to the
Customer Intelligence: Administration role.
Roles differ from permissions. In general, roles do not affect access to metadata
or data.
Here is an example of the Capabilities tab for the initial configuration of the
Customer Intelligence Common: Administrator role:
Figure 3.1 Capabilities Tab for the Customer Intelligence Common: Administrator Role
Security Administration 95
Icon Description
None of the capabilities in this category have been specified for this
role.
Some of the capabilities in this category have been specified for this
role, either explicitly or through a contributing role.
All of the capabilities in this category have been specified for this role,
either explicitly or through a contributing role. To see details, click the
plus sign (+).
Note:
n Shaded check boxes indicate capabilities that come from contributing roles.
n Some roles have implicit capabilities that are not specified on the
Capabilities tab. For more information, see “Predefined Roles for SAS
Customer Intelligence” on page 95.
Capability Description
Allow mark campaign for deployment enables the user to mark a campaign
ready for deployment.
Allow deploy and undeploy campaigns enables the user to deploy and undeploy
selected campaigns in the Deployments
category on the Administration page of
SAS Customer Intelligence Studio.
Allow activate and deactivate campaigns enables the user to activate and
deactivate campaigns in the Deployments
category on the Administration page of
SAS Customer Intelligence Studio.
The following table lists and describes the decision application resources
capabilities in each of the predefined roles. In the User Manager plug-in, SAS
Management Console displays the capabilities on the Capabilities tab in the
Security Administration 97
Properties window for each predefined role. In the Capabilities tab, navigate to
the Applications Customer Intelligence Core 6.5 Decision
Application Resources folder.
Capability Description
Manage decision treatment campaigns enables the user to manage SAS Real-
Time Decision Manager decision
treatment campaigns.
Manage decision campaign sets enables the user to manage SAS Real-
Time Decision Manager decision
treatment campaign sets.
Manage decision treatment campaign enables the user to manage SAS Real-
definitions Time Decision Manager decision
treatment campaign definitions.
Manage decision custom diagram tools enables the user to view, edit, and use
SAS Real-Time Decision Manager custom
diagram tools.
Manage global variables enables the user to view, edit, and use
global variables.
Manage decision Web service processes enables the user to manage web service
processes in SAS Real-Time Decision
Manager.
The following table lists and describes the decision nodes capabilities in each of
the predefined roles. In the User Manager plug-in, SAS Management Console
displays the capabilities on the Capabilities tab in the Properties window for
98 Chapter 3 / Setting Up the Environment
Capability Description
Allow use of advanced nodes enables the user to create and use nodes
with Advanced user permission.
Allow writing code in Process node enables the user to enter code in the
Process node.
The following table lists and describes the decision application resources
capabilities in each of the predefined roles. In the User Manager plug-in, SAS
Management Console displays the capabilities on the Capabilities tab in the
Properties window for each predefined role. In the Capabilities tab, navigate to
the Applications Customer Intelligence Core 6.5 Applications
Resources folder.
Capability Description
Manage custom detail groups enables the user to manage custom detail
groups.
Manage custom detail tags enables the user to manage custom detail
tags.
Manage response definitions enables the user to view, edit, and use
response definitions.
Manage built-in diagram tools enables the user to manage diagram tools
that are supplied with the application.
The following table lists and describes the customer intelligence studio
administration resources capabilities in each of the predefined roles. In the User
Manager plug-in, SAS Management Console displays the capabilities on the
Capabilities tab in the Properties window for each predefined role. In the
Security Administration 99
Capability Description
The following table lists and describes the comments capabilities in each of the
predefined roles. In the User Manager plug-in, SAS Management Console
displays the capabilities on the Capabilities tab in the Properties window for
each predefined role. In the Capabilities tab, navigate to the Applications
SAS Application Infrastructure Comments folder.
Capability Description
The following table lists and describes the reports capabilities in each of the
predefined roles. These capabilities are located in SAS Management Console at
the Applications Cust Intel Report Mid-Tier Application Resources
node.
Capability Description
Capability Description
In the following table, an asterisk (*) indicates that the capability is from a
contributing role.
Log on to X X* X* X* X*
Customer
Intelligence
Applications
Manage X X
decision
campaigns
Manage X X
decision
treatment
campaigns
Manage X X
decision
campaign sets
Edit comments X X* X* X* X*
Delete X X* X* X* X*
comments
View reports X
Manage reports X
Allow use of X
advanced
nodes
Allow writing X
code in Process
node
Allow mark X
campaign for
deployment
Manage X
decision
campaign
definitions
Security Administration 101
Manage X
decision
treatment
campaign
definitions
Manage reply X
definitions
Manage X
decision custom
diagram tools
Manage X
identifiers
Manage global X
variables
Manage X
decision data
processes
Manage X
decision web
service
processes
Manage X
decision SAS
processes
Manage X
treatments
Manage custom X
detail groups
Manage X
response
definitions
Manage events X
Manage built-in X X
diagram tools
Manage X
channels
Manage X
information map
metadata
Manage staged X
treatments
102 Chapter 3 / Setting Up the Environment
Manage custom X
processes
Manage X
promotion
Allow manage X
remote
deployment
environments
Allow deploy X
and undeploy
campaigns
Allow activate X
and deactivate
campaigns
Allow repository X
maintenance
Manage X
business
contexts
Manage user X
sessions
Manage locks X
Manage X
environment
settings
Modifying Roles
The User Manager plug-in in SAS Management Console enables you to modify
roles by selecting or deselecting different capabilities.
CAUTION! No automated method can revert a role to its original set of
capabilities. Instead of adjusting the capabilities of a predefined role, consider
creating a new role. This advice is especially important if major changes are needed.
If you modify a role, then follow these best practices:
n Do not rename the predefined roles. Renaming the predefined roles makes it
difficult for SAS Technical Support to help you resolve problems.
n Back up the metadata server before modifying roles, and keep a record of
the changes that you make.
When modifying a role, you can use only the capabilities that already appear in
User Manager. You cannot create new capabilities.
For more information about roles and how to modify them, see SAS Intelligence
Platform: Security Administration Guide at http://support.sas.com/
documentation/onlinedoc/intellplatform/index.html.
Administering Groups
Overview of Groups
Groups enable you to give multiple users membership in a role or permissions to
metadata, thus simplifying security administration. You can create as many
groups as are needed in order to manage your installation. In order to manage
administration resources such as business contexts, user sessions, and
environment settings, a user must be a member of the Customer Intelligence
Common Administrator group.
Note: The user interface displays only groups that are created with the
Customer Intelligence Usage: Role.
This section describes the groups that are provided in your initial installation.
Public Group
This group includes everyone who can access the metadata server, either
directly or through a trust relationship. If a user is able to log on to a client
application but does not have an individual SAS identity, the user is assumed to
be in the public group. Because this group has implicit membership, you cannot
explicitly add or remove users from this group.
104 Chapter 3 / Setting Up the Environment
database through SAS Federation Server. For more information about this
group, see SAS Customer Intelligence: Deployment Guide.
The SAS Decision Services Database Users group is a member of the
Federation Server Administrators group. For more information about the
Federation Server Administrators group, see “The Administrator Account and
Federation Server Administrators Group” in SAS Federation Server 4.2:
Administrator’s Guide.
If SAS Decision Services was configured to connect to a third-party database, a
shared login will be defined on the Accounts tab of the SAS Decision Services
Database Users Properties window. This shared login account will be used for
connecting to the database through SAS Federation Server. For more
information about shared logins, see “Shared Logins” in SAS Federation Server
4.2: Administrator’s Guide. A login is also defined for General I/O database
connections.
The SAS Trusted User and the SAS Federation Server System User are added
to the SAS Decision Services Users group during configuration.
Administering Permissions
Permissions
SAS provides a metadata-based authorization layer that supplements the
protections from the host environment and other systems. Protections are
cumulative across authorization layers. In order to perform a task, a user must
have sufficient access in all of the applicable layers.
Although permissions can be assigned to individual users, it is recommended
that you assign permissions for groups and then place users in those groups.
Placing users in groups with previously assigned permissions decreases the
work of maintaining your permissions structure and helps you avoid orphaned
objects for which no users have permissions.
You can set permissions at several levels:
n Repository-level controls provide the default access controls for objects that
do not have other access controls.
n Resource-level controls manage access to a specific item such as an
information map, a campaign, a node, a business context, or a folder. The
controls can be defined individually by using explicit settings or in patterns by
using access control templates.
n Fine-grained controls affect access to subsets of data within a resource. You
can use these controls to specify who can access either particular rows
within a table or members within a cube dimension.
The effect of a selected permission setting is influenced by any related settings
that have higher precedence. For example, if a campaign inherits a permission
from its parent folder but also has an explicit denial, then the explicit setting
determines the outcome. Similarly, if a group has been granted a permission,
and a user who is a member of the group has an explicit denial, then the explicit
setting determines the outcome.
Most permissions are set by using the following methods:
n The access control template (ACT), which provides a set of default
permissions.
Security Administration 107
3 On the Permission Pattern tab of the Properties window, click Add to add a
user name.
4 Select the new user name, and select the following permissions:
n ReadMetadata
n WriteMetadata
n WriteMemberMetadata
n ManageMemberMetadata
n ManageCredentialsMetadata
n CheckInMetadata
n Read
n Write
n WriteMetadata
n WriteMemberMetadata
1 On the Folders tab of SAS Management Console on the target system, right-
click SAS Folders, and select Properties.
2 On the Authorization tab of the Properties window, click Add to add a user
name.
3 Select the new user name, and select the following permissions:
n ReadMetadata
n WriteMetadata
n CheckInMetadata
2 Click the button to indicate agreement and display the configuration page.
4 Double-click network.automatic-ntlm-auth.trusted-uris.
before the Design Repository JDBC connections to the SAS Federation Server
using the com.sas.tkts.TKTSDriver driver are functional.
2 In the User Manager plug-in, create a new user with Internal login
credentials.
5 On the Groups and Roles tab, add this new user to the SAS Decision
Services Database Users group and the SAS Federation Server
Administrators group.
7 Open the SAS Decision Services Database User group for editing.
11 Enter SASDSFED_AUTH for the domain Name and check the Outbound
only check box.
13 On the New Login Properties dialog box, select this new domain to associate
with the new login.
15 Click OK again to save the change to the SAS Decision Services Database
Users group.
16 Click the Folders tab in the SAS Management Console and navigate to
System/Applications/SAS Decision Services/Decision Services
6.4/SASDSDesignRepository.
19 Click OK to save the change and click OK when the Warning is displayed.
20 Make this change to any resource associated with a Design repository that
uses the com.sas.tkts.TKTS driver. These changes are not required for the
SAS Decision Services Engine resources.
Password Updates
SAS Spawned Server Used by activity This is updated automatically when Update Passwords
Account publishing. is selected from SAS Deployment Manager.
Decision Services Web Used to store monitor, This is updated automatically in the SAS_Server_7
Infrastructure Platform user, and batch tables. application server data source and the Web
Data Server user Used in the SAS Infrastructure Platform Data Server when Update
account Decision Services Passwords is selected from the SAS Deployment
system resource. Manager.
Update $User_Log_JDBCConnectionResource using
SAS Management Console or the SAS Decision
Services UpdateResource utility. For more information
about the UpdateResource utility, see SAS Customer
Intelligence: Deployment Guide.
Security Administration 113
WS-Security Integration
Overview
WS-Security secures the message transmission between SAS Customer
Intelligence and the SAS Decision Services engine. The use of WS-Security with
SAS Decision Services is optional. Any of the three implemented aspects of WS-
Security can be used alone or can be specified in conjunction with any
combination of the other aspects. The following aspects have been
implemented:
Timestamp
The message is marked by the sender with creation and expiry timestamps,
which the receiver validates. The SAS Decision Services web service can be
configured to validate the request message with the expiry timestamp, as
well as an offset from its own clock. It can also set timestamps on the reply
message. This mechanism is used to prevent replay or "man-in-the-middle"
attacks.
Signature
Message signing is implemented by the sender signing the message using
its private key and the receiver decrypting it using the trusted or public key of
the sender's key. This is true for both request and response messages. The
server needs to access the trusted key of the client's private key, and the
client needs access to the trusted key of the server's private key. Frequently,
the public keys might have to be certified by a certificate authority.
Encryption
This is implemented by using a symmetric key that travels with the message.
The key is encrypted by the sender, using the trusted key of the receiver
(opposite of signing). Like with the signature, this mechanism is true for both
request and response messages. The sender can send only to a received
whose trusted key is available to the sender. All passwords can also be
sas002 encoded.
Implementation
The SAS Decision Services web service is implemented as a Java web
application. WS-Security is implemented using Apache WSS4J. The WS-
Security implementation can be configured and customized by setting the
appropriate values for system properties. Not all features of Apache WSS4J are
exposed or configurable.
To configure some of the features, private and trusted keys are required. These
keys are held in keystores. Sometimes it is convenient to hold the private and
trusted keys in separate stores. A keystore holding only trusted keys is also
known as a truststore. The JRE implementation contains a truststore called
CACerts that is used by default.
As part of setting up WS-Security, public and private keys must be created,
certified by certificate authorities, and distributed among the client and server
keystores, as per your IT policies.
114 Chapter 3 / Setting Up the Environment
Configuration
The following system properties can be used to configure the WS-Security
implementation in the SAS Decision Services engine web service:
Note: All passwords can be sas002 encoded.
Encrypt Key The keystore containing key used for Points to the CACert in
Store decrypting incoming messages. the JRE.
The user name for encryption. The sasds.ws- If this parameter is not
encryption function uses the public security.securementEncr set, then the encryption
key of this user's certificate to yptionUser function falls back to the
encrypt the generated symmetric sasds.ws-
key. If only the encryption of the security.securementUser
SOAP body data is requested, it is name property to get the
recommended to use this parameter certificate.
to define the user name.
sasds.ws- NoSecurity
security.validationActions
sasds.ws- NoSecurity
security.securementActio
ns
These properties can be set by defining them in the SAS Management Console
Configuration Manager plug-in for SAS Decision Services. In SAS Management
Console, locate the properties for SAS Decision Services Engine under
Application Management Decision Services Engine Server 6.4. On the
Advanced tab, add or update the properties that you need to set. For example,
you could define a property with a name of sasds.ws-
security.securementEncryptionKeyIdentifier and a value of X509KeyIdentifier
Tools
For most implementations, it is required to create keystores with private and
public key pairs in them, and then distribute them in other keystores. KeyTool is
a command-line utility distributed with a JRE. Here are some common
commands that are useful when setting up keystores for WS-Security:
keytool -genkeypair -alias <key name> -keyalg <key algorithm> -sigalg
<signature algorithm> -validity <days> -key store <key store name>
Generates a private and public key pair in the keystore. It also creates a new
keystore if it does not exist.
keytool -list -v -key store <key store name>
Lists keys in the keystore.
keytool -export -alias <key name> -key store <key store name> -rfc -file
<certificate file name>
Exports the public key from the keystore as a self signed certificate, for
import into a truststore.
keytool -certreq -alias <key name> -key store <key store name> -file <certificate
request file name>
Generates a certificate request for sending to a certificate authority.
keytool -import -alias <key name> -file <certificate file name> -key store <trust
store name>
Imports the certificate into the truststore.
System Resources 119
System Resources
Overview
System resources enable decision flows to access and interact with resources
such as SAS servers, database servers, or external web services. Activities
reference the system resources by name.
For example, many activities run a SAS DS2 program to produce results. The
middle tier portion of these activities must communicate with a SAS Federation
Server. A system resource type named JDBC Connection provides the
information that is needed to facilitate such communications. More specifically,
the JDBC Connection system resource contains information that is needed by a
SAS activity to execute a DS2 program running on the SAS Federation Server.
Also, a different JDBC Connection system resource is used to connect to
database servers for use in a data process. When you are accessing database
tables other than SAS data sets, these resources point directly to the database
using the database’s native JDBC driver.
The web service system resource is often used to connect to external web
services. By providing the end point URL, SAS Decision Services can use the
web service that is pointed to.
The HTTP system resource is used for exchanging information between SAS
Decision Services and SAS 360 Discover.
Activities use a name to reference system resources instead of containing the
resource information directly. Thus, flows are portable between systems. The
product supports configurable design, test, and production environments.
Typically, the sets of back-end SAS servers that are used by development, test,
and production environments are different. System resources enable the correct
set of servers to be used in each environment without modification of flows or
activities. That is, each environment contains system resources that have the
same names. However, the information that is contained by these system
resources differs from environment to environment.
$SAS_Activity_Resource
Configured to reference a SAS Federation Server for the purpose of executing
SAS activities. SAS activity code is contained in DS2 packages. By default,
these DS2 packages are stored in SAS data sets. It is possible to reconfigure
the system to store activity DS2 packages in a third-party database, if you so
choose. Contact your SAS on-site support personnel for assistance.
Note: Scoring models and business rules are published as SAS activities.
For more information, see SAS Federation Server: Administrator’s Guide.
120 Chapter 3 / Setting Up the Environment
GeneralIO_Activity_Resource
Configured to reference a third-party database management system for the
purpose of storing and accessing data. By default, this system resource is
configured to reference the database that was chosen during configuration. Also,
by default, the General I/O activity is configured to use this system resource.
$User_Log_JDBCConnectionResource
Configured to reference a third-party database management system for the
purpose of logging performance data. For more information, see “Data
Collection for Performance Analysis” on page 283. By default, this system
resource is configured to reference the third-party database that was chosen
during configuration.
requests to a SAS Federation Server over the network. Requests to a local SAS
Federation Server balances the load distribution more evenly between the
instances of the SAS Federation Servers because the internal load balancing
does not consider the load of servers. Load balancing across all SAS Federation
Server instances over the network can cause an uneven load on the servers.
It is also recommended to run at least two instances of SAS Federation Server
instances that are co-located with the engine JVM for the following reasons:
n The external load balancer for the engine JVMs might send requests to an
engine with a failed SAS Federation Server unless it monitors the status of
the SAS Federation Servers by default. If there at least two instances of SAS
Federation Server, requests can be successfully sent to an engine with a
working SAS Federation Server instance even when another instance is
failing.
n A SAS Federation Server instance can handle only a finite number of
connections. If performance tuning requires a very large connection pool for
the SAS Federation Server, one instance of SAS Federation Server might be
insufficient. When there are high parallel connection rates, a single instance
of SAS Federation Server will consume all available memory and crash.
Alternatively, each middle-tier engine can be co-located with one SAS
Federation Server. This deployment choice has the advantage of reducing calls
across a network. It also simplifies the process of scaling up by adding servers,
in that it does not require the analysis of middle-tier versus server-tier workloads.
The following types use the JDBC Connection system resource:
n SAS Activity
n Data Process
The value in the user name entry in the system resource is used to determine
the credentials to connect to the server. The system first attempts to match the
value with a SAS Server definition in the SAS Metadata Repository. The
following scenarios are dependent on whether a match is found:
n If there is a match, the authentication domain that is associated with the
server is used to select the login information that is available to the user. The
login information is used to connect to the server that is referenced by the
system resource. The password entry in the system resource is ignored.
n If the user name does not match any server name, the system searches the
available login options of the user for one that has an authentication domain
that matches the user name entry. The first such login information to match is
used to connect to the server that is referenced by the system resource. The
password entry in the system resource is ignored. If no match is found, the
system reverts to using the user name and the password to connect to the
server.
Note: If a match is found, the system uses the credentials that are associated
with the first match. If the credentials are incorrect or invalid, the system does
not try to use other possible matches.
It is recommended that you create a group and assign all users who need
access to the resource to it. The login information for the appropriate domain
should be created for the group and not individual users. Separate groups can
be created for the SAS Federation Server, databases, engine server usage,
design server usage, and others, as required.
Here is an example of using the enhanced password encryption:
4 Restart the SAS Decision Services web applications. Verify that the SAS
Decision Services Engine and design servers can connect to the SAS
Federation Server by viewing the diagnostics page.
System Resources 123
Use the same process to encrypt passwords for other JDBC connection
resources that are connecting to other services. If your database server is not
defined in the SAS Metadata Repository, you can create the domain when
assigning it to the group, and enter the name of the domain in the User Name
field of the system resource.
The terms and definitions that follow are also listed in the Help for this dialog
box.
Name
specifies the name of the system resource. It has a 60-character maximum
length. Spaces are allowed.
Description
(optional) might include the SAS activity or server cluster for which you plan
to use this SAS connection. Description has a 200-character maximum
length.
Driver Class
specifies the Java class name of the database or SAS Federation Server
driver. To create a resource for accessing database tables, use the class
name of the driver that is provided by your database vendor. If you are
unsure of what driver class name to use, see your system administrator.
DB2 com.ibm.db2.jcc.DB2Driver
Greenplum org.postgresql.Driver
124 Chapter 3 / Setting Up the Environment
Netezza org.netezza.Driver
Oracle oracle.jdbc.driver.OracleDriver
PostgreSQL org.postgresql.Driver
Teradata com.teradata.jdbc.TeraDriver
Server URL
is a database URL of the form jdbc:subprotocol:subname. See your system
administrator for the URL that references your database installation. To
create a system resource for executing DS2 activities, use the URL form
jdbc:sastkts://host:port, where host and port reference your SAS Federation
Server installation.
If this system resource is used for executing SAS activities, and if you have
more than one SAS Federation Server in your environment (recommended),
then place the host’s file alias on each SAS Federation Server instance and
then enter the alias in this field. For more information, see “Best Practices for
SAS Decision Services Performance and High Availability” on page 24.
Database URL*
Oracle jdbc:oracle:thin:@//<server>:1521/
<database>
For example: jdbc:oracle:thin:@//
machine1.unx.sas.com:1521/sasds
Teradata jdbc:teradata://machine1/
DB2 jdbc:db2://<server>:5000/<database>
For example: jdbc:db2://
machine1.na.sas.com:50000/sasds
Greenplum jdbc:postgresql://<server>:5432/
<database>
For example: jdbc:postgresql://
machine1.unx.sas.com:5432/sasds
Netezza jdbc:postgresql://<server>:5480/
<database>
For example: jdbc:netezza://
machine1.unx.sas.com:5480/SASDS
System Resources 125
Database URL*
PostgreSQL jdbc:postgresql://<server>:5432/
<database>
For example: jdbc:postgresql://
machine1.na.sas.com:5432/SASDS
* You must use a backslash (“\”) as an escape character when you use special characters in
the URL. For example, if you want to use a URL such as jdbc:sqlserver//
[machine1.na.sas.com]\instancename, where “\” is a special character, you must enter
jdbc:sqlserver//[machine1.na.sas.com]\\instancename.
Connection Options
(optional) use this field to create a resource for executing DS2 activities. The
connection options should be in the form of
DRIVER=TSSQL;CONOPTS=(DSN=FederationServerDSN).
For direct-to-database connections, see the documentation for the specific
database, to determine what options are available. With direct-to-database
connections, the connection options are optional.
User Name
(optional) is used to connect to the database or SAS Federation Server that
is specified in Server URL.
Password
(optional) is the password that is used to connect to the database or to the
SAS Federation Server that is specified in Server URL, along with the user
name.
Domain
(optional) is used to connect to the database or SAS Federation Server that
is specified in Server URL.
Note: The defined Domain can be added to the Accounts tab for the SAS
Decision Services Database Users group so that all members of the group
can access the database or SAS Federation Server.
Server
(optional) is used to connect to the database or SAS Federation Server that
is specified in Server URL.
(optional) Click Advanced to access connection and statement pool tuning
controls. For more information, see “JDBC Performance Tuning” on page 286.
The terms and definitions that follow are also listed in the Help for this dialog
box.
Name
specifies the name of the system resource. Name has a 60-character
maximum length; spaces are allowed.
Description
(optional) might specify the web service activity that you plan to use this
system resource for. Description has a 200-character maximum length.
WSDL URL
(required) specifies the URL of the target web service. If the WSDL URL
begins with https, then the User Name and Password fields are also
required.
Note: You must enter a valid URL for the WSDL. If the URL contains spaces
and other disallowed characters, they must be encoded.
Host
(optional) specifies the proxy server that forwards client requests to other
servers. See your system administrator for whether your installation uses a
proxy server, and if so, what host name you should use.
Port
(optional) specifies the port that is used by the proxy server.
User Name
If the WSDL URL begins with https (indicating that security is enabled),
then this field specifies your user name.
Password
If the WSDL URL begins with https (indicating that security is enabled), this
field specifies your user password.
After you click OK, the new Web Service Connection system resource should
appear in the repository.
The terms and definitions that follow are also listed in the Help for this dialog
box.
Name
specifies the name of the system resource. The name must be unique
among the system resources.
Library Resources 127
Description
specifies additional information about the system resource. Description has a
200-character maximum length.
URI
a URI that follows the HTTP or HTTPS scheme. The URI references the
server that this resource communicates with.
To configure the properties that are associated with this system resource click
Advanced.
Library Resources
Overview
Library resources provide two distinct capabilities:
n To define alias names for database schemas
Note: Both of these features are optional and can be used together or
separately.
1 Select Library.
Description
(optional) might describe the schema referenced by this library resource.
Description has a 200-character maximum length.
Schema Name
the actual schema name defined to the database. Description has a 200-
character maximum length.
Connection Resource
select the JDBC Connection system resource from the drop-down list,
which references the database with the desired schema.
Managing Databases
Overview
SAS Web Infrastructure Platform Data Server is included in your deployment for
use as transactional storage by SAS Decision Services software. The server is
based on PostgreSQL 9.x. The server is configured specifically to support SAS.
In a SAS Decision Services deployment, the server is configured to manage the
DecisionServices database.
This database contains user and audit logs, and batch job execution and
monitoring data that is generated by SAS Decision Services Monitor.
Table 3.13 JDBC Connection Parameters for SAS Web Infrastructure Platform Data
Server
These settings are configured during initial deployment. However, note the
connection information so that you can supply it if you make changes later, such
as moving the server to another host system.
Note: You must specify the user name and password values as required to
access the data source. For more information, see “Create a Database Shared
Login and Domain for the JDBC Connection Resource” on page 142.
These settings are represented in SAS Web Application Server in the SAS-
config-dir\Levn \Web\WebAppServer\SASServer7_1\conf\server.xml
file:
<Resource auth="Container" driverClassName="org.postgresql.Driver"
factory="com.sas.vfabrictcsvr.atomikos.BeanFactory" maxPoolSize="100"
minPoolSize="10" name="sas/jdbc/DecisionServices"
password="${pw.sas.jdbc.DecisionServices}"
testQuery="select 1 from monitor.dcsv_topology"
type="com.atomikos.jdbc.nonxa.AtomikosNonXADataSourceBean"
uniqueResourceName="sas/jdbc/DecisionServices"
url="jdbc:postgresql://hostname.example.com:9432/DecisionServices"
user="DecisionServices"/>
Database Requirements
For information about database requirements, see SAS Federation Server:
Administrator’s Guide.
Overview
During installation, standard SAS Decision Services deployments are configured
for access to one third-party database management system and for access to
SAS data sets. (Optional) Access to additional third-party database
management systems can be configured.
Note: These instructions assume that the additional database is to be used for
data storage and access only, and not for use by SAS Federation Server to read
DS2 packages.
Note: It is possible to access databases through a SAS Federation Server.
However, doing so results in degraded performance. Instead, configure SAS
Decision Services to use the native JDBC driver provided by your database
vendor.
Your installation might include one or more development, test, or production
environments. Repeat the procedures described in this section for each
environment that you want to add the additional database to.
Defaults
Database Host:
Database Port:
Database Name:
Database Password:
Overview
To change the database selection for SAS Decision Services, you must install
the required database management system client software on each SAS
Federation Server and the SAS Server. For more information, see the
installation documentation for the specific database.
Oracle
Add an entry into your TNSNAMES.ORA file and change the values that are
shown in brackets to suit your environment. SAS uses addressname to connect
to the database. SAS Federation Server and the JDBC connection system
resources use sid to connect to the database. When defining this entry, define
the addressname and the sid as the same value.
<addressname>=
(DESCRIPTION=
(ADDRESS_LIST=
(ADDRESS= (PROTOCOL=TCP) (Host=<hostname>)
(Port=<port>)))
(CONNECT_DATA=
(SERVICE_NAME=<sid>)
))
3 Select the driver that corresponds to your database, and click Finish.
SQL Server
Data Source Name
Enter the data source name.
Description
This is optional.
Server
Enter host for the SQL server database.
With SQLServer Authentication
Enter user ID and password.
You can change default database
This is optional
You can change the log location
This is optional.
Select Test Data Source
Select the data source.
DB2
Data Source Name
Enter the data source name.
Description
This is optional.
Database Alias
Select ADD.
Data Source tab
Enter the user ID and password.
TCP/IP tab
Enter the information for each field.
In UNIX or Linux, use the interactive ODBC Configuration Tool, dfdbconf, to add
new data sources to the ODBC configuration.
2 Select A to add a data source. You can also use dfdbconf to delete a data
source.
3 Select a template for the new data source by choosing a number from the list
of available drivers.
4 You are prompted to set the appropriate parameters for that driver. The new
data source is then added to your odbc.ini file.
After you have added all of your data sources, the interactive ODBC Viewer
application, dfdbview, can be used to test your connection, as shown in the
following example:
./bin/dfdbview my_odbcdsn
query the database. If the connection fails, SAS Federation Server displays error
messages describing the reasons for the failure.
General Steps
To complete the database selection change after you have completed the
database-specific steps:
1 Re-create the batch, monitoring, and user log tables in the new database.
The scripts for each table are located in the install directory of the SAS
Decision Services server configuration. The path is Program Files
\SASHome\SASDecisionServicesServerConfiguration
\6.4\Configurable.
2 Copy the new JDBC JAR files into the SASServer7_N application server lib
directory.
5 Enable Shared Login for the SAS Decision Services Database Users group
on the generated DSN.
6 From the Decision Services Manager plug-in for SAS Management Console,
edit a system resource to point to the new database DSN.
1 Re-create the batch, monitoring, and user log tables in the new database.
The scripts for each table are located in the install directory of the SAS
Decision Services server configuration. The path is Program Files
\SASHome\SASDecisionServicesServerConfiguration
\6.4\Configurable.
2 Copy the new JDBC JAR files into the SASServer7_N application server lib
directory.
5 Enable Shared Login for the SAS Decision Services Database Users group
on the generated DSN.
6 From the Decision Services Manager plug-in for SAS Management Console,
edit the $SAS_Activity_Resource system resource to point to the new
database DSN.
QUIT;
8 Add the new database DSN as the default DSN, by making it the first DSN
on the list. To do this, remove BASE_DSN, and add the new database DSN.
Then, add the BASE_DSN back again.
9 Modify the connection lib of the tap packages that are in the
loadutilpackages.sas program to point to the new database DSN.
Managing Databases 135
10 In SAS Customer Intelligence Studio, test a publish of the DS2 code and
verify that a connection to the database occurs.
1 Stop the application server where the SAS Decision Services monitor is
located (such as SASServer7_1).
4 On the SAS Decision Services Engine Server, locate the corresponding SQL
files for the database that you are migrating to. Navigate to <SASHome>
\SASDecisionServicesEngineServer6.4/Config\Deployment\Data
\<database>, and copy the SQL files to a location on the target database
server.
If the schema name has been changed from the default “monitor,” update the
SQL file with the new schema name.
5 Using the appropriate database vendor SQL utilities, execute the create-
dcsv-tables-manual.sql file to load tables.
6 Edit the data-topology.sql file to include the SAS Decision Services Engine
host name (fully qualified domain name or IP address) and port, and then
execute this SQL file. The default contents of this file are as follows:
INSERT INTO monitor.DCSV_TOPOLOGY
values ('@hostname.domain@', @engine.port@);
136 Chapter 3 / Setting Up the Environment
7 If you have decided to change the schema name, then update the
sasds.data.schema and sasds.engine.user.log.schema properties to use the
new name. To update the properties:
e Locate the sasds.data.schema property in the list and change the schema
name to use the name that you have chosen. Here is an example of the
property with the default setting:
8 On the middle-tier server, navigate to the server.xml file for the application
server where SAS Decision Services Monitor is running. By default, this file is
located in SASServer7_1 under the <SAS-configuration-directory>/
Lev1/Web/WebAppServer/SASServer7_1/conf directory. Open the server.xml
file for editing. In the server.xml file, locate this resource:
<Resource auth="Container" driverClassName="org.postgresql.Driver"
factory="com.atomikos.tomcat.NonXABeanFactory" maxPoolSize="100" minPoolSize="10"
name="sas/jdbc/DecisionServices" password="${pw.sas.jdbc.DecisionServices}"
testQuery="select 1" type="com.atomikos.jdbc.nonxa.AtomikosNonXADataSourceBean"
uniqueResourceName="sas/jdbc/DecisionServices"
url="jdbc:postgresql://hostname.domain.com:9432/DecisionServices"
user="DecisionServices"/>
Managing Databases 137
a Modify the driverClassName to use the driver of the database that you
have chosen to migrate to. Your choices are:
DB2 com.ibm.db2.jcc.DB2Driver
Greenplum org.postgresql.Driver
Netezza org.netezza.Driver
Oracle oracle.jdbc.driver.OracleDriver
PostgreSQL org.postgreqsl.Driver
Teradata com.teradata.jdbc.TeraDriver
b In the JDBC URL string, modify the host name to point to the host and
port of the database server. For example, if you have chosen to manually
configure SAS Decision Services to use a different database, then the
URL string would look similar to this example:
url=”jdbc:oracle:thin:@//oraclemachine1.example.com:1521/<database>”
10 Launch the SAS Deployment Manager to change the password for the
DecisionServices database.
d Enter the password of the web infrastructure database user. Click Next.
e Select the DecisionServices user ID in the User IDs list. Click Next.
f Enter the new password. Click Next. Allow the SAS Deployment Manager
to complete, and then close the application.
138 Chapter 3 / Setting Up the Environment
11 On the middle tier server, copy the database vendor JDBC JAR file (or if
applicable to your database server, multiple files) into the <SAS-
configuration-directory>\Lev1\WebAppServer\SASServer7_n\lib
directory.
12 Restart SASServer7_1, and make sure that you can log on successfully.
1 In SAS Customer Intelligence Studio, open the Properties window for the
business context. The reporting library for the business context is identified in
the Common data model libref field on the Settings tab.
Creating Reporting Catalogs 139
2 In SAS Management Console, right-click the library name in the Data Library
Manager plug-in and select Display LIBNAME Statement.
Figure 3.4 Display LIBNAME Statement
3 Note the libref value in the LIBNAME statement. You will use the libref value
when you create the catalog in SAS Federation Server.
Figure 3.5 Libref Value “CIORA” in LIBNAME Statement
140 Chapter 3 / Setting Up the Environment
Note: Schema names are case-sensitive. For SQL Server, the libref value
should be the database name.
3 Right-click the SAS Decision Services Database Users group and select
Properties.
a Click New.
v In the New Authentication Domain dialog box, enter the name for the
new domain.
a Click New.
i Enter the user ID for the login to the database that you used in Step
5b.i on page 140.
iv In the New Authentication Domain dialog box, enter the name for the
new domain.
Note: If you are creating a shared login and domain for SAS Federation
Server, the authentication domain must be in this format:
<data_service_domain>@SASDS where <data_service_domain> is the
domain name and SASDS is the shared login key that is already
configured on SAS Federation Server for use with shared login groups.
3 Right-click the SAS Decision Services Database Users group and select
Properties.
5 Click New.
e In the New Authentication Domain dialog box, enter the name for the new
domain.
Business Contexts
Click to create the business context. For more information, see SAS Real-
Time Decision Manager: User’s Guide.
When you sign out from SAS Customer Intelligence Studio, all business contexts
that have not been modified are automatically saved.
Node permissions are set separately from the business context permissions. For
more information, see SAS Real-Time Decision Manager User’s Guide.
To add a user to the list, click and select a user. To add a group to the list,
click and select a group.
n use familiar business names to label folders and data items instead of using
database tables and fields directly
n pre-define joins among the data tables that you use
Join Tables
Include the following basic tables:
n the CUSTOMER table from your marketing Data Mart (or another primary
Subject table that has an identifier to join with the CUSTOMER_ID field of the
Customer Intelligence Common Data Model)
n the CI_RESPONSE_HISTORY table from the Customer Intelligence
Common Data Model database
n the CI_CONTACT_HISTORY table from the Customer Intelligence Common
Data Model database
n the CI_PRESENTED_TREATMENT_HISTORY table from the Customer
Intelligence Common Data Model database
Creating an Information Map 147
Join these tables by using the CUSTOMER_ID field from the history tables and
the primary key for customer from your CUSTOMER table.
Save the information map to a directory in metadata. For example, you might
save the information map as /Shared Data/Customer Intelligence/
BusinessContexts/Telco/RDMTelcoMap
To add custom properties to a SAS Information Map at the map level, folder
level, or data item level:
4 If an Untitled1 row is not already displayed, then click Add to create a new
row. Otherwise, click in the right side of the Untitled1 cell to view the drop-
down list of custom properties that are available, and select a custom
property.
Creating an Information Map 149
6 After you enter the name, description, and value for a new custom property,
click within a header cell to remove the highlighting from the new row. If you
click OK while any part of a row is highlighted, then the changes in that row
are not saved.
7 Add the custom properties that are required for the map level. For more
information, see “Custom Properties (Map Level)” on page 151.
8 To exit and save the new custom properties, click a heading cell or an
existing row to remove the highlighting from any attribute, and then click OK.
2 On the Advanced tab in the Options dialog box, select the Custom
properties at start-up check box.
3 Specify the MAtemplate.txt file. The file is installed on the SAS server tier.
On UNIX, the typical location is /local/install/SASServer/SASHome/
SASFoundation/9.4/misc/ma.
150 Chapter 3 / Setting Up the Environment
n CUSTOMER table (or the equivalent subject table from your marketing Data
Mart)
n History Tables
o Contact_History
o Responses
o Presented_Treatments
Note: You must manually add Presented_Treatments to your custom
properties because Presented_Treatments is not included in the custom
properties template.
SAS Customer Intelligence Studio uses these custom properties to determine
the prompts to show you when you are configuring history storage details for
your business context. After you create the information map and save your
changes, enter the path to your map’s metadata directory in the Information
Map tab of your business context in SAS Customer Intelligence Studio.
Creating an Information Map 151
Table 3.15 Custom Properties (Map Level) That Are Related to Subject
DataSetOptions_ engine sets the data set options for the DataSetOption no
specified engine. This setting s_
applies to all of the tables that ORACLE=orhin
access data through that engine. ts=’/* */”
4
Integrating with the Customer
Channel
Integrating with the Customer Channel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
Integrating with the Customer Channel through SOAP . . . . . . . . . . . . . . . . . . . . . 153
Retrieve a WSDL File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
Integrating with the Customer Channel through the REST API . . . . . . . . . . . . . . 158
Post-installation Steps for REST API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
Integrating with the Customer Channel through the Client API for Java . . . . . . 159
Integrating with External Web Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
Header fields
<rtdm:Identity>100</rtdm:Identity>
<rtdm:ClientTimeZoneID>Antarctica/South_Pole</rtdm:ClientTimeZoneID>
Because requests to SAS Decision Services can originate from multiple time
zones, ClientTimeZoneID is a required field in the SAS Decision Services
header. Time zone names from the public domain time zone (TZ) database are
Integrating with the Customer Channel 155
accepted. The public domain time zone database is maintained by the Internet
Assigned Numbers Authority, available at http://www.iana.org/time-zones. The
value in the optional Identifier field in the SAS Decision Services header is used
as an identifier for the request message in logs.
Every web service stack has client tools that can be used to generate both stubs
and helper classes that call particular web services. These toolsets take a web
service's WSDL file as input and generate the stubs and helper classes as
output. Clients can be plain Java or .Net applications or, in a J2EE setting, they
can be J2EE application clients or J2EE web applications themselves. For
information about acquiring the WSDL in SAS Management Console, see
“Retrieve a WSDL File” on page 156.
Here is an example of a response from the SAS Decision Services Engine to a
SOAP request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<EventResponse name="NBO" xmlns="http://www.sas.com/xml/schema/sas-svcs/
rtdm-1.1">
<Header>
<CorrelationId>100</CorrelationId>
<StartTime>2012-04-22T13:16:39.198-04:00</StartTime>
<CompletionTime>2012-04-22T13:16:39.861-04:00</CompletionTime>
</Header>
<Body>
<Data name=“ResponseType">
<String>
<Val>NORMAL</Val>
</String>
</Data>
<Data name="OfferCode">
<String>
<Val>TRT0</Val>
</String>
</Data>
<Data name="OfferImageURL">
<String>
<Val>facebook.jpg</Val>
</String>
</Data>
<Data name="RTC">
<String>
<Val>5400010301</Val>
</String>
</Data>
<Data name="TTC">
<StringArray>
<Val>
<Item>325FD31F193DACB319E314EA6704F915</Item>
</Val>
</StringArray>
</Data>
</Body>
</EventResponse>
</soapenv:Body>
</soapenv:Envelope>
156 Chapter 4 / Integrating with the Customer Channel
Here are the components of a sample response from the SAS Decision Services
Engine to a SOAP request:
Identity value echo
<CorrelationId>100</CorrelationId>
TIP Include the ResponseType reply field to notify the channel if this is a
Normal, Error, or Standard reply. The engine server does not automatically
include information about the type of reply that it is sending back. If the
customer does not fit into any categories that are defined by a branch
node, or if the customer does not meet the filter node criteria, then that
customer will receive a Standard reply. If the execution for the decision
campaign times out before the execution logic has completed, then a
Standard reply is returned. An Error reply occurs if one of the nodes threw
an error. The Normal reply occurs when the execution logic of the decision
campaign has completed. Otherwise, you must navigate to the SAS
Decision Services log to determine the value of the reply.
3 Navigate to the SAS Decision Services repository for which you want to
generate a WSDL.
4 Right-click the web service event in the repository and click Export WSDL.
Integrating with the Customer Channel 157
5 For events that require a reply, select the Request/Reply WSDL Type. For
events that do not require a reply, such as presented treatment histories or
record histories, select the Asynchronous WSDL Type.
6 Modify the default address for your environment. Here is a sample address:
http://localhost:9086/RTDM/Event. The address is determined during the
installation of your software.
8 Click Save.
Figure 4.2 WSDL Created
You can browse your file system to verify that the new WSDL exists.
158 Chapter 4 / Integrating with the Customer Channel
{
"string":"Foo",
"stringArray":["One","Two","Three"],
"boolean":true,
"booleanArray":[true,false],
"dateTime":"2014-05-29T21:49:26.577Z",
"dateTimeArray":["2014-05-29T21:49:26.577Z","2014-05-29T21:56:28.078Z"],
"decimal":3.14,
"decimalArray":[1.1,2.2],
"integer":42,
"integerArray":[1,2],
"table":[
{"metadata":[{"tvar1":"string"},{"tvar2":"boolean"},{"tvar3":"dateTime"},
{"tvar4":"decimal"},{"tvar5":"integer"}]},
{"data":[
["Blah",true,"2014-05-29T21:49:26.577Z",0.5,7],
["Bar",false,"2014-05-29T21:56:28.078Z",3.14,42]]}] }}
1 Find the sas.conf file in the conf folder of the SAS web server installation
<SAS-configuration-directory>\Web\WebServer\conf.
2 Find the two lines of code that define the proxy and reverse proxy for the
SAS Decision Services Engine.
ProxyPass /RTDM balancer://<machine name>.na.sas.com_Cluster7/RTDM
ProxyPassReverse /RTDM balancer://<machine name>.na.sas.com_Cluster7/RTDM
3 Copy these lines of code to a text editor and change the /RTDM on the right
side of the mapping to /SASDecisionServices as follows:
ProxyPass /SASDecisionServices balancer://<machine name>.na.sas.com_Cluster7/RTDM
ProxyPassReverse /SASDecisionServices balancer://<machine name>.na.sas.com_Cluster7/RTDM
4 Paste these modified lines of code directly below the lines mapping /RTDM.
ProxyPass /RTDM balancer://<machine name>.na.sas.com_Cluster7/RTDM
ProxyPassReverse /RTDM balancer://<machine name>.sas.com_Cluster7/RTDM
ProxyPass /SASDecisionServices balancer://<machine name>.na.sas.com_Cluster7/RTDM
ProxyPassReverse /SASDecisionServices balancer://<machine name>.na.sas.com_Cluster7/RTDM
Data Types
The following table lists the supported event parameter types.
FLOAT java.lang.Double
DATETIME javax.xml.datatype.XMLGregorianCalend
ar
STRING java.lang.String
Integrating with the Customer Channel 161
SASDSRequest Interface
Note: The SAS Decision Services Client API for Java cannot be used for
marketing-style campaigns that require treatment tracking codes (TTC) because
the API does not support arrays or tables.
Use the SASDSRequest interface to set or retrieve the values of the request
variables that comprise your Decision Services event. The event, which includes
request and response variable names and types, must be defined in SAS
Decision Services. An event is specified for the SASDSRequest object when it is
created.
Here is an example of using the client API for Java to set or retrieve the values
of the request variables that comprise your Decision Services event:
// get a factory
SADSRequestFactory=getInstance("http://sasbap.demo.sas.com/RTDM/Custom",
"file://path/to/file.properties");
// Populate request
request.setString("in_string", "hello");
request.setLong("in_int", 1L);
request.setDouble("in_double", 1.2);
request.setBoolean("in_bool", true);
request.setXMLGregorianCalendar("in_date",
df.newXMLGregorianCalendar(2012, 05, 05, 12, 00, 00, 00, 300));
// Execute event
SASDSResponse response = request.execute();
Distribution
The SAS Decision Services Client API for Java is distributed as a zip-encoded
file containing a set of JAR files and other files that can be used to build and run
the client application.
n BOOLEAN
n INT
n FLOAT
n DATETIME
n STRING
n ARRAY OF BOOLEAN
n ARRAY OF INT
n ARRAY OF FLOAT
n ARRAY OF DATETIME
n ARRAY OF STRING
Web service activity supports only transport-level security using SSL (HTTPS).
The web service activity uses a Web Service Connection system resource. This
resource contains the URL of the web service to invoke. When you publish a
new web service activity, you bind it to a particular Web Service Connection
system resource. Create your Web Service Connection system resource before
publishing your new web service activity. For more information about the Web
Service Connection system resource, see “Specify a New System Resource as
a Web Service Connection” on page 125.
For information about defining a web process in SAS Customer Intelligence
Studio, see “Defining the Components of Campaigns” in SAS Real-Time
Decision Manager: User’s Guide.
Text String
Integer Int
Double Float
String String
Tables and arrays are passed in and out of the stored process as encoded
strings. An autocall macro, called scencode, is provided to encode these
objects.
BI web service activity supports only transport-level security using SSL
(HTTPS).
164 Chapter 4 / Integrating with the Customer Channel
165
5
Creating Custom Code with DS2
DS2 Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
Default SAS Decision Services 6.4 and SAS Federation
Server 4.2 Configuration Settings for DS2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
Parameter Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
Using the Execute Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
Testing Your DS2 Code with the SAS Federation Server . . . . . . . . . . . . . . . . . . . 167
Create a DS2 Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
Examples of DS2 Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
Create a SAS Process Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
Data Type Mappings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
Out of the Box SAS DS2 Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
Accessing Database Tables from a Custom SAS Activity or
from a Business Rules Node . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
SAS Decision Services Activities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
Tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
DS2 Programming
Overview
DS2 is a SAS programming language for advanced data manipulation. DS2 is
included with Base SAS and includes additional data types, ANSI SQL types,
programming structure elements, and user-defined methods and packages.
Several DS2 language elements accept embedded FedSQL syntax and the run-
time queries can exchange data between DS2 and supported databases. SAS
process nodes can use DS2 code to customize functions in SAS Real-Time
Decision Manager. The efficiency of this custom code can affect the speed and
resource usage of campaigns.
In the first maintenance release of SAS Decision Services 6.4, changes were
made to the following files in the <LevConfig>/Applications/
SASDecisionServicesServerConfig/Utilities directory in the Server tier:
n The sasds_fedserver_sas.sas file includes the following updates:
o add the XSET PLSRCMGTSECURITY FALSE option to the Alter
Server statement
o add a GRANT CREATE TABLE, SELECT, INSERT, DROP TABLE,
EXECUTE ON SERVER TO “SAS Decision Services Database
Users” AS ADMINISTRATOR; statement
o add a GRANT CONNECT ON DSN "&feddsn" TO "SAS Decision
Services Database Users" AS ADMINISTRATOR; statement
(&feddsn represents the base_dsn)
n The createFDSN.sas file includes the Add a GRANT CONNECT ON DSN
<FEDERATED DSN NAME> TO "SAS Decision Services Database
Users" AS ADMINISTRATOR; statement update.
n The sasds_fedserver.sas file includes the Set a group login for the
database DSN: CREATE DSN &dbdsn under &dataservice NOPROMPT
'DRIVER=ORACLE;GROUP=''SAS Decision Services Database
Users''' {OPTIONS (CSO (SHARED, PERSONAL))} AS
ADMINISTRATOR; update.
On the SAS App tier with SAS Decision Services, the <LevConfig>/Applications/
SASDecisionServicesServerConfig/Utilities/sasds_fedserver_sas.sas file
contains the following statements that set the required SAS Federation Server
properties:
n ALTER SERVER {OPTIONS ((XSET SHAREDLOGINKEY SASDS), (XSET
PLSRCMGTSECURITY FALSE))};
n GRANT CREATE TABLE, SELECT, INSERT, DROP TABLE ON SERVER TO
“SAS Decision Services Database Users” AS ADMINISTRATOR;
To enable members of the SAS Decision Services Database Users group to
connect and execute to the data service names (DSNs) for SAS Real-Time
Decision Manager, the following SAS Federation Server option is issued out of
the box by SAS Decision Services: ALTER SERVER {OPTIONS (XSET
PLSRCMGTSECURITY FALSE) };. The SAS Decision Services Database Users
group is also granted CONNECT permission to BASE_DSN and
DSFEDERATEDDSN.
If a user chooses to configure a third-party database out of the box, the
database DSN that is created is set to use a Shared Login and the Shared Login
group will be set to SAS Decision Services Database Users. The Data Service
for the database is also set to use the Authentication Domain that was
configured by Decision Services
Parameter Limitations
Each String parameter that is sent to or received from your DS2 code has a limit
of 32 KB. Within a DS2 process, each list and data grid parameter is serialized
to a single string with a limit of 32 KB. The size of a serialized table or list
depends on the sizes and numbers of the data that it contains and the number of
record and field separators. Therefore, avoid very large tables because they
DS2 Programming 167
method execute(
package tap_sqltable Treatments,
package tap_sqltable Treatments_Custom,
package tap_sqltable Treatments_Custom_List,
int Arbitration_Count,
in_out package tap_int_array Treatments_Order );
dcl int count;
Treatments_Order.clear();
168 Chapter 5 / Creating Custom Code with DS2
count = Treatments.row_count();
Treatments.rowLast();
do i = count to 1 by -1;
Treatments_Order.add(Treatments.getInt('TREATMENT_ID'));
Treatments.rowPrevious();
end;
end;
end;
endpackage;
run;quit;
To test DS2 code, run the code in Base SAS to validate that the DS2 code
contains no syntax errors and to publish the code to the SAS Federation Server.
Log files for the test appear in the log window in Base SAS and in the SAS
Federation Server log directory (\Lev1\FederationServer\var\Logs). For
information about resolving errors in the logs, see Appendix 1,
“Troubleshooting,” on page 307.
For more information about testing DS2 code, see SAS 9.4 DS2 Language
Reference.
This code creates a package that is called my_pkg that contains one method,
execute(), and stores it in the database that is pointed to by
DSFEDERATEDDSN. SAS activity methods must be coded as void functions in
DS2. Output parameters must be marked with the in_out tag, which causes their
values to be returned to the middle tier after method execution.
Note: SAS Decision Services does not support the use of in_out tagged
parameters for input. They are used strictly for output only. Also, always ensure
that all input arguments precede the output arguments within your DS2 method
signatures.
To force a package to always execute in SAS missing mode, use ds2_options
sas; as the first statement, before the PACKAGE statement. When you omit this
option, your package uses ANSI missing mode by default. SAS missing mode is
recommended to achieve the highest compatibility between DS2 and DATA step.
Your custom activity code might include more than one DS2 package. The
methods of the last package in your DS2 program are the only methods that are
visible to decision flows. The execute() method of the last package is the only
method that can be called by the decision flows. The arguments for these
methods must use only the Decision Services data types. Otherwise, an error is
returned during the activity publishing step.
Note: If you use SAS Business Rules Manager to create multiple business rules
definitions that use the same rule flow, the rule flow DS2 code for the most
recent business rules definition overwrites the DS2 code for previous rule flows
because the DS2 package names are the same. For information about creating
business rules, see SAS Real-Time Decision Manager: User’s Guide.
You can test your package in your interactive SAS session by using a DS2
TABLE statement:
proc ds2 nolibs conn="driver=remts;server=your_Fed_Server;port=21032;
protocol=bridge;uid=user;pwd=password;
conopts=(DSN=DSFEDERATEDDSN)";
table _null_;
method init();
dcl package my_pkg echo();
dcl varchar(32767) out_string;
echo.execute('String to echo', out_string);
put out_string=;
end;
endtable;
run;
quit;
environment, the engine picks up the new activity code the next time a flow is
activated or deactivated. Until that time, any prior version of the activity
continues to be used.
The following table lists the code that defines, executes, and tests a DS2
package.
Note: If you are using Base SAS to run the DS2 code, you use the code for
Definition and Execution and Testing. If you are using SAS Customer
Intelligence Studio to run the DS2 code, you use only the code for Definition.
method init();
dcl varchar(16) str;
str = 'Hello World!';
put str;
end;
enddata;
run;
quit;
Without a currently assigned libref, the PROC DS2 statement simply sets up the
environment to submit DS2 language statements.
proc ds2;
_NULL_ on the DS2 DATA statement indicates that there is no automatic output
generated. The DS2 PUT statement writes to the SAS log.
Note: Use the PUT statement only for temporary troubleshooting.
data _null_;
method init();
dcl varchar(16) str;
str = 'Hello World!';
put str;
end;
enddata;
The RUN statement submits the DS2 statements. The RUN statement is
required. SAS reads the program statements that are associated with one task
until it reaches a RUN statement.
run;
For detailed information about creating DS2 code, see SAS DS2 Language
Reference.
172 Chapter 5 / Creating Custom Code with DS2
INVESTMENT_YEAR CAPITAL
2004 2140
2005 4429.8
2006 6879.886
2007 9501.478
2008 12306.58
DS2 Programming 173
2009 15308.04
2010 18519.61
2011 21955.98
2012 25632.9
2013 29567.2
2014 33776.9
INVESTMENT_YEAR CAPITAL
2011 21955.98
2012 25632.9
2013 29567.2
2014 33776.9
method execute(
package tap_table Treatments,
package tap_table Treatments_Custom,
package tap_table Treatments_Custom_List,
int Arbitration_Count,
in_out package tap_int_array Treatments_Order );
Treatments_Order.clear();
endpackage;
run;
174 Chapter 5 / Creating Custom Code with DS2
a Enter a SAS process ID. For DS2 code, the SAS process ID must match
the last DS2 package name that you enter on the SAS Code page.
Note: The casing for the SAS process ID must also match the casing for
the DS2 package name.
b Enter a description that includes you as the owner and that describes the
purpose of the activity.
3 In the SAS Code page, copy and paste the DS2 package code that you
tested in Base SAS.
Note: You do not need the PROC DS2 statement when you copy and paste
the DS2 package code into a SAS process definition.
After you enter the code, the variables are automatically generated in the
Input Variables and Output Variables pages.
Note: Your DS2 package must contain the method execute().
The code and metadata are sent to the SAS Decision Services Design Server,
which stores it in the design repository folder within SAS Metadata Server. After
the package has been completed and stored in the repository, you can create
flows that include the SAS process.
For more information about creating SAS processes, see SAS Real-Time
Decision Manager User’s Guide.
String Varchar
Int Bigint
Float Double
Boolean Integer
DS2 Programming 175
DateTime Double
Overview
Several DS2 packages are provided out of the box, in the following location
<Lev Config Dir>\Applications\SASDecisionServicesServerConfig
\SASCode. Some of those SAS files are required by the SAS Decision Services
run time, some are utilities to help you build your own SAS activities, and some
are sample SAS activities.
Note: Do not modify these DS2 packages. Do not call methods that are marked
as internal-use-only in the source code comments.
Utility Packages
Note: To add logging to your custom DS2 packages, see “DS2 Logger Package
Methods, Operators, and Statements” in SAS DS2 Language Reference.
tap_hash
This package is a simple extension of the DS2 hash object. Each new
package does not need to declare its own hash extension package; this one
is provided for everyone’s use. To reference this package, specify the
package keyword, the utility package name, and then the DS2 variable
name.declare package tap_hash my_hash();.
tap_{data type}_array where the data type is string, datetime, float, int, or
boolean
Note: It is recommended to use tap {data type}_array instead of tap_array.
SAS Decision Services array objects are passed to a DS2 method as an
encoded string (varchar) parameter. Use the tap_data type_array package to
decode the string. This package must be used in the execute method so that
SAS Customer Intelligence Studio can parse the parameters to determine
which type of List variable to use for input and output. Empty array objects
can also be created and populated by your custom SAS activity code. This
package provides an encode() method that can be called to create an
encoded string version of the current array. This is the array that is to be
returned to the SAS Decision Services engine.
Here are the available methods:
n tap_data type_array(); - Constructs an empty array.
n encode() returns varchar; - Encodes this array into a string for return to
the SAS Decision Services engine.
n add(varchar element); - Appends the specified element to the end of this
array.
n add(int element); - Appends the specified element to the end of this array.
/* DEBUG: Check and see what the input values look like */
test_output = my_in_array.encode();
put test_output=;
/* DEBUG: Check and see what the output values look like */
test_output = my_out_array.toString();
put test_output=;
tap_table
You use the tap_table method to manage SAS Decision Services data grids.
Here are the available methods:
Note: You can enter up to 32K characters in the varchar field.
n tap_table(); - Creates an empty table.
do multiplier = 1 to 10;
factors_table.setInt(i, multiplier, i * multiplier);
end;
end;
DS2 RESTCallout
The DS2 RESTCallout package provides a means to execute HTTP POST
requests from DS2. It is a helper package that is a front end to the HTTP
DS2 package. More specific requests might require the direct usage of the
DS2 Programming 179
DS2 HTTP package, when the use of specific DS2 HTTP package features is
desired.
Here are the available methods:
tap_RESTCallout
The constructor method creates a DS2 RESTCallout package instance.
Its member variables include a varchar(2048) URL attribute, as well as
HTTP and tap_logger package instances.
createPost
The createPost method creates an HTTP request, setting its URL and
enabling you to provide other parameters, such as a time-out and the
contentType, and to accept HTTP headers. A call to createPost can be
followed by many executePost calls. Only one URL can be active per
RESTCallout instance. Calling createPost replaces the URL of a previous
createPost call. Here are the signatures for createPost:
createPost( url, timeout, userid, password, rc );
createPost( url, contentType, accept, timeout, userid, password, rc );
n in_out int rc - The input rc variable is updated with the return code.
executePost
The executePost method executes an HTTP POST request and updates
its output arguments. If the URL and time-out are given, createPost is
called with those given arguments. If the signature without the URL is
used, the previously created POST request is used. Here are the
signatures for executePost:
executePost( payload, hstat, rc, responseBody );
executePost( payload, hstat, rc, responseBody, url );
executePost( payload, hstat, rc, responseBody, url, timeout,
timeout, userid, password );
n in_out int hstat - updated with the HTTP status code of POST request
execution.
n in_out int rc - The method return code.
tap_datetime
The package tap_datetime wraps native SAS functions, passing a datetime
or date number, as needed, to these functions.
n tap_datetime() - Creates a new instance with the date set to January 1,
1960.
Note: No local offset can be applied to any numbers that represent SAS
dates or datetimes and that are passed to tap_datetime(). Therefore,
those numbers have no local offset applied when they are returned from
tap_datetime() methods.
n tap_datetime(package tap_datetime) - Creates a copy of the given
tap_datetime.
n tap_datetime(double sasDatetime) - Creates a new instance that is based
on the given SAS datetime (seconds since January 1, 1960).
n tap_datetime(varchar stringRepresentation) - Creates a new instance
from the given string representation. The following formats are supported:
o ‘DDMMMYYYY’, for example: ‘15Mar2007’
o ‘DDMMMYYYY:HH:MM:SS’, for example: ‘15Mar2007:15:30:45’
o ‘YYYY-MM-DDTHH:MM:SS’, for example: ‘2007-03-15T15:30:45’
Time zone IDs are standard zone names used by the tz database. For
examples, see https://en.wikipedia.org/wiki/
List_of_tz_database_time_zones.
n varchar toString() - Returns a string representation of this instance in the
form of 'DDMMMYYYY:HH:MM:SS'.
n double toSASDatetime() - Returns the SAS datetime (seconds since
January 1, 1960) corresponding to this instance.
n double toSASDate() - Returns the SAS date (days since January 1, 1960)
corresponding to this instance.
n fromSASDatetime(double sasDatetime) - Sets time for this instance
based on the given SAS datetime (seconds since January 1, 1960).
n fromSASDate(double sasDate) - Sets time for this instance based on the
given SAS date (days since January 1, 1960).
n Package tap_datetime supports the following native SAS functions, but
unlike their SAS equivalents, these functions take no input arguments.
Instead, the values that are returned depend on the date and time that the
tap_datetime instance represents.
For example, suppose you have an instance of package tap_datetime
called “vacation” that is set to the value “12Apr2013”. Then a call to
vacation.year() would return the value 2013.
For complete descriptions of the native SAS functions, see SAS DS2
Language Reference.
DS2 Programming 181
The advantage to using the tap_* packages is that they correctly call the
equivalent SAS methods. Some of the following SAS methods require a
SAS date, and some require a SAS datetime.
o int year()
o int month()
o int day()
o int hour()
o int minute()
o int second()
o int weekday()
o int qtr()
o double timepart()
o double datepart()
tap_datetime_utilities
The package tap_datetime_utilities contains logically static functions that
construct tap_datetime instances, or that operate on more than one
tap_datetime instance.
n tap_datetime_utilities() - Constructs a new instance.
Sample Package
sas_activity_tests
This is a sample package that can be used for validation and testing. Here
are the available methods:
182 Chapter 5 / Creating Custom Code with DS2
echo_string
Signature - (varchar(32767) in_string, in_out varchar out_string)
Description - Echoes the input string to the output string.
echo_int
Signature - (int in_int, in_out int out_int)
Description - Echoes the input int to the output int.
echo_float
Signature -(double in_float, in_out double out_float)
Description - Echoes the input float to the output float.
echo_boolean
Signature - (int in_boolean, in_out int out_boolean)
Description - Echoes the input Boolean to the output Boolean.
echo_datetime
Signature - (double in_datetime, in_out double out_datetime)
Description - Echoes the input datetime to the output datetime.
echo_scalars
Signature - (varchar(32767) in_string, int in_int, double in_float, int
in_boolean, double in_datetime, in_out varchar out_string, in_out int
out_int, in_out double out_float, in_out int out_boolean, in_out double
out_datetime)
Description - Echoes the input values to the output values.
echo_array
Signature - (varchar(32767) in_array, in_out varchar out_array)
Description - Echoes the input array to the output array.
echo_table
Signature - (varchar(32767) in_table, in_out varchar out_table)
Description - Echoes the input table to the output table.
variable_test
Signature - (varchar(32767) in_string, bigint in_int, double in_float, int
in_boolean, double in_datetime, varchar(32767) in_array, varchar(32767)
in_table, in_out varchar out_string, in_out bigint out_int, in_out double
out_float, in_out int out_boolean, in_out double out_datetime, in_out
varchar out_array, in_out varchar out_table)
Description - Edits each of the input values and sets them in the output
values.
n out_string - The result of reversing in_string. For example, “abc”
becomes “cba.”
n out_int - The result of in_int + 2.
n out_table - The input table with the row order reversed, 100 added to
each column of type int, 222.222 added to each column of type float, 6
days added to each column of type datetime, the string reverse for
each column of type string, and the negation for each column of type
Boolean.
A null table is encoded as simply "null." A table with no rows has an empty data
array.
The encodeJSON method returns a nvarchar string consisting of the tap_table
instance formatted into JSON text. The encodeJSON method has two
signatures, one without any input arguments, and the other with three:
encodeJSON( int dblWidth, int dblPrecisn, varchar(128)
dblFmtSpecifier ) returns nvarchar;
The signature without args calls the other using 0, 15, and "BESTFIT" as its
args. Here is an example:
method encodeJSON( int dblWidth, int dblPrecisn,
varchar(128) dblFmtSpecifier ) returns nvarchar;
184 Chapter 5 / Creating Custom Code with DS2
SASEW
Conforms to the SAS Ew. format rules. The values are formatted within
the specified width. Scientific notation is always produced in the form of
[-]ddd.dddE±dd.
SASEWD
The value is formatted with the given width precision. Scientific notation is
always produced in the form of [-]ddd.dddE±.dd.
SASWD
The value is formatted with the given width precision. Scientific notation is
always produced in the form of [-]ddd.dddE±.dd.
1 With the Federation Server definition selected, click the Data Source Names
tab.
2 From the drop-down list, select New Federated Data Source Name.
3 Enter the name and description for the federated DSN, and click Next.
5 Select the DSNs that you want to connect to with this federated DSN, and
click OK.
7 It is recommended that you keep the default security setting, and click Next.
186 Chapter 5 / Creating Custom Code with DS2
8 When you have reviewed the information about the Summary screen, click
Finish.
You can test your federated DSN by modifying the following SAS program:
proc ds2 Conn="driver=remts;server=your_server;port=your_port;protocol=bridge;
uid=admin_userid;pwd=admin_password;conopts=(DSN=your_federated_dsn)";table _null_;
method run();
set AN_EXISTING_DATABASE_CATALOG.SCHEMA.TABLE;
put a_column= another_column=;
end;
endtable;
run;
quit;
Custom SAS activities are implemented as DS2 packages. To read from a table
from within a DS2 method, you must use either the DS2 hash package or the
DS2 SQLStmt package. To write to a table from within a DS2 method, use the
SQLStmt package. The hash package can be used only for reading. To read
using a hash object, use the dataset() method of the DS2 hash object. This
method takes an SQL SELECT statement as an argument and populates the
hash object with the corresponding result set.
method compute();
dcl package hash h();
dcl package hiter hi(h);
dcl int rc;
h.definekey('clientid');
h.definedata('hhid');
h.definedata('income');
h.dataset(
'{select clientid, hhid, income from DSORA.MAFUNC.CUSTOMER1;}');
h.definedone();
rc = hi.first();
do while(rc = 0);
…do something with the data…
rc = hi.next();
end;
end;
The SQLStmt package supports SQL syntax similar to that used in JDBC
parameterized prepared statements, It also provides control over SQL statement
lifetime, enabling more efficient code to be written. The following example
illustrates writing five records to a database table called “testdata”:
dcl package sqlstmt s('insert into testdata (x, y, z) values (?, ?, ?)', [x y z]);
do i = 1 to 5;
x = i;
y = i*1.1;
z = i*10.01;
s.execute();
end;
DS2 Programming 187
If you want to access databases from custom DS2 code, the database must first
be set up within the SAS Federation Server. In the setup process, a data service
is created. Within that data service, there is a catalog name that is used for the
service. That is the catalog name that should be used when referencing the
database from within the custom DS2 code. The schema name depends on the
database. However, it is usually the database schema name. For data sets, it is
the schema name that is used when setting up the service in the SAS
Federation Server. The table name is the actual name of the table in the
database.
For more information, see SAS 9.4 DS2 Language Reference.
The SAS activity type is used to host score code and business rules. It is also
used to extend SAS Decision Services functionality. A SAS activity consists of a
SAS program and an activity XML document that describes the activity, the
methods that are supported by that activity, and the system resources that are
used by that activity.
DS2 programming skills are required to develop SAS code that runs as an
activity. For assistance with custom activity development or publishing, contact
your on-site SAS support personnel.
Tips
n when you change from one data set to another using a SET statement that
lists more than one data set
DS2 code does not set variables to null or missing by default when the variables
are instantiated. In order to prevent unpredictable results, initialize each DS2
variable before you use it.
When you are programming in DS2, unassigned variables are not initialized to
missing as they are in a DATA Step. As a best practice, you should explicitly
initialize all DS2 variables. Related variables with package scope retain their
values across method invocations, unless they are explicitly reinitialized. A
package scope variable is a variable that is declared prior to the first method
declaration of a DS2 package. Before you can use package scope variables, the
variables must be identified and instantiated. A package-scope variable is going
to keep its value in memory for as long as that variable is loaded into memory on
that JDBC connection. For more information, see “Understand How Global
Packages and Local Packages Differ” on page 193.
A THIS expression provides an alternate method to simultaneously declare and
use a global scalar variable from anywhere within a DS2 program. A THIS
expression is used to circumvent the standard variable lookup. In a THIS
expression, DS2 searches for a scalar variable declaration of the identifier in
global scope and local variables with the same name are overridden. If there is
no such declaration, DS2 declares the identifier in global scope with DOUBLE
type. Global variables can be referenced by all programming blocks in a DS2
program.
For more information about variable declarations in DS2, see SAS DS2
Language Reference.
x = s; /* slow */
x = substr(s,1,16); /* faster */
x = substr(ns,1,16); /* even faster, avoids transcoding */
DS2 Programming 189
If the compute(x) computation always computes the same value for a given
value of x, then modify the code to perform the computation once and save the
computed value.
computed_x = compute(x);
if computed_x > computed_max then computed_max = computed_x;
if computed_x < computed_min then computed_min = computed_x;
value once before the loop begins. Use the computed value in the loop. For
example, in the following code sample, compute(x) is evaluated during each
iteration of the DO loop.
do i = 1 to dim(a);
if (compute(x) eq a[i]) then ...;
end;
If compute(x) computes the same value for each iteration of the loop, then
modify the code to perform the computation one time after it is outside the loop.
computed_x = compute(x);
do i = 1 to dim(a);
if (computed_x eq a[i]) then ...;
end;
do i = 1 to 10;
r = ranuni(1);
put r=;
end;
end;
enddata;
run;
data _null_;
method init();
dcl int i;
dcl double r;
do i = 1 to 10;
r = ranuni(1);
put r=;
end;
end;
enddata;
run;
quit;
Output:
DS2 Programming 191
1 proc ds2;
NOTE: Writing HTML Body file: sashtml.htm
2 data _null_;
3 method init();
4 dcl int i;
5 dcl double r;
6
7 do i = 1 to 10;
8 r = ranuni(1);
9 put r=;
10 end;
11 end;
12 enddata;
13 run;
r=0.88386586448177
r=0.97382110217586
r=0.50758258602581
r=0.88694050721824
r=0.68936349358409
r=0.94325460819527
r=0.92878638301044
r=0.48766398406587
r=0.77988508134149
r=0.87713846680708
NOTE: Execution succeeded. No rows affected.
14
15 data _null_;
16 method init();
17 dcl int i;
18 dcl double r;
19
20 do i = 1 to 10;
21 r = ranuni(1);
22 put r=;
23 end;
24 end;
25 enddata;
26 run;
r=0.88386586448177
r=0.97382110217586
r=0.50758258602581
r=0.88694050721824
r=0.68936349358409
r=0.94325460819527
r=0.92878638301044
r=0.48766398406587
r=0.77988508134149
r=0.87713846680708
NOTE: Execution succeeded. No rows affected.
27 quit;
streaminit(1);
do i = 1 to 10;
r = rand('uniform');
put r=;
end;
end;
enddata;
run;
data _null_;
method init();
dcl int i;
dcl double r;
streaminit(1);
do i = 1 to 10;
r = rand('uniform');
put r=;
end;
end;
enddata;
run;
quit;
Output:
30 proc ds2;
31 data _null_;
32 method init();
33 dcl int i;
34 dcl double r;
35
36 streaminit(1);
37 do i = 1 to 10;
38 r = rand('uniform');
39 put r=;
40 end;
41 end;
42 enddata;
43 run;
r=0.88386586448177
r=0.97382110217586
r=0.50758258602581
r=0.88694050721824
r=0.68936349358409
r=0.94325460819527
r=0.92878638301044
r=0.48766398406587
DS2 Programming 193
r=0.77988508134149
r=0.87713846680708
NOTE: Execution succeeded. No rows affected.
44
45 data _null_;
46 method init();
47 dcl int i;
48 dcl double r;
49
50 streaminit(1);
51 do i = 1 to 10;
52 r = rand('uniform');
53 put r=;
54 end;
55 end;
56 enddata;
57 run;
r=0.88386586448177
r=0.97382110217586
r=0.50758258602581
r=0.88694050721824
r=0.68936349358409
r=0.94325460819527
r=0.92878638301044
r=0.48766398406587
r=0.77988508134149
r=0.87713846680708
NOTE: Execution succeeded. No rows affected.
58 quit;
method load_and_clear();
dcl double i;
do k = 1 to 100;
d = 2*k;
h.add();
end;
h.clear();
end;
endpackage;
This example creates a hash package that is local. It is created and deleted for
each call to load_and_clear
/** LOCAL **/
package mypack;
dcl double k d;
method load_and_clear();
dcl package hash h([k], [d]);
dcl double i;
do k = 1 to 100;
d = 2*k;
h.add();
end;
h.clear();
end;
endpackage;
195
6
Displaying Reports in the Reports
Workspace
Overview of Displaying Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
Customer Intelligence LASR Analytic Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
Customer Intelligence LASR Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
Customer Intelligence Staging Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
Configure Autoload . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
Overview of Configuring Autoload . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
Edit LASR Library Extended Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
Modify Autoload Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
Set Access Permissions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
Test the Autoload Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
Schedule Autoload . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
Extract Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
Overview of Extracting Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
Example Job . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
The %CISUBJ Macro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
The %CICOUNT Macro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
The %CI2LASR Macro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
Schedule the Job . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
Select the SAS Visual Analytics Application Server . . . . . . . . . . . . . . . . . . . . . . . . 212
Reports and Templates in SAS Management Console . . . . . . . . . . . . . . . . . . . . . . 213
Report Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
Report Instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
Display Extended Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
How Responses Are Calculated in Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
Data is extracted from the common data model to a staging library. Autoload
loads data from the staging library to the SAS LASR Analytic Server. After the
report templates are imported, reports are created from the data on the SAS
LASR Analytic Server.
For information about accessing SAS Customer Intelligence Studio through SAS
Visual Analytics and setting reporting options in business contexts, see SAS
Marketing Automation: User’s Guide. For information about using SAS Visual
Analytics, see “SAS Visual Analytics” in SAS Marketing Automation:
Administrator’s Guide.
The following server and libraries are required for displaying reports.
SAS LASR Analytic Server
Customer Intelligence LASR Analytic Server is the SAS LASR Analytic
Server that is installed with SAS Customer Intelligence for use in reporting.
You can use this server and the default values, edit the default values, or
create your own SAS LASR Analytic Server. For information about Customer
Intelligence LASR Analytic Server, see “Customer Intelligence LASR Analytic
Server” on page 197.
LASR library
The autoload process loads data from the data directory into a LASR library.
Customer Intelligence LASR Library is installed with SAS Customer
Intelligence. You can use this library and the default values, edit the default
values, or create your own LASR library. For more information about
Customer Intelligence LASR Library, see “Customer Intelligence LASR
Library” on page 199.
staging library
The staging library contains the data that is extracted from the common data
model. Customer Intelligence Staging Library is installed with SAS Customer
Intelligence. For more information, see “Customer Intelligence Staging
Library” on page 200.
Customer Intelligence LASR Analytic Server and Customer Intelligence LASR
Library are configured to be used with a single common data model. There can
be multiple business contexts at your site as long as they share the same
common data model. Sites that use more than one common data model for
reporting must set up each common data model instance in the same way. Be
sure to use a unique namespace for each duplicate setup. Components such as
SAS LASR Analytic Servers, LASR libraries, tables, and autoload configurations
must be unique for each common data model.
To display reports:
3 Create a SAS job that extracts data from the common data model into the
staging library. For more information, see “Extract Data” on page 207.
4 Set a schedule for the job to extract data on a regular basis.For more
information, see “Schedule the Job” on page 211.
The Options tab specifies the port number, and the name of the High-
Performance Analytics environment host. The port number is the TCP/IP port
number that the Customer Intelligence LASR Analytic Server listens on. The
High-Performance Analytics environment host is the host path where files that
define the cluster are located. This field is applicable to a distributed server only.
Use LASR authorization service is selected.
198 Chapter 6 / Displaying Reports in the Reports Workspace
The General tab displays the name and description for the library.
The Options tab specifies the libref and server tag. A server tag is a text string
that is associated with a table that is loaded into memory on a Customer
Intelligence LASR Analytic Server instance. The server tag is specified in the
LIBNAME statement or as a data set option. The server tag and the table name
are used together to match the name that is used for tables in the Customer
Intelligence LASR Analytic Server. The data provider library is the Customer
Intelligence Staging Library that was installed with the product. For more
information, see“Customer Intelligence Staging Library” on page 200.
200 Chapter 6 / Displaying Reports in the Reports Workspace
The Data Server tab specifies the database server and connection. The server
is the Customer Intelligence LASR Analytic Server that was installed with the
product. For more information, see “Customer Intelligence LASR Analytic
Server” on page 197.
data directory into the LASR library. The Customer Intelligence Staging Library is
installed with the product. The library is located in the Libraries folder in the
Data Library Manager plug-in in SAS Management Console.
By default, the following Autoload data directories are created:
n Append
n Formats
n Logs
n Unload
If SAS Marketing Automation and SAS Visual Analytics are installed on different
SAS server tiers, the data must be on a shared drive that is accessible by
autoload. The security permissions for the autoload data directory are
determined by your site. The user ID that populates this directory must have
Write permission.
For information about the location of the autoload data directory, see “Modify
Autoload Scripts” on page 201.
Configure Autoload
2 Paste the copy of the directory in the directory for the staging library.
3 In the new directory, edit AutoLoad.sas. Change the name of the LASR
library to Customer Intelligence LASR Library or the LASR library that you
created. For more information, see “Overview of Displaying Reports” on page
195.
%LET AL_META_LASRLIB=Customer Intelligence LASR Library;
If the SAS Visual Analytics Administration and Reporting (VAAR) LASR Analytic
Server and the Customer Intelligence LASR Analytic Server are on different
machines, take the following steps:
2 Edit the AutoLoad.sas file. Change the pathname for INCLUDELOC to the
pathname for the new include directory. The following example is for the
UNIX environment:
%LET INCLUDELOC=/<configuration-directory>/AppData/SASCustomerIntelligence/MarketingAutomation/include
2 The user ID that executes the autoload scripts that access the LASR library
metadata must be a member of the Customer Intelligence Administrator
group. On the Authorization tab of the Properties window, click Add and
select the Customer Intelligence Administrator group to add to the Users and
Groups list.
Schedule Autoload
After you have configured autoload, execute the scheduling script so that your
changes take effect. From the directory that you created in “Modify Autoload
Scripts” on page 201, execute the following file.
On Windows, the file is schedule.bat.
On UNIX, the file is schedule.sh.
When autoload starts for the first time, the script starts the SAS LASR Analytic
Server. To verify that the server is running, open the Manage Environment page
of SAS Visual Analytics Administrator. The server status is displayed on the
LASR Servers tab.
In some situations, you might need to select a default application server before
autoload can start the SAS LASR Analytic Server. For more information, see
“Select the SAS Visual Analytics Application Server” on page 212.
The table status is displayed on the LASR Tables tab.
When you validate autoload for the first time, the list of campaign tables is empty
because no data has been extracted.
Extract Data 207
Extract Data
n Uses the %CI2LASR macro to extract the data from the common data model.
For information about the contents of the table that contains the extracted
data, see “%CI2LASR Output Table Data Dictionary” in SAS Marketing
Automation: Administrator’s Guide.
When autoload runs, the data is loaded into a LASR library.
If any parameters in the job are not valid, the table is not created.
Note: If SAS Marketing Automation and SAS Visual Analytics are installed on
different SAS server tiers, the extracted data must be on a shared drive that is
accessible by autoload. Specify the shared drive information in the
VA.Autoload.Location extended attribute for the LASR library. For more
information, see “Customer Intelligence Staging Library” on page 200. The job
that extracts data from the common data model must run on the SAS server tier
where SAS Marketing Automation is installed.
Example Job
Here is an example of a SAS job that extracts data from the common data
model. The output is located in a file named CAMPAIGN_TREATMENT_DATA.
All templates use the contents of this file to generate reports.
/************************************************************/
/* Assign SAS libref for the CI Common Data Model Library */
/* -------------------------------------------------------- */
/* Note you can find libname statements in SMC. */
/* Select the library object, right-click, and */
/* select Display LIBNAME Statement. Cut and paste the */
/* libname statement from the dialog box. */
/************************************************************/
/************************************************************/
/* Assign SAS libref for library for the extracted data */
/* -------------------------------------------------------- */
/* Library for autoload data directory location. This is */
208 Chapter 6 / Displaying Reports in the Reports Workspace
/************************************************************/
/* In order to extract data from the CI Common Data Model */
/* it is necessary to know what subjects are of interest. */
/* For each subject, it is necessary to know what tables */
/* hold the Contact History, Response History, and */
/* Treatment History data, so it can be summarized. */
/* */
/* Use the %CISUBJ macro to create a Subject Table. Each */
/* call to the %CISUBJ macro adds a subject to the table. */
/* If the table does not exist, it is created. */
/************************************************************/
%ciSubj (subjectTable=WORK.CI_SUBJECT,
subject=Customer,
contact_histTable=CI_CONTACT_HISTORY_CUST,
response_histTable=CI_RESPONSE_HISTORY_CUST,
presentedTreatment_Table=CI_PRESENTED_TREATMENT_CUST);
%ciSubj (subjectTable=WORK.CI_SUBJECT,
subject=AllAcct,
contact_histTable=CI_CONTACT_HISTORY_ACCT,
response_histTable=CI_RESPONSE_HISTORY_ACCT,
presentedTreatment_Table=CI_PRESENTED_TREATMENT_ACCT);
%ciSubj(subjectTable=WORK.CI_SUBJECT,
subject=Household,
contact_histTable=CI_CONTACT_HISTORY_HHD,
response_histTable=CI_RESPONSE_HISTORY_HHD,
presentedTreatment_Table=CI_PRESENTED_TREATMENT_HHD);
/************************************************************/
/* Additional user-requested fields. Note that */
/* the syntax for this macro variable consists of items for */
/* a SQL select clause. Each item must have a trailing */
/* comma. */
/* Only tables that are already included in the extract can */
/* be used to request fields that are not included in the */
/* extract. */
/* */
/* Each extracted field is specified in the form: */
/* */
/* <table name>.<column name> AS alias_column_name */
/* 'descriptive label you will see in VA' , */
/* */
/************************************************************/
%let ci_user_req_fields =
Extract Data 209
ci_campaign.max_budget_offer_amt
as campaign_max_offer
'Campaign max budget offer',
ci_communication.max_budget_offer_amt
as communication_max_offer
'Communication max budget offer',
;
/************************************************************/
/* Extract subject data from the common data model and */
/* load it into a staging library. All parameters are */
/* required. */
/************************************************************/
%ci2lasr(subjectTable=work.CI_SUBJECT,
CIDMLIB=CICDM,
extract_libref=BASELIB,
outputTable=CAMPAIGN_TREATMENT_DATA);
/*******************************************************************/
/* NAME: ci2lasr.sas */
/* VERSION: 6.4 */
/* DESCRIPTION: extract data from the common data model and */
/* accumulate counts using %CICOUNT */
/* Parameters: */
/* extract_libref= libref of staging library */
/* CIDMLIB= libref for CDM */
/* subjectTable= name of subject table */
/* outputTable= name of extracted table */
/* PRODUCT: MA */
/* USAGE: */
/* */
/* %ci2lasr( */
/* extract_libref=%(), */
Extract Data 211
/* CIDMLib=%str(), */
/* subjectTable=%str(), */
/* outputTable=%str(), */
/* mode=SIZE | EXTRACT); */
/* */
/*******************************************************************/
Enter the following command on the Windows command line. In this example,
the BAT file is named sasjobextract.bat. The job is executed every day at 1:00
am.
schtasks create /sc DAILY /st 1:00:00 /tn C:\myprogramfiles\sasjobextract.bat
To schedule the job from the command line in the UNIX environment, create a
cron table that sets the schedule. In the following example, the job has been
saved in a file named extract.sas. The job is executed every day at 1:00 am.
0 1,* * 0-6 sas /mysasjobs/extract.sas
Enter the following command at the UNIX prompt. In the following example, the
cron table file is named sasjobextract.
crontab sasjobextract
You can also schedule the job through the Schedule Manager plug-in in SAS
Management Console.
For more information about scheduling and executing SAS jobs, see Scheduling
in SAS at http://support.sas.com/documentation/onlinedoc/sasmc/index.html.
212 Chapter 6 / Displaying Reports in the Reports Workspace
For more information about scheduling tasks in the UNIX and Windows
environments, see the documentation for your operating system.
Report Templates
SAS Customer Intelligence Studio provides templates that you can use to
display reports in the Reports workspace. During installation, the SAS Package
maps the table to an existing table on the SAS LASR Analytic Server. Before
you install the report templates, extract data and create the table. For more
information, see “Extract Data” on page 207.
To install the report templates, take the following steps.
1 Copy the SAS package that contains the report templates from the following
location on the SAS Customer Intelligence Application Server tier to a
location on your SAS Management Console client machine.
On UNIX, the location of the report templates package is:
<SASHome>/SASFoundation/9.4/misc/cicsvr/Config/Deployment/Packages/cireporttemplates.spk
3 In the Import SAS Package wizard, the location on your SAS Management
Console client machine that you specified in Step 1.
4 Follow the rest of the steps in the wizard to import the report templates into
the Report Templates folder. On the Tables page of the wizard, specify
CAMPAIGN_TREATMENT_DATA as the target table.
to the templates that are provided with SAS Customer Intelligence Studio.
The report displays only data from the current business context.
This attribute must be added in SAS Management Console to any SAS
Visual Analytics report that you want to display in the Reports workspace.
For more information, see “Display Extended Attributes” on page 215.
If a report template has both the ci.external and the ci.template extended
attributes, the report displays data from all of the business contexts in the
common data model. However, the report is visible only in the current
business context.
By default, a report template is visible in all business contexts. To limit the
template to a single business context, see “ci.bc.name” in “Report Instances”
on page 214.
Report Instances
Report instances are located in the SAS Management Console folder that you
specify when you save a report in SAS Customer Intelligence Studio. Reports
have the following extended attributes.
ci.report
identifies the file as a report. This extended attribute is required to display the
report in the Reports workspace in SAS Customer Intelligence Studio.
This attribute is added automatically when the file is saved in SAS Customer
Intelligence Studio.
ci.bc.name
identifies a business context. This extended attribute is required to display
the report in the Reports workspace in SAS Customer Intelligence Studio.
You cannot specify more than one business context. When this attribute is
specified, the report is visible only if the value of the attribute matches the
business context for the current user.
This attribute is added automatically when the report instance is saved in
SAS Customer Intelligence Studio.
You can use SAS Management Console to add this attribute to any SAS
Visual Analytics report that you want to display in the Reports workspace and
limit to users of a particular business context. For more information, see
“Display Extended Attributes” on page 215.
The attribute is required for all report instances. It is optional for report
templates.
ci.source.template.name
specifies the name of the template from which the report was created. The
template name is displayed with the report in the Reports workspace in SAS
Customer Intelligence Studio.
This attribute is added automatically when the file is saved in SAS Customer
Intelligence Studio.
ci.source.template.path
specifies the pathname of the template from which the report was created.
This attribute is added automatically when the file is saved in SAS Customer
Intelligence Studio.
How Responses Are Calculated in Reports 215
For information about designing reports, see SAS Visual Analytics: User’s Guide
at http://support.sas.com/documentation/onlinedoc/va/index.html.
n Click link
n View product
n Add to cart
n Purchase
7
Managing Campaign Assets
Managing Campaign Assets in SAS Management Console . . . . . . . . . . . . . . . . . 218
Overview of Folders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
Overview of SAS Decision Services Repositories . . . . . . . . . . . . . . . . . . . . . . . . . . 218
Location of SAS Customer Intelligence Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
Assets and Permissions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
Copying and Pasting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
Regenerating the SAS Decision Services Metadata Objects . . . . . . . . . . . . . . . . 221
Importing and Exporting SAS Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
Data Libraries, Event Variables, and Data Processes . . . . . . . . . . . . . . . . . . . . . . . 227
Data Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
Event Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
Data Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
Prerequisites for Defining a Data Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
Managing Deployments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
Overview of Managing Deployments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
About Deploying and Activating Campaigns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
View Campaigns That Are Marked for Deployment . . . . . . . . . . . . . . . . . . . . . . . . 230
Add Remote Deployment Environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
Enable a Secure Sockets Layer (SSL) Remote Environment . . . . . . . . . . . . . . . 234
Mark Items for Deployment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
Understanding Versions and Event Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
Understanding Deployment Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
Deploying and Undeploying Selected Campaigns . . . . . . . . . . . . . . . . . . . . . . . . . . 237
Validate Deployed Campaigns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
Activating and Deactivating Selected Campaigns . . . . . . . . . . . . . . . . . . . . . . . . . . 243
Import and Deploy Treatment Campaign Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
Remove Unused Objects from the Production Repository . . . . . . . . . . . . . . . . . . 246
Migrating Files from a Previous Release of SAS Real-Time
Decision Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
Migrating Events and Global Variables from SAS Customer
Intelligence 5.4 or 5.41 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
Exporting and Importing Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
Common Data Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
218 Chapter 7 / Managing Campaign Assets
Overview of Folders
The Folders tab of SAS Management Console displays the folders that contain
metadata for SAS Customer Intelligence objects. You can import and export
SAS Packages, and copy and paste objects between folders. SAS Customer
Intelligence does not use the My Folder or Shared Data folders.
Folder permissions are applied to the contents of the folders. If a user has
permission to edit a folder, then the user can edit the contents of the folder and
delete an empty folder. If a user has permission to view the folder, then the user
can view the contents of the folder. The user cannot add content to the folder,
and cannot delete the folder. If a user has no access permissions to the folder,
then the user cannot view or add contents to the folder, and cannot delete the
folder. For more information about administrative roles and setting permissions,
see the online Help for SAS Management Console.
You can create folders, but you cannot rename folders that are used by SAS
Customer Intelligence.
When you create a folder, it inherits the permissions of the parent folder. You
can change the inherited permissions.
Icons represent the status of the real-time decision cluster. Here are the icons as
well as the type of logical repository that they reference.
When you select Paste Special, a copy of the item is created. If an item by the
same name already exists in the target destination, the item is named Copy of
item name.
To use Paste Special to include all of the dependencies of a copied object,
select the object on the Select Objects to Copy page of the Paste Special
wizard. Select Select All to include all of the objects that are listed on the
Dependencies tab. If you select individual objects on the Dependencies tab,
select the objects under the Copied Objects folder, and then select their
dependencies on the Dependencies tab.
If you are copying assets such as campaign definitions, use Paste Special to
retain all of the dependencies. For example, copies of campaigns and the
campaigns that they link to are installed with the same folder structure as the
original items. Tags that are no longer in the same environment as the copied
treatment are not retained. If you use Paste Special to paste copied items
directly into the SAS Folders folder, the source paths are not preserved.
Instead, use Export SAS Package and Import SAS Package to preserve
source paths in the SAS Folders folder.
Copied items retain the permissions of the original items. You can change the
permissions of individual objects, such as campaign definitions. Do not change
permissions on processes; there might be several campaigns that rely on
access to a process.
When you copy and paste campaigns and treatments, codes and control group
names are retained according to the setting for the business context, and new
surrogate keys are generated in the common data model.If you selected the
Retain all code values when pasting option in the business context, codes
and control group names are retained only when the copied object is pasted
within the selected business context.
By default, the delay between system start-up and the first SAS Decision
Services resource population process is 360 seconds. To change the length of
the delay, enter the following option.
-Dcom.sas.analytics.crm.flow.inbound.assets.populate.initial_interval = <number of seconds>
User Permissions
A user who has View permission can export a SAS package. The import process
automatically grants the importing user WriteMetadata permission on newly
imported objects if the user does not already have this permission.
To import an item into a folder, you must have access permissions for the folder.
An administrator can temporarily add a user to the access control template. The
user can be removed after the required operation has been completed.
Managing Campaign Assets in SAS Management Console 223
Select Include access controls in the Import SAS Package wizard only if you
want to preserve access controls and the target location contains the same
persons, identity groups, and access control templates as the source location.
Otherwise, the objects in the package are imported with the default access for
the target location.
3 Create user names in the destination environment that are identical to the
user names in the source environment. Assign the same roles and
capabilities to the destination user names. User names are case-sensitive.
4 Create a repository in the destination environment that has the same name
as the repository in the source environment.
6 If the objects in the source environment contain dynamic lists, create data
libraries in the destination environment that contain the list values. Make sure
that the data libraries in the destination environment and the data libraries in
the source environment have the same names.
7 You must have Write permission in order to export and import objects. An
import that fails because of permission issues results in a corrupted object.
The visual indicator of a corrupted object is a red exclamation point ( ). This
object can be deleted only by a user with Write permission.
For information about exporting objects from the source environment, see
“Manually Deploying Campaign Assets in SAS Management Console” on page
237.
The exporting and importing process retains all codes, but regenerates
surrogate keys. The following codes are retained:
n campaign codes
n cell codes, including marketing cells
n package codes
campaign should be imported to the same relative folder. If the assets are
exported and imported together, they do not have to be imported to the same
folder locations relative to each business context. Assets that are not referenced
by other assets can be imported into any folder.
Comments
Comments are removed from the imported object.
n REPLY_CD
n MARKETING_CELL_CD
n PACKAGE_CD
New surrogate keys are generated in the common data model when you import
or copy and paste a campaign.
An imported campaign retains its deployment status. If an imported campaign
has been marked for deployment, it automatically publishes data to the common
data model. If the imported campaign is not marked for deployment, you must
use one of the following to methods to publish the data:
n mark the campaign for deployment
n manually publish the campaign from within SAS Customer Intelligence Studio
Definitions
If you include dependent objects when you export a campaign, the campaign
definition is not exported.
If importing a response definition would result in a duplicate channel response
code for a specific channel, the channel response code field is empty in the
imported definition.
Managing Campaign Assets in SAS Management Console 225
When you import a definition, the only business contexts that remain associated
with that definition are those business contexts for which you have Write
permission.
Events
When you import an event directly (that is, apart from a campaign), all identifiers
that are not already created are deleted from the event the next time the event is
opened. If a campaign that uses the same event is then imported, the new
identifiers are retained, new identifier definitions are created, and the event
definition is updated with the new identifiers.
When you import event variables into SAS Real-Time Decision Manager, the
column names in the imported table must match the localized event column
names in the user interface. For example, in the English locale, the imported
event variable table must have the following column names.
n Variable Name
n Display Name
n Description
n Type
n Identifier
n Level
n Required
226 Chapter 7 / Managing Campaign Assets
Identifiers
If an identifier that is used in a Start node or a Reply node does not exist on the
target system, it is created as when the campaign is imported. Identifiers are
references to variables that are used to create campaigns more efficiently. For
more information, see “Identifiers” in SAS Real-Time Decision Manager User’s
Guide. When an identifier is created during import, the import log includes the
following message: The identifier <identifier name> was
automatically created as a globally defined identifier. The
import log includes a warning message if an identifier of the same name already
exists but it of a different data type.
Self-Learner Definitions
If you import a self-learner definition from a business context to a business
context that uses a different information map, the import process does not
remove a data item from the new self-learner definition if the data item has the
same ID as the data item in the new information map. Instead, the data item
from the target information map is referenced. Data items referenced in the
imported self learner definition that are not in the target information map are
removed. A warning message appears if the original data item is not available
when you open the imported self-learner definition.
Note: You can modify the Self Learner Threshold parameter in the autoexec file
to specify the minimum number of cases needed to generate a non-random
score. The default is 1000 cases.
Treatments
When you import treatments along with a campaign, a number in a red disc in
the Updates page for the campaign in SAS Customer Intelligence Studio
indicates that the imported campaign treatment is not in sync with existing
treatments.
Select Updates or Rejections to display changed treatments or treatments
whose changes have been rejected. Click in the toolbar to refresh the
contents of the Treatments page.
Select a treatment to compare the campaign version of the treatment with the
changed version. Campaign Treatment is the version of the treatment that is
associated with the campaign. Treatment is the changed version.
to be accessible by the new system if you want to view the image on the new
system. Therefore, if you use a URL that points at a local file, then you must
make sure that the same URL is valid on the new system. If the URL is not valid,
you might need to copy the image and paste it in the same location on the new
system.
Memory Size
If you import a large package, you might need to increase memory size. In the
sasmc.ini file, modify the following code.
JavaArgs_1=-Xmx2048m
Data Libraries
The Data Library Manager in SAS Management Console lists the data libraries
that can be selected for an event input variable of type Data Grid or for a data
process. The list of data libraries that are available for selection by a data
process is based on the JDBC library resources that are defined in the SAS
Decision Services repository. A data process and an event input variable of type
Data Grid can reference the same data library.
Event Variables
An event can have an input variable of type Data Grid. In SAS Customer
Intelligence Studio, the location of input data grids that can be used in the Test
interface is specified in the Data Options panel on the Settings tab for the
business context, as the Decision test data grid input library selection. The
228 Chapter 7 / Managing Campaign Assets
data grid for the event input variable is selected on the Test tab of a diagram in
Test Mode.
An event can also have an output variable of type Data Grid. In SAS Customer
Intelligence Studio, the location of output data grids that can be used in the Test
interface is specified in the Data Options panel on the Settings tab for the
business context as the Decision test data grid output library selection.
Input and output library locations that can be used only in the SAS Customer
Intelligence Studio Test interface are selected from a list that is provided by the
Data Library Manager in SAS Management Console.
Data Processes
Managing Deployments
In order to display and use all of the features of the Deployments category, you
must have the following capabilities.
n Allow mark campaign for deployment
n Manage promotion
For more information, see “Predefined Roles for SAS Customer Intelligence” on
page 95.
The list displays the campaigns that are currently marked for deployment or
were modified after being marked for deployment, along with the treatment
campaigns and treatment campaign sets that are referenced by the displayed
campaigns.
To add or remove deployment environments from the list, you must have Edit
permission for the business context.
For information about using command-line scripts to manage remote
deployments, see “Use the Launcher to Complete Tasks” on page 401.
Note: Single sign-on is not supported for remote deployment environments.
b Note the libref value in the LIBNAME statement. You will use the libref
value when you add a remote deployment environment and when you
create the catalog in SAS Federation Server.
Figure 7.10 Libref Value “CIORA” in LIBNAME Statement
Note: Schema names are case-sensitive. For SQL Server, the libref
value should be the database name.
4 Click Verify Settings to ensure that you have added a valid deployment
environment.
For more information about SAS Decision Services Engine Servers, see
“Production Environment” on page 50.
1 On the SSL server machine, issue the following command to retrieve the
SSL server public key:
Managing Deployments 235
3 From the location on the middle tier where JRE is installed, issue the
following command:
./keytool -import -alias SSL server name -keystore
"$JRE_HOME/lib/security/cacerts" -file \public\certificate
TIP It is a best practice to mark campaigns for deployment before you deploy
treatment campaign sets so that the campaigns are already available when
you deploy a treatment campaign set.
You can refresh data and delete old records after a campaign has been marked
for deployment and published to the common data model. Create a new version
of the campaign and mark the new version for deployment.
To mark items for deployment in SAS Management Console, click the Folders
tab. In the folder that contains the SAS Real-Time Decision Manager objects,
right-click the objects and select Mark for Deployment. You can mark multiple
campaigns, decision treatment campaigns, and treatment campaign sets for
deployment at the same time.
For information about using command-line scripts to mark campaigns for
deployment, see “Use the Launcher to Complete Tasks” on page 401.
campaign when it was last deployed. For example, 1.2 in the Deployed Version
column indicates that the campaign was deployed after the second time it was
marked for deployment. Even though the campaign was marked for deployment
twice, the campaign might not have been deployed after it was marked for
deployment the first time.
The Event Name column displays the events that are associated with the
campaign, treatment campaign, or treatment campaign set.
For information about versions and events in SAS Customer Intelligence Studio,
see SAS Real-Time Decision Manager: User’s Guide.
Status Description
Status Description
For information about the life cycle of a campaign, see “Life Cycle of a Decision
Campaign” on page 52.
4 Select SASDSDesignRepository.
5 Right-click the asset that you want to promote, and select Export SAS
Package (note the previous caution).
Managing Deployments 239
7 Select the assets that you want to promote. A convenient way to select only
the boxes that you want is to select Clear All. Then select each XML file that
you want to promote. Click Next.
8 Verify the package name, location, and contents, and click Next.
The flow has now been successfully exported from the development
environment and saved in the package file called YourPackage.spk. The
240 Chapter 7 / Managing Campaign Assets
second part of the promotion process is to import the asset into the
production environment.
9 Right-click the repository folder of the repository that you want to promote the
asset to, and select Import SAS Package.
CAUTION! The Folder view in SAS Management Console does not restrict
the locations to which assets can be imported. To avoid unpredictable results,
always import to a repository folder.
10 Navigate to your package name. If you import directly after exporting, then
the package name is automatically supplied. To avoid overwriting existing
artifacts, select New Objects Only. Click Next.
11 Verify that a check mark exists beside the XML file of each asset that you
selected. Click Next.
Managing Deployments 241
13 Click Finish.
The promotion operation copies the asset without removing the asset from the
source repository. The asset has been successfully promoted from the
development to the production repositories as shown below.
242 Chapter 7 / Managing Campaign Assets
You can further verify that the promotion process was successful by viewing the
contents of the XML file after promotion.
2 Right-click the asset that you promoted and select View SAS Decision
Services content.
If the XML content can be viewed, then the promotion was successful.
3 Expand the SAS Decision Services system that contains the flow that you
want to activate. In the example below, SASDSEngineServer represents a
running engine that is deployed within a cluster. The green check mark
indicates that the plug-in has been successfully connected to the engine.
When a flow has been successfully activated, the following dialog boxes
appear:
246 Chapter 7 / Managing Campaign Assets
The first dialog box indicates that the flow was successfully marked as active
in the repository. The second dialog box indicates the flow was successfully
activated in the running system and is now ready to process events. The flow
status changes from inactive to active, as shown below.
If the user closes the treatment campaign set without saving, the administrator
can import the missing campaigns. Alternatively, the administrator can remove
the existing references to member campaigns and add new decision treatment
campaigns to the treatment campaign set.
repository, you export the SAS Decision Services event or global variable object.
On import, the objects are imported into a SAS Decision Services repository.
In SAS Real-Time Decision Manager 5.4, the activity code for SAS processes
and models was stored as SAS DATA step code in a folder. In 5.41 and later, the
activity code uses DS2 code that is embedded within the activity stored in a SAS
Decision Services repository. As a result, you must save the SAS process and
model definition from the 5.4 release to ensure that the activity is updated to
include the DS2 code. If you are migrating from the 5.4 release to a 5.41 release
or later, it recommended that you manually convert the SAS DATA step code to
DS2 code.
If you import a campaign with an event that already exists in the new release,
the campaign is opened and updated to use the new version of the event.
Identifiers that are associated with request variables or reply variables might be
changed if there are existing identifiers that have the same name but are of a
different data type. For more information see “Data Types” on page 11.
The relationship between treatment campaign sets and decision treatment
campaigns is maintained if all of the objects are imported into a path relative to
the business context root path. If treatment campaign sets and decision
treatment campaigns are imported at the same time, their relationship is
maintained in any path that they are imported to.
Import the campaign definitions and reply definitions into any folder within the
business context folder.
For more information about exporting and importing files, see “Best Practices for
Exporting and Importing Objects” on page 223.
8
Managing the Environment
Starting the Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
Backing Up and Restoring Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
The Difference between Backing Up Data and Archiving Data . . . . . . . . . . . . . . 251
General Strategy for Backing Up Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
Backing Up Files Before Installing a New Version . . . . . . . . . . . . . . . . . . . . . . . . . . 253
Using SAS Integration Utilities to Back Up and Restore Campaigns . . . . . . . . . 253
Exporting SAS Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
Checking for and Installing Hot Fixes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
Migrating to a New Release . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
Configuring Additional SAS Federation Servers to Form a Server Cluster . . 254
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
Install and Configure a New SAS Federation Server . . . . . . . . . . . . . . . . . . . . . . . 255
Edit JDBC Connection System Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
Clustering Best Practices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
Processing Large Amounts of Data in Arbitration . . . . . . . . . . . . . . . . . . . . . . . . . . 256
Arbitration Process Capacity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
Reduce Data Sent to an Arbitration Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
Requirements for the Remote Deployment Environment . . . . . . . . . . . . . . . . . . . 262
Requirements for Remote Publishing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
Requirements for the Design Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
Accessing the External REST APIs for Integrated SAS Products . . . . . . . . . . . 263
Managing User Sessions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
Managing User Sessions in the Administration Workspace . . . . . . . . . . . . . . . . . 264
Managing User Sessions If Secure Sockets Layer (SSL) Is Configured . . . . . . 265
Update Dynamic Custom Detail Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
Environment Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
Overview of Environment Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
Set Row and Item Recovery Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
Set Separators for Lists and Treatment Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
Set Logging Level . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
Improving Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
Performance Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
Load Balancing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
Improving History Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
Improving Campaign Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
250 Chapter 8 / Managing the Environment
Infrastructure Data Server (Postgres), SAS Web Server, JMS broker (Active
MQ), and cache locator (GemFire) must be started before you start SASServer1
(Web Infrastructure Platform). SASServer1 (WIP) must be started before you
start SASServer7. SASServer7 has a logical dependency on SAS Decision
Manager data server (Postgres), and SAS Federation Server. The following
diagram displays the start-up order for the SAS Customer Intelligence
components.
SAS Deployment
SAS Web Server
Server Manager
Retrieval Studio
Server (Postgres)
Server (Postgres)
SAS Information
SAS Federation
SAS Federation
Cache Locator
Manager Data
SAS Decision
(Active MQ)
(Gemfire)
(Python)
SAS Web
Server
(httpd)
Agent
SAS Metadata
Servers
SAS/CONNECT
SAS OLAP
Spawner
Spawner
(Web
DIP Job
Runner
Server
Server
Object
Deployment Tester
Infrastructure
Platform)
Remote Services
2 Back up either the SAS Content Server or the SAS Metadata Server.
3 Back up the remaining server (either the SAS Metadata Server or the SAS
Content Server).
For details about synchronizing your backups, as well as additional guidance for
making backups, see SAS Intelligence Platform: System Administration Guide.
The guide is available at http://support.sas.com/documentation/onlinedoc/
intellplatform/index.html.
Backing Up and Restoring Data 253
1 Make sure that the SAS Metadata Server has been paused and set to an
Offline state.
2 Stop either the web application server or the SAS Content Server application.
3 Use operating system commands or third-party tools to copy all of the files
and subdirectories from the following path:
SAS-configuration-directory\Lev1\AppData\SASContentServer
\Repository
n mausrupl.sas
Overview
The standard SAS Decision Services installation and deployment process
configures a single engine middle tier and a single SAS Federation Server. For
production deployments, more than one middle-tier engine and co-located SAS
Federation Server are typically configured to meet system performance and
availability requirements. See “JDBC Performance Tuning” on page 286 for
information about how to determine the number of servers to allocate to each
tier. A minimum of two middle tier SAS Federation Servers are required to
support hardware failover.
The SAS Decision Services engine load balances every SAS Federation Server
for which there is a corresponding URL in the JDBC Connection system
resource that is used for executing activities. Therefore, for proper operation,
every such SAS Federation Server must have access to the same set of DS2
packages. This requires that every such SAS Federation Server be configured
identically, with the same logins, database users, and DSNs. If your DS2
packages are stored in SAS data sets, those data sets must be located in a
shared directory that is accessible from all such SAS Federation Servers.
Configuring Additional SAS Federation Servers to Form a Server Cluster 255
SAS
S A S D ec is ion
Federation
Se rv ices E ng in e Server
S A S D ec is ion SAS
HTTP Server Federation D ata b ase
Se rv ices E ng in e Server
Activities
(DS2)
S A S D ec is ion SAS
Federation
Se rv ices E ng in e Server
n $Score_JDBCConnectionResource
3 Right-click the desired system resource, and select Edit System Resource
from the drop-down menu.
4 Modify the Server URL field only, by adding a space followed by the full
URL, including protocol, of your new SAS Federation Server.
This problem is caused by a limit of 32 kilobytes on the size of strings that are
passed from Java to the SAS DS2 language.
treatment code and description, but also all of the custom attributes for every
treatment.
n TREATMENT_COLUMN
n TREATMENT_CONTRIB_CELL_PACKAGE_SK
n TREATMENT_DESC
n TREATMENT_FOLDER
n TREATMENT_GUID
n TREATMENT_NAME
n TREATMENT_PARENT_FOLDER
n TREATMENT_REF_TEXT
n TREATMENT_REF_URL
n TREATMENT_SK
n NAME
n BOOLEAN_VALUE
n COLUMN_NAME
n DATE_VALUE
n DYNAMIC_FLAG
n LINK_VALUE
n NUM_VALUE
n REQUIRED_FLAG
n STRING_VALUE
n TAG
n TYPE
n VAR_ID
n XREF_LIST_ID
n LIST_VALUE
n ORDER
n TAG
n VAR_ID
The values in these columns are UDF list-type values where multiple rows might
exist for multiple-select UDFs. Only one _VALUE column is populated per row,
depending on type. Empty columns have negligible impact on an arbitration
process.
n In SAS Federation Server, the federated data source name (DSN) must be
populated with the common data model catalogs and schemas that match
the source environment.
n Libraries that are used by data processes in the decision flow must be
created with the same names in the run-time repository (pointing to the
correct hostnames and using the appropriate user names and passwords for
the production environment).
1 Open the file that is used to start the SAS Web Application Server.
On UNIX or Linux, the file is <SAS-configuration-directory>/
Lev1/Web/WebAppServer/SASServer6_N/conf/setenv.sh.
On Windows, the file is <SAS-configuration-directory>\Lev1\Web
\WebAppServer\SASServer6_N\conf\wrapper.conf
2 If you are using SAS Model Manager, add the following parameters to the
file:
-DMMGRWebServiceURL=http://myserver:portNumber
-DMMGRWebServiceURLUser=myuser
-DMMGRWebServiceURLPW=mypassword
3 If you are using SAS Business Rules Manager, add the following parameters
to the file:
Note: SAS Business Rules Manager comes with SAS Real-Time Decision
Manager. This step is required only if you are using an installation of SAS
Business Rules Manager that is not in the same environment as SAS Real-
Time Decision Manager.
-DBRMWebServiceURL=http://myserver:portNumber/SASBusinessRulesManagerWeb/rest/
-DBRMWebServiceURLUser=myuser
-DBRMWebServiceURLPW=mypassword
4 If you are using SAS Decision Builder, add the following parameters to the
file:
-DBDMWebServiceURL=http://myserver:portNumber
-DBDMWebServiceURLUser=myuser
-DBDMWebServiceURLPW=mypassword
To log off from a user session, select the session and click .
1 Open the file that is used to start the SAS Web Application Server.
On UNIX or Linux, the file is <SAS-configuration-directory>/
Lev1/Web/WebAppServer/SASServer6_1/conf/setenv.sh.
On Windows, the file is <SAS-configuration-directory>\Lev1\Web
\WebAppServer\SASServer6_1\conf\wrapper.conf
If the environment is not configured to use the default port, use the HTTPS
port number.
Environment Variables
Enter a number in the Maximum rows displayed field to specify the maximum
number of rows in a table that is displayed in SAS Customer Intelligence Studio.
This setting affects external tables that contain the following items.
n Events
n Test cases
n External treatments
Environment Variables 267
n Batch input
n Batch output
If you close or navigate away from an application window before you close an
object such as a campaign, the object remains open on the server. If you return
to the same session and attempt to reopen the object, the server verifies that the
abandoned object is not already open in another window. Enter the number of
seconds in the Reopen timeout field to specify the maximum amount of time
that the server waits for a reply from an open window before restoring
abandoned objects in a new window.
To set the delimiter for list values that are returned into a string type reply
variable, enter or select a separator in the Separator for list values list. To set
the delimiter for the multiple treatment values that are provided in a package,
enter or select a separator in the Separator for treatment values list. SAS
Real-Time Decision Manager uses the delimiters that are specified in the SAS
Decision Services global variables. If the global variables do not exist, SAS
Customer Intelligence Studio creates them and the delimiter values that are
created on the Campaign page are used as the initial values.
High
enables INFO, WARN, ERROR, DEBUG, and TRACE level logging. The
TRACE level creates the most detailed information and is used to
troubleshoot problems. The HIGH tracing level is not recommended for
normal operations.
This option controls the size of the log that is generated for any SAS code that is
run during a SAS Customer Intelligence Studio session.
For information about setting the levels for other logs in SAS Real-Time Decision
Manager, see “Customizing Logs for Troubleshooting” on page 325.
Improving Performance
Performance Considerations
The performance of SAS Real-Time Decision Manager can be measured by
volume and response time. Performance can be improved by load balancing,
and by monitoring, tuning, and analyzing your environment.
Performance can be hindered by the following activities:
n processing large amounts of transactions or events per second
n making external requests. Minimize external requests to improve
performance. For example, if the channel already has access to the data that
you need for your campaign, pass it in through the event or the API request
as much as possible instead of having each campaign execution require you
to query the database again. Interacting with a separate application can take
a lot of time.
n using SAS custom code, such as DS2, for process nodes adds time and can
easily include inefficient code
n using the SAS external web services activities
TIP When you use SAS external web service activities, use in-memory
tables and caching to optimize performance, if possible.
Improving Performance 269
n managing data between Java data types and DS2. For more information, see
“Data Types” on page 160.
When you choose a database to use with SAS Real-Time Decision Manager,
consider the transaction and latency requirements of your site. Not all of the
supported databases perform the same way in the same situation. For
performance and tuning information about the type of workload that you expect,
consult the product documentation for your database.
Your hardware might not be efficient when processing a large number of
treatment campaigns because it might not have enough memory to compute the
offers in parallel.
Load Balancing
Production workloads for SAS Real-Time Decision Manager must be split across
two or more operational servers that contain a SAS Decision Services engine
server and a SAS Federation Server. In order to balance incoming requests, a
load balancer might be necessary. If a load balancer is already installed at a site,
configure this component to direct traffic to the operational servers.
Load balancing provides the following benefits:
n volume management
load balancing enables you to keep the environment operational while you
perform maintenance on a component.
The following diagram displays the location of a load balancer in a configuration
of SAS Real-Time Decision Manager.
270 Chapter 8 / Managing the Environment
SAS
Compute
Metadata
Servers
Servers
Design
Middle Tier 1
sas-rtdm-internal.acme.com
Design
“Client” Applications Middle Tier 2
SAS Web
(SAS Customer Intelligence Studio,
Server
SAS Management Console, etc.)
SAS Real-Time
Decision Manager
sas-rtdm-external.acme.com
Tier 1
External Channel
Load Balancer Applications
SAS Real-Time
Decision Manager
Tier 2
In general, the DS2 activities method records history faster than other
methods. This method uses DS2 code that comes with the product. The
engine server makes a synchronous call to the SAS Federation Server and
requests that it execute the DS2 code. The SAS Federation Server then
executes the DS2 code to write the one row and returns an acknowledgment
that it wrote the row. The SAS Federation Server inserts a single record for
each executed flow that uses DS2. For more information, see “Flows” on
page 60.
Note: If you are using the DS2 activities method, the libref name for the
common data model must match the SAS Federation Server catalog name.
For more information, see “Creating Reporting Catalogs” on page 138.
Improving Performance 271
For example, to specify using a web service to update the contact history, enter
the following option:
-Dcom.sas.crm.rtdm.chupdate_flow=_SAS_CONTACT_HISTORY_WS_FLOW
To increase the number of concurrent jobs to load dynamic treatments, enter the
following option.
-Dcom.sas.analytics.crm.ccs.dt_stp_cnt = <number of jobs>
To increase the number of concurrent jobs to load confirmed contacts, enter the
following option.
- Dcom.sas.analytics.crm.ccs.pt_stp_cnt = <number of jobs>
To increase the number of concurrent jobs to load response history, enter the
following option.
-Dcom.sas.analytics.crm.ccs.rh_stp_cnt = <number of jobs>
By default, the CICommon web service collects records for up to ten seconds
before calling a stored process. If your site has the capacity, you can set a
longer time limit.
To change the time limit, enter the following option.
-Dcom.sas.analytics.crm.ccs.ccsservice.service.time_threshold = <number of seconds>
After you disable logging, you must restart SAS Federation Server.
Federation Server actually compiles and runs the DS2 code. In order to
communicate with SAS Federation Server, the design server and the engine
server each maintains its own pool of connections to SAS Federation Server.
Each connection loads a given DS2 package only when that package is
requested for a campaign. After a DS2 package is loaded, it remains in that
connection's memory until the connection is closed. DS2 packages that are
already in memory execute significantly faster than DS2 packages that must be
loaded.
The advantages of using connections that already have DS2 packages loaded
into memory are as follows:
n A connection that has been called on to execute all of your various DS2
packages executes subsequent DS2 calls faster than a new connection
does.
n Older connections usually have more DS2 code loaded into their memory,
and therefore process campaigns more quickly than newer connections.
n Reusing a given connection as much as possible produces better
performance than using the connections in sequence.
n A heavily reused connection is more likely to include the DS2 package that
you need because it is already loaded into memory.
n Because newer connections execute DS2 code more slowly, performance
measurements should not be taken in an environment that has recently been
restarted.
n Restarting the connections between SAS Decision Services servers and SAS
Federation Server adversely affects performance.
The following events reset connections:
n restarting SAS Federation Server
n restarting the SAS Decision Services server (the design server or the engine
server)
n invalidating a particular connection because a time-out value is exceeded
during execution of DS2 code
Note: The invalidation of a particular connection can be triggered by poor
back-end database performance if your DS2 code makes SQL calls to the
database. When one connection is invalidated, it triggers a cascade in which
all connections are reset. This restart can cause slower performance, which
can trigger more time-out conditions.
Bulk-Load Settings
Bulk-load settings are used only by the CustIntelReporting history processes
and by SAS Marketing Automation. If you are using SAS Marketing Automation
or stand-alone SAS Real-Time Decision Manager, and transactions to flows
exceed 500 transactions per second (TPS) where contact history is enabled, you
can increase performance by setting the bulk-load settings for the business
context.
1 Data set options specifies options that are used in the SAS DATA step to
create the temporary table. To enable the bulk-load capabilities of the
database, specify BULKLOAD=YES. Additional options might also be
appropriate, depending on which database you are using. For recommended
options, see “Example: Enabling the Bulk-Load Facility” on page 276. If a
bulk-load facility is not available for your database, or if you choose not to
use the bulk-load facility, see “Specify Data Set Options without Bulk
Loading” on page 278.
2 Schema specifies the location for the temporary tables. The following options
are valid.
n Specify your CICOMMON schema if you want the temporary tables to be
created in the same schema that stores contact history.
n Specify another schema to use for the temporary tables.
n Leave the field blank if you want the temporary tables to be created in the
user’s default schema.
n Users must have both Read and Write access to the specified schema,
including the following:
o the ability to create and drop tables and indexes
o the ability to delete, insert, and update records
n If you are using a Netezza database, specify the name of the database
where you want the temporary tables to be created.
Facility” on page 276. For information about enabling the bulk-load facility of
other databases, visit http://support.sas.com/documentation/index.html and
search for the keywords “bulk-load facility.”
To improve performance for all databases, add the following options to the
marketingautomation_autoexec_usermods.sas file.
options dbidirectexec;
%let SYS_SQL_IP_SPEEDO=YES;
n Schema: <schema-name>
Here are example bulk-load facility values for SQL Server - OLE DB Connection:
n Data set options: BULKLOAD=YES
n Schema: (optional)
Here are example bulk-load facility values for SQL Server - ODBC Connection:
n Data set options: BULKLOAD=YES
n Schema: (optional)
n Use temporary table capability of database: Not selected
n Schema: (None)
If you are storing MATABLES in a separate database, add the schema name. Do
not select Use temporary table capability of database.
278 Chapter 8 / Managing the Environment
You can also use the Teradata Parallel Transporter (TPT) to implement
FastLoad.
To start FastLoad in the SAS/ACCESS interface using the TPT API, specify the
TPT=YES data set option in a processing step that populates an empty Teradata
table. For more information, see SAS/ACCESS for Relational Databases:
Reference at http://support.sas.com/documentation/onlinedoc/access/
index.html.
1 Data set options specifies options that are used in the SAS DATA step to
create the temporary table. To improve performance, specify the
INSERTBUFF option.
2 Schema specifies the location for the temporary tables. The following options
are valid.
n If you want the temporary tables to be created in the user’s default
schema, leave the field blank.
n If you are selecting the Use temporary table capability of database
option, which uses the native temporary table capability of the database
to create temporary tables, leave the Schema field blank. The Schema
field is ignored if Use temporary table capability of database is
selected.
n Specify your CICOMMON schema if you want the temporary tables to be
created in the same schema that stores contact history.
n Specify another schema to use for the temporary tables.
Users must have both Read and Write access to the specified schema,
including the following:
n the ability to create and drop tables and indexes
Overview
The following examples show data set options that are recommended when a
bulk-load facility is not available. Enter these values on the Settings tab of the
Business Context Properties window, as described in “Specify Data Set Options
without Bulk Loading” on page 278.
n Schema: (None)
n Schema: (None)
Overview
The SAS Decision Services Monitor provides an API for querying activity hit
counters and execution performance statistics. The Monitor also controls
production batch execution, and provides access to batch job progress, status,
and results.
The SAS Decision Services Monitor collects performance statistics from SAS
Decision Services engines, saves them in a database, and supports querying
this data. The following describes the implementation of the SAS Decision
Services Monitor.
Data Collection
Overview
The monitor polls all SAS Decision Services engines in the cluster to retrieve
statistics on a regular basis. The data collection interval is configurable with
reasonable restrictions. For information about parameters that control the
frequency of data collection, see “Configuration” on page 281. The engines
continue to process data, whether the monitor retrieves data from it or not. Upon
start-up, the monitor scans the Topology table for the list of engines running in a
cluster. This table is scanned only at start-up. Any changes to the topology are
not picked up by the monitor until the monitor web application is restarted.
Independent Threads
Although it is not possible to guarantee a strict data collection interval, the
system makes a best effort to do so. During data collection, the monitor
communicates to the engines using spring remoting (Java serialization over
HTTP). If an engine is down, the HTTP call will time out. Depending on network
configuration, this might take time. To make the calls to the engines independent
of each other, the monitor collects data from engines on separate threads.
Duration
The statistics that are retrieved represent an interval of time. The duration is
determined by the time between the last retrieval from the engine (or the start of
the engine) and the current time of retrieval. Any changes to event and node
counts are captured. The average response time for flows is also captured. This
means that if the monitor is stopped and restarted, the duration will be longer
than usual and will include the counts during the time the monitor was not
available. If an engine server crashes, accumulated counts since the last
collection are lost. Therefore, using large data collection intervals can
compromise the accuracy of the counts. On the other hand, more frequent
collection uses more resources.
Persistence
Overview
Data collected from engines are persisted in a relational database. In the event
of the monitor process going down, historical data is retained.
Data Collected
As mentioned earlier, three types of data is collected: event counts, node counts,
and flow response times. Changes to event and node counts for a duration are
persisted in a record that includes the name of the event or the qualified name of
the node (including the name of the flow), the count, engine information (address
and port), and the start and end time of the duration. If the count for an event or
node does not change in a duration, the record is not written.
Similarly, the average response time for a flow is also persisted in a record that
includes the name of the flow, the average time in milliseconds, details of the
engine, and the duration.
For activity method call nodes, metadata such as the name of the activity and
the method called is also persisted. However, this information is not duration
oriented and only the time at which this is retrieved is persisted.
Configuration
The system supports the following configuration items that control monitoring:
Overview
Using the SAS Decision Services HQ Plug-in for SAS Environment Manager,
you can collect engine performance data, such as event hit counts, node hit
counts, and average flow response time. The plug-in also provides system
health information. Every tracking service is displayed as an individual service
under SAS Decision Services Monitoring Server. You can also find physical
memory size, virtual memory size, and CPU usage percentage information.
In order for SAS Environment Manager to access the SAS Decision Services
monitoring plug-in, a SAS Environment Manager agent needs to be installed on
each server in a SAS Decision Services engine cluster. The auto-discovery
process might take longer than 30 minutes, depending on the background
process of the SAS Environment Manager server. After the SAS Decision
Services monitoring plug-in is in the inventory of the SAS Environment Manager
server, you can select the SAS Decision Services resource that is linked to the
SAS Decision Services monitoring server, in order to collect the engine
performance data.
For more information about SAS Environment Manager, see SAS Environment
Manager User’s Guide at http://support.sas.com/documentation/onlinedoc/sev/
index.html.
1 Switch to Metric Data view by clicking Metric Data from any monitoring
service.
2 Select the metric data in the first column of the table by clicking the check
box.
3 Change the time interval in the text field by entering any integer.
286 Chapter 8 / Managing the Environment
Tuning Controls
Two JDBC Connection resources are configured for three separate purposes:
n To allow decision service activities to execute DS2 package methods, which
are hosted by SAS Federation Server. These package methods are used for
scoring, or for executing custom SAS code.
n To enable General I/O activities to read from and write to relational
databases such as Oracle, DB2, Teradata, and Microsoft SQL Server.
n To enable General I/O activities, which are configured to access SAS data
sets, to read SAS data sets through SAS Federation Driver for Base SAS.
SAS Decision Services uses Apache Commons Database Connection Pooling
(DBCP) to affect efficient caching and management of JDBC Connections,
parameterized prepared statements, and parameterized callable statements. For
more information about Apache Commons DBCP, see http://
commons.apache.org/dbcp/index.html.
DBCP pool tuning values are stored in JDBC Connection resources. To access
the pool tuning controls, select the Folders tab of SAS Management Console,
and follow these steps:
2 Right-click the JDBC Connection resource that you want to configure, and
select Edit System Resource.
Each attribute can be disabled or enabled by selecting the check box in the
Configured column. You can also enable or disable all attributes by selecting
Enable All. If all of the attributes are disabled in either Connection Pooling or
Statement Pooling, the XML element is not created in the JDBC resource. If the
pooling control is saved with the JDBC resource, you will see the advanced
dialog box when you edit this system resource the next time. You can click
Reset to Default to return to the basic dialog box. Any connection or statement
pool setting that is not explicitly configured in the JDBC resource, uses a default
288 Chapter 8 / Managing the Environment
value that is defined by Apache Commons DBCP. These default values are
listed below in the descriptions of each pool tuning control.
Note: It is recommended to use the default values in the Statement Pooling
panel.
After you click OK, the new JDBC Connection system resource appears in the
repository.
The terms and definitions that follow are also listed in the Help for this dialog
box.
Lifo
determines whether the pool returns idle objects in last-in-first-out order. The
default setting for this parameter is true. It is recommended that you use the
default setting. However, you can change the setting to prevent firewalls or
databases from automatically closing connections that have stayed idle too
long. If you have a number of idle connections in your connection pool, the
default setting is to reuse the most-used connections because these
connections have stored information and therefore will execute the fastest. If
there are a number of idle connections, those connections will be
automatically closed. SAS Decision Services handles connections that have
been closed from the outside. SAS Decision Services automatically drops
every connection in its pool and re-creates the connection pool.
Consequently, you will receive time-outs on the campaigns that you are
trying to execute during the period of time when the connections are dropped
and the connection pool is being re-created. It is recommended that you
make the pool small to minimize the number of idle connections or make the
pool larger and change the Lifo parameter so that you do not always use the
top of the stack. Or do not use a firewall or database that closes connections
from outside that have been lying idle between the middle-tier engine server
and your database.
MaxActive
controls the maximum number of objects that can be allocated by the pool
(checked out to clients or idle awaiting check-out) at a given time. When the
value is non-positive, there is no limit to the number of objects that can be
managed by the pool at one time. When MaxActive is reached, the pool is
said to be exhausted. The default setting for this parameter is 12.
MaxIdle
controls the maximum number of objects that can sit idle in the pool at any
time. When the value is negative, there is no limit to the number of objects
that can be idle at one time. The default setting for this parameter is 16.
MaxWait
the maximum amount of time, in milliseconds, to wait for an idle object when
the pool is exhausted. The default setting for this parameter is -1, which
means the wait can continue indefinitely.
MaxTotal
sets a global limit on the number of objects that can be in circulation (active
or idle) within the combined set of pools. When the value is non-positive,
there is no limit to the total number of objects in circulation. When maxTotal is
exceeded, all keyed pools are exhausted. When maxTotal is set to a positive
value, and borrowObject is invoked when at the limit with no idle instances
available, an attempt is made to create room by clearing the oldest 15% of
the elements from the keyed pools. The default setting for this parameter is
16 (no limit).
MinEvictableIdleTimeMillis
specifies the minimum amount of time that an object can sit idle in the pool
before it is eligible for eviction because of idle time. When the value is non-
positive, no object is dropped from the pool because of idle time alone. This
setting has no effect unless TimeBetweenEvictionRunsMillis is greater than
0. The default setting for this parameter is 120000 milliseconds.
MinIdle
sets a target value for the minimum number of idle objects (per key) that
should always be available. If this parameter is set to a positive number and
timeBetweenEvictionRunsMillis is greater than 0, each time the idle object
eviction thread runs, it tries to create enough idle instances so that the
specified number of idle instances will be available under each key. This
parameter is also used by preparePool, if true is provided as that method's
populateImmediately parameter. The default setting for this parameter is 4.
NumTestsPerEvictionRun
determines the number of objects to be examined in each run of the idle
object evictor. This setting has no effect unless
TimeBetweenEvictionRunsMillis is greater than 0. The default setting for this
parameter is 10.
TestOnBorrow
whether to validate objects before they are returned by the borrowObject()
method.
TestOnReturn
whether to validate objects after they are returned to the
returnObject(java.lang.Object) method.
TestWhileIdle
whether to validate objects in the idle object eviction thread, if any.
TimeBetweenEvictionRunsMillis
the amount of time to sleep between examining idle objects for eviction. The
default value is 120000 milliseconds.
WhenExhaustedAction
specifies the behavior of the borrowObject() method when the pool is
exhausted.
SoftMinEvictableIdleTimeMillis
the minimum number of milliseconds an object can sit idle in the pool before
it is eligible for eviction. There is an extra condition that at least MinIdle
number of objects remain in the pool.
290 Chapter 8 / Managing the Environment
Setting Example
TimeBetweenEvictionRunsMillis 1000 * 60 * 30
NumTestsPerEvictionRun 3
MinEvictableIdleTimeMillis 1000 * 60 * 30
HTTP Client Code Usage 291
Overview
SAS Decision Services uses Apache HTTP Client code in the following areas:
n SAS Customer Experience Real-Time Server integration
http-connection-manager.max-per-host
Set this value based on server capability. For example, if the server can
support 1000 concurrent HTTP connections, set this value at 1000. Every
instance of the HTTP Connection system resource, web service activity
resource, and the SAS Decision Service RequestFactory creates a pool of
connections, all for the same URL (for example, the same host).
http-connection-manager.max-total
Set this value to be the same as max-per-host because every pool supports
only a single host.
http-connection-manager.class
Set this value to
org.apache.commons.httpclient.MultiThreadedHttpConnectionManager.
System Properties HTTP Client Properties Default Values (if not set)
props.set("http.protocol.version", "HTTP/1.1");
props.set("http.connection.timeout", "1000");
props.set("http.tcp.nodelay", "true");
Overview
This section describes how best to take advantage of the SQLSTMT package,
which first became available with SAS Federation Server 3.2. In addition to the
SQLSTMT package, several other noteworthy performance improvements
became available with SAS Federation Server 4.1:
n Memory management improvements
294 Chapter 8 / Managing the Environment
n Greater stability, as code base closely matches the SAS 9.4 DS2 code base
It is advantageous to use SQLSTMT rather than the hash object, for the
following reasons:
n SQLSTMT allows a query to be prepared once and executed many times.
The hash object must prepare the query each time it is executed.
It is a best practice to use a single SQLSTMT to prepare a query once and
execute it many times rather than repeatedly calling SQLSTMT. Repeatedly
calling SQLSTMT unnecessarily uses resources to repeatedly create,
prepare, execute, and destroy the query.
For information about how to specify the values, see the examples that
follow.
If you need to write to multiple schemas, create a separate SQLSTMT for
each schema rather than passing the schema name to SQLSTMT.
The following example illustrates how the SQLSTMT package can facilitate
updating a data set in one database based on the values in another data set
in a second database:
libname db1 odbc user=XXXX pw=XXXX dsn=exadat;
libname db2 './base';
PROC DS2;
data _null_;
declare double x y;
method run();
dcl package sqlstmt stmt1('select x,y from db1.dataset1');
dcl package sqlstmt stmt2('update db2.dataset2 set y=? where x=?',
[y x]);
stmt1.execute();
stmt1.bindResults([x y]);
do while (stmt1.fetch() = 0);
stmt2.execute();
end;
end;
enddata;
RUN; QUIT;
/* Package level variables are used to bind the result set data. */
dcl bigint _myInt;
dcl varchar(255) _myString;
dcl double _myFloat;
/* A package level variable that gets prepared once when the package instance
is created. */
dcl package SQLSTMT _selectData('SELECT myInt, myString, myFloat FROM
oraSource.mySchema.testTable WHERE custId=?', [_custId]);
/* Set the bound parameter to the value of customer ID passed in from the
middle tier. */
_custId = customerID;
/* A package level variable that gets prepared once when the package instance
is created. */
dcl package SQLSTMT _selectData('SELECT myInt, myString, myFloat FROM
oraSource.mySchema.testTable WHERE custId=?');
Using SQLSTMT in Real-Time Applications 297
/* Local variables to hold data from a single row of the result set. */
dcl bigint myInt;
dcl varchar(255) myString;
dcl double myFloat;
/* Set the parameter to the value of customer ID passed in from the middle tier. */
_selectData.SETBIGINT(1, customerID);
double. A single row of data is inserted based on the value passed in from the
middle tier. See the inline comments for more details.
package example3 /overwrite=yes;
/* Note: All variables used as bound parameter variables must be package
level variables. */
/* Set the bound parameters to the values passed in from the middle tier. */
_custId = customerID;
_myInt = myInt;
_myString = myString;
_myFloat = myFloat;
Overview
SAS Real-Time Decision Manager treatment and treatment set campaigns are
the most resource intensive applications run by SAS Decision Services. These
applications require comprehensive tuning of all components to achieve best
performance. The settings found in this section represent reasonable initial
values for treatment set applications. The settings are not necessarily
appropriate for other, less resource intensive, applications.
The reference application, to which the following initial tuning settings apply,
includes 23 concurrent treatment campaigns in a single treatment set. Each
treatment campaign calls custom DS2 code, which in turn queries an Oracle
database up to six times per transaction.
Note: These settings are only a suggested starting point. Additional tuning
should be conducted using your specific application on your specific hardware,
while simulating peak transaction volumes.
MaxActive (SAS_Activity_Resource) 5
MaxIdle(SAS_Activity_Resource) 5
MinIdle(SAS_Activity_Resource) 5
improves speed and resource utilization. For more information, see “Using
SQLSTMT in Real-Time Applications” on page 293.
Note: The SQLSTMT packages use considerable more memory than hash
objects because the statements are cached for each JDBC connection.
However, this memory utilization is a good trade-off for performance.
n Run one SAS Federation Server per host. SAS Federation Server’s
improved internal memory management reduces threading contention and
eliminates the need to run more than one instance per host.
n Minimize use of the text concatenation operator, where possible, in DS2. This
operator (||) causes excessive CPU on the SAS Federation Server.
n Increase the number of threads assigned to the activity.execution.thread.pool
from the default of 100 to 600.
n Perform as much work in the database as possible. Avoid joining tables at
run time.
n Always index your database tables.
n If you are using the Oracle database and the rate of DS2 history activity is
high, adjust the file size of each Redo File group to 250 MB or higher or
increase the number of redo log groups.
The following tasks are critical to achieving best performance:
n Set the appropriate number of JDBC connections to the SAS Federation
Server.
n Set the appropriate number of threads available to the execution thread pool.
n Write DS2 code with real-time performance in mind, using the SQLSTMT
with package level declarations and bind variables, rather than the DS2 hash
object.
To set the first two values appropriately, you must understand the number of
activities that are being executed in each decision flow and the volume of
concurrent requests.
Audit Services
Overview
Auditing is an important part of the integration of SAS applications and solutions.
In its simplest form, auditing is a feature that provides a historical record of user
interaction with SAS applications, resources, and servers.
Events Logged
The following table lists the application events that are logged by different clients
of the audit service. It is a two-step process to activate and deactivate flows and
change the value of global variables. The first step is to change the status of the
flow in the repository. The second step is to notify the engine to update the
distributed cache. The first step generates the flow activation, flow deactivation,
or variable value update events. The second step generates an engine update
event, if the cache is updated.
Engine update This audit event is logged This audit event is logged
when the distributed cache by the SAS Decision
is updated as part of Services engine.
engine synchronization.
Note: All calls to
synchronize do not
necessarily update the
cache. For example, the
cache is not updated if the
contents of the repository
are the same as the cache,
or if there is a problem in
publishing the DS2 code to
SAS Federation Server. In
such cases, no event is
logged.
Flow activation This audit event is logged This audit event is logged
when an administrator by the SAS Decision
activates a decision flow. Services Administration
The audit event is logged API and the SAS
after the status of the Management Console
decision flow is updated in Decision Services plug-in.
the repository.
Flow deactivation This audit event is logged This audit event is logged
when an administrator by the SAS Decision
deactivates a decision Services Administration
flow. The audit event is API and the SAS
logged after the status of Management Console
the decision flow is Decision Services plug-in.
updated in the repository.
A flow might be
deactivated because
another flow that uses the
same event is activated.
Variable value updated This audit event is logged This audit event is logged
when an administrator by the SAS Decision
changes the value of a Services Administration
global variable. The audit API.
event is logged after the
status of the variable is
updated in the repository.
n The SAS Management Console Decision Services plug-in does not log the
change in the global variable values.
n The SAS Management Console Decision Services plug-in enables you to roll
back the activation or deactivation of a flow when it cannot notify the engine
to synchronize the cache. However, in such a case, it does not record the
rollback in the audit log.
304 Chapter 8 / Managing the Environment
Data Logged
The Web Infrastructure Platform (WIP) audit service logs the audit event data in
two tables in the WIP data server. They are public.sas_audit and
public.sas_audit_entry.
The primary table is sas_audit. Every row of that table corresponds to an audit
event. SAS Decision Services generates an audit event whenever a SAS
Decision Services event, flow, activity, or global variable is created, updated, or
deleted. When an audit event occurs, SAS Decision Services fills in the following
fields of the audit record:
Field Description
The sas_audit_entry table contains the additional information for certain types of
audit events, such as engine synchronization and variable value update. It
contains two fields that are significant to SAS Decision Services:
sas_audit_entry.property_nm and sas_audit_entry.new_value_txt. These fields
are used in conjunction to describe additional information about the event.
Here are the possible values for engine synchronization:
n property_nm contains RTDMFlow, and new_value_txt contains the name of
the flow that is loaded in the cache.
n property_nm contains RTDMVariable, and new_value_txt contains the name
of the variable that is loaded in the cache.
n property_nm contains the name of the global variable that is loaded in the
cache, and new_value_txt contains the value of the variable.
For array type variables, there are multiple rows, each containing one array
element value.
For variable value updates, property_nm contains value, and new_value_txt
contains the value of the variable. For array type variables, there are multiple
rows, each containing one array element value.
Only those objects that you have permission to view or edit are displayed. You
must have Edit permission in order to release a locked object.
Select the object that you want to release and click to be able to edit the
object. After an object is released, any changes to the object can be saved only
by selecting Save as.
306 Chapter 8 / Managing the Environment
307
Appendix 1
Troubleshooting
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
Problem Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
Typical Troubleshooting Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
Review the Error Dialog Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
Review the SASCustIntelCore6.x.log File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
Review the SASCustIntelStudio6x.log File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
Review Other Logs and Logging Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
Review Possible Resource Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
Next Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
Troubleshooting Validation Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
Checking Diagnostics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
Common Diagnostic Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
Common Sources of Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
Locked Asset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
Library Reference That Was Not Correctly Defined . . . . . . . . . . . . . . . . . . . . . . . . 312
Campaign Designers Close SAS Customer Intelligence in
the Middle of a Process That They Have Initiated . . . . . . . . . . . . . . . . . . . . . . . . 313
Stored Process Server Error in SASCustIntelCore6.x.log . . . . . . . . . . . . . . . . . . . 313
DS2 Data Type PACKAGE Hash Not Supported . . . . . . . . . . . . . . . . . . . . . . . . . . . 313
Errors in Model Scoring Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
DS2 Code Differences between SAS Federation Server and Base SAS . . . . . 315
Custom DS2 Code Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315
DS2 Data Type Not Supported . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317
Changes to Event Time-out Values Do Not Display . . . . . . . . . . . . . . . . . . . . . . . . 318
Queries to Database Dictionary Tables Time Out . . . . . . . . . . . . . . . . . . . . . . . . . . 318
Errors with Null Numeric Input Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318
StackOverflowError After Activating a Campaign . . . . . . . . . . . . . . . . . . . . . . . . . . 319
Activity Code Not Published . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319
Event Time-out Changes Do Not Take Effect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320
Components Not Receiving Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320
Invalid License Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321
Test Run-Time Server Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321
Error Codes for the Common Data Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
Logs for Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
Design Environment and Operational Environment Logs in
SAS Customer Intelligence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
308 Appendix 1 / Troubleshooting
Overview
This chapter presents a systematic approach to resolving problems in SAS Real-
Time Decision Manager.
Problem information typically appears in log files.
Begin by collecting basic information. A clear definition of the problem often
makes it easier to find a solution.
Problem Definition
A good problem definition includes the following information:
2 What are you seeing (or not seeing) in the logs or in the results that
demonstrates the problem?
5 Has the same sequence of steps been followed before without producing the
problem? If so, what might have changed?
a information map
e library definitions and options within the SAS Management Console Data
Library Manager plug-in
6 Does this problem occur for all users? If not, can this user’s problem be
replicated on another user’s computer?
a operating system of the compute tier, middle tier, and client tier
b database type and version for the underlying data warehouse (for
example, Oracle, SQL Server)
c version and hot fix level of the SAS Customer Intelligence products
9 How many transactions per second are being sent at the time of the
performance problem?
11 What is the range of response times that are you seeing under this load?
12 What steps, if any, have you taken in order to isolate the problem to a
particular component or flow? Examples are particular activities, treatments,
flows, and campaigns, or particular queries to the database.
When you have collected this information, you are ready to perform the following
troubleshooting steps.
2 Copy the entire error message, and paste it into a text editor.
This enables you to view the full text of the error. It also enables you to send
the full text of the error to SAS Technical Support, if necessary.
3 Record the time of the error so that you can identify any associated error
messages in the logs.
4 Use the error message and the problem description to search for known
issues in the SAS Notes at http://support.sas.com/notes/index.html.
You might need to try different combinations of keywords or different sections
of the error message.
310 Appendix 1 / Troubleshooting
2 If you do not find any relevant error messages in the log, then search for
WARN.
2 If you do not find any relevant error messages in the log, then search for
WARN.
n stored process server connections. For more information, see “About the
SAS Stored Process Server” on page 48.
n UNIX ulimit open file descriptors. Set the file descriptors to at least 20480.
Next Steps
After following these steps, it still might not be clear what is causing the problem.
Search for an applicable SAS Note at http://support.sas.com/notes/index.html,
using different combinations of keywords or error messages that you have
encountered.
If the solution to the problem remains unclear, review “Problem Definition” on
page 308 and send a description of the problem to SAS Technical Support. See
“Contacting SAS Technical Support” on page 336.
Checking Diagnostics
The SAS Decision Services diagnostics pages are useful for validating your
system after configuration. If errors occur when running the diagnostics pages,
check the associated log for details.
Error Solution
Invalid passwords are specified for the Use the User Manager plug-in in SAS
database or SAS Federation Server. Management Console to update the
password.
The wrong JDBC driver or data source Edit the configured data source or edit the
class was used for the application server. JDBC Connection system resource that is
referenced in the error message. see
“System Resources” on page 119.
The wrong version of the JDBC driver or Edit the configured data source or edit the
data source class was used for the JDBC Connection system resource that is
application server. referenced in the error message. For
more information, see “System
Resources” on page 119.
The data source name was not found or Install the database client on the SAS
no default driver was specified in the SAS Federation Server machine or define and
Federation Server data service. update the ODBC system data source on
the operating system.
Locked Asset
To address this error, release the locked object in the Locks category in the
Administration workspace of SAS Customer Intelligence. For more information,
see SAS Real-Time Decision Manager: User’s Guide.
2 Correct the reference by going to the Data Library Manager plug-in, right-
clicking on the library in question, and selecting Properties.
The library definitions that are used by SAS Customer Intelligence can be
viewed in SASCustIntelCore6.x.log. Often a careful examination of the
Common Sources of Errors 313
LIBNAME statements in this log can help you pinpoint problems with reading or
writing data.
3 Shut down the compute tier (object spawner, workspace servers, stored
process servers).
4 Check for remaining SAS processes that should not be running. Kill any
processes that are not responding.
For example, if the method in your last package for a SAS activity contains a
hash in its signature, then you receive the following error message:
2013-05-29 14:26:36,834 ERROR 41a93e32544d55ca:-3454255b:13ef116bda3:-4e60 SASDSDesignRepository
com.sas.rtdm.designserver.implementation.DesignServerWebserviceFactory -
Converting SAS Decision Services design server exception to fault.com.sas.analytics.ph.RTDMException:
DS2 data type PACKAGE hash is not supported for use in a DS2 Activity method.
at com.sas.analytics.ph.common.exp.DS2.DS2ActivityReader.mapDataType(DS2ActivityReader.java:129)
at com.sas.analytics.ph.common.exp.DS2.DS2ActivityReader.readParameter(DS2ActivityReader.java:73)
at com.sas.analytics.ph.common.exp.DS2.DS2ActivityReader.readMethod(DS2ActivityReader.java:44)
at com.sas.analytics.ph.common.exp.DS2.DS2ActivityReader.read(DS2ActivityReader.java:30)
at com.sas.rtdm.implementation.activity.sasactivity.SASActivityGenerator.generateActivity
(SASActivityGenerator.java:24)
at com.sas.rtdm.designserver.implementation.DesignServerInternalImpl.generateActivityFromDS2
(DesignServerInternalImpl.java:818)
at com.sas.rtdm.designserver.implementation.TranslatingDesignServerImpl.generateActivityFromDS2
(TranslatingDesignServerImpl.java:383)
To avoid this error, and to use method types other than those supported by SAS
Decision Services:
1 Create a single package in which you put only the methods that you want to
expose into your SAS activity.
2 Create a utility package for the rest of your methods.
3 Enter both packages in your SAS Activity window. Enter the utility package or
packages first, and then enter the package that uses the utility.
The SAS activity definition generator ignores all but the last package, and the
SAS activity publisher publishes all packages.
quit;
Running the following SAS DS2 code causes the code to be compiled and run in
the SAS Federation Server version of SAS DS2:
proc ds2 nolibs NOPROMPT="driver=remts;server=your-federation-server;port=21032;
protocol=bridge;uid=fedadmin;pwd=XXXXXXXX;conopts=(driver=ds2;conopts=(DSN=BASE_DSN))";
quit;
Use the second method above when you test SAS DS2 code for use in SAS
Real-Time Decision Manager (SAS Decision Services) activities.
1 A campaign that contains custom DS2 code is run by the SAS Decision
Services Engine Server (in production) or the SAS Design Server (in
development in SAS Customer Intelligence Studio).
316 Appendix 1 / Troubleshooting
2 When the SAS Decision Services Engine Server begins to process the
custom DS2 code, it prompts SAS Federation Server to run the code.
3 SAS Federation Server executes the code and returns the results to the SAS
Decision Services Engine Server to complete the program.
1 To publish the DS2 code, the SAS Decision Services Engine Server requires
a stored process that runs on SAS Pooled Workspace Server. Therefore, the
SAS Decision Services Engine Server communicates relevant information
about the custom DS2 code to the SAS Pooled Workspace Server.
In some instances, the SAS Pooled Workspace Server is unable to locate SAS
Federation Server, which causes the SAS Decisions Services servers to return
the following errors in their logs:
n ERROR com.sas.rtdm.implementation.ds2.DS2Publisher -
Failed to publish DS2 code for SAS activity
"{your_SAS_Node}”.
n ERROR: Unable to establish connection
SAS Decision Services stores the location for the SAS Federation Server in the
$SAS_Activity_Resource metadata object. If the SAS Federation Server is co-
located with SASServer7, then the location URL in $SAS_Activity_Resource is
often set to localhost. However, if the SAS Pooled Workspace Server is not
also co-located with the SAS Federation Server, then the stored process cannot
find a SAS Federation Server instance at localhost. To address this issue,
install the SAS Pooled Workspace Server on the same computer where an
instance of SAS Federation Server is installed. You can also list the explicit fully
qualified domain names for all SAS Federation Server URLs in the
Common Sources of Errors 317
When you run this code, you encounter an error message similar to the one
below:
2013-11-11 17:28:27,331 ERROR a1a8761d15cd81f3:-69151c9a:142469a1b3a:2bcb
SASDSDesignRepository
com.sas.rtdm.designserver.implementation.DesignServerWebserviceFactory -
Converting SAS Decision Services design server exception to fault.
com.sas.analytics.ph.RTDMException: DS2 data type PACKAGE hash is not supported
for use in a DS2 Activity method.
at
com.sas.analytics.ph.common.exp.DS2.DS2ActivityReader.mapDataType(DS2ActivityRea
der.java:129)
at
com.sas.analytics.ph.common.exp.DS2.DS2ActivityReader.readParameter(DS2ActivityR
eader.java:73)
at
com.sas.analytics.ph.common.exp.DS2.DS2ActivityReader.readMethod(DS2ActivityRead
er.java:44)
at
318 Appendix 1 / Troubleshooting
com.sas.analytics.ph.common.exp.DS2.DS2ActivityReader.read(DS2ActivityReader.jav
a:30)
at
com.sas.rtdm.implementation.activity.sasactivity.SASActivityGenerator.generateAc
tivity(SASActivityGenerator.java:24)
at
com.sas.rtdm.designserver.implementation.DesignServerInternalImpl.generateActivi
tyFromDS2(DesignServerInternalImpl.java:818)
at
com.sas.rtdm.designserver.implementation.TranslatingDesignServerImpl.generateAct
ivityFromDS2(TranslatingDesignServerImpl.java:383)
In order to work around this problem, create your DS2 utility packages outside
SAS Real-Time Decision Manager.
In order to avoid this slow performance, follow these two guidelines when you
query DBMS dictionary tables from within DS2 code:
n Use literals rather than parameters in your SQL query.
To avoid this error, substitute a predetermined value, such as 0 or -9999, for null
values that are sent to an external web service.
at
com.sas.rtdm.implementation.cache.SynchronizingCacheLoader.publishToDS2(Synchron
izingCacheLoader.java:246)
For information about the ports for the load balancer, see SAS Intelligence
Platform: Middle-Tier Administration Guide.
This error occurs when the SID file is not updated on the middle tier. In order to
update the SID file, run the SAS Deployment Manager on your middle tier and
select Update SID File in Metadata. For more information, see SAS Intelligence
Platform: Installation and Configuration Guide at http://support.sas.com/
documentation/onlinedoc/intellplatform/index.html.
Filename SASCustIntelCore6.x.log
Location <SASPlanName>/Lev1/Web/Logs/SASServer6_x
How to Increase the Set the logging level on the Logging page in SAS Customer
Logging Level Intelligence Studio. For more information, see “Set Logging
Level” on page 267.
The level of logs that you can adjust on the Logging page in
SAS Customer Intelligence Studio are dependent on your
settings in the SASCustIntelCore-log4j.xml file. Setting
logging to Medium gives you DEBUG messages. Setting
logging to High gives you TRACE messages. Setting logging
to Off gives neither, and gives only lower-level messages
depending on the settings in the SASCustIntelCore-log4j.xml
file. No matter what your logging settings are on the Logging
page in SAS Customer Intelligence Studio, you see at most
only the levels that you specify in the SASCustIntelCore-
log4j.xml file.
The TRACE level displays all the information that flows
between SAS Real-Time Decision Manager (SASServer6)
and SAS Decision Services. The RDMTestRunner class
includes TRACE logging that shows the TestInput (what
SAS Real-Time Decision Manager sends to SAS Decision
Services) and TestOutput (what SAS Decision Services
sends back to SAS Real-Time Decision Manager).
Filename SASCustIntelStudio6.x.log
Location <SASPlanName>Lev1/Web/Logs/SASServer6_x
Filename SASCustIntelReporting6.x.log
Location <SASPlanName>Lev1/Web/Logs/SASServer6_x
Filename SApp_STPServer_yyyy-mm-dd_pid.log
Log Contents Code and results from the nodes that are executed by the
SAS Stored Process Server.
Filename SASApp_PooledWSServer_yyyy-mm-dd_pid.log
Log Contents Queries that are created by nodes. Because the size of this
log increases quickly, enable debug logging for this log only
when troubleshooting a specific problem.
Filename SASDecisionServicesDesignServer6.x.log
Filename SASDecisionServicesEngineServer6.x.log
Logs for Troubleshooting 325
Location \Lev1\Web\Common\LogConfig
\SASDecisionServicesEngine-log4j.xml or
<SASPlanName>\Lev1\Web\Logs\SASServer7_x
Note: The following process requires knowledge of log4j.
The log file contains two appenders: LogFile and LogFile2.
All loggers are configured to use LogFile, which is a rolling
file appender that rolls over everyday. In some situations,
such as during system debugging, large amounts of log
messages might be written that can make the log file too
large. When the log messages are too sparse, it might be
convenient to collect the log over multiple days in a single
file for troubleshooting or submitting to technical support.
In these situations, it is convenient to use a rolling file
appender that rolls over based on size. The Logfile2
appender is provided as a convenience. It rolls over every
100MB. To use the LogFile2 appender, edit the log4j
configuration file and modify the logger definitions to use the
LogFile2 appender.
Filename SASFederationServer.x.log
Location \SASHome\SASFederationServer\4.x\etc
\dfs_log.xml
How to Increase the Set the logging level in the dfs_log.xml configuration file,
Logging Level located in the /etc directory of the installation path.
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{ISO8601} %p
[%X{sas.session.id}] [%X{sas.user.name}]
[%X{sas.local.session.id}] %c{1} %m %n"/>
</layout>
</appender>
<!-- to avoid parsing errors, loggers must come after appenders -->
TIP Because it is preferable to use DS2 to insert the data into the common
data model, you will not be using SAS Customer Intelligence Reporting and
therefore you will refer to the SAS Decision Services log or the SAS
Federation Server log, and not the SASCustIntelReporting6.x.log.
Logs for Troubleshooting 327
n database logs
n installation and configuration logs
2 Click the Folders tab, and then select System Applications SAS
Decision Services Decision Services 6.4
SASDSDesignRepository.
3 Change the directory path for the fileNamePattern parameter in the appender
to reflect your environment's directory structure.
5 Save the dfs_log.xml file, and restart the SAS Federation Server.
Logs for Troubleshooting 329
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
330 Appendix 1 / Troubleshooting
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{ISO8601} %p [%X{sas.session.id}]
[%X{sas.user.name}] [%X{sas.local.session.id}] %c{1} %m %n"/>
</layout>
</appender>
<!-- to avoid parsing errors, loggers must come after appenders -->
<root>
<priority value="ERROR"/>
<appender-ref ref="ASYNC_ FILE"/>
</root>
</log4j:configuration>
Configuration Loggers
These loggers track information as the DS2 compiler starts up, and provide
context for the actual execution of the user's code.
The options supplied to the DS2 compiler are displayed:
<logger name="App.TableServices.DS2.Config.Options"><level value="debug"/></logger>
The DS2 source code that is processed by the DS2 compiler is displayed:
<logger name="App.TableServices.DS2.Config.Source"><level value="debug" /></logger>
Note: Package source code is logged only when it is compiled. The logger does
not have access to package source code during execution time.
The version information for all Threaded Kernel Extensions loaded by the DS
compiler is displayed:
<logger name="App.TableServices.DS2.Config.Version"><level value="info" /></logger>
Run-time Loggers
These loggers track actual execution. Some of the tracked information is created
for each row processed. Therefore, a large input data set can produce
substantial amounts of data.
A trace of all method calls that occur during execution is displayed:
<logger name="App.TableServices.DS2.Runtime.Calls"><level value="debug" /></logger>
All SQL statements prepared and executed by the DS2 compiler are displayed:
<logger name="App.TableServices.DS2.Runtime.SQL"><level value="debug" /></logger>
In order to use this configuration file, add the following logconfigloc option to
your sdssas command:
% sdssas test.sas -log test.log -logconfigloc config.l4s
Tap Loggers
The tap_logger is a DS2 package that is installed on SAS Federation Server as
part of SAS Decision Services (SAS Real-Time Decision Manager). This utility
package simplifies adding logging to your DS2 packages for activities (such as
SAS process nodes). The package is similar to Log4J in that messages can be
logged at different logging levels.
TIP Save a copy of this configuration file before you edit it.
1 Add a new file appender to dfs_log.xml that is similar to the file appender
in this example:
<appender class="RollingFileAppender" name="DSTimeBasedRollingFile">
<param name="Append" value="true"/>
<param name="ImmediateFlush" value="true"/>
<rollingPolicy class="TimeBasedRollingPolicy">
<param name="fileNamePattern"
value="Installation-root\FederationServer\2.1\var\log\SASDS_%d_%S{pid}.log"/>
</rollingPolicy>
<layout>
<param name="HeaderPattern" value="Host: '%S{host-name}', OS: '%S{os-family}',
Release: '%S{os-release}',
SAS Version: '%S{sup_ver_long2}', Command: '%S{startup_cmd}'"/>
<param name="ConversionPattern" value="%d %-5p [%t] %c %X{Client.ID}:%u - %m"/>
</layout>
</appender>
3 Search for Application message logger and add the following logger section
immediately after it:
<logger name="App.SASDS">
<level value="Trace"/>
<appender-ref ref="DSTimeBasedRollingFile"/>
</logger>
After you restart the SAS Federation Server, all messages sent to a tap_logger
instance are written to the file that you specified in the file appender above.
n SAS Federation Server. For more information, see SAS Federation Server:
Administrator’s Guide.
n each database. For more information, see the documentation for the
database.
CAUTION! SAS Decision Services interprets DateTime values that are
stored in a database or in SAS data sets as being in the Greenwich Mean
Time (GMT) time zone A default time zone (GMT) is associated with values that
are read from a database because time zone information is not persisted with the
data. As a best practice, always store DateTime values using the GMT time
zone. This practice enables compatibility with SAS Decision Services and
removes ambiguity.
n SAS Customer Intelligence Studio. For more information, see SAS Real-
Time Decision Manager: User’s Guide.
n SAS Federation Server. For more information, see SAS Federation Server:
Administrator’s Guide.
n on each database. For more information, see the documentation for the
database.
336 Appendix 1 / Troubleshooting
n The number of cores (CPUs) are available on each of the machines in this
implementation.
n If you have performed any resource monitoring, either per machine or per
process, include information about your observations. Label your
observations by machine and by process, if applicable. SAS Decision
Services Monitoring enables you to monitor the performance statistics of
executions. For more information, see “SAS Decision Services Monitoring”
on page 279.
n The problem description. For more information, see “Problem Definition” on
page 308.
n The time at which the logging levels were increased and the problem was re-
created.
n The steps used to re-create the problem.
n The following logs that contain messages from the time the problem
occurred:
o SASCustIntelCore6.x.log
o SASCustIntelStudio6.x.log
o SASCustIntelReporting6.x.log
o SASStoredProcessServer_yyyy-mm-dd_pid.log
o ObjectSpawner_yyyy-mm-dd_pid.log
o WorkspaceServer_yyyy-mm-dd_pid.log
o SASDecisionServicesDesignServer6.x.log
o SASDecisionServicesEngineServer6.x.log
o SASFederationServer.x.log
o SASContentServer9.4.log
Contacting SAS Technical Support 337
Best Practices
It is helpful to apply the following best practices when gathering logs:
n Follow the steps that are presented in “Logs for Troubleshooting” on page
322.
n All logs that you gather must be from the same time period. The time period
must include a time during which the problem occurred.
n Include a timestamp for when the problem occurred. Ensure that the
timestamp is included in the period covered by all of the logs.
n If you have it, include a timestamp for when the problem first happened. An
approximate time is acceptable.
n Include a brief description of the components that are installed on each
machine.
n Label all of the logs such that technical support knows which machine each
log came from.
3 from the machine or machines where SAS Federation Server is installed (the
dfs_*.log files in the <LevConfig>\FederationServer\var\Logs directory
or in the common <LevConfig>\Logs directory)
n \Lev1\Web\Logs
n \Lev1\FederationServer\var\Logs
n \Lev1\Web\WebAppServer\SASServerN_N\logs
339
Appendix 2
Common Data Model: Concepts
About the Common Data Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339
What Is the Common Data Model? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339
Using the Common Data Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340
Updating the Content of the Common Data Model . . . . . . . . . . . . . . . . . . . . . . . . . 341
Managing Multiple Business Contexts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
Reporting and the Common Data Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
Publishing and Executing Campaigns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
How the Common Data Model Is Organized . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343
Key Tables for Reporting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344
Campaigns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344
Communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345
Cells, Packages, and Treatments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346
Control Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
History and Responses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
Integration with SAS Customer Intelligence 360 . . . . . . . . . . . . . . . . . . . . . . . . . . . 350
About Extension (_EXT) Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351
Purpose of _EXT Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351
About Populating the _EXT Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351
About History Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352
The CI_CONTACT HISTORY Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353
The CI_RESPONSE_HISTORY Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354
The CI_PRESENTED_TREATMENT_HISTORY Table . . . . . . . . . . . . . . . . . . . . . 357
About Lookup Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357
Contact History
the record of customer touchpoints and the campaign, communication,
and cell. Contact history records all of the offers that are available to the
customer.
Note: To publish the contact history, select Update Contact History in
the Properties in a Reply node or on the Standard Reply page.
Response History
the direct and indirect responses from customers to communications and
offers. Response history records whether the customer accepted or
rejected the offer.
Presented Treatment History
the record of offers that are presented to the customer. For example, if
three offers are available to the customer and only one of these is
presented, then the presented treatment history records that one. Each
treatment records the values that SAS Real-Time Decision Manager
assigns to a custom response to a customer.
n customer responses
All of the business contexts for your site can share a single version of the
common data model. Alternatively, you can specify a separate instance of the
model for each business context. For more information, see “Managing Multiple
Business Contexts” on page 342.
TIP Maintaining two separate common data models, one for SAS Marketing
Automation and one for SAS Real-Time Decision Manager, ensures that any
batch updates made by SAS Marketing Automation do not interfere with the
ability of SAS Real-Time Decision Manager to query and record history in real
time.
For descriptions of the tables and their columns in the common data model, see
SAS Customer Intelligence Common Data Model: Data Dictionary at http://
support.sas.com/documentation/solutions/ci/index.html. You must supply the
following user name and password to view this site:
User Name: sas
Password: CIadmin123
A diagram of the model is included at the end of the data dictionary. Use the
diagram to understand the relationships among the tables that comprise the
model.
Overview
The common data model is typically updated when you save a campaign after
the campaign has been published, or each time you execute a campaign. A
campaign is not published if the publish operation is not enabled, and if the
location of the data model for the respective business context is not specified.
The following common data model tables are updated when a campaign is
executed:
n CI_CONTACT_HISTORY_<subject>
n CI_PRESENTED_TREATMENT_HISTORY_<subject>
n CI_RESPONSE_HISTORY_<subject>
n CI_DYNAMIC_TREATMENT_ATTRIBUTE
n CI_DYNAMIC_TREATMENT_ATTRIBUTE_EXT
n CI_PACKAGE_X_TREATMENT
342 Appendix 2 / Common Data Model: Concepts
n CI_TREATMENT_CHAR_UDF
n CI_TREATMENT_NUM_UDF
n CI_TREATMENT_DATE_UDF
n CI_STAGING_DATA
Note: This table is updated only if you are using staged treatments.
n LASR library
n staging library
For more information about SAS Visual Analytics reports, see “Displaying
Reports in the Reports Workspace” on page 195.
Note: This definition of “publish” differs from that used to describe writing the
DS2 packages to the SAS Federation Server database that stores DS2 code in
“Create a DS2 Package” on page 168.
For more information, see “Saving, Publishing, and the Common Data Model” on
page 373.
When you publish a campaign or create a new version of the existing campaign,
you create a new set of surrogate key (SK) entries in the common data model.
You might create a new version of a campaign if you want a trail so that you can
see each different version of a campaign, with different metadata, that is
published in the common data model. SAS Customer Intelligence Studio begins
using this new campaign and data model. In the common data model, all unique
foreign primary keys for all common data model tables are surrogate keys.
Surrogate keys store the unique code that identifies each campaign within the
database.
When you create a report that provides information about the common data
model, it is the metadata within these surrogate keys that provides you with the
information about each table in the common data model. The four report
templates are as follows:
Campaign Channel Report
displays campaign count by channel.
Campaign Status Report
displays campaigns by status.
Treatment Performance Report
displays treatment contact and response counts, treatment details, campaign
type, channel, and campaign export date for the specified treatment.
Note: The example templates are in English only.
For more information about reports and report templates, see Chapter 6,
“Displaying Reports in the Reports Workspace,” on page 195.
Overview
Here are the table types in the common data model:
n Campaigns. For more information, see “Campaigns” on page 344.
n Communications. For more information, see “Communications” on page 345.
n History and responses. For more information, see “History and Responses”
on page 349.
n Cells, packages, and treatments. These include contact rule tables, self-
learning tables, and dynamic treatment tables.see “Cell, Package, and
Treatment Tables” on page 346.
344 Appendix 2 / Common Data Model: Concepts
Campaigns
Campaign Tables
Campaign tables contain campaign information for SAS Marketing Automation
and SAS Real-Time Decision Manager.
CI_CHANGE_LOG
contains an audit trail that is recorded when a component (table) of a campaign
is changed.
CI_CHANGE_TYPE
is a reference table that contains the types of changes that are stored in the
change log. This table is prepopulated when the common data model is
installed.
CI_CAMPAIGN
is the central table to which the other tables in the campaigns category connect.
A campaign contains a planned set of one or more communications over one or
more channels that are directed at a group of subjects such as customer,
household, or individual.
CI_CAMPAIGN_EXT
contains the additional user-defined fields if the CI_CAMPAIGN table is
extended in order to meet user-specific requirements.
CI_CAMP_PAGE
contains the checklist item for a campaign. A checklist item can be a brief, a
diagram, a communication, an optimization, a schedule, creative details, or offer
details.
How the Common Data Model Is Organized 345
CI_CAMP_PAGE_CHAR_UDF
contains character user-defined fields that are associated with the campaign.
These fields are custom details for the campaign group checklist.
CI_CAMP_PAGE_NUM_UDF
contains the numeric user-defined fields that are associated with the campaign
group. These fields are custom details for the campaign group checklist.
CI_CAMP_PAGE_DATE_UDF
contains date user-defined fields that are associated with the campaign. These
fields are custom details for the campaign checklist.
For information about _UDF tables, see “UDF (User-Defined) Tables” on page
352.
CI_CAMPAIGN_STATUS
contains the status codes and status descriptions for a campaign. This reference
table is automatically populated when the common data model is installed. For
default populated values, see “About Lookup Tables” on page 357.
CI_CAMPAIGN_TYPE
contains the types of campaigns. This reference table is automatically populated
with the values Selection and Decision when the common data model is
installed.
CI_TREAT_CAMP_SET_X_CAMPAIGN
is an intersection table that models the many-to-many relationship between
treatments and campaigns. When a treatment campaign is removed from the
treatment campaign set, a clean publish operation removes the treatment
campaign from this table.
CI_TREATMENT_CAMPAIGN_SET
is a set of treatment campaigns applicable only in SAS Real-Time Decision
Manager campaigns. After each treatment campaign has determined the
eligibility of an offer, the campaign returns the information to the treatment
campaign set. The treatment campaign set arbitrates the offers and returns the
best offers to the individual customers.
CI_TREAT_CAMP_SET_STATUS
is a reference table that contains the status codes and descriptions for a
treatment campaign set. This table is prepopulated when the common data
model is installed. The supplied values are __N (Not Marked for Deployment)
and __D (Marked for Deployment).
Communications
Communication Tables
346 Appendix 2 / Common Data Model: Concepts
CI_COMMUNICATION
contains the general descriptive information about a reply. A reply represents the
delivery of a package of treatments over a channel to particular cells.
CI_COMMUNICATION_EXT
contains additional user-defined fields when the CI_COMMUNICATION table
must be extended in order to meet user-specific requirements.
CI_COMMUNICATION_STATUS
is a reference table that contains the status codes and status code descriptions
for a communication. For example, the status code _11 means Exported and the
status code _12 means Deployed. This table is prepopulated when the common
data model is installed. Additional user-defined status codes can be specified.
For the default values, see “About Lookup Tables” on page 357.
_UDF Tables
For information about _UDF tables, see “UDF (User-Defined) Tables” on page
352.
CI_CHANNEL
is a reference table that contains the channels, channel codes, and channel
descriptions that are typically used in a campaign. A channel represents the
means of communication (such as email) between a company and targeted
customers. This table is automatically populated with common channel codes.
For more information, see “About Lookup Tables” on page 357.
CI_PACKAGE
contains a collection of one or more treatments. A package is used as a
collection point for one or more treatments. Treatments are delivered to the
channel as part of a package that is associated with a campaign.
CI_CELL_PACKAGE
contains columns to associate cells, communications, and treatments with a
package in order to facilitate reporting. The table also includes summary counts
for contacts and responses at a package level.
The DELETED_FLG field is set to Y when an occurrence is re-executed. Both
executions have the same occurrence number. The previous occurrence is
How the Common Data Model Is Organized 347
deleted when a new occurrence is added. The DELETED_FLG field is not set to
Y when the last occurrence is deleted. The DELETED_FLG field is set to Y
when the occurrence is re-executed and has a new surrogate key.
The RESPONSE_TRACKING_CD code is generated by SAS Real-Time
Decision Manager at contact time. The calling system returns the code when
there is a response or a presented treatment has been confirmed.
CI_DYNAMIC_TREATMENT_ATTRIBUTE
contains the associations of what dynamic treatments are part of a campaign. In
dynamic treatments, values can change each time that a campaign is run. After
assigning a treatment to a package, the user can assign values to each of the
dynamic custom details in the treatment. These values can be constants (1 or
ABC) or can be references to other variables (such as global variables or output
variables from upstream nodes). If they are references to other variables, the
values for those custom details are calculated each time the campaign is
executed, and could be different each time.
To place these per-execution values into the common data model, SAS
Customer Intelligence generates DS2 code that inserts the dynamic values into
the various treatment tables. If web services are used for contact history tables,
stored processes are used instead of DS2 code.
This table uses the response tracking code to generate a value for the
CELL_PACKAGE_SK column. In a DS2 process, the contact must precede the
writing to the table.
CI_DYNAMIC_TREATMENT_ATTR_EXT
contains additional user-defined fields when the
CI_DYNAMIC_TREATMENT_ATTRIBUTE table must be extended in order to
meet user-specific requirements. For information about the limits on the number
of characters in a variable, see “About Populating the _EXT Tables” on page
351.
CI_PACKAGE_X_TREATMENT
is an intersection table that models the many-to-many relationship between
packages and treatments. A package can have multiple treatments. A single
treatment can be a part of multiple packages.
CI_TREATMENT
contains the treatments that are associated with a campaign. Treatments can be
combined into a package.
When a business user defines a treatment, that user can specify whether the
treatment should be static or dynamic. Static treatments are named because
their values do not change as the treatment or treatments are applied throughout
the execution of a campaign.
The dynamic attribute of a treatment in a decision campaign can be specified as
either a variable or a manually defined value.
348 Appendix 2 / Common Data Model: Concepts
CI_STAGING_DATA
associates staged treatments with a business context if the common data model
is used to store staged treatments.
CI_CONTACT_RULE
is used by SAS Real-Time Decision Manager to associate inbound contact rules
with treatments in a campaign. There can be multiple contact rules for a single
treatment.
For more information about setting contact rules, see SAS Real-Time Decision
Manager: User's Guide.
CI_CONTACT_RULE_TYPE
is used by SAS Real-Time Decision Manager to associate a type with each
contact rule. The available types are Contacts, Presentations, or Responses
CI_CONTACT_RULE_INTERVAL
is used by SAS Real-Time Decision Manager to associate a time interval with
each contact rule.
CI_TREATMENT_UDF_TAG
contains the treatment tag (if any) that is associated with each treatment custom
detail.
CI_TREATMENT_EXT
contains additional user-defined fields when the CI_TREATMENT table must be
extended in order to meet user-specific requirements.
CI_TREATMENT_CHAR_UDF
contains character user-defined fields that are associated with the treatment.
These fields are updated when a campaign that contains a treatment with a
user-defined field of type char is executed. The static or default values for the
custom details are written to this table during the publish of a campaign. The
dynamic values for the custom details are written to the table during campaign
execution.
CI_TREATMENT_NUM_UDF
contains the numeric user-defined fields that are associated with the treatment.
These fields are updated when a campaign that contains a treatment with a
user-defined field of type num is executed. The static or default values for the
custom details are written to this table during the publish of a campaign. The
dynamic values for the custom details are written to the table during campaign
execution.
CI_TREATMENT_DATE_UDF
contains the date user-defined fields that are associated with the treatment.
These fields are updated when a campaign that contains a treatment with a
user-defined field of type date is executed. The static or default values for the
How the Common Data Model Is Organized 349
custom details are written to this table during the publish of a campaign. The
dynamic values for the custom details are written to the table during campaign
execution.
Control Groups
CI_CONTROL_GROUP_TYPE
is a reference table that contains the types of control groups that are used for
reporting. The supplied type is _ST for Standard. This table is prepopulated
when the common data model is installed. Additional user-defined types can be
specified. For more information, see Table A2.11 on page 361.
In the common data model, the following associations are established:
n For champion/challenger settings, the champion is the control group that the
challengers are compared with.
n For challenger/challenger settings, each challenger is a control group for all
the other challengers in a node, so that any two challengers can be
compared with each other.
To learn more about the champion and challenger control group, see “A/B Test
Node” in SAS Real-Time Decision Manager: User’s Guide.
CI_CTL_GRP_CELL_X_TEST_CELL
contains the intersection of a marketing cell that is being used as a control group
with a marketing cell that is being used as a test cell in order to determine the
performance of this control group comparison. The values for
CONTROL_GROUP_CELL_SK and MARKETING_CELL_SK are added as rows
in the table when a campaign is published. This table is used for holdout control
groups as well as for champion/challenger and challenger/challenger control
groups.
CI_MARKETING_CELL
contains a grouping of subjects that are targeted by a campaign. An example of
a subject is customer, household, or individual.
CI_CONTACT_HISTORY
contains a contact record of the delivery of a particular package to a particular
channel for a particular subject. For more information, see “About History
Tables” on page 352.
350 Appendix 2 / Common Data Model: Concepts
CI_PRESENTED_TREATMENT_HISTORY
contains a record of the presentation of particular treatments for a particular
channel for particular subjects. For more information, see “About History Tables”
on page 352.
This table is used in a call center where an operator presents a subset of the
delivered treatments to a customer. Data in this table is used for decision
campaigns (for SAS Real-Time Decision Manager data) as opposed to selection
campaigns (for SAS Marketing Automation data).
CI_CONTACT_HISTORY_STATUS
is a reference table that contains the status codes and descriptions for a contact
history record. This table is prepopulated when the common data model is
installed. Additional user-defined status codes can be specified. For the default
values, see “About Lookup Tables” on page 357.
CI_RESPONSE_HISTORY
contains a record of the direct or inferred response to a particular treatment or
package that has been made over a particular channel by a particular subject.
For more information, see “About History Tables” on page 352.
CI_RESPONSE
is a reference table that contains user-defined response codes and their
associated descriptions.
CI_RESPONSE_CHANNEL_RESPONSE
is a reference table that associates the external response codes of a specific
channel with internal response codes in order to facilitate the reporting of
customer responses.For the default values, see “About Lookup Tables” on page
357.
CI_RESPONSE_X_CELL_PACKAGE
is an intersection table that contains the valid responses for cell packages within
a communication and the response types (for example, conversion responses
and non-conversion responses).
CI_RESPONSE_TYPE
is a reference table that contains the codes for the types of responses such as
_CV (which stands for Converted) and _RS (which stands for Responded). This
table is prepopulated when the common data model is installed.
CI_EXTERNAL_CONT_RESP_DETAIL
contains details of contact or response impression events extracted from contact
and response data that is imported from SAS Customer Intelligence 360.
CI_EXTERNAL_CONTACT
contains summary of contact events extracted from contact data that is imported
from SAS Customer Intelligence 360.
CI_EXTERNAL_RESPONSE
contains summary of response events extracted from response data that is
imported from SAS Customer Intelligence 360.
Overview
The _EXT tables are not initially structured and are initially empty. As part of the
customizing process, you define the new column structures that you want to add
to the _EXT tables. This is usually a one-time database administrator task.
When a campaign or communication is executed, those name/value pairs in the
columns of a UDF table are transposed to the rows of the associated _EXT
table. The rows of the _EXT tables are populated with data.
The EXT table combines CHAR_UDF, NUM_UDF, and DATE_UDF tables into
one table that is more efficient for reporting. For example, CI_CAMPAIGN_EXT
table has one row for every campaign and is very wide with all the UDFs in the
columns. UDFs that are needed for reporting are combined in the EXT tables.
For example, the campaign-level UDFs that can be used for reporting from the
CI_CAMPAIGN_CHAR_UDF , CI_CAMPAIGN_NUM_UDF, and
CI_CAMPAIGN_DATE_UDF will be added to the CI_CAMPAIGN_EXT.
Note: For list type custom details, the value, rather than the display value, is
used to populate the _EXT table. The CI_DYNAMIC_TREATMENT_ATTR_EXT
table is populated with the dynamic custom details from the
CI_TREATMENT_*_UDF tables and the CI_TREATMENT_EXT table is
populated with the static custom details from the CI_TREATMENT_*_UDF
tables.
Note: The value of the CI_TREATMENT_CHAR_UDF.CHAR_UDF_VAL
variable is limited to 500 characters.
For more information, see “Customizing the Extension (EXT) Tables” on page
370.
352 Appendix 2 / Common Data Model: Concepts
Table View
CI_CAMP_GRP_PAGE_CHAR_UDF CI_CAMPAIGN_GROUP_CHAR_UDF
WHERE PAGE_NM = 'Brief Custom
Details'
CI_CAMP_GRP_PAGE_NUM_UDF CI_CAMPAIGN_GROUP_NUM_UDF
WHERE PAGE_NM = 'Brief Custom
Details'
CI_CAMP_GRP_PAGE_DATE_UDF CI_CAMPAIGN_GROUP_DATE_UDF
WHERE PAGE_NM = 'Brief Custom
Details’
Overview
The CI_CONTACT_HISTORY, CI_RESPONSE_HISTORY, and
CI_PRESENTED_TREATMENT_HISTORY tables have the following
requirements or properties:
n They are deployed in the same location as the common data model.
For information about using global variables to control the writing of history
records during testing, see “Manage Test Behavior” on page 63.
RESPONSE_SK
is the primary reference key code that associates the response with the
response code. This column refers to the CI_RESPONSE table that is a
lookup table for the response codes and their descriptions.
RESPONSE_TRACKING_CD
is a unique value containing the response code that is generated by SAS
Marketing Automation, and that is required to be returned with response data
for appropriate attribution and tracking to a particular campaign cell package.
RESPONSE_VALUE_AMT
is a flag that indicates the type of correlated response. Valid values are Y
(inferred response) and N (direct response).
SUBJECT_ID
is the primary reference key of a unique identifier such as Subject ID (for
example, Customer, Account, or Household) that associates the
CI_RESPONSE_HISTORY table with an external table. You must replace the
placeholder value that is assigned for this column during installation with a
valid key to the appropriate external table.
TREATMENT_HASH_VAL
contains a hash value generated to supply a single lookup value for a
combination of the dynamic custom details for a package.
TREATMENT_SK
is the primary reference key that associates the response with a treatment.
Direct Responses
Direct responses are responses that are attributed to a specific direct marketing
campaign. Direct responses are captured at the time of purchase by matching a
promotion code or key code to the targeted customer names. The code is
provided to the customer in the offer. The promotion code is returned in the
response by the customer and captured at the touchpoint so that there is a direct
link between the campaign and the response. The promotion code is a value
that is external to SAS Customer Intelligence. Therefore, you must decide how
to manage this link between the external promotion code and a campaign in
SAS Customer Intelligence.
Inferred Responses
Inferred responses are those responses that are indirectly attributable to a
marketing campaign, as specified by the purchase behavior of a customer. For
example, inferred responses might include the responses of all of the customers
in the target population of direct marketing Campaign X who bought the product
during the campaign. The objective of tracking the inferred responses is to
measure the total potential effect of the direct marketing efforts.
Both direct and inferred responses are defined by a response interval that
includes a start time and an end time. Responses that are returned outside the
defined response interval are not attributed to the campaign ROI. The only
356 Appendix 2 / Common Data Model: Concepts
responses that do not require a response interval are specified by either trigger-
based or event-based campaigns.
A customer who is targeted for a campaign might respond in a number of ways.
Possible types of direct and inferred responses that you might track are listed in
the following table.
Spill (to a similar product Clicks through an email to Does not provide a
in the same category) purchase a similar product. promotion code and does
not purchase the product
Provides a promotion code that is offered, but
at time of purchase and purchases another product
does not purchase the in the same category
product that is offered, but (captured in billing data).
purchases another product
in the same category.
n CI_CAMPAIGN_GROUP_TYPE
n CI_CAMPAIGN_STATUS
358 Appendix 2 / Common Data Model: Concepts
n CI_CAMPAIGN_TYPE
n CI_CHANGE_TYPE
n CI_CHANNEL
n CI_COMMUNICATION_RECURR_TYPE
n CI_COMMUNICATION_STATUS
n CI_CONTACT_HISTORY_STATUS
n CI_CONTROL_GROUP_TYPE
n CI_RESPONSE
n CI_RESPONSE_TYPE
Note: These values are supplied when the common data model is created.
Here are the tables, with their prepopulated values. Your lookup tables might
contain either different or additional values if they have been customized.
___ Other
Campaigns that are migrated from a previous release retain their original
campaign status codes. The codes are not converted to the values in the
following table.
1_1 Initiating
1_3 Designing
3_2 Scheduled
3_3 Executing
I Decision
O Selection
T Treatment
__H hourly
__D daily
__W weekly
__M monthly
__N none
__U unknown
_11 Executed
_30 Failed
_32 Future
_11 Executed
_30 Failed
_AU Automatic
_CL Challenger
_CP Champion
362 Appendix 2 / Common Data Model: Concepts
_ST Manual
Manual control groups are created by
selecting the Cell represents a control
group option in the Cell node.
_CV Converted
_RS Responded
363
Appendix 3
Implementing the Common Data
Model
Implementing the Common Data Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363
Creating the Table Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364
Overview of DDL Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364
How to Find Your DDL Scripts for Creating the Common Data Model . . . . . . . . 365
Specify Your Database Connection Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366
Setting Up the History Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368
Overview: Setting Up the History Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368
Update the Placeholder SUBJECT_ID Columns . . . . . . . . . . . . . . . . . . . . . . . . . . . 368
Customizing the Extension (EXT) Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370
Modify the Definition of an Extension Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370
Setting Up the Lookup Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372
Prepopulate the Lookup Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372
Resolving Translated Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372
Registering Data Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373
Updating the Libref for the Common Data Model . . . . . . . . . . . . . . . . . . . . . . . . . . . 373
Saving, Publishing, and the Common Data Model . . . . . . . . . . . . . . . . . . . . . . . . . . 373
About Saving versus Publishing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373
Full and Incremental Publish Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374
Migrating Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374
Overview
This section contains the steps for creating the table structure of the common
data model. The common data model is typically created as part of the SAS
Customer Intelligence installation. The common data model is used by SAS
Marketing Automation and SAS Real-Time Decision Manager. For conceptual
information about the common data model, see Appendix 2, “Common Data
Model: Concepts,” on page 339.
364 Appendix 3 / Implementing the Common Data Model
1 Verify that the user and group authorizations are specified for the users who
start the Customer Intelligence Common Web Service in order to access the
metadata for the business context. For more information, see “Administering
Group and Role Membership” on page 105.
2 Create the table structure for common data model tables in your database.
For more information, see “Creating the Table Structure” on page 364.
3 Set up the history tables. For more information, see “Setting Up the History
Tables” on page 368.
4 Customize the _EXT tables. To add the user-defined fields for the associated
UDF tables, For more information, see “Customizing the Extension (EXT)
Tables” on page 370.
5 Set up the lookup tables. For more information, see “Setting Up the Lookup
Tables” on page 372.
6 Create the library definition for the common data model. For details, see SAS
Intelligence Platform: Data Administration Guide.
7 Edit your business contexts to include the location of the metadata for the
common data model tables.
Note: The databases for SAS Real-Time Decision Manager and SAS Marketing
Automation should be kept separate for performance reasons. The common
data model for SAS Marketing Automation is optimized for batch writing. The
common data model for SAS Real-Time Decision Manager might need to be
optimized for smaller writes and short, real-time queries to the SLA.
o CI_CAMPAIGN_EXT
o CI_CAMP_CHECKLIST_ITEM_EXT
o CI_CAMPAIGN_GROUP_EXT
o CI_CAMP_GRP_CLIST_ITEM_EXT
o CI_COMMUNICATION_EXT
o CI_DYNAMIC_TREATMENT_ATTR_EXT
o CI_TREATMENT_EXT
Note: CI_CAMPAIGN_EXT columns that are meant to hold dates must use
a database type that holds date and time.
Scroll down to BEGIN EXTENSION SECTION and follow the instructions for
modifying the extension tables.
After customizing the ci_cdm_ddl_<db>.sas file, execute it via SAS to place
the tables in the database.
DB2 ci_cdm_ddl_db2.sas
Greenplum ci_cdm_ddl_greenplum.sas
Netezza ci_cdm_ddl_netezza.sas
Oracle ci_cdm_ddl_oracle.sas
PostgreSQL ci_cdm_ddl_postgres.sas
Teradata ci_cdm_ddl_teradata.sas
DB2 Example
Greenplum Example
Netezza Example
Oracle Example
For example, if the user name is scott, the password is tiger, and the Oracle
TNS Entry computer is cicommon.acme.com, then your %LET statements would
be similar to the following statements:
If the SAS session encoding is UTF-8, the length of staged treatment names
might exceed 128 bytes. In this case, there are execution errors. In order to
accommodate these longer names, add a DBCONINIT option to the CONNECT
Creating the Table Structure 367
Note: For Oracle, if the common data model is in a separate database instance
from the customer’s subject data (for example: customer, household, account),
then the tnsnames.ora file must be updated with the new connection information
about the subject data files. The tnsnames.ora file is located on the SAS
computer where the Oracle client is installed.
PostgreSQL Example
Mixed case or uppercase names for tables, columns, or schemas are not
supported for PostgreSQL except for table CI_STAGING_DATA. Table
CI_STAGING_DATA must be uppercase.
Teradata Example
Placeholder Columns
Each of the tables in BEGIN HISTORY SECTION by default contains the
primary key column, SUBJECT_ID, that is used as a placeholder column. A
history table can belong to one or more subjects, as well as to one or more
business contexts. You must update SUBJECT_ID with a customer-specific
subject key column or columns that typically point to an external table of custom
business values.
Note: If the subject has a composite key, then the multiple columns of the
composite key replace the SUBJECT_ID column.
n CI_CUST_RESPONSE_HISTORY
n CI_CUST_PRESENTED_TREAT_HIST
3 Follow the same steps in “Update a Single Subject” on page 368 for the set
of tables for each subject.
n CI_AP_CUST_RESPONSE_HISTORY
n CI_AP_CUST_PRESENTED_TREAT_HIST
n CI_NA_CUST_CONTACT_HISTORY
n CI_NA_CUST_RESPONSE_HISTORY
n CI_NA_CUST_PRESENTED_TREAT_HIST
370 Appendix 3 / Implementing the Common Data Model
Note: Table names must conform to the restrictions (such as length and special
characters) of the target data source. For example, the maximum length of a
table name in Oracle is 30 characters.
n CI_AP_CUST_PRESENTED_TREAT_HIST
n CI_AP_HHLD_CONTACT_HISTORY
n CI_AP_HHLD_RESPONSE_HISTORY
n CI_AP_HHLD_PRESENTED_TREAT_HIST
n CI_NA_CUST_CONTACT_HISTORY
n CI_NA_CUST_RESPONSE_HISTORY
n CI_NA_CUST_PRESENTED_TREAT_HIST
Overview
These steps are required in order to customize an extension table:
1 Modify the database table definition for the extension table. This step is
performed by the system DBA.
2 Identify which custom details (UDFs) are associated with which column of the
extension table. This step is performed by the administrator in SAS
Management Console.
Note: User-defined fields (UDFs) in the common data model are represented as
custom details in SAS Customer Intelligence and in SAS Management Console.
Overview
The extension tables contain one column by default that is a key column that is
associated with a main table in the common data model. For example, the
extension table, CI_CAMPAIGN_EXT, contains the single column called
CAMPAIGN_SK that is a key column in the associated table, CI_CAMPAIGN.
To create the new UDF columns for reporting, add a column to the extension
table. Here is an example of SAS code in which a column called
Customizing the Extension (EXT) Tables 371
/*===================================================================*/
/* Enter Customer Specific Target Source Connection Values - Oracle */
/*===================================================================*/
QUIT;
CAMPAIGN_SK = 1000000001
CHAR_UDF_NM = 'Sales Unit'
CHAR_UDF_SEQ_NO = 000002
CHAR_UDF_CHECKLIST_FLG = 'N'
CHAR_UDF_VAL = 'East'
CHAR_EXT_COLUMN_NM = 'CAMPAIGN_ADDITIONAL_DESC'
PROCESSED_DTTM = 01-APR-2013 00:00:00
372 Appendix 3 / Implementing the Common Data Model
If the column does not exist in the extension table, then no error is reported.
However, no data is written. You can either create campaign definitions that
have extension column names before the tables are modified, or modify the
tables before you create the campaign definitions.
Edit ci_cdm_load_codes.sas to set the correct LIBNAME for your database. The
following example sets the LIBNAME for an Oracle database.
%let lib= CDMLIB;
LIBNAME &lib. ORACLE PATH=&path. USER=&user. PASSWORD=&pass.;
n You run a test in the Test interface in SAS Customer Intelligence Studio.
Migrating Tables
The migration of the common data model from SAS Real-Time Decision
Manager 5.4 and 5.4.1 to 6.1 and later requires the running of the
ci_cdm_migrate_to_61_<db>.sas script. This is an in-place script that takes
place in one schema or database. No migration of data from one schema or
database to another schema or database is provided for in this script. You
should make a complete backup version of the 5.4 common data model before
you run the migration script.
Within each migration script the connection values and history tables must be
customized.
As the script executes, there are instances in which a current 5.4 table is
dropped and then re-created. In these instances a backup version of the table is
created and left intact after the script completes in order to save the original
data.
Find the migration scripts at the following locations:
n Under Windows: Program Files\SASHome\SASFoundation\9.4\cicsvr
\sasmisc
n Under UNIX: /SASHome/SASFoundation/9.4/misc/cicsvr
Migrating Tables 375
In SAS Real-Time Decision Manager 6.4, a change was made in the way that
treatment custom details of type Numeric Range or Date Range are published in
the common data model. For information about migrating tables that contain
treatment custom details to SAS Real-Time Decision Manager 6.5 from previous
releases, see “Migrating Files from a Previous Release” in .
376 Appendix 3 / Implementing the Common Data Model
377
Appendix 4
Command-Line Utilities
About the Command-Line Utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378
Encode Passwords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379
Add Channels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379
Overview of the Add Channels Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379
How to Use the Add Channels Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379
Add Channels Utility Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380
Batch Export and Import Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381
Overview of the Batch Export and Import Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381
How to Use the Batch Export Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381
How to Use the Batch Import Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383
Batch Export and Import Tool Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384
Load Treatments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385
Overview of the Load Treatments Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385
How to Use the Load Treatments Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385
Treatment Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386
Treatment Contact Rules Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387
Treatment Custom Detail Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388
Treatments to Delete Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392
List Values Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
Load Treatment Utility Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
Write Response Definition Data to XML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
Overview of the Response Definition Data Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
How to Use the Response Definition Data Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
Response Definition Data Utility Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394
Lineage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394
Overview of the Lineage Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394
How to Use the Lineage Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395
Lineage Utility Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395
Lineage Utility Relationships . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395
Lineage Utility Domain Object Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397
Lineage Utility Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398
Clean Up Production Repository . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399
Overview of the Clean Up Engine Repository Utility . . . . . . . . . . . . . . . . . . . . . . . . 399
How to Use the Clean Up Engine Repository Utility . . . . . . . . . . . . . . . . . . . . . . . . 400
Use the Launcher to Complete Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401
Overview of the Launcher . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401
Launcher Command Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401
378 Appendix 4 / Command-Line Utilities
Encode Passwords
For greater security, encode passwords when you execute the command-line
utilities. The parameters, including the encoded password, should be passed as
a single parameter to the sasciutils command.
In the following example, parameters are passed to the Add Channel utility as a
single parameter.
echo '-addchannel -userid myuserid -password
"{SAS002}3CD4EA1E0AF5A79500BC8ACC" -utilitylogfile c:/temp/cleanup.log
-deldate "Jun 01, 2013"'| sasciutils
For more information about encoding passwords, see SAS Intelligence Platform:
Migration Guide at http://support.sas.com/documentation/onlinedoc/
intellplatform/tabs/install94.html.
Add Channels
\sasciutils_console.exe"
-addChannel -userid MyUserId -password MyPassword
-utilitylogfile c:/tmp/channel.log -code D2D
-name "Door to Door Solicitation" -skipcdm
SET CURRENT=%CD%
CD %SASHOME%\SASPlatformObjectFramework\9.4
:INVALID
GOTO END
:END
CD %CURRENT%
PAUSE
Modify the code and place it in a text file named ExportCIObject.cmd. From the
directory that contains this file, execute the command with the following syntax:
ExportCIObject object-type object-name [-includeDep, -options]
object-type
is the public object type. For more information, see Table A4.1 on page 382.
object-name
is the name of the object.
-includeDep
includes dependencies.
-options
are the other batch export tool options.
After you have exported the objects, modify the substitution properties file. For
more information, see SAS Intelligence Platform: System Administration Guide
at SAS Intelligence Platform Product Documentation.
CICellNode (not visible in SAS Campaign cell node A node that represents a group or a
Management Console Folder subgroup that is targeted by a
view) campaign
SET CURRENT=%CD%
CD %SASHOME%\SASPlatformObjectFramework\9.4
:INVALID
GOTO END
:END
CD %CURRENT%
PAUSE
Modify the code and place it in a text file named ImportCIObject.cmd. From the
directory that contains this file, execute the command with the following syntax:
ImportCIObject package-name [-options]
Load Treatments
-loadtreatments
specifies the Load Treatments utility
-domain
specifies the domain of the user ID. This argument is optional.
-userid
is the user ID of the account that is used to execute the utility.
-password
is the password for the user ID.
-bcname
is the name of the business context.
-libname
is the library name of the tables that contain the treatments (for example,
"Treatment Tables").
-treatmenttablename
is the name of the treatment table. The treatment table, custom detail table,
and treatments to delete table must be in the same library.
-contactrulestablename
is the name of the table that stores inbound contact rules. The information
includes contact rule types and time periods. Inbound contact rules are
specified when you create a treatment. For more information, see SAS Real-
Time Decision Manager: User’s Guide.
-customdetailtablename
is the name of the custom detail table. The treatment table, custom detail
table, and treatments to delete table must be in the same library.
-treatmentstodeletetablename
deletes the specified treatment table. The treatment table, custom detail
table, and treatments to delete table must be in the same library.
Treatment Tables
Treatment tables should contain the following fields.
* For the treatment fields that are published to the common data model, the maximum character length is determined by the sizes used
when the common data model treatment-related tables were created.
TREATMENT_FOLDER The location of the treatment This field is not stored in the
relative to the business context common data model.
root data folder. The specified
Note: This field must match the
folder must already exist.
FOLDER field in the
Otherwise, an error is returned
TREATMENTS table.
for that treatment.
RULE_TYPE The localized value of the rule This field must match one of the
type: Contacts,Presentations, locale-specific rule types.
or Responses.
INTERVAL_UNIT The localized value of the time This field must match one of the
interval for the rule: Hours, locale-specific interval units.
Days, Weeks, or Months.
The values for the Type field in the Treatment Custom Detail table are defined in
CIUtilities/Source/Java/com/sas/analytics/crm/util/client/
UtilResources.properties. The default values are as follows.
Utilities.LoadTreatments.numericType.txt = Numeric
Utilities.LoadTreatments.dateType.txt = Date
Utilities.LoadTreatments.textType.txt = Text
Utilities.LoadTreatments.checkboxType.txt = Check box
Utilities.LoadTreatments.listType.txt = List
Utilities.LoadTreatments.linkType.txt = Link
Field Description
Write Response Definition Data to XML 393
On UNIX, the sasciutils file is typically installed on the middle tier in ./SASHome/
SASCustomerIntelligenceUtilities/6.5. From the UNIX directory that
contains the sasciutils file, execute the command with the following syntax:
sasciutils -useraction DumpResponseSK -argument1 -argument2
The command takes the following arguments:
-useraction DumpResponseSK
specifies the Response Definition Data utility.
-userid
is the user ID of the account that is used to execute the utility.
-password
is the password for the user ID.
-metaserver
specifies the Domain Name System (DNS) name of the metadata server.
-metaport
specifies the port for the metadata server.
-metadomain
specifies the domain for authentication (for example, DefaultAuth). This
argument is optional.
-responseskfile
specifies the response SK map path and output XML filename.
-logfile
specifies the log path and output log filename.
-threads
specified the number of simultaneous objects that are affected. The default is
1.
-debug
enables debugging text. This argument is optional.
Lineage
The following table lists and describes the directions for the relationships in the
Lineage utility.
Direction Description
The following table lists the relationship types and directions for left objects and
right objects in the Lineage utility.
Table A4.7 Relationship Types and Directions for Left and Right Objects
n .rules
n .selflearner
n .sas
n .read
n .update
n .insert
n .sdm
n .web
n .celebrus
n .java
n .dscode
n .javacode
Note: If CIDecisionProcess is the only the object type, and does not include any
sub-types, then all the process types in the lineage list will be used.
The following example lists the relationship links for a decision treatment
campaign:
sasciutils -lineage CICampaign_DecisionTreatment -userid MyUserid -bcName NorthWestBanking -password
MyPassword
The following example lists the relationship links for a decision campaign:
sasciutils -lineage CICampaign_Decision -userid MyUserid -bcName NorthWestBanking -password
MyPassword
For a campaign with a score node, a rules node, several treatments, a treatment
campaign set, and marked for deployment, the example output is created:
myCampaign:id A5OOUZVB.AF0000PO/TransformationActivity "A" TO myRuleDefinition id:A5OOUZVB.AA0002HH/Group
The following example lists the relationship links for a self-learner definition:
sasciutils -lineage CIDecisionProcess.selflearner -userid MyUserid -bcName NorthWestBanking -password
MyPassword
The following example lists the relationship links for a treatment campaign set.
sasciutils -lineage CITreatmentCampaignSet -userid MyUserid -bcName NorthWestBanking -password
MyPassword
The following example displays the lineage between treatments and campaigns:
sasciutils -lineage CITreatment -userid MyUserid -bcName NorthWestBanking -password MyPassword
-authdomain
The authentication domain for the remote system
-x
specifies the name of business context that corresponds to the campaign.
Spaces are allowed; the business context name is not case-sensitive.
-E
encrypts the remote system password (otherwise, the password appears in
clear text)
-v
specifies informative messages in the log. If not specified, only errors are
displayed.
-n
specifies that arguments are given by using the path and name rather than
by identifier. The path and name must be provided in URI (Universal
Resource Indicator) format unless option -q is specified.
-q
specifies that arguments are either quoted or have no spaces. URI
translation of arguments is suppressed when this option is specified.
--
specifies the end of the options. All parameters after this are directive
arguments.
directive arguments
is a list of arguments, separated by spaces. See Table A4.9 on page 404 and
Table A4.8 on page 403 for the directives that are associated with each
argument.
These are the possible arguments:
assetType
type of asset to mark for deployment. The value is camp.
business context ID
uses the settings of the specified business context to regenerate
metadata. Any saved settings are overridden by the directive arguments.
campID
campaign ID
camp path
folder path and campaign name
clearCache
information map cache to be cleared after map is generated
genType
describes the method used. 1 is SQL. 2 is PROC SUMMARY.
maintenance options
options for maintenance. The values are f to remove inactive flows, e to
remove unused events, a to remove unused activities, s to remove
unused treatment campaign sets, or t to remove unused decision
treatment campaigns. You can enter the options in any order. By default,
the options are executed in the following order: f, e, s, t, a.
remote name
name of the remote system
report name
folder and filename of input variables report
Use the Launcher to Complete Tasks 403
setId
test case ID
set path
folder path and campaign set name
testId
test case ID
testName
name of the test case in the campaign
testResultFile
test result log file path
testSaveMode
indicates whether a campaign is to be saved again after the test runs.
The values are save or nosave (default).
testType
indicates whether a campaign is to be tested. The value is camp.
typeArgs
space-delineated list of table-type arguments
The campID argument is an identifier that is assigned by the SAS Real-Time
Decision manager application server. It is not intended to be entered by the user
on the command line, but it can be used if the -n option is not used.
In the following table, the -n option has not been specified.
Table A4.8 Arguments When the -n Option Has Not Been Specified
You can enter the path argument on the command line if the -n option has been
specified. If an application server that is not the standard is used, the application
server also uses this argument with the -n option.
The following table lists the arguments to use when the -n option has been
specified. All objects are identified by name or by folder and name.
In order to generate a complete report, you should have access to all of the
campaigns and events. Otherwise, the generated report is incomplete.
If you do not specify a reporting library, the campaign is published to the default
library for the business context. For information about reporting libraries, see
“Creating Reporting Catalogs” on page 138..
Note: If you cross-publish a campaign to another common data model, you
must also publish the decision treatment campaigns and treatment campaign
sets that are related to the campaign.
Overview of Logging
By default, the launcher logs are stored in the home directory of the user who
issues the launcher command. The Launcher supports two types of logging:
General logging
logs each execution of the Launcher. Logging information can be written to a
different file for each execution or it can be appended to an existing file.
Command logging
logs a particular execution of the Launcher. Command logging enables you
to create logs for specific campaigns. The following considerations apply to
command logging:
n Command logging runs in Append mode by default.
n Command log files are written to the same directory as general log files. If
a directory other than the default has been specified for general logging,
then command logs are also written to the specified directory.
n Command log filenames are created based on the type of operation, the
object name or ID, and the last directory name in the path.
The sasmalauncher.ini file is the Launcher initialization file that contains start-up
and configuration parameters for the Launcher. To configure the Launcher’s
logging parameters, including log filenames and directories:
2 Open sasmalauncher.ini. You see Java code similar to the sample file
excerpt that is displayed.
3 Add command lines that specify the logging parameters that you want to
change. Add each new command argument at the end of the file.
Locate sasmalauncher.ini
sasmalauncher.ini is located by default in the SAS Customer Intelligence
installation directory:
n UNIX: .../SASMarketingAutomationLauncher/6.5
---
[properties]
MASTERPROP="C:\SASServer\SASHome\sassw.config"
[default]
startdir=<LAUNCHERDIR>
408 Appendix 4 / Command-Line Utilities
applogloc=
launchercmd=<JREHOME>
mode=console
JavaArgs_1=-Denv.definition.location="<SASENVIRONMENTSURL>"
JavaArgs_2=-Dma.launcher.logdir="ApplicationData\SAS\SASMarketingAutomationLauncher"
JavaArgs_3=-Djava.system.class.loader=com.sas.app.AppClassLoader
JavaArgs_4=-Dsas.ext.config="<SASHOME>\sas.java.ext.config"
JavaArgs_5=-Dsas.app.launch.config=picklist
JavaArgs_6=-Dsas.app.repository.path="<VJRHOME>\eclipse"
JavaArgs_7=-Dsas.app.class.path=.;"C:\SASServer\SASHome\SASMarketingAutomationLauncher\
6.5\build"
JavaArgs_8=-Dsas.app.launch.picklist=picklist;"help\primary.picklist"
JavaArgs_9=
Classpath=-cp "<VJRHOME>/eclipse/plugins/sas.launcher.jar"
MainClass=com.sas.analytics.crm.ma.launcher.MALauncher
n Execution Failed
Appendix 5
%CI2LASR Output Table Data
Dictionary
The %CI2LASR macro extracts common data model data to an output table.
The data is used for reports. For more information, see “Extract Data” on page
207.
The following table does not include columns that are built from the customized
extension (_EXT) tables. Those columns depend on the common data model
implementation at your site.
Table A5.1 %CI2LASR Macro Output Table Data Dictionary
Column Name Type Length Format Informat Common Data Model Source
TOTAL_MARKETING_ CONTACT_CNT NUM 8 NLNUM16. The total number of attempted contacts for the package,
minus any failed contacts (such as bounced e-mail
messages). This value is a count of subjects such as
Contents of the %CI2LASR Macro Output Table
HO_TOTAL_ATTEMPTED_CONTACT_CNT NUM 8 NLNUM16. NLNUM16. The total number of attempted contacts that were sent to
the channel for the holdout package. This value is a count
of subjects such as Customer, Household, or Account.
HO_TOTAL_MARKETING_CONTACT_CNT NUM 8 NLNUM16. NLNUM16. The total number of attempted contacts for the holdout
package minus any failed contacts (such as bounced e-mail
messages). This value is a count of subjects such as
Customer, Household, or Account.
CAMPAIGN_STATUS_DESC
417
CAMPAIGN_TYPE_CD CHAR 12 $12. $12. CI_CAMPAIGN,COLUMN: CAMPAIGN_TYPE_CD
Appendix 6
REST API for SAS Decision Services
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420
Latency Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420
Use Cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420
Other Important Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421
Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421
Decision Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421
Decision Services Artifacts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421
Decision Services Engine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422
Decision Services Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422
Validity Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422
Administrative Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422
Activation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422
Run-time Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423
Decision . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423
Decision Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423
Decision Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423
Decision Variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423
Decision Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423
Bindings (input and output) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423
Decision ID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424
Time Out . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424
Job . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424
Pagination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424
Guidance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425
Media Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425
Externally Defined Media Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425
SAS Decision Services Media Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426
Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436
Collection / . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436
Collection /decisionDefinitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437
Collection /jobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438
Resource /descisionDefinitions/{decisionID} . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439
Resource /decisions/{decisionId} . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440
Post-installation Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440
420 Appendix 6 / REST API for SAS Decision Services
Overview
This API allows access to decisions that are generated by the SAS Decision
Services engine. Specifically, the API accepts inputs that are represented as
decision parameters, processes them in the engine, and returns a
representation of the decision generated. The API is implemented as a
Representational State Transfer (REST) interface that accepts JSON payloads.
The REST API generates decisions in the SAS Decision Services engine. To
generate a decision, a client application posts a decision request object to a
named decision definition and receives a decision in response. The request
includes a set of bindings (one or more name-value pairs) that serve as inputs to
the decision generation process. Each binding has a name that is a string and a
value. The value might be a number, a Boolean value, a string, an array, or a
table. The generated decision object contains a set of bindings that are used by
the client applications to implement the decision. For example, a call center
might use a decision that contains items to offer to a customer for sale. Each
decision definition has a required set of bindings with fixed names and types for
the decision request as well as a defined set of bindings for the corresponding
decision object that was produced.
A decision services engine might hold several decision flows. Each such flow
contains code that generates a decision object when it is executed. Each flow is
associated with only one decision definition that determines the inputs and
outputs and that is an interface to the flow. The client application does not
reference the flow directly. Rather, it uses the decision name that is defined in
the decision definition. When a decision request is received by the engine, it
looks up the decision definition with the supplied decision name, finds the flow
that is associated with the decision definition, executes the flow, and returns the
generated decision.
Latency Requirements
In most cases, the decision must be returned to meet strict latency constraints
(order of 10–100s of milliseconds) that require a synchronous call to the engine.
In other cases, the client application does not care about the decision generated,
relying instead on the side-effects of executing a decision flow. In this case, the
client application can execute the decision flow asynchronously. The post
returns immediately and does not block the client application. The side effects
are completely determined by the decision flow.
Use Cases
A typical use case is a call center application that sends information to the
engine to determine the marketing offer to return to the caller. The call center
application typically sends the caller's identification and some information that is
not already available in the application's data storage (for example, the reason
Terminology 421
for the call). The engine might retrieve additional caller-specific information from
the database and execute decision flows to generate the offer.
Another use case might involve a website application that sends information to
the engine in order to retrieve offer information that drives banner
advertisements on the website. The decision is generated when creating content
for the website and any delay in generating the page can cause the customer to
leave the site. Therefore, a timely response within strict latency requirements is
critical.
5 The POST method on the jobs collection returns only an accepted status and
internally queues the decision flow for execution using the supplied decision
request.
Terminology
The following terms are applicable to the REST API for SAS Decision Services
Transaction Processing as well as the Appendix 7, “SAS Decision Services
Administration,” on page 443.
Decision Services
A collection of services that allow external and internal applications to generate
decisions.
Validity Rules
The artifacts in a decision services environment are complex objects that are
created by design-time services. Parts of an artifact might depend on, or refer to,
another part of the same artifact or another artifact. For example, a decision flow
might contain a rule that uses a variable, also contained in the same decision
flow. The variable might get its value from a binding in a decision definition that
the decision flow refers to. In the latter case, the decision flow is considered to
be dependent on the decision definition. Validity rules determine whether the
contents of a single artifact is consistent in itself as well as across artifacts. In
other words, in the above example, the variable that is referenced in the rule
must not only exist in the decision flow, but must also be used in the rule that is
consistent with its data type. Therefore, if the type of the variable is string, the
rule might not use it as an integer. In addition, the binding in the decision
definition that supplies the value to the variable must exist and match the type of
the variable.
Administrative Services
A subset of the decision services that focuses on administering a decision
services environment. In particular, it includes activating or de-activating
decision flows, changing the time-out values, and changing the value of
variables in the engines that are contained in the environment.
Activation
Activation makes the decision flows available for execution in a decision
services engine or engines. Active decision flows can be executed to create
decisions by sending decision requests to the engine. Not all decision flows can
be activated. Only a decision flow that (by itself and the artifacts that it depends
on) satisfies validity rules can be activated. Since artifacts are modified through
the design-time API, and moved to and from an environment using a promotion
API. The administration API provides error messages that direct the user to one
of these APIs in case validity errors are encountered during activation.
Terminology 423
Run-time Services
A subset of the decision services that focuses on the execution of decision
flows.
Decision
The output of the SAS Decision Services engine, generated by executing a
decision flow. It includes a set of bindings, such as name-value pairs that contain
the output that is generated by executing the decision flow. In addition, it
contains diagnostic information, such as timestamps that mark the start and end
of the decision-making process and a correlation ID that was supplied with the
decision request.
Decision Request
The input to execute a decision flow in the SAS Decision Services engine. It also
includes a set of bindings, such as name-value pairs that are written to the
decision flow in order to create the decision. In addition, it contains information,
such as the Internet Assigned Numbers Authority (IANA) time zone of the client,
that might be used to interpret clock time in the engine. It also contains the
correlation ID for tracking the request through the engine. It can also contain the
simulation timestamp and simulation time zone information. The latter two
values are optional. However, they might be required by certain decision flows.
Decision Flow
A set of rules and logic that is executed in the SAS Decision Services engine
when a decision request is received.
Decision Variable
The decision variables are named and typed values that influence the execution
of decision flows in the SAS Decision Services engines. The value of a variable
for a particular environment can be changed using the administration API for that
environment. Variables are global in scope, for a particular environment. These
variables affect the execution of all decision flows in the environment.
Decision Definition
Named metadata that describes the input and output bindings for the decision
request and decision. The decision definition captures the external contract of
the decision flow. It determines the names and types of input data that is
expected by the flow, and that are to be supplied in a decision request. It also
determines the names and types of data that is contained in the decision that the
flow generates.
corresponding value are defined in the decision definition. The name is usually
chosen by the person who designs the decision definition, and it reflects the
domain-specific terms. For example, it is possible to have a value called
customerId of type string.
Decision ID
The name of the decision definition. The client application does not reference
the decision flow directly. Instead, it uses the decision ID (the URL-encoded
name of the decision definition) to request a decision to be created. This
separates the client application from the actual execution logic, allowing the
latter to be swapped out for another decision flow, without bringing the system
down.
Time Out
Since, in most cases, it is critical to generate a decision within strict time limits, a
decision definition can have a time-out value associated with it that causes the
engine to time out if it fails to finish executing the decision flow within that time.
The time-out values are specified in seconds in REST APIs.
Job
A collection that allows asynchronous execution of decision flows in the engine.
The client application posts the decision request to this collection, and the
engine queues a decision for execution using the decision request. As soon as
the execution is queued, the engine returns a status of Accepted to the client
application.
Pagination
Overview
Pagination establishes the baseline expected query parameters and behavior for
paging or iterating through collections.
For collections, APIs can use query parameters to fetch (GET) or update (PUT,
PATCH) subsets of collections. This helps prevent the transmission of entire
(large) collections across networks, when a client application can visit or present
only a small subset of the collection.
…collection?start=<item-index>&limit=<max-item-count>
…collection?start=<item-index>
…collection?limit=<max-item-count>
APIs should use the start value to indicate the starting index of the subset. Start
should be a zero-based index. The default start should be 0.
APIs should use the limit value as the maximum number of items to return. The
number of items returned can be less, if the collection is exhausted. APIs should
use a default limit of 10.
Collection results should use hypermedia controls for the following, if each such
collection subset or page navigation is possible and practical.
Media Types 425
n first (rel="first")
n previous (rel="prev")
n next (rel="next")
n last (rel="last")
Guidance
When a resource representation contains links to collections, those links should
go to the main collection without the query parameters. The server should apply
the default start and limit values to return the first page. The API can also
include a field that contains the number of items in the collection. By convention,
this is named itemCount for the corresponding .../items collection. If you want to
view all of the objects within the collection, use at least the total number of
objects as the value of limit. Pagination should be the default, to prevent the
possibility of reading large collections.
Requests for collection resources return an empty collection, if there are no
items that match the criteria. For example, if the start value is more than the
number of items in the collection, an empty collection is returned. This could
happen if resources are deleted while someone is paging through the collection
using the next or previous links that were constructed when the resources were
still available. This is not an error condition and does not generate an error
response.
Media Types
application/vnd.sas.collection
application/vnd.sas.collection denotes a collection of resources. The collection
should contain domain objects in the element named items. This allows
heterogeneous collection and uniform structure across different collections. It
should have a name attribute that is the domain-specific name for the collection
items. The default is "items." If approved by the API COE, an API can use a
different name for the container. The value of the accept attribute, if present,
must be a text string consisting of a space-separated list of media type strings.
The media type names can omit the +xml and +json.
The type is implicit in the response representation of the collection. It should
contain the values of the start and index of the collection's subset of elements,
as per the pagination query parameters (&start=int and &limit=int), or the
collection's default start (0) and limit (10). The type of start is a 64-bit signed
integer value. The type of limit is a 32-bit signed integer value. The collection
can include an integer count attribute if the API can efficiently compute the size
426 Appendix 6 / REST API for SAS Decision Services
of the underlying collection. The type of the count is a 64-bit signed integer
value. The collection can have a nested collection of links. Each link element in
the links collection must be represented according to REST API link
representation standards.
Here is an example of application/vnd.sas.collection+json and application/
vnd.sas.collection+json;version=2:
{
"version" : 2,
"accept": "space-separated media type names allowed in this collection",
"count" : integer,
"start" : integer,
"limit" : integer,
"name" : "items",
"items": [
{ resource1 fields }, ...,
{ resourceN fields }
],
"links" : [
{ link representation }, ...
{ link representation },
]
}
application/vnd.sas.decision.definition
The application/vnd.sas.decision.definition media type describes the inputs that
are required to execute a decision flow and outputs that are generated by it. It
describes the data that can be used to construct the input member of the
decision request and render the data that is contained in the output member of
Media Types 427
the created decision. The value of the decisionId field is used as a key to
execute decision flows synchronously, as well as asynchronously. When
returned by the run-time services, it represents a decision definition of a decision
flow deployed in the engine. When returned by the design services, it represents
a decision definition that can be edited and used to construct decision flow. The
latter case is not addressed by this API.
Here are the link relations for the application/vnd.sas.decision.definition media
type.
created dateTime The timestamp that shows when this resource was first
created.
modified dateTime The timestamp of when this resource was last modified.
links collection of One or more link objects. See the link relations
link objects information above for a description of the link types.
"aBoolean" : "boolean",
"anInt" : "integer",
"aFloat" : ""decimal",
"aString" : "string",
"aDateTime" : "dateTime",
"aBooleanArray" : "booleanArray",
"aIntArray" : "integerArray",
"aFloatArray" : "decimalArray",
"aStringArray" : "stringArray",
"aTimestampArray" : "dateTimeArray"
"aTable" : "table"
},
"links": [{
"method": "GET",
"rel": "self",
"href": "http://rdcesx13020.race.sas.com/SASDecisionServices/rest/
runtime/decisionDefinitions/Sample%20Offers",
"uri": "decisionDefinitions/Sample%20Offers",
"type": "application/vnd.sas.decision.definition"
}, {
"method": "GET",
"rel": "summary",
"href": "http://rdcesx13020.race.sas.com/SASDecisionServices/rest/
runtime/decisionDefinitions/Sample%20Offers",
"uri": "decisionDefinitions/Sample%20Offers",
"type": "application/vnd.sas.decision.definition.summary"
}, {
"method": "POST",
"rel": "decisions",
"href": "http://rdcesx13020.race.sas.com/SASDecisionServices/rest/
runtime/decisions/Sample%20Offers",
"uri": "decisions/Sample%20Offers",
"type": "application/vnd.sas.decision"
}, {
"method": "POST",
"rel": "jobs",
"href": "http://rdcesx13020.race.sas.com/SASDecisionServices/rest/
runtime/jobs/Sample%20Offers",
"uri": "jobs/Sample%20Offers"
}]
}
application/vnd.sas.decision.definition.summary
Summary information for the underlying decision definition that is returned as
part of a collection to support browse functionality that does not require
retrieving the entire decision definition. This information might be returned by the
run-time services. In that case, the underlying resource has been deployed and
is not editable.
Here are the link relations for the application/
vnd.sas.decision.definition.summary media type.
Media Types 431
"method": "POST",
"rel": "jobs",
"href": "http://rdcesx13020.race.sas.com/SASDecisionServices/rest/
runtime/jobs/Sample%20Offers",
"uri": "jobs/Sample%20Offers"
}]
}
application/vnd.sas.decision
The application/vnd.sas.decision media type describes the decision as returned
by the SAS Decision Services engine when a decision request is posted to the
decisions resource collection.
The application/vnd.sas.decision media type contains the following members.
application/vnd.sas.decision.request
The application/vnd.sas.decision.request media type represents the information
that is used to generate the decision.
The application/vnd.sas.decision.request media type contains the following
members.
Media Types 435
Resources
Collection /
The / returns a collection of links to the top-level collections surfaced through
this API.
Authentication is not required. The request URL is GET http://
www.example.com/SASDecisionServices/rest/runtime/. The response to the
GET request is a collection of top-level links that are returned to
decisionDefinitions for resources that support run-time services. Currently only a
single collection is returned.
Here are the HTTP response codes:
200
OK
Resources 437
404
Not found.
500
Server error.
This resource can return the following media type representations by setting the
Accept: header of the request:
n application/json
n application/vnd.sas.collection+json
Collection /decisionDefinitions
The /decisionDefinitions collection is a collection of decision definitions that are
associated with the corresponding decision flows that are deployed in the SAS
Decision Services engine. The collection supports pagination and filtering by the
name of the decision definition. Because the names of decision definitions that
are deployed in a SAS Decision Services engine are unique, using such a filter
returns a collection of at most one item. The decision definition summary objects
contain links that allow the execution of the decision flow synchronously and
asynchronously. It is also possible to retrieve the complete decision definition.
Authentication is not required.
The GET request URL is GET http://www.example.com/SASDecisionServices/
rest/runtime/decisionDefinitions.
Here are the HTTP response codes:
200
OK
404
Not found.
500
Server error.
Here are the query parameters for /decisionDefinitions:
This resource can return the following media type representations by setting the
Accept: header of the request:
n application/json
n application/vnd.sas.collection+json
Collection /jobs
The /jobs collection is a collection of resources that represent transient requests
to asynchronously execute decision flows. When a decision.request object is
posted to this URL along with a URL parameter that contains the decisionId of
the decision definition that is associated with a decision flow, the SAS Decision
Services engine accepts this request and returns a status of 202 Accepted. It
then creates a job that represents a request to execute the decision flow
asynchronously. The client application does not wait for the flow to execute or
even for the job to be created. Because a job is a transient resource, it is not
possible to retrieve a job object using a GET method. Authentication is not
required.
The POST URL is POST http://www.example.com/SASDecisionServices/rest/
runtime/jobs.
Here are the HTTP response codes:
200
OK
404
Not found.
Resources 439
500
Server error.
Here is the query parameter for /jobs:
This method can return the following content type, as named by the Content-
Type: header:
n application/vnd.sas.decision.request+json
Resource /descisionDefinitions/{decisionID}
The /decisionDefinitions/{decisionId} resource represents a single decision
definition that is associated with a decision flow that is deployed in the SAS
Decision Services engine. The GET request returns a single decision definition
as identified by either the decisionId or the corresponding decision definition
summary object, depending on the media type that is requested.
The GET request URL is GET http://www.example.com/SASDecisionServices/
rest/runtime/decisionDefinitions/{decisionId}. Authentication is not required.
Here are the HTTP response codes:
200
OK
404
Not found.
500
Server error.
This resource can return the following media type representations by setting the
Accept: header of the request:
n application/json
n application/vnd.sas.decision.definition+json
n application/vnd.sas.decision.definition.summary+json
Resource /decisions/{decisionId}
The /decisions/{decisionId} resource is a transient resource that is used to
execute decision flows in the SAS Decision Services engine. The decision
resource is created when a decision.request object is posted at the URL below.
The resource that is created is not persisted and cannot be retrieved using a
GET method. Therefore, after generation by using a separate GET method,
decisions cannot be accessed. The POST method returns the decision object in
the response body and does not return a location for the created decisions. It
executes a decision flow that is associated with a decision definition that is
identified by the decisionId. Authentication is not required.
The POST URL is POST http://www.example.com/SASDecisionServices/rest/
runtime/decisions/{decisionId}.
Here are the HTTP response codes:
200
OK
404
Not found.
500
Server error.
This method can return the following content type, as named by the Content-
Type: header:
n application/vnd.sas.decision.request+json
This resource can return the following media type representations by setting the
Accept: header of the request:
n application/vnd.sas.decision.definition+json
Post-installation Steps
In order to for the REST API to work correctly, the following post-installation
steps must be completed:
1 Find the sas.conf file in the conf folder of the SAS web server installation
<SAS-configuration-directory>\Web\WebServer\conf.
2 Find the two lines of code that define the proxy and reverse proxy for the
SAS Decision Services engine.
ProxyPass /RTDM balancer://<machine name>.na.sas.com_Cluster7/RTDM
ProxyPassReverse /RTDM balancer://<machine name>.na.sas.com_Cluster7/RTDM
3 Copy these lines of code to a text editor and change the /RTDM on the right
side of the mapping to /SASDecisionServices as follows:
ProxyPass /SASDecisionServices balancer://<machine name>.na.sas.com_Cluster7/RTDM
ProxyPassReverse /SASDecisionServices balancer://<machine name>.na.sas.com_Cluster7/RTDM
4 Paste these modified lines of code directly below the lines mapping /RTDM.
ProxyPass /RTDM balancer://<machine name>.na.sas.com_Cluster7/RTDM
ProxyPassReverse /RTDM balancer://<machine name>.sas.com_Cluster7/RTDM
Resources 441
Appendix 7
SAS Decision Services
Administration
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443
Use Cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444
Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444
Media Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444
Externally Defined Media Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444
SAS Decision Services Media Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445
Resources and Collections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458
Resource / . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458
Collection /decisionDefinitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460
Collection /decisionFlows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466
Collection /variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472
Overview
The SAS Decision Services Administration API is a REST API that administers a
SAS Decision Services deployment containing one or more SAS Decision
Services engines.
Decision flows that are loaded in the engine for execution are known as active
decision flows. The process of making a decision flow active is known as
activation. Conversely, making it unavailable is known as deactivation. Not all
decision flows can be activated. Only decision flows that are valid can be
activated. The validity rules are described in the terminology section. The
Administration API allows activation of valid decision flows and deactivation of
any active decision flow.
The Administration API does not support modifying artifacts such as decision
flows, or adding missing artifacts from other decision services deployments. So,
if activation fails because of validity reasons, the administration API returns
detailed validation error messages. These messages can then be used to
correct the situation by using the appropriate API.
In most cases in the engine, the decision must be generated under strict latency
constraints. Every decision flow in the engine is associated with a decision
definition that contains a time-out value. This time-out value is used by the
engine to terminate the decision flow execution, should it take more time to
444 Appendix 7 / SAS Decision Services Administration
generate the decision. The administrative API allows setting and changing the
time-out value of the decision definition.
Some decision flows can be associated with a variable whose value can affect
the execution of the decision flow and, accordingly, the decision generated by it.
The Administration API also makes it possible to change the value of variables.
Use Cases
Here are use cases for the SAS Decision Services Administration API:
Query the status of flows in the engine
You might want to select a group of flows based on certain filter criteria and
view their contents. The filter criteria might include selection by created or
modified date, name, ID, activation status, association with a particular
decision definition, association with a particular variable, or a combination of
those. Decision flows in general are large resources and, for the purpose of
administration, a summary representation is more helpful.
Activation or deactivation
You might want to select a group of inactive flows based on filter criteria, as
above, and activate or deactivate one or all of them.
Changing time-out values
You might want to select a decision definition and view or change its time-out
value. Again, a summary representation of the decision definition is more
useful.
Changing the value of a variable
You might want to select a variable using filter criteria and view or change its
value. The filter criteria might include an association with a particular flow.
Terminology
For terminology specific to REST APIs, see “Terminology” on page 421.
Media Types
application/vnd.sas.collection
For more information about this media type, see “application/vnd.sas.collection”
on page 425.
Media Types 445
application/vnd.sas.decision.definition.summary
Summary information for the underlying decision definition is returned as part of
a collection. This makes it possible to support browse functionality that does not
require retrieving the entire decision definition. This information might be
returned by the run-time services. In that case, the underlying resource has
been deployed and is not editable. When exposed by the design-time services
links, it includes those that help create, edit, and delete decision definition
resources. When returned by the administration services, it represents a
decision definition that is available in the engine that is associated with a
decision flow that might or might not be active.
Here are the link relations for the application/
vnd.sas.decision.definition.summary media type.
rest/runtime/decisions/Sample%20Offers",
"uri": "decisions/Sample%20Offers",
"type": "application/vnd.sas.decision"
}, {
"method": "POST",
"rel": "jobs",
"href": "http://<server>/SASDecisionServices/
rest/runtime/jobs/Sample%20Offers",
"uri": "jobs/Sample%20Offers"
}]
}
application/vnd.sas.decision.flow.summary
The application/vnd.sas.decision.flow.summary media type is a summary
representation of a decision flow.
Here are the link relations for the application/vnd.sas.decision.flow.summary
media type.
application/vnd.sas.decision.variable
The application/vnd.sas.decision.variable media type represents a variable in
SAS Decision Services.
452 Appendix 7 / SAS Decision Services Administration
"type": "application/vnd.sas.decision.variable"
}, {
"method": "GET",
"rel": "value",
"href": "http://<server>/SASDecisionServicesAdministration/
rest/variables/GVStringArray1/value",
"uri": "variables/GVStringArray1/value",
"type": "application/json"
}, {
"method": "PUT",
"rel": "value",
"href": "http://<server>/SASDecisionServicesAdministration/
rest/variables/GVStringArray1/value",
"uri": "variables/GVStringArray1/value",
"type": "application/json"
}]
}
application/vnd.sas.decision.batch.update.request
The application/vnd.sas.decision.batch.update.request media type represents a
command to update multiple objects in a collection, identified by the IDs in the
selection field. This is used for activating or deactivating multiple decision flows
and to set the time-out value for multiple decision definitions in the SAS Decision
Services Administration API.
The application/vnd.sas.decision.batch.update.request media type contains the
following members.
application/vnd.sas.decision.batch.update.result
The application/vnd.sas.decision.batch.update.result media type represents the
result of a bulk update on a set of SAS Decision Services resources.
{
"version" : 1,
"startTimeStamp" : "time started",
458 Appendix 7 / SAS Decision Services Administration
Resource /
The / resource returns an object that contains a collection of links to the three
top-level collections that are surfaced by this API:
n /decisionDefinitions
n /decisionFlows
n /variables
The / resource uses the GET / method, which requires authentication, and has a
request URL of GET http://www.example.com/
SASDecisionServicesAdministration/rest/.
Here is an example of the JSON representation:
Resources and Collections 459
{
"links": [
{
"href": "http://www.example.com/SASDecisionServicesAdministration/
rest/decisionDefinitions"
"method": "GET",
"rel": "decisionDefinitions",
"type": "application/vnd.sas.collection",
"uri": "/decisionDefinitions"
},
{
"href": "http://www.example.com/SASDecisionServicesAdministration/
rest/decisionFlows"
"method": "GET",
"rel": "decisionFlows",
"type": "application/vnd.sas.collection",
"uri": "/decisionFlows"
},
{
"href": "http://www.example.com/SASDecisionServicesAdministration/
rest/variables"
"method": "GET",
"rel": "variables",
"type": "application/vnd.sas.collection",
"uri": "/variables"
}
]
}
403
Forbidden
404
Not found
500
Server error
Note: These are the most common HTTP response codes. You should be
prepared to handle all valid HTTP response codes, including 3xx redirection
response codes.
GET / returns the following media type representations by setting the Accept:
header of the request:
n application/json
n application/xml
Collection /decisionDefinitions
Overview
The /decisionDefinitions represents the collection of decision definitions
available in a run-time deployment. A decision definition is usually associated
with one or more decision flows, only one of which can be active.
The /decisionDefinitions collection has the following methods:
n GET
n POST
The GET method requires authentication and has a request URL of GET http://
www.example.com/SASDecisionServicesAdministration/rest/decisionDefinitions.
The GET method returns a collection of decision definition summaries
corresponding to the decision definitions in the system. The collection supports
pagination and filtering by the label (display name) of the decision definition.
The GET method has the following query parameters:
n application/vnd.sas.collection+xml;version=2
n application/vnd.sas.collection+json
n application/vnd.sas.collection+xml
n application/json
n application/xml
The POST method sets a time out for a group of decision definitions. Changing
the artifacts in use by the engine is expensive and requires validating any new
changes against the existing configuration and artifacts already loaded. Bulk
update methods like these collect all the changes required and perform the
validation only once instead of once per change. This allows for meeting strict
performance requirements.
The POST method requires authentication and has a request URL of POST
http://www.example.com/SASDecisionServicesAdministration/rest/
decisionDefinitions.
The POST method accepts the following content types, as named by the
Content-Type: header:
n application/vnd.sas.decision.batch.update.request+json
n application/vnd.sas.decision.batch.update.request+xml
n application/json
n application/xml
Because only the time-out field can be updated, the updates array can contain
only a single entry with the value of the op field set to replace, the value of the
path field set to time out, and the value field set to a positive floating point
number representing the time-out value in seconds.
A response returns the results of the update as a application/
vnd.sas.decision.batch.update.result.
Here are the HTTP response codes:
200
OK
Resources and Collections 463
400
Bad Request
401
Unauthorized
403
Forbidden
404
Not found.
500
Server error
Note: These are the most common HTTP response codes. You should be
prepared to handle all valid HTTP response codes, including 3xx redirection
response codes.
The POST method can return the following media type representations by
setting the Accept: header of the request:
n application/vnd.sas.decision.batch.update.results+json
n application/vnd.sas.decision.batch.update.results+xml
n application/json
n application/xml
Resource /decisionDefinitions/{decisionId}
The /decisionDefinitions/{decisionId} resource represents a single decision
definition in the system.
The GET method has the following query parameters:
The GET method requires authentication and has a request URL of GET http://
www.example.com/SASDecisionServicesAdministration/rest/decisionDefinitions/
{decisionId} .
The GET method returns a representation of a single decision definition
summary as identified by the decisionId.
Here are the HTTP response codes:
200
OK
401
Unauthorized
403
Forbidden
404
Not found
464 Appendix 7 / SAS Decision Services Administration
500
Server error
Note: These are the most common HTTP response codes. You should be
prepared to handle all valid HTTP response codes, including 3xx redirection
response codes.
GET returns the following media type representations by setting the Accept:
header of the request:
n application/vnd.sas.decision.definition.summary+json
n application/vnd.sas.decision.definition.summary+xml
n application/json
n application/xml
Resource /decisionDefinitions/{decisionId}/timeout
The /decisionDefinitions/{decisionId}/timeout resource represents the value of
the timeout, in seconds, for this decision definition. This value is used to
determine whether a decision flow execution has gone on for too long and
should be stopped. The timeout value is described in the application/
vnd.sas.decision.definition.summary media type. The value is a positive floating
point number and is returned or accepted as text/plain.
The GET method requires authentication and has a request URL of GET http://
www.example.com/SASDecisionServicesAdministration/rest/decisionDefinitions/
{decisionId}/timeout.
The GET method returns the value of the timeout, in seconds, for the decision
definition identified by the decisionId.
Here are the HTTP response codes:
200
OK
401
Unauthorized
403
Forbidden
404
Not found
500
Server error
Note: These are the most common HTTP response codes. You should be
prepared to handle all valid HTTP response codes, including 3xx redirection
response codes.
GET returns the following media type representation by setting the Accept:
header of the request:
Resources and Collections 465
n text/plain
The PUT method sets the value of the timeout, in seconds, for the decision
definition identified by the decisionId.
Note: For updating the timeout value for multiple decision definitions, the batch
update process is the most efficient option.
The PUT method requires authentication and has a request URL of PUT http://
www.example.com/SASDecisionServicesAdministration/rest/decisionDefinitions/
{decisionId}/timeout.
The PUT method accepts the following content type, as named by the Content-
Type: header:
n text/plain
Resource /decisionDefinitions/{decisionId}/timeoutEnabled
The /decisionDefinitions/{decisionId}/timeoutEnabled resource represents a
Boolean value to indicate whether timeout processing is turned on for this
decision definition, as identified by the decisionId.
The GET method requires authentication and has a request URL of GET http://
www.example.com/SASDecisionServicesAdministration/rest/decisionDefinitions/
{decisionId}/timeoutEnabled .
The GET method returns the value of the timeoutEnabled flag for this decision
definition. The value is returned as a Boolean value.
Here are the HTTP response codes:
200
OK
466 Appendix 7 / SAS Decision Services Administration
401
Unauthorized
403
Forbidden
404
Not found
500
Server error
Note: These are the most common HTTP response codes. You should be
prepared to handle all valid HTTP response codes, including 3xx redirection
response codes.
GET returns the following media type representation by setting the Accept:
header of the request:
n text/plain
The PUT method updates the value of the timeoutEnabled flag for this decision
definition. Accepted values are Boolean values.
The PUT method requires authentication and has a request URL of PUT http://
www.example.com/SASDecisionServicesAdministration/rest/decisionDefinitions/
{decisionId}/timeoutEnabled.
The PUT method accepts the following content type, as named by the Content-
Type: header:
n text/plain
Collection /decisionFlows
Overview
The /decisionFlows collection represents the collection of decision flows in the
system. Every decision flow is associated with a decision definition that it
Resources and Collections 467
n POST
The GET method requires authentication and has a request URL of GET http://
www.example.com/SASDecisionServicesAdministration/rest/decisionFlows.
The GET method returns a collection of decision definition summaries
corresponding to the decision definitions in the system. The collection supports
pagination and filtering by the following attributes:
label (string)
The display name of the decision flow.
active (Boolean)
The flag indicating whether the decision flow is active or not.
decisionId (string)
The ID of the decision definition that this flow is associated with.
The GET method has the following query parameters:
"start" : start,
"limit" : limit,
"count" : count,
"name" : "decisionFlowSummaries",
"accept": "application/vnd.sas.decision.flow.summary+json"
"items" :
[
{ application/vnd.sas.decision.flow.summary+json contenti },
{ application/vnd.sas.decision.flow.summary+json contenti+1 },
...
{ application/vnd.sas.decision.flow.summary+json contentn },
],
"links: [
{ "rel" : "first", "method" : "GET", ... },
{ "rel" : "prev", "method" : "GET", ... },
{ "rel" : "next", "method" : "GET", ... },
{ "rel" : "last", "method" : "GET", ... },
...
]
}
500
Server error
Note: These are the most common HTTP response codes. You should be
prepared to handle all valid HTTP response codes, including 3xx redirection
response codes.
GET returns the following media type representations by setting the Accept:
header of the request:
n application/vnd.sas.collection+json;version=2
n application/vnd.sas.collection+xml;version=2
n application/vnd.sas.collection+json
n application/vnd.sas.collection+xml
n application/json
n application/xml
n application/vnd.sas.decision.batch.update.request+xml
n application/json
n application/xml
Since only the active field can be updated, the updates array can contain only a
single entry with the value of the op field set to replace, the value of the path
field set to active, and the value field set to a Boolean value representing
whether the flows are active or not.
Here are the HTTP response codes:
200
OK
400
Bad Request
401
Unauthorized
403
Forbidden
404
Not found.
470 Appendix 7 / SAS Decision Services Administration
500
Server error
Note: These are the most common HTTP response codes. You should be
prepared to handle all valid HTTP response codes, including 3xx redirection
response codes.
The POST method can return the following media type representations by
setting the Accept: header of the request:
n application/vnd.sas.decision.batch.update.results+json
n application/vnd.sas.decision.batch.update.results+xml
n application/json
n application/xml
Resource /decisionFlows/{decisionFlowId}
The /decisionFlows/{decisionFlowId} resource represents a single decision flow
in the system as identified by the decisionFlowId.
The GET method has the following query parameters:
The GET method requires authentication and has a request URL of GET http://
www.example.com/SASDecisionServicesAdministration/rest/decisionFlows/
{decisionFlowId}.
The GET method returns a single decision flow as identified by decisionFlowId.
Here are the HTTP response codes:
200
OK
401
Unauthorized
403
Forbidden
404
Not found
500
Server error
Note: These are the most common HTTP response codes. You should be
prepared to handle all valid HTTP response codes, including 3xx redirection
response codes.
GET returns the following media type representations by setting the Accept:
header of the request:
n application/vnd.sas.decision.flow.summary+json
n application/vnd.sas.decision.flow.summary+xml
Resources and Collections 471
n application/json
n application/xml
Resource /decisionFlows/{decisionFlowId}/active
The /decisionFlows/{decisionFlowId}/active resource represents the activation
status of the decision flow identified by decisionFlowId.
The GET method has the following query parameters:
The GET method requires authentication and has a request URL of GET http://
www.example.com/SASDecisionServicesAdministration/rest/decisionFlows/
{decisionFlowId}/active.
The GET method returns the activation status of this decision flow as a Boolean
value. True if the decision flow is active, false otherwise.
Here are the HTTP response codes:
200
OK
401
Unauthorized
403
Forbidden
404
Not found
500
Server error
Note: These are the most common HTTP response codes. You should be
prepared to handle all valid HTTP response codes, including 3xx redirection
response codes.
GET returns the following media type representations by setting the Accept:
header of the request:
n text/plain
The PUT method updates the value of the activation status of this decision flow.
Accepted values are Boolean values.
Note: For updating the activation status for multiple decision flows, the batch
update process is the most efficient option.
The PUT method requires authentication and has a request URL of PUT http://
www.example.com/SASDecisionServicesAdministration/rest/decisionFlows/
{decisionFlowId}/active.
The PUT method accepts the following content type, as named by the Content-
Type: header:
n text/plain
472 Appendix 7 / SAS Decision Services Administration
Collection /variables
Overview
The /variables collection represents all of the variables in the system.
The /variables collection has a GET method. The GET method requires
authentication and has a request URL of GET http://www.example.com/
SASDecisionServicesAdministration/rest/variables.
It returns a collection of resources that represents the variables in the system.
The collection elements are instances of the application/
vnd.sas.decision.variable media type.
The GET method has the following query parameters:
{ "version" : 2,
"start" : start,
"limit" : limit,
"count" : count,
"name" : "variables",
"accept": "application/vnd.sas.decision.variable+json"
"items" :
[
{ application/vnd.sas.decision.variable+json contenti },
{ application/vnd.sas.decision.variable+json contenti+1 },
...
{ application/vnd.sas.decision.variable+json contentn },
],
"links: [
{ "rel" : "first", "method" : "GET", ... },
{ "rel" : "prev", "method" : "GET", ... },
{ "rel" : "next", "method" : "GET", ... },
{ "rel" : "last", "method" : "GET", ... },
...
]
}
404
Not found
500
Server error
Note: These are the most common HTTP response codes. You should be
prepared to handle all valid HTTP response codes, including 3xx redirection
response codes.
GET returns the following media type representations by setting the Accept:
header of the request:
n application/vnd.sas.collection+json;version=2
n application/vnd.sas.collection+xml;version=2
n application/vnd.sas.collection+json
n application/vnd.sas.collection+xml
n application/json
n application/xml
Resource /variables/{variableId}
The /variables/{variableId} resource represents a single variable in the system.
The GET method has the following query parameters:
The GET method requires authentication and has a request URL of GET http://
www.example.com/SASDecisionServicesAdministration/rest/variables/
{variableId}.
The GET method returns a representation of a single variable as identified by
the variableId.
Here are the HTTP response codes:
200
OK
401
Unauthorized
403
Forbidden
404
Not found
500
Server error
Note: These are the most common HTTP response codes. You should be
prepared to handle all valid HTTP response codes, including 3xx redirection
response codes.
Resources and Collections 475
GET returns the following media type representations by setting the Accept:
header of the request:
n application/vnd.sas.decision.variable+json
n application/vnd.sas.decision.variable+xml
n application/json
n application/xml
Resource /variables/{variableId}/value
The /variables/{variableId}/value resource represents the value of this variable
identified by the variableId. Primitive values like string or Boolean are returned
as text/plain. Complex values like array or table are returned as application/json
or application/xml. Depending on the type of the variable, the allowed values can
be parsed or set.
The GET method has the following query parameters:
The GET method requires authentication and has a request URL of GET http://
www.example.com/SASDecisionServicesAdministration/rest/variables/
{variableId}/value.
The GET method returns the value of this variable.
Here are the HTTP response codes:
200
OK
401
Unauthorized
403
Forbidden
404
Not found
500
Server error
Note: These are the most common HTTP response codes. You should be
prepared to handle all valid HTTP response codes, including 3xx redirection
response codes.
GET returns the following media type representations by setting the Accept:
header of the request:
n text/plain
n application/json
n application/xml
The PUT method sets the value of this variable with the supplied value.
476 Appendix 7 / SAS Decision Services Administration
The PUT method requires authentication and has a request URL of PUT http://
www.example.com/SASDecisionServicesAdministration/rest/variables/
{variableId}/value.
The PUT method accepts the following content type, as named by the Content-
Type: header:
n text/plain
n application/json
n application/xml
Recommended Reading
Here is the recommended reading list for this title:
n SAS Real-Time Decision Manager: User’s Guide.
n SAS Federation Server: Administrator’s Guide
Index
architecture
Special Characters
designing 18
SAS Intelligence Platform 17
_EXT tables 351 storage 21
$User_Log_JDBCConnectionResourc archiving data 251
e 120 arrays, methods for 175
ASCII characters
and translated data 372
A attachments
disabling 86
acceptance response type 356 autoexec_usermods.sas file
access control template and object spawner 47
See ACT
access permissions 106
business context 144 B
capabilities 94
groups 103 backing up campaigns 253
roles 94 backing up data 251
SAS Customer Intelligence assets batch simulation tables
219 field length 88
SAS identities 93 BI web services 71, 162
User Manager plug-in 105 Boolean data type 11
accounts Boolean List data type 11
capabilities 94 Boolean values in SAS activities 11
permissions 106 browsers
roles 94 Firefox 110
SAS identities 93 bulk-load facility
User Manager plug-in 105 and DB2 277
ACT 107 and Netezza 277
activating decision flows 243 and Oracle 277
activating flows 54 and SQL Server - ODBC connection
activities 57, 187 277
See also General I/O activities and SQL Server - OLE DB
See also web service activities connection 277
date and time formats 11 and Teradata 277
promotion rules 238 enabling in business context 276
activity business contexts
deploy to a remote environment 406 access permissions 144
Add Channels utility 379 and bulk-load facility 276
errors 380 and common data model 342
administrative tasks 6 creating 143
aliases, defining for schemas 127 data grid library 227
Apache Commons Database data set options 276, 278
Connection Pooling (DBCP) 286 library location for common data
application servers 50 model 373
arbitration permissions 107, 143
processing large amounts of data updating subjects 368
256
480 Index
J
I
Java 2 Enterprise Edition (J2EE)
application servers 22, 51
identifier JDBC connection resource
importing 247 create database domain 142
importing create database shared login 142
best practices 223 JDBC Connection system resources
campaigns 381 120, 229
memory size 227 creating 123
reply definitions 247 for General I/O activities 65
response definitions 247 pool tuning for performance 286
SAS packages 247 JVM
treatment campaign sets 246 memory size 301
inferred responses 355 JVM options
information maps set 87
backing up 252
custom properties 151
understanding 145
input variables 405 L
generating reports 401
listing 401 Launcher
inquiry response type 356 errors 409
Insert operation (General I/O logs 407
activities) 66 libraries
install account See SAS library resources
setup instructions 83 library references (librefs) 35
installation defining 36
best practices for performance 24 library resources 65, 127
BI web services 71 defining schema aliases 127
choosing environments 51 Limit nodes
database I/O considerations 29 troubleshooting 48
deployment scenarios 28 Lineage utility 394
easy button deployments 25 lists
hardware capacity planning 27 separators 267
production deployments 26 load balancing
SAS Federation Server 72 and SAS Stored Process Server 48
484 Index
packages
M in common data model 346
passwords
mark for deployment encoding 379
list of campaigns 229 updated by SAS Deployment
Marketing Operations Management Manager 112
See SAS Marketing Operations performance 273
Management See also system performance
marking campaigns for deployment business context options 276, 278
from command line 401 data set options 276, 278
membership database 268
administering groups 105 history processes 270
administering roles 105 INSERTBUFF option 278
metadata JVM memory size 301
access to 103 loading history tables 273
backing up 252 permissions 106
methods ACT 107
arrays 175 business context 107, 143
validation 181 capabilities 94
middle tier 17 groups 103
models 80 manage in business context 144
Index 485
X
V
XML
validation creating for SAS activities 174