You are here

retrieveTasksForProcess

- (AlfrescoRequest *)retrieveTasksForProcess:(AlfrescoWorkflowProcess *)process completionBlock:(AlfrescoArrayCompletionBlock)completionBlock - Returns an array of tasks that the user is able to see and are in the status provided. Tasks are returned if the user created the task or is the assignee of a given task.

Parameters

(AlfrescoWorkflowProcess *) process
The process to retrieve tasks for.
(AlfrescoArrayCompletionBlock) completionBlock
The completion block has the format typedef void (^AlfrescoArrayCompletionBlock)(NSArray *array, NSError *error).

Returns

(AlfrescoRequest *)

Example


   // Get tasks for process
   [workflowProcessService retrieveTasksForProcess:process completionBlock:^(NSArray *array, NSError *error){
       
       for (AlfrescoWorkflowTask *task in array)
       {
           NSLog(@"---> TASK: Identifier: %@\n", task.identifier);
           NSLog(@"---> TASK: taskDescription: %@\n", task.taskDescription);
           NSLog(@"---> TASK: Description: %@\n", [task description]);
           NSLog(@"---> TASK: Priority: %@\n", task.priority);
       }
       
   }];

        

retrieveTasksForProcess

- (AlfrescoRequest *)retrieveTasksForProcess:(AlfrescoWorkflowProcess *)process listingContext:(AlfrescoListingContext *)listingContext completionBlock:(AlfrescoPagingResultCompletionBlock)completionBlock - Returns a paged result of all tasks that the user is able to see on the given process.

Parameters

(AlfrescoWorkflowProcess *) process
The process to retrieve tasks for.
(AlfrescoListingContext *) listingContext
The listing context with a paging definition that is used to retrieve the tasks.
(AlfrescoPagingResultCompletionBlock) completionBlock
The block that is called passing in the paged results on completion of the operation. The completion block has the format typedef void (^AlfrescoPagingResultCompletionBlock)(AlfrescoPagingResult *pagingResult, NSError *error).

Returns

(AlfrescoRequest *)

Example