Show TOC

Procedure documentationQuerying Business Objects Locate this document in the navigation structure

 

You can specify a business object, or business object and operation, and obtain the following:

  • All default implementations: OBN determines for which operations the current user has at least one valid implementation, and then returns the default implementation for each operation.

  • Default implementation for the business object: OBN determines for which operations the current user has at least one valid implementation, then determines from among these operations the default operation, and then returns the default implementation for this operation.

  • All implementations for a specific operation: OBN returns all the valid implementations for the specified operation for the business object.

  • All operations for the business object: OBN returns all operations for the business object for which the current user has at least one implementation.

You can also check if the current user has any valid implementations for a particular business object, or business object and operation. This is useful if you are creating an OBN link and want to determine if the link is valid for the current user so that you can disable the link, if necessary.

Procedure

  1. To query OBN for business objects and operations, get a resolving container:

    Syntax Syntax

    1. IOBNResolvingContainer obnResolvingContainer = null;
      //  Valid for both technologies
      IPrincipal user = getUser();
      try {
          // Create OBN metadata for specified business object, operation
          IOBNMetadata obnMetadata = OBNFactory.getInstance()
              .createOBNMetadata(BO, systemAlias, operation, user);
      
          // Get OBN service (valid for both technologies)
          IOBNService obnService = getOBNService();
      
          // Get a resolving containers for the specified OBN metadata
          obnResolvingContainer = obnService
              .getOBNResolvingContainer(user, obnMetadata);
      }
      catch(OBNException e) 
      {
      // Handle exceptions
      }
      
    End of the code.
  2. Once you have an IOBNResolvingContainer object, you can execute various methods to find out information about the business object and operation specified in the IOBNMetadata object.

    The following checks if there is a valid implementation for the specified OBN metadata for the current user:

    Syntax Syntax

    1. booleanisAnyImplementationForOBNLink = false;
      try {
          isAnyImplementationForOBNLink = obnResolvingContainer
              .hasImplementations();
      }
      catch(OBNException e) {
      // Handle exceptions
      }
      
    End of the code.