DoesTransitionExist

Description

Returns the list of transitions that exist between two states.

The list of transitions is returned in no particular order. You must examine each entry in the array until you find the name of the action you are looking for.

Syntax

Perl


$entitydef->DoesTransitionExist(sourceState, destState); 
Identifier
Description
entitydef
An EntityDef object corresponding to a record type in a schema.
sourceState
A String containing the name of the state that is the source of the transition.
destState
A String containing the name of the state that is the destination of the transition.
Return value
If at least one transition between the two states exists, this method returns a reference to an array of strings.

Example

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]);

 }