Vorheriges Thema: GetResourceChildrenList

Nächstes Thema: IsResourceExists

GetResourceParentsList

Description

This method uses the Resources cache to gather information about any given resource at a given time stamp.

For example, given "Resource Group A", this method will return us a slalom map containing the resources which directly ascend from it and are effective and the connection between them is also effective at the given TIME.

Syntax

GetResourceParentsList(ResourceId,TIME)

Parameters

Name

Type

Description

ResourceID

string

The name of the resource.

TIME

string

Represents a date in the script’s time zone.

Return Value

Returns a slalom map with all the direct ascendants of the given ResourceId at the given time.

Remarks

This method fails if the resource does not exist.

Slalom Example (partial)

Option Explicit

Sub OnRegistration(dispatcher)
  'TODO: ADD code here TO REGISTER EVENTS NEEDED TO calculate service LEVEL
End Sub

Sub OnResourceStructureChanged(TIME)
  Set pMap = Context.GetResourceParentsList(Context.ResourceId("xxxxR"),TIME)
  for each pItem in pMap
   \\some code
  Next
End Sub

Sub OnMetricChanged(TIME)
'TODO: this code is executed at the beginning of every contract version
End Sub

Sub OnLoad(TIME)
  'TODO: ADD code here TO handle calculation START event
End Sub

Sub OnPeriodStart(TIME)
  'TODO: ADD code here TO handle period START event
End Sub

Sub OnPeriodEnd(TIME, isComplete)
  'TODO: ADD code here TO handle period END event
End Sub