Oracle has provided SOA facade and management api to retrieve the composite/instance details from the soa-infra database. List of composite instances can be retrieved based on any filter condition like between 2 dates, by instance id, by state etc. The API documentation is available at -
http://docs.oracle.com/cd/E21764_01/apirefs.1111/e10659/oracle/soa/management/facade/package-summary.html
And the detailed documentation is here -
http://docs.oracle.com/cd/E28280_01/admin.1111/e10226/soaadmin_apimanage.htm
I am listing here a code excerpt to retrieve the list of bpel instances between a give date. The actual code was to retrieve the payload that instantiated the bpel for each bpel instance in list.
First set the filter condition -
locator = LocatorFactory.createLocator(props);
CompositeInstanceFilter filter = new CompositeInstanceFilter();
filter.setMinCreationDate(minCreationDate);
filter.setMaxCreationDate(maxCreationDate);
then get the list of instances -
List<CompositeInstance> compositeInstance =
locator.getCompositeInstances(filter);
List<ComponentInstance> childComponentInstances;
get child component instances list by iterating through the list.
for (CompositeInstance compositeInstance1 : compositeInstance) {
childComponentInstances = compositeInstance1.getChildComponentInstances(cInstanceFilter);
System.out.println("Child list size -> " + childComponentInstances.size()+" | name -"+compositeInstance1.getCompositeDN().getCompositeName());
iterate through childComponentInstances list to retrieve the details. AuditTrail can also be retrieved for a particular instance here in this loop.
for (ComponentInstance componentInstance1 :
childComponentInstances) {
System.out.println("++++++++++++++++ " +
componentInstance1.getComponentName() +
"| Version - " + componentInstance1.getCompositeDN().getRevision() +
" | Instance ID - " + componentInstance1.getCompositeInstanceId() +
" | " + componentInstance1.getCreationDate());
}
}
For complete code please mail me.
http://docs.oracle.com/cd/E21764_01/apirefs.1111/e10659/oracle/soa/management/facade/package-summary.html
And the detailed documentation is here -
http://docs.oracle.com/cd/E28280_01/admin.1111/e10226/soaadmin_apimanage.htm
I am listing here a code excerpt to retrieve the list of bpel instances between a give date. The actual code was to retrieve the payload that instantiated the bpel for each bpel instance in list.
First set the filter condition -
locator = LocatorFactory.createLocator(props);
CompositeInstanceFilter filter = new CompositeInstanceFilter();
filter.setMinCreationDate(minCreationDate);
filter.setMaxCreationDate(maxCreationDate);
then get the list of instances -
List<CompositeInstance> compositeInstance =
locator.getCompositeInstances(filter);
List<ComponentInstance> childComponentInstances;
get child component instances list by iterating through the list.
for (CompositeInstance compositeInstance1 : compositeInstance) {
childComponentInstances = compositeInstance1.getChildComponentInstances(cInstanceFilter);
System.out.println("Child list size -> " + childComponentInstances.size()+" | name -"+compositeInstance1.getCompositeDN().getCompositeName());
iterate through childComponentInstances list to retrieve the details. AuditTrail can also be retrieved for a particular instance here in this loop.
for (ComponentInstance componentInstance1 :
childComponentInstances) {
System.out.println("++++++++++++++++ " +
componentInstance1.getComponentName() +
"| Version - " + componentInstance1.getCompositeDN().getRevision() +
" | Instance ID - " + componentInstance1.getCompositeInstanceId() +
" | " + componentInstance1.getCreationDate());
}
}
For complete code please mail me.