DoesTransitionExist

설명

두 상태 사이에 존재하는 전이 목록을 리턴합니다.

전이 목록은 특정 순서 없이 리턴됩니다. 찾고 있는 조치의 이름을 찾을 때까지 배열의 각 항목을 검토해야 합니다.

구문

VBScript

entitydef.DoesTransitionExist sourceState, destState 

Perl

$entitydef->DoesTransitionExist(sourceState, destState); 
ID
설명
entitydef
스키마의 레코드 유형에 해당하는 EntityDef 오브젝트입니다.
sourceState
전이의 소스인 상태의 이름이 포함된 문자열입니다.
destState
전이의 대상인 상태의 이름이 포함된 문자열입니다.
Return value
Visual Basic의 경우, 두 상태 사이에 적어도 하나의 전이가 있으면 이 메소드는 문자열 목록이 포함된 Variant 값을 리턴합니다. 각 문자열은 조치의 이름에 해당합니다. 전이가 없는 경우 이 메소드는 빈 Variant를 리턴합니다.

Perl의 경우, 두 상태 사이에 적어도 하나의 전이가 있으면 이 메소드는 문자열 배열에 대한 참조를 리턴합니다.

예제

VBScript

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

transitions = entityDefObj.DoesTransitionExist("open", "resolved")
If transitions <> Empty Then
   ' Simply initiate an action using the first entry.
   sessionObj.EditEntity entity, transitions(0)

   ' ...
End If 

Perl

$sessionObj = $entity->GetSession();

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



$transitions = $entityDefObj->DoesTransitionExist("open",
       "resolved");



if (@$transitions)

 {

 # Simply initiate an action using the first entry.

 $sessionObj->EditEntity($entity, @$transitions[0]);

 } 

피드백