Document Generators allow users to download and save a document with data from the Web Determinations interview. The document is usually a transcript of the interview for record keeping, but can be any document that requires data from the interview to be embedded in it, such as a pre-filled form.
The default Document Generator allows users to save and print a transcript of their Web Determinations interview in the following formats:
The general steps to enable a user to download a document for a Web Determinations interview are:
The main difference between the default Document Generator and a custom Document Generators is that the HTML and PDF formats supported by the default Document Generator requires template files.
Custom Document Generators can use template files (that is, the value entered by the user in the Template field), almost all cases would not require a template.
To use the default Document Generator make sure no other custom Document Generators are available. Custom Document Generators take precedence over the default Document Generator, so the default Document Generator will not be registered in the interview session if another custom Document Generator plugin exists and can be registered to the current Web Determinations interview.
Add the required JAR file to generate PDF Documents
Use the Document links during the Web Determinations Interview
Adding a Document link to the Web Determinations interview is performed during Screen authoring of a rulebase. When adding a Document link, the rulebase author is able to control:
The following screenshot displays the Screen Authoring window, and a view of the summary screen and a Document link selected:
Assumptions:
It is assumed that the rulebase author has already created the rules and attributes of the rulebase.
The rulebase author specifies what Decision Report/s are available, the file format of the transcript, and if applicable, the template to be used (which controls transcript layout and content)
To add a Document link, do the following:
Availability of the Document link to the user is controlled by the Visibility area on the Summary screen. There are two fields in this area - Attribute and Default State. This area works identically to controlling the visibility of Goal links.
Once a Document link for either HTML or PDF has been added, a template file needs to be created for the link to work.
The template file for HTML is the XML Stylesheet Language (XSL). The template file for the PDF is the XML Stylesheet Language - Formatted Objects (XSL-FO). The template should be located at the path entered in the Template field.
The template source document is the interview data in XDS format - an XML format used in Oracle Policy Automation applications to represent the rulebase model and instance data.
Both XSL and XSL-FO templates are used in conjunction with the template source document. When the Document Generator plugin generates the document, it generates an XDS file, then 'transforms' the XDS XML file using the template file (XSL or XSL-FO) to generate the document for the user to download.
The XDS format is the format used by the default Data Adaptor plugin (XDS Data Adaptor) in Web Determinations for saving Web Determinations Interview data. The XDS format is also used in Oracle Policy Modeling to save Interview data (for example, when running Debug)
There are a number of ways to generate a sample XDS file for the current rulebase (which would greatly help during creation of the XSL/XSLFO template file); they are:
The following is a sample XDS; note the XML nodes, attributes, attribute and node values; it is possible to deduce some of the rulebase model data and instance data by analyising the sample XDS.
The template file can only be constructed if the developer has good knowledge of the XDS structure (the XML nodes, hierarchy, node attributes), and familiarity with the rulebase model (and thus expected XML attribute and node values). having a sample XDS for the rulebase is highly recommended.
Notes:
A JAR file needs to be added to the Oracle Web Determinations library to be able to generate PDF documents. The JAR file will have the filename xml-apis-ext-X.X.XX.jar where the X denotes the version/major/minor release numbers; for example, "xml-apis-ext-1.3.04.jar".
The JAR file can be obtained as part of the Apache FOP (Formatting Object Printer) package. The website for Apache FOP is http://xmlgraphics.apache.org/fop/index.html
Once the JAR file has been obtained, it needs to be installed into the OWD library
If you are still experiencing issues generating PDF documents, see Document Generation for PDF files
The user will be able to see a Document link in the Summary Screen once the Document link has been added in Oracle Policy Modeling Screen Authoring.
When the user clicks a document link, it will trigger the Document Generator plugin to generate an XDS for the current Interview, then generate the actual document using the template file. The Document Generator plugin will first attempt to locate the template file using the path provided in Template field of the Document link.
If the template file is not present (not deployed, incorrect path), an error will occur during document generation, and an error page will be displayed to the user.
For issues with generating PDF transcripts, please ensure that the library files (JAR for Java and DLL for .NET) for FOP is present in the web application.
The 'lib' folder when running Web Determinations in Tomcat is in <Tomcat>\<web determinations app folder>\WEB-INF\lib
For example, for a default Tomcat installation in Windows - C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\web-determinations\WEB-INF\lib
Ensure the FOP library files below is present in the 'lib' folder:
The 'lib' folder when running Web Determinations in IIS is in <IIS>\<web determinations app folder>\bin
For example, C:\inetpub\web-determinations\bin
Ensure the nFOP library files below is present in the 'lib' folder: