Legal | Privacy
Creating an Inline Service in the Oracle Real-Time Decisions (RTD) Environment

Creating an Inline Service in the Oracle Real-Time Decisions (RTD) Environment

This tutorial shows you how to configure, deploy, analyze, and update an Inline Service using the components of the Oracle Real-Time Decisions ( Oracle RTD) environment.

Approximately 2 hours

Topics

This tutorial covers the following topics:

Place the cursor over this icon to load and view all the screenshots for this tutorial. (Caution: This action loads all screenshots simultaneously, so response time may be slow depending on your Internet connection.)

Note: Alternatively, you can place the cursor over each individual icon in the following steps to load and view only the screenshot associated with that step.

Overview

The Oracle Real-Time Decisions (Oracle RTD) platform allows you to develop enterprise software solutions that analyze business process behavior and make recommendations in real-time, allowing you to identify and address problems and opportunities as soon as they emerge. In this tutorial you learn how to configure, deploy, analyze, and update an Inline Service. Inline Service refers to the configured application that is deployed using the components in the RTD environment. Oracle RTD consists of five components: Decision Studio, Real-Time Decision Server, Decision Center, Administration (JMX), and Load Generator. Inline Services are configured and deployed using Decision Studio and analyzed and updated using Decision Center. Inline Services run on Real-Time Decision Server. An Inline Service can gather data and analyze characteristics of enterprise business processes on a real-time and continuous basis. It also leverages that data and analysis to provide decision-making capability and feedback to key business processes.

Back to Topic List

The Inline Service you build in this tutorial is based around a fictitious credit card company's call center. The Inline Service collects data about the customer and the call center operational system, and then analyzes information about the call and its resolution. The goal of this Inline Service is to analyze the patterns about calls, reasons for calling, and customers. You begin by building a basic Inline Service. In later sections, you extend the capability of this Inline Service to provide recommendations to the CRM system on cross selling offers and then to add feedback to the service on the success of its recommendations.

Back to Topic List

Prerequisites

Before starting this tutorial, you should:

1.

Have access to or have installed Oracle Real-Time Decisions (RTD), including populating the CrossSell example data provided with Oracle RTD. For more information, please refer to the administration documentation titled Installation and Administration of Oracle RTD ( section 2.3, if using RTD 2.2)

 

2.

Set up a user named sdsu using JMX.

 

3.

Download the Tutorial Code.doc file, which provides scripting solutions for the tutorial.

 

Back to Topic List

Creating a New Inline Service

The goal of this topic is to create a new Inline Service. You have finalized the business requirements for your new RTD project and you are now creating a basic Inline Service that meets those project requirements. This Inline Service retrieves customer information from a data source using a minimum number of objects, including data source, entity, and Informant. You are going to add more features to this inline service in later topics.

To create a new Inline Service, you perform the following steps:

Back to Topic List

To create a new Inline Service project, perform the following steps:

1.

To access Decision Studio, go to the client computer where you installed the Oracle RTD client tools and run RTD_HOME\eclipse\eclipse.exe where RTD_HOME is the Oracle RTD install directory. For example, C:\OracleBI\RTD\.

 

2.

Select File > New > Inline Service Project.

 

3.

Enter Tutorial for the project name.

 

4.

Select the Basic Template from the metadata template list.

 

5.

Verify that the Create new project in workspace option is selected.

 

6.

Click Finish.

 

To configure the application element, perform the following steps:

1.

In the Inline Service Explorer, expand the Tutorial > Service Metadata folder.

 

2.

Double-click the Application element.

 

3.

Enter This is a tutorial application in the Description field.

 

4.

Click the Permissions tab.

 

5.

Click the Add button. This opens the Add User or Group window.

 

6.

Click Select Server. This opens the Connect to a server window.

 

7.

Enter sdsu for the User name and password and check Save password.

 

8.

Click Connect. Upon connection, the Connect to a server window is closed.

 

9.

In the Add User or Group window, enter sdsu in the User and Group field.

 

10.

Click OK.

 

11.

In the Permissions section, grant all privileges by clicking the Granted field for each row. Granting the Deploy Service from Studio option automatically checks Open Service and Open Service for Reading options.

 

Back to Topic

To create a data source and import data fields, perform the following steps:

1.

Select the Data Sources element in the Inline Service Explorer.

 

2.

Right-click the Data Sources element and select New SQL Data Source.

 

3.

Enter Customer Data Source in the Display Label field.

 

4.

Click OK. This opens the Customer Data Source window in the editor area.

 

5.

Click the Import button.

 

6.

In the Import Database Table window, examine and accept the RTD server parameters.

 

7.

Click Next.

 

8.

Select the SDDS data source from the JDBC Data Source list.

 

9.

Select the CROSSSELLCUSTOMERS table from the list.

 

10.

Click Finish.

 

11.

In the Output list on the left, select the ID column.

 

12.

Click the arrow pointing to the right to add this column to the Input list.

 

13.

Retain only the following seven output attributes in the Output list. Use the Remove command in the Output list to delete other attributes.
Age
HasCreditProtection
Language
LastStatementBalance
MaritalStatus
NumberOfChildren
Occupation

 

14.

Select File > Save All to save the metadata.

 

Back to Topic

To create and map entities, perform the following steps:

1.

Select the Entities element in the Inline Service Explorer.

 

2.

Right-click the Entities element and select New Entity.

 

3.

Enter Customer in the Display Label field.

 

4.

Click OK.

 

5.

Click the Import command button in the editor area for the Customer entity.

 

6.

In the Data Source Selection window, select Customer Data Source.

 

7.

Click OK.

 

8.

Set the default value for each attribute as shown. Since Decision Studio encloses the string values with double quotes automatically, do not include them when you set default values.

Age = 35

HasCreditProtection = No

Language = English

LastStatementBalance = 1000

MaritalStatus = Single

NumberOfChildren = 0

Occupation = Student

 

9.

Click the Add Key command button.

 

10.

In the Key Name window, enter customerId in the Display Label field.

 

11.

Select Integer for the data type from the drop-down list.

 

12.

Click OK.

 

13.

Select File > Save All to save the Tutorial project. You will see several errors in the Problems View. This is expected because the mapping definition of the Customer entity attributes to its data source is incomplete. Proceed to the next section in order to complete the mapping definition.

 

Back to Topic

1.

Double-click the Session entity under the Entities element folder.

 

2.

Click the Add Attribute command button in the Session editor area.

 

3.

Enter customer in the Display Label.

 

4.

Change the data type for customer attribute to Other... in the drop-down list.

 

5.

Select the Customer entity under the Entity Types folder.

 

6.

Click OK.

 

7.

Click OK.

 

8.

Click the Select command button to add a session key.

 

9.

In the Select entity keys window, expand Session > customer and check customerId as the session key.

 

10.

Click OK.

 

11.

Verify that the customerId session key is added to the session.

 

12.

Select File > Save All to save the project.

 

Back to Topic

1.

Double-click the Customer entity under the Entities element folder.

 

2.

Click the Mapping tab of the Customer entity object.

 

3.

In the Data Source Input Values section, click the Customer Data Source record.

 

4.

Click the ellipsis button (button with three dots) in the Input Value field.

 

5.

In the Edit Value window, select the Attribute or Variable option for the value source, expand the tree to Session > customer, and select the customerId value.

 

6.

Click OK.

 

7.

Select File > Save All to save the project.

 

Back to Topic

To deploy and test an Inline Service, perform the following steps:

To create an Informant for testing the Inline Service, perform the following steps:

1.

Expand the tree in the Inline Service Explorer view to Tutorial > Service Metadata > Integration Points > Informants.

 

2.

Right-click the Informants object and select New Informant.

 

3.

Enter Testing in the Display Label field.

 

4.

Click OK.

 

5.

Click Advanced.

 

6.

In the Edit advanced properties window, uncheck the Show in Decision Center option.

 

7.

Click OK.

 

8.

Click Select.

 

9.

Select customerId as the session key.

 

10.

Click OK.

 

11.

Click the Logic tab.

 

12.

Either enter the code below or copy and paste the contents from the Lab 7-A section in the Tutorial Code.doc document.

logInfo("Customer age = " + session().getCustomer().getAge());

 

13.

Select File > Save All.

 

Back to Topic

To deploy the Inline Service, perform the following steps:

1.

Select Project > Deploy.

 

2.

In the Deploy Inline Service window, select the Tutorial project from the Project drop-down list.

 

3.

Verify that the deployment state is set to Development.

 

4.

Verify that the server is set to localhost:8080.

 

5.

Check the following options: Release Inline Service lock and Terminate active sessions (used for testing).

 

6.

Click Deploy. It takes few seconds for the deployment to complete. A message appears on the message tab at the lower left indicating that the Inline Service is deployed successfully.

 

Back to Topic

To test the Inline Service, perform the following steps:

1.

Select Window > Show View > Test to open the test window view in Testing Informant editor area.

 

2.

Verify that the Testing Informant is selected in the Integration Point drop-down list.

 

3.

Enter 1 for the value of the customerId field.

 

4.

Click the Execute Request button (green play button).

 

5.

Click the Log tab.

 

6.

Verify that the customer's age is returned.

 

7.

Test the Informant with several more values for customerId and monitor the logs.

Back to Topic

To create models for call analysis, you perform the following steps:

Create Informants and External Systems

The goal of this topic is to create Informants and associate them with customer sessions and external systems. You have built a new Inline Service and tested its basic functionality. You are adding Informants and associating them with external systems that Informants use to send requests. You are also going to configure Informants to receive session key information in order for them to gather and process data based on the session.

To create Informants and external systems, perform the following steps:

To create a new Call entity, perform the following steps:

1.

In the Inline Service Explorer, expand the tree to Tutorial > Service Metadata > Entities.

 

2.

Right-click Entities and select New Entity.

 

3.

Enter Call in the Display Label field.

 

4.

Click OK. This opens the Call window in the editor area.

 

5.

In the Definition tab, click Add Attribute.

 

6.

Enter agent in the Display Label field and verify that String is selected in the Data Type drop-down list.

 

7.

Click OK.

 

8.

Add two more attributes with the following properties:

Display Label Data Type
length Integer
reason code Integer

 

9.

Verify your work looks like the screenshot:

 

10.

Select File > Save All.

 

To associate Call and Session entities, perform the following steps:

1.

Double-click the Session entity under Entities folder.

 

2.

Click Add Attribute in the Session window.

 

3.

Enter call in the Display Label field and select Other... from the Data Type list. The Select a Type window opens.

 

4.

Expand Entity Types and select the Call entity.

 

5.

Click OK.

 

6.

Click OK.

 

7.

Select File > Save All.

 

Back to Topic

To create external systems, perform the following steps:

1.

In the Inline Service Explorer, expand the tree to Integration Points > External Systems.

 

2.

Right-click External Systems and select New External System.

 

3.

Enter IVR in the Display Label field.

 

4.

Click OK.

 

5.

Right-click External Systems and select New External System.

 

6.

Enter CRM in the Display Label field.

 

7.

Click OK.

 

Back to Topic

To create new Informants, perform the following steps:

1.

In the Inline Service Explorer, in the Integration Points folder, right-click the Informants folder and then select New Informant.

 

2.

Enter Call Begin in the Display Label field.

 

3.

Click OK.

 

4.

Click Select in Call Begin editor area.

 

5.

Select customer / customerId as the session key.

 

6.

Click OK.

 

7.

Set the External System to IVR in the drop-down list and enter 1 in the Order field.

 

8.

Click the Logic tab.

 

9.

Copy the contents from the Lab 8-A section of the Tutorial Code.doc document and paste it in the Logic field.

 

10.

Select File > Save All.

 

11.

Right-click the Informants folder and then select New Informant.

 

12.

Enter Service Complete in the Display Label field.

 

13.

Click OK.

 

14.

Click Select in Service Complete editor area.

 

15.

Select customer / customerId as the session key.

 

16.

Click OK.

 

17.

Set the External System to CRM in the drop-down list and enter 2 in the Order field.

 

18.

Click the Add button to add an incoming parameter.

 

19.

Enter agent in the Display Label field and verify that String is selected in the Data Type field.

 

20.

Click OK.

 

21.

Add two more incoming parameters with the following properties.

Display Label Data Type
length Integer
reason code Integer

Verify your work:

 

22.

Click the Session Attribute field for the agent parameter.

 

23.

Click the ellipsis (...) button.

 

24.

In the Request Attribute Assignment window, expand the tree and select Session > call > agent.

 

25.

Click OK.

 

26.

Map the other two incoming parameters with the following session attributes. 

length call / length
reason code call / reason code

 

27.

Select File > Save All.

 

28.

Right-click the Informants folder and select New Informant.

 

29.

Enter Call End in the Display Label field.

 

30.

Click OK.

 

31.

Click Select in the Call End editor area.

 

32.

Select customer / customerId as the session key.

 

33.

Click OK.

 

34.

Set the External System to CRM in the drop-down list, enter 5 in the Order field, and check Force session close.

 

35.

Click the Logic tab.

 

36.

Copy the contents from the Lab 8-B section of the Tutorial Code.doc document and paste it in the Logic field.

 

Back to Topic

To test and debug the new Informants, perform the following steps:

1.

Select File > Save All.

 

2.

Select Project > Deploy.

 

3.

In the Deploy Inline Service window, ensure that the Tutorial project is selected from the drop-down list.

 

4.

Click Deploy. This may take a few moments. Verify that a message appears on the message tab at the lower left indicating that the Inline Service is deployed successfully.

 

5.

In the Test view, select Call Begin as the integration point from the drop-down list and enter 1 for customerId.

 

6.

Click the Execute Request button.

 

7.

Click the Log tab.

 

8.

Verify that the Call Begin Informant created a session for this customerId.

 

9.

Select the Call End integration point from the drop-down list.

 

10.

Click the Execute Request button again.

 

11.

Verify that the Call End Informant recorded the session end point.

 

12.

Test these two Informants with several more values for customerId and monitor the logs.

 

Back to Topic

To create choice groups and models for call analysis, perform the following steps:

To create a choice group, perform the following steps:

1.

In the Inline Services Explorer, expand the tree to Tutorial > Service Metadata > Choices.

 

2.

Right-click Choices and select New Choice Group.

 

3.

Enter Call Reason in the Display Label field.

 

4.

Click OK. This opens the Call Reason window in the editor area.

 

5.

In the Choice Attributes tab, click Add.

 

6.

Enter code in the Display Label field and select Integer from the Data Type drop-down list.

 

7.

Click OK.

 

8.

Verify that this choice attribute is added to the Call Reason choice group. Choice attributes defined on a choice group are available to lower level choice groups and choices.

 

9.

In the Inline Service Explorer, select the Call Reason choice group under the Choices folder.

 

10.

Right-click the Call Reason choice group and select New Choice. Be sure to pick New Choice, not New Choice Group.

 

11.

Enter Check Balance in the Display Label field.

 

12.

Click OK. This opens the Check Balance window in the editor area.

 

13.

In the Attribute Values tab, set the code Attribute Value to 17. You can either enter the value directly on the Attribute Value column or click the ellipsis command on this column; this opens a window where you can set this constant value.

 

14.

Add three more choices under the Call Reason choice group using the information from the following table:

Choice Code
Make Payment 18
Rate Inquiry 19
Other 20

 

15.

Select File > Save All.

 

To create a choice model, perform the following steps:

1.

Select the Models element under Tutorial > Service Metadata.

 

2.

Right-click the Models folder and select New Choice Model.

 

3.

Enter Reason Analysis in the Display Label field.

 

4.

Click OK. This opens the Reason Analysis window in the editor area.

 

5.

Uncheck the Use for prediction option.

 

6.

In the Choice tab, use the drop-down list to set the Choice Group target to Call Reason.

 

7.

Replace the existing value in the Label for Choice field by typing Reason for call.

 

8.

Click the Learn Location tab.

 

9.

Select the On Integration Point option.

 

10.

Click Select.

 

11.

Select Service Complete in the Integration Points list.

 

12.

Click OK.

 

13.

Double-click the Service Complete Informant under the Integration Points > Informants folder.

 

14.

Click the Logic tab.

 

15.

Copy the contents from the Lab 8-C section of the Tutorial Code.doc document and paste it in the Logic field. The logic tells the model which Reason Code was selected for the call.

 

16.

Select File > Save All.

 

To test the choice model, perform the following steps:

1.

Select Project > Deploy and then click the Deploy button in the Deploy Inline Service window to redeploy the Tutorial project into the RTD server.

 

2.

Verify that a message appears on the message tab at the lower left indicating that the Inline Service is deployed successfully.

 

3.

In the Test view, select the Service Complete Informant in the Integration Point drop-down list and enter the following values:

customerId 7
agent John
length 21
reasonCode 18

 

4.

Click the Execute Request button.

 

5.

If necessary, click the Log tab.

 

6.