Main Content

getSLRequirements

Get imported referenced requirement associated with OSLC requirement resource object

Since R2021a

    Description

    ref = getSLRequirements(reqResource) returns the imported referenced requirement associated with the OSLC requirement or requirement collection resource reqResource.

    example

    Examples

    collapse all

    This example shows how to get the referenced requirement that was imported from IBM® DOORS® Next that is associated with the OSLC requirement resource in the same project in DOORS Next.

    Import requirements from IBM DOORS Next. For more information, see Import Requirements from IBM DOORS Next.

    Create and configure an OSLC client myClient as described in Create and Configure an OSLC Client for the Requirements Management Domain. When setting the service provider and configuration context, use the same settings that you used when importing the requirements.

    Create a creation factory for the requirement resource type. Query the service provider for requirements. Submit a query request to the service provider for the available requirement resources.

    myCreationFactory = getCreationFactory(myClient,'Requirement');
    reqs = queryRequirements(myQueryCapability)
    reqs = 
    
      1×30 Requirement array with properties:
    
        ResourceUrl
        Dirty
        IsFetched
        Title
        Identifier

    Assign one of the requirements to the variable myReq. Retrieve the full resource data from the service provider for the requirement resource.

    myReq = reqs(1);
    status = fetch(myReq,myClient)
    status = 
    
      StatusCode enumeration
    
        OK

    Get the imported referenced requirement associated with myReq.

    ref = getSLRequirements(myReq)
    ref = 
    
      Reference with properties:
    
                  Id: '431'
            CustomId: '431'
            Artifact: 'https://localhost:9443/rm/_BCoGwgJZEeuFW5Ss3RBk7w'
          ArtifactId: 'https://localhost:9443/rm/_BDSOEwJZEeuFW5Ss3RBk7w'
              Domain: 'OSLC'
           UpdatedOn: 17-Feb-2021 13:54:13
           CreatedOn: 29-Sep-2020 09:38:16
           CreatedBy: ''
          ModifiedBy: ''
            IsLocked: 1
             Summary: 'System Hazards'
         Description: 'System Hazards'
           Rationale: ''
            Keywords: {}
                Type: 'Functional'
                 SID: 431
        FileRevision: 1
          ModifiedOn: 29-Sep-2020 09:38:16
               Dirty: 0
            Comments: [0×0 struct]
               Index: '1'

    Input Arguments

    collapse all

    OSLC requirement or requirement collection resource object, specified as an oslc.rm.Requirement or oslc.rm.RequirementCollection object.

    Output Arguments

    collapse all

    Referenced requirement, returned as an slreq.Reference object.

    Version History

    Introduced in R2021a