GetStateDefNames

Descripción

Devuelve los nombres de estado definidos en el objeto EntityDef.

Como los demás componentes de un objeto EntityDef, el administrador establece los estados definidos utilizando Rational ClearQuest Designer. No se pueden establecer directamente desde la API.

Sintaxis

VBScript

entitydef.GetStateDefNames 

Perl

$entitydef->GetStateDefNames(); 
Identificador
Descripción
entitydef
Un objeto EntityDef que corresponde a un tipo de registro de un esquema.
Valor de retorno
Para Visual Basic, un valor Variant que contiene una matriz cuyos elementos son series. Cada serie contiene el nombre de un estado. Si el campo EntityDef no contiene estados, el valor de retorno es un Empty Variant. Para Perl, una referencia a una matriz de series.

Ejemplos

VBScript

set sessionObj = GetSession
set entityDefObj = sessionObj.GetEntityDef(GetEntityDefName())

If entityDefObj.GetType = AD_REQ_ENTITY Then
   sessionObj.OutputDebugString "States of record type: " & _
            entityDefObj.GetName()

   ' List the possible states of the record
   nameList = entityDefObj.GetStateDefNames()
   For Each stateName in nameList
      sessionObj.OutputDebugString stateName
   Next
End If 

Perl

$sessionObj = $entity->GetSession();

$entityDefObj = $sessionObj->GetEntityDef($entity->GetEntityDefName());



if ($entityDefObj->GetType eq $CQPerlExt::CQ_REQ_ENTITY)

 {

 $sessionObj->OutputDebugString("States of record type:
       ".$entityDefObj->GetName());



 # List the possible states of the record

 $nameList = $entityDefObj->GetStateDefNames();



foreach $stateName (@$nameList)
   {
  $sessionObj->OutputDebugString($stateName)

  }

 } 

Feedback