Main Content

createRequirement

Create requirement in OSLC service provider

    Description

    example

    myRequirement = createRequirement(myCreationFactory,title) creates a requirement with the specified title by using the creation factory myCreationFactory in the Open Services for Lifecycle Collaboration (OSLC) service provider.

    Examples

    collapse all

    This example shows how to submit a creation request for a new requirement resource with a configured OSLC client.

    After you have created and configured the OSLC client myClient as described in Create and Configure an OSLC Client for the Requirements Management Domain, create a creation factory for the requirement resource type.

    myCreationFactory = getCreationFactory(myClient,'Requirement');

    Use the creation factory to create a new requirement resource with the title My New Requirement. Retrieve the full resource data from the service provider for the requirement resource and inspect the resource.

    newReq = createRequirement(myCreationFactory,'My New Requirement');
    fetch(newReq,myClient);
    newReq
    newReq = 
    
      Requirement with properties:
    
        ResourceUrl: 'https://localhost:9443/rm/resources/_72lxMWJREeup0...'
              Dirty: 0
          IsFetched: 1
              Title: 'My New Requirement'
         Identifier: '1806'

    Open the requirement resource in the system browser by using the show function.

    show(newReq)

    Input Arguments

    collapse all

    OSLC resource creation factory, specified as an oslc.core.CreationFactory object.

    Requirement title, specified as a character array.

    Output Arguments

    collapse all

    OSLC requirement resource, returned as an oslc.rm.Requirement object.

    Introduced in R2021a