webMethods and Intelligent Business Operations 10.2 | CentraSite Developer's Guide | API for JAXR | Service that Uses Another Service
 
Service that Uses Another Service
If a service calls another service, this should be modeled with the pre-defined Uses association.
Service callingService = ...;
Service calledService = ...;
 
// find the "Uses" concept
ClassificationScheme associationType = bqManager.findClassificationSchemeByNam
e(Collections.singleton(FindQualifier.EXACT_NAME_MATCH), "AssociationType");
Concept usesConcept =
bqManager.findConceptByPath("/" + associationType.getKey().getId() + "/Uses");
 
// create association of type "Uses"
Association usesAssociation =
lcManager.createAssociation(calledService, usesConcept);
 
// callingService is now the source object of the association
callingService.addAssociation(usesAssociation);
 
ArrayList associationList = new ArrayList();
associationList.add(usesAssociation);
 
// save association and related modified objects
lcManager.saveAssociations(associationList, false);

Copyright © 2015- 2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release