Condividi tramite


EntityType: ResourceConstraintScenario (ProjectData service)

In this article
Definition
Parent element
Child elements

Contains the properties that define the reporting data for a resource constraint scenario in the ProjectData service.

Example

The following REST query uses the ResourceConstraintScenarios entity set and the ScenarioId key to get the specified resource constraint scenario. The query is all on one line.

http://<pwa_url>/_api/ProjectData/ResourceConstraintScenarios
    ?$filter=ScenarioId eq guid'da4af49e-4b96-e211-a1ea-00155da01314'

Definition

<EntityType Name="ResourceConstraintScenario">
  <Key>
    <PropertyRef Name="ScenarioId" />
  </Key>
  <Property Name="ScenarioId" Type="Edm.Guid" Nullable="false" />
  . . .
  <NavigationProperty Name="CreatedByResource" Relationship="ReportingData.ResourceConstraintScenario_CreatedByResource" ToRole="CreatedByResource" FromRole="ResourceConstraintScenario" />
  . . .
</EntityType>

Parent element

Element

Description

ReportingData

The schema for the reporting data in the ProjectData service.

Child elements

Child elements are properties of a resource constraint scenario and navigation properties of that resource constraint scenario. Attributes of the Property elements specify the property name and type, and whether the property can be a null value. The NavigationProperty elements specify collections of entities, such as cost constraint scenarios, that are associated with a resource constraint scenario. A navigation property uses an Association element in a query for a related entity collection

The Key element specifies the property that is the primary key for a resource constraint scenario query. ScenarioId is the scenario GUID.

Property elements

The following table lists the Property elements for the ResourceConstraintScenario entity. The Name, Type, and Nullable columns contain attribute values for each property.

Attribute values for the Property elements of ResourceConstraintScenario

Name

Type

Nullable

Description

AllocationThreshold

Edm.Decimal

false

The percentage number between 0 and 100 that specifies the minimum threshold that is required for a resource to be allocated to a project.

AnalysisId

Edm.Guid

false

The GUID for a portfolio analysis.

AnalysisName

Edm.String

true

The name of a portfolio analysis.

ConstraintType

Edm.Byte

false

The type of restriction or constraint.

ConstraintValue

Edm.Decimal

false

A value that indicates the limit of a constraint.

CostConstraintScenarioId

Edm.Guid

false

The GUID of a portfolio analysis cost constraint scenario.

CostConstraintScenarioName

Edm.String

true

The name of a Portfolio Analysis cost constraint scenario.

CreatedByResourceId

Edm.Guid

false

The GUID of the resource that created a constraint.

CreatedByResourceName

Edm.String

true

The name of the resource that created a constraint.

CreatedDate

Edm.DateTime

false

The date and time that a constraint was created.

EnforceProjectDependencies

Edm.Boolean

false

A flag that indicates whether project dependencies are enforced.

EnforceSchedulingConstraints

Edm.Boolean

false

A flag that indicates whether scheduling constraints are enforced.

HiringType

Edm.Byte

false

The internal or external hiring type.

ModifiedByResourceId

Edm.Guid

false

The GUID of the resource that last modified a constraint.

ModifiedByResourceName

Edm.String

true

The name of the resource that last modified a constraint.

ModifiedDate

Edm.DateTime

false

The date and time that a constraint was last modified.

RateTable

Edm.Byte

false

Specifies a rate table.

ScenarioDescription

Edm.String

true

The description of a Portfolio Analysis scenario.

ScenarioId

Edm.Guid

false

Key
The GUID of a Portfolio Analysis scenario.

ScenarioName

Edm.String

true

The name of a Portfolio Analysis scenario.

The following table lists attribute values for the NavigationProperty elements of the ResourceConstraintScenario entity. The Name and Relationship columns contain attribute values for each navigation property.

There are two types of Relationship attributes. One type contains two pairs of names; each pair of names indicates a navigation direction. The first pair starts with the entity type that has the primary, or starting, role in the navigation. The second pair starts with the entity type that has the secondary, or dependent, role in the navigation. For example, for the Analysis navigation property, the primary type is PortfolioAnalysis, and the secondary type is ResourceConstraintScenario. For this type of navigation, the FromRole is PortfolioAnalysis_ResourceConstraintScenarios, and the ToRole is ResourceConstraintScenario_Analysis.

The other type of Relationship attribute contains a single pair of names. The first name in the pair is the primary entity type in the navigation. The second name in the pair is the secondary entity type in the navigation. For example, in the CreatedByResource navigation property relationship, ResourceConstraintScenario is the primary entity type and CreatedByResource is the secondary entity type.

Attribute values for the NavigationProperty elements

Name

Relationship

Description

Analysis

PortfolioAnalysis_ResourceConstraintScenarios_ResourceConstraintScenario_Analysis

Establishes navigation from a portfolio analysis to a collection of resource constraint scenarios and from a resource constraint scenario to an analysis.

CostConstraintScenario

CostConstraintScenario_ResourceConstraintScenarios_ResourceConstraintScenario_CostConstraintScenario

Establishes navigation from a cost constraint scenario to a collection of resource constraint scenarios and from a resource constraint scenario to a cost constraint scenario.

CreatedByResource

ResourceConstraintScenario_CreatedByResource

Establishes navigation from a collection of resource constraint scenarios to the resource that created them.

ModifiedByResource

ResourceConstraintScenario_ModifiedByResource

Establishes navigation from a collection of resource constraint scenarios to the resource that modified them.

ResourceScenarioProjects

ResourceConstraintScenario_ResourceScenarioProjects_ResourceScenarioProject_ResourceConstraintScenario

Establishes navigation from a resource constraint scenario to a collection of resource scenario projects and from a resource scenario project to a resource constraint scenario.

See also

Reference

ResourceConstraintScenarios

ReportingData

Concepts

Querying OData feeds for Project 2013 reporting data