Friday, July 27, 2018

Consuming ADF BC model project components from another project !

Consuming ADF BC model project components from another project !


This year, let me start my posts with a simple topic. There are multiple ways to expose a project for use by other projects. One obvious approach is generate an ADF library artefact and consume it from other projects. This is documented in Fusion Middleware Fusion Developers Guide -

  • Packaging a Reusable ADF Component into an ADF Library
  • Adding ADF Library Components into Projects 

 The above things are well and good. However if you you want to consume a ADF BC model project within same workspace, there is an easy way.

To consume business components defined in a model project from another model project within the same work space,

  1. Right click the model project which consumes business components from other model projects in the same workspace and select Project Properties.In the Project Properties dialogue window, select the Dependencies tab and add the supplier Project by either selecting Build Output option or Jar archive option .
  2. The above steps is enough to consume Java classes from the dependent model project. To consume business components follow Step 3. 
  3. Once you define the dependencies for the consumer project, in the Project Properties window, select Imports option displayed below the ADF Business Component node. Click Import button, select the desired jpx file (jpx for the project whose business components needs to be imported to the consumer project) using file browser and then select the components that needs to be imported to the consumer project as shown in the following diagram.


You are done with the import task. Now IDE will start exposing business components in the consumer project.

Please note that, ADF development team is working on the dependency management feature to make it more user friendly so that specifying dependency may be enough to consume business components from dependent project. Stay tuned, will keep you posted !


visit link download