This chapter covers the following topics:
The Scripting Engine is the component of Oracle Scripting that executes Script Author scripts at runtime. It is essentially a collection of base Java classes that process a script, any custom code associated with the script, and script end user interactions.
Scripts can be executed in one of two Scripting Engine interfaces: the agent interface (a Java application running in an Oracle form), and the Web interface (in which a script executes in an Oracle Applications-compatible Web browser). In either interface, the Scripting Engine displays text, images, questions and prompts (in units known as panels). Script end users provide answers to the one or more questions in each panel by clicking buttons, selecting choices from lists, or completing text fields. To progress from one panel to the next, the user clicks a submit button (usually labeled Continue in the agent interface or Next in the Web interface).
Each Scripting Engine interface interprets end user responses and custom code. The progression through the script (script flow) may be determined dynamically, if branching logic is included in the script.
Panels are the only Script Author objects that display in a script. Other objects control processing, but do not display.
Panels are displayed in the agent interface in a panel display area. Other components unique to this interface include a script information area (optional), a shortcut button area (optional), and a progress area (which shows the path through the current script session and, optionally, lists the responses selected for each question per panel). These components are all wrapped in a script frame that contains a progress indicator, a Disconnect button, and (optionally) a Suspend button.
In the Web interface, each panel is represented by one JSP page. This is equivalent to the panel presentation area in the agent interface. The frame around the panel contains Back, Next, and Reset to Default buttons; for suspendable scripts, it also includes a Save for Later button. No other components display, other than the Web browser's own interface controls.
This section includes the following topics:
Scripts created in Script Author are deployed to the applications database. Thereafter, interaction center agents with the appropriate Oracle Applications responsibility can launch a script and run it in the Scripting Engine agent interface.
Oracle Scripting is integrated with the following business applications:
The Customer Support module of Oracle TeleService
Oracle TeleSales
Note: In previous releases, Oracle Collections was integrated with Oracle Scripting.
In production, scripts are typically executed from within one of these applications. For script testing purposes, scripts can also be launched in standalone mode (using the Script User or Scripting Agent responsibility). Standalone mode is not supported for typical interaction center operations.
This section includes the following topics:
For information on launching scripts from each business application, refer to the Integration section of Oracle Scripting Implementation Guide.
For descriptions of each element of the Scripting Engine UI, see Understanding the Scripting Engine.
Use the following procedure to launch a script in the Scripting Engine agent interface in standalone mode.
Caution: Standalone mode (executing a script without the use of a business application) is intended for script testing only, and is otherwise not supported by Oracle.
A script must be deployed to the applications database using Script Author.
Log into Oracle applications using the Personal Home Page login, or the Single Sign-On login if implemented.
Scripting Agent, Vision Enterprises
Scripting User
From the Navigator, select Scripting Demo Form and click Open.
The Script Chooser window appears.
The Oracle Forms Developer window entitled Oracle Scripting is referred to as the Script Chooser. This window provides access to a list of all active scripts created and deployed to the applications database using Script Author.
In the Script Chooser window, from the Script Name/Language list, select the combination of script name and language for the script you want to launch.
Click Start Scripting.
The Script Chooser minimizes, and the script launches in a separate window.
Use the following procedure to execute a script in the Scripting Engine agent interface.
A script must be deployed to the applications database using Script Author.
Launch a script.
Log into Oracle applications using the Personal Home Page login, or the Single Sign-On login if implemented.
Customer Support
Telesales Agent
Scripting Agent, Vision Enterprises (for testing only)
Scripting User (for testing only)
From the first panel, review all information displayed.
If there is only a single question control (a submit button) in the panel, then click the button (or select the space bar when the button control is selected).
For example, if the panel contains a Continue button, click Continue.
The script progresses to the next panel, if any. If the script transaction is complete, the script frame closes.
If the question user interface (UI) control is a series of submit buttons, then select and click the appropriate button. To select the button using the keyboard, press the space bar. To cycle among two or more choices, use the Tab key.
The script progresses to the next panel, if any. If the script transaction is complete, the script frame closes.
If the panel contains two or more question controls, then review and select all question responses as appropriate.
If the question user interface (UI) type is a text field, text area, or password field, then type in the field, as appropriate. An absence of a response (leaving a null value) is acceptable; unless validation is explicitly associated with the panel question, you are not required to enter a value into any of these question UI types.
If the question UI type is a radio button or a drop-down list, you must select one of the answer choices displayed by the question control.
If the question UI type is a check box or a checkbox group, select each option (answer choice) as appropriate. For a single check box, select the check box value if appropriate. For a checkbox group, select as many or as few answer choices as appropriate. Leaving a check box clear (passing a null value) is acceptable.
If the question UI type is a multi-select list box, you may select no values (null), one value, or any combination of the values displayed. Clicking on any answer choice option in the list selects that single item. Holding down the Control key (on a Microsoft Windows platform) or the Option key (on a Macintosh OS platform) allows you to select any two or more answer choices. Clicking the Shift key (on any platform) allows you to select any two or more consecutive answers.
If the question user interface (UI) type is a series of submit buttons, then select and click the appropriate button. To select the button using the keyboard, press the space key. To cycle among two or more choices, use the Tab key.
When you have provided the appropriate answers to all questions in a panel, then click Continue.
Optionally, to hide responses provided thus far during the current script transaction, then in the Progress area, click Hide Answers.
Optionally, if responses provided thus far during the current script transaction are hidden, then if you want to display those answers in the Progress area, click Show Answers.
Repeat steps 2 through 4 for each panel in the script.
To navigate to the previous panel in the script, from the application toolbar, click Previous Panel.
Oracle Scripting displays the appropriate panel.
If you have navigated backward in a script, then to return to the next panel, from the application toolbar, click Next Panel.
Oracle Scripting displays the appropriate panel.
To navigate to any panel you have already visited in the script, then from the progress area, scroll if necessary to the appropriate panel name, and click in the progress area.
Oracle Scripting displays the appropriate panel.
If you have navigated backward in a script, then to return to the last panel you have viewed thus far in the script, from the application toolbar, click Last Panel.
Oracle Scripting displays the last panel displayed in the current script transaction.
Optionally, to execute a function contained in a shortcut button, click the button.
The function executes.
Optionally, to exit the script, click Disconnect.
The script jumps to the first panel in a group designated with the WrapUpShortcut. If this group contains no panels, then the script transaction ends, and the script frame closes.
Optionally, if enabled, then to suspend the script transaction, click Suspend.
The script transaction is saved as a suspended script, and the script frame closes.
Use the following procedure to suspend a current Oracle Scripting transaction running in the Scripting Engine agent interface.
Note: The Oracle application that launches the script in the agent interface controls whether or not the script can be resumed. Check the documentation for the appropriate Oracle application to determine if the resume feature has been implemented.
The Suspendable global script property must be selected in the deployed Script Author script.
The IES : Display Suspend Button on Script Frame profile option must be set to True.
Log into Oracle applications using the Personal Home Page login, or the Single Sign-On login if implemented.
Customer Support
Telesales Agent
At any point of time during the runtime session, you can click the Suspend button.
Any answers you have entered in the panel where you clicked the Suspend button are saved, as "intermediate" answers, but not submitted to the Scripting Engine. The intermediate answers are available to you when you resume the suspended transaction.
Scripts created in Script Author are deployed to the applications database. Thereafter, a script can be designated as the survey questionnaire for a survey campaign in the Survey Administration console. When the survey campaign has a cycle and deployment, and the deployment is activated, then a valid survey URL results.
The Scripting Engine Web interface provides the ability to execute Script Author scripts in an Oracle Applications-compatible Web browser (over the Internet or on an intranet, including across secure HTTP). This is sometimes known as the survey runtime component of Oracle Scripting.
Scripts are executed in the Scripting Engine Web interface using one of two methods, based on the deployment type. Standard deployments require only survey campaign administration. Networked users of a Web browser can then launch and execute a script in a Web browser by accessing the URL.
Targeted deployments require additional administration of a marketing list (using Oracle Marketing Online functionality) and of an invitation or reminder master document (using Oracle One-to-One Fulfillment functionality). This assigns each list member a unique respondent ID, which is included in the valid survey URL for targeted deployments.
When a list member receives an e-mail inviting him or her to use the script, they simply access the URL, and execute the script in a Web browser.
Users of Oracle self-service Web applications such as Oracle iSupport can execute a script in a Web browser by clicking the survey URL from within the application. These require only standard deployments.
A script executed using the Scripting Engine Web interface is referred to as a survey questionnaire (or a survey) if its purpose is simply to solicit information or feedback. Otherwise, it is referred to as a Web script. Both terms are used interchangeably to refer to execution of a script in a Web browser.
This section includes the following topics:
This section includes the following topics:
You must have a valid survey URL for an activated deployment.
Your web application must be customized to embed the survey URL in the user interface.
Log into Oracle Self-Service Web Applications. Use the Single Sign-On login if implemented.
The appropriate responsibility is determined by the integrated Web application. For example, to launch scripts from Oracle iSupport, log into Oracle iSupport using the iSupport User responsibility.
From the appropriate application, access the page on which the link to the survey URL is located.
Click the survey URL link.
The Web script or survey executes, hosted in the user interface of the logged-in application. Upon completion of the script, your Oracle Applications session is still valid, and you can perform work in the application as required.
You must be a member of an Oracle Marketing list.
You must be the recipient of an e-mail message (invitation or reminder) originating from an Oracle One-to-One Fulfillment master document, containing a valid survey URL, including a unique respondent ID for your list record.
None
None
On a networked computer connected to the Internet, open the invitation or reminder e-mail message.
From the invitation or reminder e-mail message, application, click on the survey URL.
Alternatively, copy the survey URL, and paste it into the Location or Address field of your Web browser, and press the Return key.
The Web script or survey executes. You are logged in as an applications guest user. The only action you can perform is to complete the survey. Upon completion of the script, your Oracle Applications session is terminated.
You must know the URL of an active survey deployment.
To launch the script as a guest user, you must not be in an active session of an Oracle Applications session, or have a valid cookie for a Web browser with valid Oracle Applications session authentication information cached. For example, if you are in a valid session using Microsoft Internet Explorer, open Netscape Navigator to execute the Web script or survey.
None
None
On a networked computer connected to the Internet, enter the URL of a valid survey URL into the Location or Address field of your Web browser.
Press the Return key.
The Web script or survey executes. You are logged in as an applications guest user. The only action you can perform is to complete the survey. Upon completion of the script, your Oracle Applications session is terminated.
Important: You are strongly advised to use only the Oracle Scripting Back and Next buttons to navigate between the panels of a script in the Web interface.
If you use the native browser "Back" and "Next" buttons to progress through Web interface script sessions, while there are some situations where the Scripting Engine can interpret and act upon your panel answers, there are others where it cannot. For more information, see Issues Arising from the Use of Browser Buttons.
This section consists of the following topics:
Your general progress through a script is as follows:
You enter answers on a panel, and when you are satisfied that they are correct, you click Next. The next panel in the script sequence, as determined by the Scripting Engine, appears.
If you need to change answers in a panel that you previously visited in the current session, click Back. Continue to click Back until you reach the panel containing the answers that you want to change.
You can think of using the Next button as going forward through the script, and using the Back button as a way to temporarily pause the standard forward script progression.
Note: Scripts running in the Web interface will generally not contain the Continue button, that is designed to appear in panels when you run scripts in the agent interface. If the Continue button appears in a panel during a Web interface session, you can click either the Oracle Scripting Next button or the Continue button - they will behave identically.
In this section dealing with navigation in the Web interface, any reference to the Next button applies also to the Continue button.
There are special considerations for button panels, that is, panels with one question and one or more push buttons that serve as the answers.
The first time that a button panel is displayed, the Next button will be disabled, and you must click one of the push buttons to answer the panel.
If you return the script to the same push button panel, then the Next button is enabled. To progress forward through the script, you can then perform either of the following operations:
Click any of the push buttons in the panel - possibly changing the answer
Click the Next button - equivalent to clicking the same push button that was answered the last time
To allow for maximum flexibility when you change previously-entered answers or resume a script that you previously suspended, Oracle Scripting has the concept of submitted and saved answers.
When you click the Next button (or a button in a button panel), the current panel's answers are submitted to the Scripting Engine, which processes them - together with any related branches, blocks, groups, and actions designed in the script - and determines the next panel to be displayed.
Clicking the Back button displays the previous panel in the session, clicking the Save for Later button suspends the current session. In both cases, the current panel's answers are saved, but not submitted to the Scripting Engine.
Answers are saved or submitted only if you use the Oracle Scripting Back, Next, and Save for Later buttons, and never when you use a browser button.
Saved answers are only submitted to the Scripting Engine when you click the (Oracle Scripting) Next button, or a button in a button panel.
Note: Oracle Scripting stores both submitted and saved answers in xml form in the database. Because the saved answers have not yet been processed, they can be thought of as "intermediate" answers. When referring to answers, the terms "saved" and "intermediate" are used interchangeably in this section.
Oracle recommends that you do not use native browser Back and Next buttons in Web interface script sessions: you should always use only the Oracle Scripting Back and Next buttons.
If you use both the Oracle Scripting and the browser buttons, this can lead to the situations described in the following sections.
You have used the Oracle Scripting Next (OS-N) and Back (OS-B) buttons to visit and revisit a panel, such as panel B in the sequence A -(OS-N)-> B -(OS-N)-> C -(OS-B)-> B -(OS-N)-> D.
The first time you click (OS-N) on B, Panel C appears; the second time that you visit B, you change an answer, click (OS-N), and now D appears.
The net effect is that C is no longer in the script flow.
If, from D, you click the browser Back button twice to get back to C, then click the Oracle Scripting Next (OS-N) button, you will get a message indicating that you have reached a page that is no longer valid: after acknowledging the message, you will be returned to the last valid page, that is, D.
When you click the Oracle Scripting Back (OS-B) button while on a panel, all the answer changes that you have made on that panel are saved, but not submitted to the Scripting Engine.
For example, suppose you enter data in and progress through the panels A, B, C, D by clicking the Oracle Scripting Next (OS-N) button each time.
Now, you click the Oracle Scripting Back (OS-B) button twice to return to panel B. On panel B, you make some changes, then click the Oracle Scripting Back (OS-B) button to get back to panel A. The changes you made on panel B are saved as "intermediate" answers, but not submitted to the Scripting Engine.
If you now use the browser Back button to return to panel C, make some changes, then click the Oracle Scripting Next (OS-N) button, Oracle Scripting will process the answers entered on panel C, but warn you that there were previous panels with unsubmitted answers that were not used.
The facility to suspend and resume Oracle Scripting transactions in the Web interface applies mainly to targeted surveys. Oracle applications that launch standard surveys may implement the facility to allow users to suspend and resume scripts launched from those applications.
To be able to suspend and resume a script in the Web interface, the script must belong to a suspendable survey campaign. Only if that is true will a Save for Later button appear on the screen, when the script is run in the Web interface. There is no further dependency on any profile option.
To suspend the script, click Save for Later. All the script answers entered up to that point are stored, including the answers entered by the user on the final displayed page.
Users of suspended targeted surveys can resume a suspended survey by clicking the same link that they received by e-mail originally. Oracle Scripting will then display a page showing the date and time that the survey was suspended, and a message asking if the user wants to start a new survey transaction from scratch or to resume the saved survey by restarting the suspended script.
The general options available to the user on script resumption are as appear in the diagram following.
If the user chooses to start the script from scratch, all of the data entered in the previous suspended session is ignored; the user will be entering completely new data.
Users who do not want to start the script from scratch will be able to restart the script at a particular panel, with Oracle Scripting reconstructing the data using the answers entered during the previous session or sessions. The option that determines the "restart" panel is controlled and set by the application that creates the e-mail URL. The restart panel can be either the panel where the script was suspended, the first panel of the script, or the last panel accessed in the script flow.
Note: Assume the panel flow for a script session was A, B, C. In panel C, you clicked the Oracle Scripting Back button to re-enter data on panel B, then clicked Save for Later. On script resumption, the "last page" option restarts you at panel C; the "panel at which the script was suspended" option restarts you at panel B.
Note: For more information about when and how Oracle Scripting stores answers to panel questions, see Submitted and Saved (Intermediate) Answers.
During the resume process, in reconstructing the script, the Scripting Engine processes the answers that were given in the original transaction, and verifies that each panel returned is the same as in the original transaction. Two types of error may occur during the resumption, recoverable and unrecoverable.
Recoverable errors are generated when calling custom code, such as Java or PL/SQL, and do not disrupt the script flow. You will be given the opportunity to ignore recoverable errors and continue processing the script resumption.
Note: Recoverable errors that occurred and were ignored in the original transaction can trigger new messages during the resume process; that is, errors seen during the script resumption do not have to be specific to the current resume process.
Unrecoverable errors are those that prevent the Scripting Engine from processing further. Situations where this may occur are the following:
Due to external changes, none of a panel's branches are valid.
A different panel is returned during the script resumption from the panel in the original transaction.
To deal with errors during script resumption, you can select from the following options (the first two are only for recoverable errors):
Ignore the recoverable error and attempt to continue the resume process.
Ignore all recoverable errors and attempt to continue the resume process.
Cancel the resume transaction.
The information for the script is restored back to the saved state, as if no resumption had been attempted.
Restore the transaction back to the point at which the error occurred.
Users can then continue the script from that point.
This section includes the following topics:
Each execution of a script must occur within the context of a valid Oracle Applications session.
For users of the agent interface, the agent user must log into Oracle Applications before starting an Oracle Scripting session.
For uses of the Web interface, scripts can be executed from an Oracle self-service Web application. If so, the current Oracle Applications session validation information is used. This session is governed by ICX session timeout settings.
If executing a script in the Web interface without an existing, valid Oracle Applications session, the applications guest user account is used to begin an Oracle Applications session. This session terminates upon completion of the script transaction. No other work in any other Oracle application can occur.
For more information, see Oracle Scripting Implementation Guide.
All script transactions are executed using the Scripting Engine component of Oracle Scripting, and each script requires an Oracle Scripting session. This session is dependent on an existing Oracle Applications session.
The behavior of Oracle Scripting sessions differs based on which interface of the Scripting Engine is used to run the script.
For scripts executed in the Scripting Engine agent interface, each Oracle Scripting session can contain one or more transactions.
For scripts executed in the Scripting Engine Web interface, each Oracle Scripting transaction uses its own session.
The first time in an Oracle Applications session that the Scripting Engine agent interface is invoked (by a launch script request), an Oracle Scripting session starts.
The session is dependent on Oracle Forms. In an Oracle Applications session, Oracle Forms runs as an applet on the client desktop. When you first log in and request a script to launch, the Oracle Scripting session begins. An Oracle Scripting session remains open until it expires, or until the Oracle Applications session is terminated (in other words, the user logs out of Forms-based applications).
The Oracle Scripting session times out if you are idle (from a Scripting Engine perspective) for longer than a specified time. Thus (whether you are idle in the middle of a script transaction, or if you are between script transactions), if you do not perform any work in the script (or request a new script to execute for the duration of time specified in the session idle timeout property), this session expires. The Apache session idle timeout is a servlet property, established in the ZONE.PROPERTIES file. (For more information, see Oracle Scripting Implementation Guide.)
After a session is started, you can execute any number of scripts in the Scripting Engine agent interface. Normal rules apply; for example, you cannot launch two scripts simultaneously, nor start a script from within another script.
Each time a user requests a script to execute in a Web browser, a new Oracle Applications session starts. The script transaction executes within the Oracle Scripting session. When the transaction ends, the session also ends. This is true:
Regardless of how often or how frequently a script is requested to execute in a Web browser.
Regardless of whether the script is executed as a survey or Web script.
Regardless of whether the script uses an existing authenticated Oracle Applications user, or the applications guest user.
Regardless of whether the script is hosted in the UI of an Oracle self-service Web application or run in "standalone" mode in its own browser window.
Like all scripts executed in this interface, an existing, deployed, validated script is prerequisite, as is the existence of a valid, active survey campaign. Each transaction (and each session) is accessed by the end user accessing the appropriate survey URL (whether through clicking a hypertext link, or an image associated with a hypertext link).
When using the Scripting Engine Web interface in a hosted mode (when executing a script from the UI of a self-service Web application), you can execute as many script transactions as required for the business purposes of the self-service application (with each script transaction occurring within its own Oracle Scripting session). In contrast, when in an interaction or transaction of a Forms-based business application, you can only launch a single script per business application transaction.
Like scripts executed in the agent interface, the Scripting session times out if you are idle within the script longer than the amount of time specified in the session idle timeout parameter on the Apache server.
The options available to you after the timeout depend on whether or not the survey campaign script is in a suspendable survey campaign.
If the script is in a suspendable survey campaign, the following considerations apply:
When the session times out, the script is suspended.
Users of suspended targeted surveys can resume a suspended survey by clicking the same link that they received by e-mail originally.
In general, you can resume a suspended script in the Web interface if the necessary features are built into the application that launched the script.
If the script is not in a suspendable survey campaign, the script cannot be resumed at the panel where the timeout occurred: you will have to relaunch the script in a new browser window.
Each time a script is launched by the Scripting Engine, an Oracle Scripting transaction begins. Each transaction ends upon standard completion of the script.
From a Wizard script perspective, standard completion of a script transaction occurs (from the script perspective) after the end user exits any panel in the flow of a script for which the next destination specified in the Script Wizard is "End script." When the end user provides one or more responses (as appropriate) to that panel, and the final page is then displayed in the Web browser, then any post-actions associated with the global script are then executed, and the script transaction then ends.
From a graphical script perspective, standard completion of a script refers to reaching the termination node on the root graph. Any post-actions associated with the completion of the global script are then executed, and the script transaction then ends.
In an appropriately configured graphical script, any Disconnect or WrapUp group (a group on the root graph that contains the WrapUpShortcut shortcut name) is connected to a termination node on the root graph. Thus, in the agent interface, clicking the Disconnect button results in directing the session to the group with the WrapUpShortcut property. Upon completion of the flow in this group (if any), the script transaction ends.
There is no equivalent for the Disconnect button in the Web interface.
Clicking the Suspend button in the agent interface, for the purposes of this discussion, is considered standard (if temporary) completion of a script session. Clicking the Save for Later button in the Web interface suspends the transaction.
Upon standard completion of a script, when the Continue or Next button is clicked by the end user in the last panel of the script, the Scripting Engine performs all post-panel processing, and then performs all standard script wrapup functions.
Note: When you reach a termination point in a script executing in a survey campaign designated as Always Suspend, the script is suspended, and the Scripting Engine performs post-panel processing and script wrap-up functions.
The following occur for each panel when the Continue button is clicked by the end user of any script:
The responses provided for the panel are sent to the Scripting servlet.
If any questions in the panel have validation associated with them, those validation commands execute.
Outgoing branches that determine the next destination in the flow of the script is evaluated.
Post-action commands associated with the panel are executed.
Action commands associated with the appropriate outgoing branch are executed.
If the destination of the appropriate outgoing branch is an object that is processed but not displayed (a group or block), processing for that object then occurs, beginning with any pre-action commands associated for that object.
If the destination of the appropriate outgoing branch is a panel, then any pre-action commands associated for that panel are executed, and then the panel is displayed.
When the final destination is the end of the script (in other words, when the appropriate outgoing branch leads to a termination node), the following also occur:
In the Oracle Scripting schema, the script end time is recorded in the database.
If answer collection is enabled for the script, the answers provided by the script end user are recorded to the appropriate tables in the database.
If footprinting is enabled for the script, the panels accessed during the script transaction, and the duration of time spent in each panel, is recorded to the database.
If information is specified to be saved to any custom tables, this information is then recorded to the database.
The transaction, and any PL/SQL operations or Delete actions occurring during the script transaction, is committed to the database.
If using the Scripting Engine agent interface, the script window in which the script appears is minimized or hidden from view.
A script session can be terminated prematurely by the script end user. Scripts can only be prematurely terminated when a panel is displayed in the Scripting Engine user interface and the application is awaiting an end user response.
In the agent interface, if the user directs the scripting window to close, and confirms the warning message, the script transaction is terminated as incomplete. The script session is retained.
In the Web interface, if the Web browser window is closed before the last panel in the script is displayed, the consequences depend on whether or not the script is in a suspendable survey campaign. If it is, the script transaction is suspended; if it is not, the script transaction is terminated upon reaching the session idle timeout specified on the Apache server, and the script session is also terminated at that time.
If a script transaction is prematurely terminated:
Panel post-actions (if any) are not processed.
Post-actions of any groups or blocks containing the panel from which the script was closed are not processed.
Post-actions of the global script (if any) are not processed.
Note, however, that after a session is prematurely terminated, the following still occur:
Footprinting and answer collection (if specified) are still recorded to the database.
Any operations performed on the database connection so far are committed.