Integrate an interview experience within an existing application or process
Initialize an interview with data from an outside source
Pass interview data, conclusions and decision reports to an external application
Use an external data store for Web Determinations resources
Integration with another application will most likely involve use of the Web Determinations' Data Adaptor plugin which allows the current interactive session to use an arbitrary data source for loading and saving session data.
Embed Oracle Web Determinations inside a frame
Configure Oracle Web Determinations' look and feel to appear embedded
Integrate Oracle Web Determinations into a parent application's workflow
To get Oracle Web Determinations to embed inside a frame, you need to turn off the commentary frameset and tell Web Determinations to target the current frame rather than the top frame. This can be done by going to appearance.properties and making the following settings:
use-session-frameset=false frameset-top-target=_self commentary-target=commentary_frame
The application can then be started by either going to the main page using:
http://<server>:<port>/<webapp>
http://<server>:<port>/<webapp>.aspx
Or you can start a session for a rulebase directly by going to:
http://<server>:<port>/<webapp>/startsession/<rulebase>/<locale>
http://<server>:<port>/<webapp>/startsession/<rulebase>/<locale>.aspx
This following discusses how to configure the Oracle Web Determinations' theme/skin/UI so that it appears to be part of the parent application.
The first thing to change in order to embed Oracle Web Determinations into an application are: the colors used, the text font/size, image and branding. Changing these will achieve the most in terms of making Oracle Web Determinations feel part of the parent application.
A lot of configuration is available in the appearance.properties, such as the body text font and color as well as styling of various Web Determinations page components (progress bar, menu bar, header, and so on).
While there is a lot of configuration available, only some parts of Web Determinations' look and feel can be controlled via appearance.properties. The appearance.properties file allows easy modification of commonly-customized Web Determinations areas.
Specific styling changes not possible in appearance.properties can be made by modifying the main.vm.css - located in <OWD webapp>/WEB-INF/classes/templates/main.vm.css. Note that this requires knowledge of HTML and CSS.
Here are a list of things to consider changing in Web Determinations that are configurable in appearance.properties:
The following two screen shots demonstrate the difference that can be made with a few tweaks in the appearance.properties.
Oracle Web Determinations has some page components that can be removed so it does not look like a stand-alone application. Some page components can be disabled via appearance.properties, while others need to be disabled manually by manipulating the Web Determinations templates. Note that manipulating templates requires knowledge of Velocity.
The Web Determinations Header and Footer would be the primary components to be removed for embedding Web Determinations. As the Header and Footer cannot be disabled via appearance.properties, this needs to be done manually by modifying the Web Determinations templates. A main template is a template that contains the <html> tag; for example, start_screen, summary_screen, question_screen.
The next set of components that can be removed from Web Determinations are the bars - the menu bar, progress bar, and status bar. They can be completely disabled via appearance.properties.
Below is an example of what it would look like if the menu, status, and progress bars are disabled.
If the parent application has a layout or characteristics that are unique and do not follow standard web layout, the Oracle Web Determinations page layout may need to be tweaked to match.
This is not a simple change, and is considered advanced customization. Customizing the Web Determinations Velocity templates allows for nearly limitless changes, but can also reduce stability and maintainability.
To prevent reduction in stability and maintainability,
Some examples of page layout and specific modifications are:
This following describes an approach to integrating Oracle Web Determinations into a parent (web) application's workflow/process. This means that part-way through the workflow, the parent application will hand over data to Web Determinations, which will then conduct an interview.
Data (both provided and determined) during the Web Determinations interview is then passed back to the parent application. The parent application can then use the data passed back for further analysis or to drive the workflow.
Integrating an Oracle Web Determinations interview inside an application's workflow means that the application can leverage Web Determinations' capability for handling complex determination scenarios.
To integrate the Web Determinations interview, the parent application needs to:
Pre-seeding a Web Determinations interview makes the integration with the workflow seamless - the user does not have to re-enter data that was provided already to the parent application (either via a previous form on the same workflow or another workflow/app altogether).
The parent application can feed data to the Web Determinations interview by using the Load action. The data can be a mixture of:
The Web Determinations Load action uses the Data Adaptor to fetch and load data to a fresh interview, 'pre-seeding' the interview before it begins. More information about pre-seeding and Data Adaptor can be found in Data Adaptor - common scenarios
To start a Web Determinations interview, a specific URL needs to be constructed. The URL construction works for both starting a fresh interview and pre-seeded interview, although the latter is probably the expected usage when integrating.
Web Determinations has a REST-based URL, allowing for a specific rulebase, locale, goal, and session ID to be provided. This avoids the user having to manually make the selection for those items, and helps with a seamless integration.
The REST URL to construct for starting the pre-seeded Web Determinations interview is as follows:
http://<OWD_webapp>/startsession/<rulebase_name>/<locale>/<goalID>?caseID=<caseID#>&user=guest
Description:
The parent application has a few options to retrieve the data from a Web Determinations interview session.
To resume the original workflow, the Web Determinations interview needs to direct the user to the next form in the workflow after the interview is completed.
There are many different approaches for this since web applications vary in implementation. Some are complex and dynamic, employing heavy Javascript/AJAX while others are simple and rely on basic URL request/response to drive the flow.
For basic (non-dynamic) webapp setups, the Web Determinations interview can change the URL of the frame (or the parent page) to the next form in the workflow.
To achieve this:
Some web applications employ DHTML/Javascript, and can control the page or frame's URL. In this case, Web Determinations may only need to be able to signal via Javascript that it has completed, and the parent application's DHTML/Javascript architecture can resume control of the workflow.
You can initialize an interview by pre-seeding it with data from an outside source in instances where:
To enable pre-seeding, do the following:
The URL that will direct the user to the pre-seeded interview allows the client system to specify a Case ID that the Data Adaptor will use to retrieve data from the external datasource. The URL format is:
http://<webserver address>/<WD web app name>/startsession/<rulebase name>/<locale ID>?caseID=<caseID#>&user=guest
The client system needs the following information in order to construct the URL:
To build the Data Adaptor that will load the data from the datasource to the target rulebase you first need to determine what data is to be extracted from the datasource, and how it will map to the rulebase as instance data.
In the event of the data being inferenced from a Web Determinations interview session needing to be saved to an external data source, you must first take the following action in order to determine what action will be taken to save the data:
A Data Adaptor needs to be developed for the client system so that when the 'save' action is issued, the custom-developed Data Adaptor will persist the specific Web Determinations interview session data into the external datasource.
This scenario also has variations/extensions, which are:
Note that when calling the Data Adaptor save, only the Case ID and interview session data is passed in.
Auto-saving data during a Web Determinations interview can be driven by Event Handler plugins.
Auto-saving will use the 'save' capability of the loaded Data Adaptor. To persist Web Determinations interview data into an external datasource see "Saving data from a WD Interview to an external data source".
Below are common triggers for auto-save, and the Event to use:
More complex scenarios can combine the above so that, for example, auto-save per screen is performed and also when the goal is reached.
Because Case ID and interview session data is the only data passed through to the Data Adaptor, design of the Event Handler and Data Adaptor must take this into account. This means that the Data Adaptor must be able to operate based on information available in the Interview Session data passed; that is, the Event Handler cannot tell the Data Adaptor if the save is for a completed screen, or a completed goal.
With this design restriction, the Data Adaptor needs to be able to persist the data based on the actual instance value together with the rulebase model data.
There are situations where rulebases of an Oracle Web Determinations implementation need to be stored and accessed from a custom datasource. The RulebaseResolverPlugin is an Interview Engine plugin that allows usage of custom datasources to store and retrieve rulebases from. Also it lets the implementer customize the rulebase service functionality. For information on how to create a Rulebase Resolver plugin, go to the topic Create a Rulebase Resolver plugin.