Thursday 13 November 2014

Oracle Code Compliance Inspector


The Code Compliance Inspector uses a pre-defined set of assertions that are based on SOA AIA Integration Developer guidelines and the Web Services Interoperability Organization Basic Profile (WS-I BP) to check SOA projects for design consistency and good coding and documentation practices. CCI qualifies code as Compliant, Conformant, or Fully Conformant to be in sync The Open Group Architecture Framework (TOGAF) standard guidelines based on the pass criteria of the highest priority assertions.


  • CCI is available as a JDeveloper extension
  • As a command-line utility
  • Oracle Enterprise Repository (OER) utility


Developers will typically use the JDeveloper extension and will continuously check compliance on JDeveloper projects as they develop.

The CCI command line utility can be used to incorporate CCI code check as part of our build/deployment/continuous integration process. So every time someone checks code into main branch, the Continuous Integration tool can automatically checkout the code, do a CCI code compliance test and then build and deploy. Of course if the code is not compliant it can send an error notification to a distribution list, without deploying.
Here are some examples for invoking the Code Compliance Inspector from a command line:

  • Windows: checkCompliance.bat -inputDir D:\AIA\demo -outputDir D:\ComplianceOut
  • Linux: sh checkCompliance.sh -inputDir /AIA/demo -outputDir /ComplianceOut


CCI provides optional integration to Oracle Enterprise Repository (OER). When OER is present, CCI can synchronize results to the repository, enabling users to access the report from the OER console. Integrating compliance data into OER provides repository users with information about whether composites are compliant into the repository reports and individual asset metadata.

To make it working in JDEV11 is quite easy, just download and install the extensions in JDeveloper




Then right-click the project and select Check Code Compliance.


Note: when the project is selected, the code compliance inspector can also be launched
from the toolbar.

A highlighted Compliance Results tab will appear in the log panel, go ahead and select it
to see the project status



In this environment, we are simply checking compliance against WS-I standards, but there are also other standards delivered with Oracle Application Integration Architecture Foundation Pack that can check much more as well as additional checks that can be added by your team

3 comments:

  1. Hi
    Could you please elaborate how CCI jar can be included in maven lifecycle? It seems invoking compliance.policy.engine.jar is not possible directly without OER installation.Refer http://stackoverflow.com/questions/23595426/how-to-invoking-oracle-cci-from-a-command-line

    ReplyDelete
  2. Hi Sameer,
    sorry for the late reply.
    Also in version 12 of the SOA the CCI command line tools are distributed with OER within the /modules/tools/solutions/12.1.3.0.0-ComplianceInspector.zip, as described here:
    https://docs.oracle.com/middleware/1213/oer/administer-oer/codecomplianceinsp.htm#OERCG13432

    ReplyDelete
  3. Hi,
    Can you please help me out here. While running CCI from Jdev, I am getting a pop-up with the following message:
    org.apache.xerces.dom.ElementNSImpl.setUserData(Ljava/lang/String;Ljava/lang/Object;Lorg/w3c/dom/UserDataHandler;)Ljava/lang/Object;

    and all the policies gets skipped.
    Have you come across this issue ?

    ReplyDelete