Try OpenEdge Now
skip to main content
ABL Reference
Class Properties and Methods Reference : GetAssignedTasks( ) method
 

GetAssignedTasks( ) method

Returns an array of all Task objects currently assigned to the user of the associated Progress.BPM.UserSession. An assigned task is one that is assigned specifically to the user, perhaps at design time, or by the user explicitly, or by another user.
Once a task is assigned, it is no longer available.
Return type: Progress.BPM.Task EXTENT
Access: PUBLIC
Applies to: Progress.BPM.UserSession class

Syntax

This method supports three overloaded versions.
The first overloaded version takes no parameters.
GetAssignedTasks( )
If the method succeeds, it returns an array of Progress.BPM.Task objects. If the method succeeds but there are no assigned 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.
GetAssignedTasks( 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 GetAssignedTasks, including during execution of the Is() method, the GetAssignedTasks( ) 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 GetAssignedTasks( ) method is unchanged.
If an unhandled STOP condition or QUIT condition is raised while the GetAssignedTasks( ) 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.
GetAssignedTasks( 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 method succeeds, it returns an array of Progress.BPM.Task objects. If the method succeeds but there are no assigned tasks for the user that satisfy the filter(s), the method returns an indeterminate array.
If the method 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 GetAssignedTasks, including during execution of the Is() method, the GetAssignedTasks( ) 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 GetAssignedTasks( ) method is unchanged.
If an unhandled STOP condition or QUIT condition is raised while the GetAssignedTasks( ) method is executing, that condition is raised on the statement that calls the method, and normal processing for that condition proceeds.

Notes

To return a filtered Task list:
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.