org.yawlfoundation.yawl.elements
Class YEnabledTransitionSet

java.lang.Object
  extended by org.yawlfoundation.yawl.elements.YEnabledTransitionSet

public class YEnabledTransitionSet
extends Object

This class collects the set of all currently enabled transitions (ie. tasks) of a net. It is designed to provide a completely correct implementation of the YAWL deferred choice semantics. Enabled transitions are grouped by the id of the enabling place (condition). For each place: if there is one or more composite tasks enabled, one of the composite tasks is chosen (randomly if more than one) and all other tasks are not fired; otherwise, all the atomic tasks are enabled, allowing a choice to be made from the environment, and each atomic task is 'stamped' with an identifier that services may use to identify tasks that are part of the same group. This class is used exclusively by YNetRunner's continueIfPossible() and fireTasks() methods. Author: Michael Adams Date: 5/03/2008


Nested Class Summary
 class YEnabledTransitionSet.TaskGroup
          A group of YTasks plus an identifier
 
Constructor Summary
YEnabledTransitionSet()
           
 
Method Summary
 void add(YTask task)
          Adds an enabled task to the relevant task group
 List<YEnabledTransitionSet.TaskGroup> getEnabledTaskGroups()
          Gets the final set(s) of enabled transitions (one for each enabling place)
 boolean isEmpty()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

YEnabledTransitionSet

public YEnabledTransitionSet()
Method Detail

add

public void add(YTask task)
Adds an enabled task to the relevant task group

Parameters:
task - the enabled task

getEnabledTaskGroups

public List<YEnabledTransitionSet.TaskGroup> getEnabledTaskGroups()
Gets the final set(s) of enabled transitions (one for each enabling place)

Returns:
the list of groups

isEmpty

public boolean isEmpty()
Returns:
true if there are no enabled transitions in this set


Copyright © 2004-2012 The YAWL Foundation.