Configuring the Web Interface OSLC provider service
Enabling the OSLC Provider service
The Web.config file includes a switch to enable or disable the OSLC provider service.
The default location for this file is c:\inetpub\wwwroot\PTC Integrity Modeler Web Interface\
Within the <appSettings> tag, set the EnableModelerOSLC key value to true or false.
Map Modeler types to OSLC Resources
The Modeler item types that are exposed by the Modeler OSLC service provider can be configured. It is possible to define which Modeler item types are exposed as OSLC Requirement Resources, and which types are exposed as OSLC Architecture Resources.
The configuration file is: OSLCControl.xml
The default location for this file is: c:\inetpub\wwwroot\PTC Integrity Modeler Web Interface\App_Data\
The following are some Modeler item types that are exposed as OSLC Requirement resources:
• Requirement
• Interface Requirement
• Extended Requirement
• Functional Requirement
• Performance Requirement
• Physical Requirement
• Design Constraint
• Enterprise Goal
From Modeler 10, the following SysML 2.0 items are exposed as Requirement resources:
• SysML 2 Requirement
• SysML 2 Requirement Definition
Map Modeler properties to OSLC Resource properties
The Modeler properties that are exposed by the Modeler OSLC service provider can be configured. It is possible to update the mapping of Modeler item properties to OSLC Resource properties.
Additional Modeler item properties can be exposed by adding the properties to the configuration file using the same format.
The configuration file is called: OSLCMappings.xml
The default location is c:\inetpub\wwwroot\PTC Integrity Modeler Web Interface\App_Data\
In this file, OSLC Resource properties are defined and each defined property has a set of parameters which are described below.
• oslc - value can’t be changed. This is the expected OSLC property name.
• modeler - value can be changed. Specifies the Modeler property used. Able to choose another Modeler property name. Type must match the existing valuetype as this is what is expected by OSLC.
• valuetype - value can’t be changed as OSLC expects each OSLC defined property to use the OSLC defined valuetype.
• range - value can be changed but can only be the allowed OSLC values. It defines what range of items to expect in the Role or Property. “any” is the safest option as “anything” can be there, but if you use a well-defined type like requirement then the item in that role has to be an accurate fit. Where you see http://open-services.net/ns/rm#requirement the item in that role will also be an OSLC Requirement Resource.
• occurs - this must match the Modeler property multiplicity. It can be changed but must match the Modeler property. For example, you can’t have exactly-one for parentRequirement as this is a role that allows zero-or-many.
• read-only - this is not currently used, so changes have no effect.
• preview-lrg - specifies if the property is shown in the large preview UI. Can be changed.
• preview-sml - specifies if the property is shown in the small preview UI. Can be changed.
• representation - this defines if the data will be Inline (used for Properties) or Reference (used for items in Roles).
ServiceProviderCatalogs use rel tags for Model Versions. Possible rel tag values are listed below.
• predecessor-version - link to a previous version of the model.
• latest-version - link to the latest version of the model, at this time.
• canonical - link to the latest version of the model, now and in the future.
Adding New Properties to the OSLC Provider Service
To expose additional Modeler properties as OSLC resource properties, add new entries into the OSLCMappings.xml file. Add entries to the core section, or to the resource type specific sections.
The olsc property must start with the prefix ptc_im_rm for Requirement Resources and ptc_im_am for Architecture Resources. The suffix can be chosen but must conform to XML standards.
The occurs property must be correctly mapped to the multiplicity of the Modeler property. The following examples show valid mappings for the Id, Description and Applied Constraint properties:
• Id = exactly-one
• Description = zero-or-one
• Applied Constraint = zero-or-many
Configuring the display of diagram images
Diagram images are included in the Large Preview delegated user interface (if applicable). This also includes Text Diagrams and Table Matrix.
You can choose to enable/disable display of diagrams via the OSLCControl.xml file found in the App_Data folder. The setting called includeDiagramImage by default is set to True.
<previews>
<l—Control the initial size of Previews Small & Large-->
<previewSmall height="100px" width="600px"/>
<previewLarge height="400px" width="800px" includeDiagramImage="True"/>
</previews>
Selection Delegated User Interface
An OSLC Selection user interface that presents model items in a tree hierarchy is available at the Root of the Modeler OSLC Service. This UI provides access to both Architecture and Requirements Management resources and allows navigation from the Root of the OSLC Provider (shows Servers, Databases, Models, Model Versions, and then all Model items). Only Model Items are selectable.
The UI can be called with basic authentication as headers, but allows the provider a login dialog if no authentication is provided. CORS is supported to allow calls from any Domains, but can be configured via the web.config of the Modeler OSLC Provider service. For more information on how to use OSLC Selection Dialogs, refer to the OSLC Specifications.