Demo
In this page there are some examples usefull to understand how JEDI works. The examples are configured for Oracle 11g.
You can find all the sources referenced in this page in examples folder (both in bin and source distributions).
HR schema
First of all you have to create some business data to be used to generate JEDI documents.
Currently JEDI uses the same datasource for reading both managed documents and XML business data streams. So the configuration database must always coincide with the business database.
You have to define, on the Oracle database, an example schema named HR containing data about employees, countries, etc.
Next you have to run the following scripts (located in examples folder):
- HR_DDL.sql: it will create the tables and write some data on them
- HR_JEDI.pks, HR_JEDI.pkb: it will create a PLSQL package with the functions used by the managed documents
- HR_grants.sql: it is necessary to give to JEDI user the grant to execute the functions of HR_JEDI PLSQL package
HR managed documents
Running HR-JEDI-Documents.sql script, located in examples folder, you'll load some managed documents on the JEDI configuration database.
- Employees from query
- Employees excel from JEDI XML Document
- Employees from RS Stored Procedure
- Employees from XML Stored Procedure
- Employees from SQLX Stored Procedure
Now you can use JEDI admin interface to look at the configuration of these documents. Open you browser at the following address:
http://<servername>:<port>/jedi/document/documentList.faces
then insert username and password and finally make a search of the managed documents.
Employees from query
This managed document extracts all the employees whose last name is like a given parameter and shows the result as an XML stream.
Entering into its detail page, you can see that:
- The output format is XML
- It uses a reusable tranformer, named Identical Transformer, that gets an XML output same to the XML input
- The XML source type is a SQL query, whose statement is shown beside
- It has only one parameter, named 'Surname' , to be used in the query
Employees excel from JEDI XML Document
This managed document extracts all the employees whose last name is like a given parameter and shows the result as an Excel document.
Entering into its detail page, you can see that:
- The output format is Excel
- It uses a reusable tranformer, named Excel Reusable Transformer, that gets an Excel output from the XML input
- The XML source type is a JEDI XML Document with a reference to 'Employees from query' managed document whose output will be used as XML input
- It has only one parameter, named 'Surname', to be used by the referenced JEDI XML Document
Employees from RS Stored Procedure
This managed document extracts all the employees whose last name is like a given parameter and shows the result as an XML stream.
Entering into its detail page, you can see that:
- The output format is XML
- It uses a reusable tranformer, named Identical Transformer, that gets an XML output same to the XML input
- The XML source type is an Oracle Result Set from stored procedure, whose method to invoke is HR.HR_JEDI.EmployeesSelect
- It has only one parameter, named 'Surname', to be used in the stored procedure
Employees from XML Stored Procedure
This managed document extracts all the employees whose last name is like a given parameter and shows the result as an XML stream.
Entering into its detail page, you can see that:
- The output format is XML
- It uses a reusable tranformer, named Identical Transformer, that gets an XML output same to the XML input
- The XML source type is an Oracle XMLTYPE from stored procedure, whose method to invoke is HR.HR_JEDI.EmployeesSelectXML. This PLSQL function simply converts the cursor into an XML output with only one nesting level
- It has only one parameter, named 'Surname', to be used in the stored procedure
Employees from SQLX Stored Procedure
This managed document extracts all the employees whose last name is like a given parameter and shows the result as a PDF document.
Entering into its detail page, you can see that:
- The output format is PDF
- It uses a reusable tranformer, named Identical Transformer, that gets an XML output same to the XML input
- The XML source type is an Oracle XMLTYPE from stored procedure, whose method to invoke is HR.HR_JEDI.EmployeesSelectSQLX. This PLSQL function returns an XMLTYPE result representing an XML output with more nesting levels
- It has only one parameter, named 'Surname', to be used in the stored procedure
Running the examples
You can use Test document functionality of JEDI admin interface: choose the managed document, fill in the parameter values and click on 'Generate document' button.
Otherwise you can use a direct HTTP request. Here is an example of an URL requesting the JEDI document identified by 1:
http://<servername>:<port>/jedi/document.jedi?id=1&valString=a
(page content was updated on 18/09/2013)