You are here

retrieveTasksWithCompletionBlock

- (AlfrescoRequest *)retrieveTasksWithCompletionBlock:(AlfrescoArrayCompletionBlock)completionBlock - Returns an array of all tasks that the user has access to.

Parameters

(AlfrescoArrayCompletionBlock) completionBlock
The block that is called passing in the task objects on completion of the operation. The completion block has the format typedef void (^AlfrescoArrayCompletionBlock)(NSArray *array, NSError *error).

Returns

(AlfrescoRequest *)

Example


    // create task service
    SkyVaultWorkflowTaskService *workflowTaskService = [[AlfrescoWorkflowTaskService alloc] initWithSession:self.session];
    
    // get all tasks
    [workflowTaskService retrieveTasksWithCompletionBlock:^(NSArray *array, NSError *error) {
           for (AlfrescoWorkflowTask *t in array)
           {
               NSLog(@"TASK: ---> identifier: %@\n", t.identifier);
               NSLog(@"TASK: ---> processDefinitionIdentifier: %@\n", t.processDefinitionIdentifier);
               NSLog(@"TASK: ---> startedAt: %@\n", t.startedAt);
               NSLog(@"TASK: ---> priority: %@\n", t.priority);
               NSLog(@"TASK: ---> taskDescription: %@\n", t.taskDescription);
           }
    }];