GetActionDefType

설명

지정된 조치의 유형을 식별합니다.

GetActionDefNames 메소드를 사용하여 action_def_name 매개변수에 대한 유효한 값의 목록을 가져올 수 있습니다.

레코드 유형은 해당 레코드에 대해 허용되는 조치 유형을 제어합니다. 전체 목록은 ActionType 상수를 참조하십시오.

EntityDef 오브젝트의 다른 부분처럼, 관리자는 Rational® ClearQuest® Designer를 사용하여 정의된 조치를 설정합니다. API에서 직접 설정할 수 없습니다.

구문

VBScript

entitydef.GetActionDefType action_def_name 

Perl

$entitydef->GetActionDefType(action_def_name); 
ID
설명
entitydef
스키마의 레코드 유형에 해당하는 EntityDef 오브젝트입니다.
action_def_name
EntityDef의 유효한 조치 이름을 식별하는 문자열입니다.
Return value
action_def_name에 지정된 조치의 유형을 지정하는 Long 값. 값은 ActionType 상수 중 하나에 해당합니다.

예제

VBScript

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

sessionObj.OutputDebugString "Modify action names for " & _
         entityDefObj.GetName()

' List the action names whose type is "modify"
nameList = entityDefObj.GetActionDefNames()
For Each actionName in nameList
   actionType = entityDefObj.GetActionDefType(actionName)
   if actionType = AD_MODIFY Then
      sessionObj.OutputDebugString actionName
   End If 
Next

Perl

$sessionobj = $entity->GetSession(); 

$entitydefname = $entity->GetEntityDefName();

$entitydefobj = $sessionobj->GetEntityDef($entitydefname);

# Search for a legal action with which to modify the record 
$actiondeflist = $entity->GetLegalActionDefNames();

foreach $actionname (@$actiondeflist) 
 {
  $actiondeftype = $entitydefobj->GetActionDefType($actionname);
  if ($actiondedftype eq $CQPerlExt::CQ_MODIFY)
   {
   $sessionobj->EditEntity($entity,$actionname);
   }
 } 

피드백