Defining Logic > Functions > System Functions > OwnedResource

Owned Resource

Returns the name of the nth resource currently owned by the entity making the function call. The function parameter indicates the position of the resource in the chronological list of owned resources. For example, OwnedResource(1) returns the longest owned resource in the list and so on.

 

When used without a parameter, this function returns the most recent resource that the entity captured and still owns. If the parameter value is not within the range of the resource list, or if the entity or downtime currently does not own a resource, the function will return a 0 (zero) without a warning or error message.

 

A preempted resource is NOT removed from the list but marked temporarily to indicate that the preemptee does not own the resource. After the resource resumes the original process after being preempted, it retains its original rank in the list.


© 2011 ProModel Corporation • 556 East Technology Avenue • Orem, UT 84097 • Support: 888-776-6633 • www.promodel.com