指定されたアクションのタイプを識別します。
GetActionDefNames メソッドを使用すると、action_def_name パラメータに有効な値のリストを取得できます。
レコード タイプに基づいて、指定されたレコードに許可されるアクションのタイプを制御します。完全なリストについては、ActionType 定数を参照してください。
EntityDef オブジェクトの他の部分と同様に、管理者が Rational® ClearQuest® Designer を使用して定義済みアクションを設定します。 これらは、API から直接には設定できません。
VBScript
entitydef.GetActionDefType action_def_name
Perl
$entitydef->GetActionDefType(action_def_name);
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);
}
}