XML Model Report - Oracle configurator

Please refer to the link below for the latest content:

http://www.applikast.net/technical/tools/xml-model-report---oracle-configurator

################################################################################
################################################################################
Developers who have worked on Oracle Configurator have always realised that there has been a requirement to understand the changes between existing repository models and the published version of those models in Oracle configurator.

There have unfortunately been no tools to identify such changes and to highlight them.

We had once hit a situation where our repository model was completely out of sync(corrupted) when compared to a published model. We needed to understand the exact changes(it would have been helpful to visually see the differences but unfortunately there was no mechanism to do so).

Desperation led to an invention and I ended up modifying the existing Model Report that Oracle provides.

This can be used to compare differences between two different models. These models could be both published models/repository model-published model/same model on two different instances(UAT and Prod).

Why did we modify the Model Report?






  • There was no existing tool to check changes that were made to a Model.
What has changed ....
 ---------------------------------------------------------------------------------------------------------------------------------------------------------
  • Seeded Model Report runs from the user interface in Configurator Developer
  • Modified to now run for publications as well as models in repository
  • Can now be run from the commandline Stores the output in /tmp directory
  • §Generates an xml output rather than just pdf
  • XML can be compared to check differences
---------------------------------------------------------------------------------------------------------------------------------------------------------
Advantages
---------------------------------------------------------------------------------------------------------------------------------------------------------
  • Model Report can be generated for Models in repository and publications as well
  • Now possible to get the model report in an xml format
  • Xml’s can be compared across publications/models to identify changes
  • Now possible to re-cover from disasters when developers forget what they have done
  • Compare publication against repository to identify changes
  • Xml’s can be compared across instances to identify changes made to a model and be used for accurately migrating all modifications. (Especially useful if you do not have a CZ Gold instance)   
---------------------------------------------------------------------------------------------------------------------------------------------------------
Running the Model Report
---------------------------------------------------------------------------------------------------------------------------------------------------------
  • Download ModelReport
  • Set classpath
  • Modify java code to enter tns information(one for each instance that you own . E.g prod/pre-prod/dev etc
  • Compile CZAnalysis.java
  • Run CZAnalysis.java
  • Retrieve xml file
---------------------------------------------------------------------------------------------------------------------------------------------------------
Identify model id’s
---------------------------------------------------------------------------------------------------------------------------------------------------------
Use SQL Below to identify all Models in repository:
     –SELECT NAME, 
                      devl_project_id 
       FROM cz_devl_projects 
       WHERE devl_project_id = persistent_project_id


Use SQL below to identify all publications for a given model in repository:
     -SELECT NAME, 
                     devl_project_id 
       FROM cz_devl_projects 
       WHERE devl_project_id != persistent_project_id 
       AND persistent_project_id =  
       ORDER BY devl_project_id DESC
 
---------------------------------------------------------------------------------------------------------------------------------------------------------
Detailed Steps: Move Jar
---------------------------------------------------------------------------------------------------------------------------------------------------------



---------------------------------------------------------------------------------------------------------------------------------------------------------
Detailed Steps: Modify code
---------------------------------------------------------------------------------------------------------------------------------------------------------

  • Modify the java file CZAnalysis.java.
  • Update the loadProperties and getConnectString methods with your database information from tnsnames.ora:
  • Compile file using - javac CZAnalysis.java
---------------------------------------------------------------------------------------------------------------------------------------------------------
Detailed Steps: Set Classpath
---------------------------------------------------------------------------------------------------------------------------------------------------------

  • Set classpath to include directory that contains the directory CZAnalysis e.g:
  • export THTH CLASSPATH=/dev/modelreport:$CLASSPATH

---------------------------------------------------------------------------------------------------------------------------------------------------------
Detailed Steps: Run Model Report
---------------------------------------------------------------------------------------------------------------------------------------------------------
  • Run CZAnalysis using:
    • java CZAnalysis
    • E.g java CZAnalysis xxx xxxpwd 359180
  • This will create a file called xxx359180out.xml under /tmp directory. 
  •  You can pass multiple model id’s at once to run CZAnalysis e.g:
    • java CZAnalysis xxx xxxpwd 359180 359181 359182
    • This will create 3 files /tmp/xxx359180out.xml / tmp/xxx359181out.xml /tmp/xxx359182out.xml
  • You can run CZAnalysis on different environments for the same model id to check differences between the same model on different environments(e.g dev and pre-prod or dev and prod)
     
---------------------------------------------------------------------------------------------------------------------------------------------------------
Detailed Steps: Check Differences
---------------------------------------------------------------------------------------------------------------------------------------------------------

  • Bring the xml files onto your desktop from the middle tier.(using ftp).
  • Use any tool like WINMERGE to compare xml files for different model id’s/publications.
  • This report identifies all possible changes including
    • Addition of New nodes New rules New Properties
    • Changes to Description Type Values Min-max values Rule text Argument bindings Initial Values
  • E.g of Changes to effective dates.

  • E.g of Changes to property values.
       

  • E.g of Changes to argument bindings
  •  E.g of Changes to CX Rules(seen as statement rule equivalents)



1 comment:

  1. Thank you very much for developing this tool and share it. When we have lots of complex models, this tool is indispensable.

    ReplyDelete

There was an error in this gadget