Previous Next

GetAvailableTasks( ) method
Returns an array of all Task objects currently available to the user of the associated Progress.BPM.UserSession. An available task is one that a group of users is eligible to perform but that has yet not been assigned to any specific user.
An available task can be available to more than one user. The task must be assigned, however, before a user can work on it.
Return type:
Access:
Applies to:
This method supports three overloaded versions.
The first overloaded version takes no parameters.
 
Syntax 
GetAvailableTasks( )
If the method succeeds, it returns an array of Progress.BPM.Task objects. If the method succeeds but there are no available tasks for the user, the method returns an indeterminate array.
If the method fails, it raises a BPM error.
The second overloaded version returns an array that includes only those Task objects that meet the criteria defined by the Filter argument. This method invokes the Is( ) method on the input filter object parameter to test each Task object according to the filter criteria and returns the Task in the list if it does so.
 
Syntax 
GetAvailableTasks( INPUT Filter AS Progress.BPM.TaskFilter )
Filter
A Progress.BPM.TaskFilter object whose Is( ) method determines whether each of the eligible Task objects is included in the array returned by the method.
If there is an unhandled error during execution of GetAvailableTasks( ), including during execution of the Is() method, the GetAvailableTasks( ) method raises that error. The method does not return any kind of array of Task objects, and the target of any assignment of the return of the GetAvailableTasks( ) method is unchanged.
If an unhandled STOP condition or QUIT condition is raised while the GetAvailableTasks( ) method is executing, that condition is raised on the statement that calls the method, and normal processing for that condition proceeds.
The third overloaded version returns an array that includes only those Task objects that meet the criteria defined by the FilterArray argument. This method invokes the Is( ) methods on the input filter object parameter to test each Task object according to the filters criteria and returns the Task in the list if it does so.
 
Syntax 
GetAvailableTasks( INPUT FilterArray AS Progress.BPM.TaskFilter EXTENT,
                   INPUT Operator AS CHAR)
FilterArray
An array of Progress.BPM.TaskFilter objects whose Is( ) methods determine whether each of the eligible Tasks is included in the array returned by the method. For each Task, the result of applying each filter is combined with the results of applying the other filters in a way determined by the Operator argument.
Operator
A CHARACTER expression that resolves to either AND or OR. If AND, a Task must satisfy all of the filters in FilterArray to be included in the array that the method returns. If OR, a Task will be included as long as it satisfies at least one of the filters in FilterArray.
If the methods succeeds, it returns an array of Progress.BPM.Task objects. If the method succeeds but there are no available tasks for the user that satisfy the filter(s), the method returns an indeterminate array.
If any of the methods fails, it raises a BPM error. One possible reason for failure is an invalid Operator argument.
If there is an unhandled error during execution of GetAvailableTasks( ), including during execution of the Is() method, the GetAvailableTasks( ) method raises that error. The method does not return any kind of array of Task objects, and the target of any assignment of the return of the GetAvailableTasks( ) method is unchanged.
If an unhandled STOP condition or QUIT condition is raised while the GetAvailableTasks( ) method is executing, that condition is raised on the statement that calls the method, and normal processing for that condition proceeds.
Note:
1.
Define a class that implements the Progress.BPM.Filter.ITaskFilter interface, or use a built-in Progress.BPM.Filter.* class. When you are implementing the interface, the only required class member is the Is( ) method. It is likely, however, that you will add a property for storing a value.
The Is( ) method might then compare the value of that property to some property of its Task parameter as part of method implementation and return a LOGICAL value indicating whether the Progress.BPM.Task object parameter meets some set of criteria, as defined by the implementation of this method.
2.
Initialize the class that implements the Progress.BPM.Filter.ITaskFilter interface. This requires instantiating the class and, likely, providing one or more values to serve as the filtering criteria (possibly by passing them as constructor arguments or setting properties).
3.
Pass the Progress.BPM.Filter.ITaskFilter instance to the appropriate overloaded method of GetAssignedTasks( ) or GetAvailableTasks( ).
The array of Task objects returned from the Get*Tasks call contains only those tasks that match the filter.

Previous Next
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates.