You are here

retrieveProcessesWithCompletionBlock

- (AlfrescoRequest *)retrieveProcessesWithCompletionBlock:(AlfrescoArrayCompletionBlock)completionBlock - Returns an array of all processes that the user has access to. The processes will only be returned if they have been started by the user, or if the user is involved in any of a process's tasks.

Parameters

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

Returns

(AlfrescoRequest *)

Example


    // create process service
    SkyVaultWorkflowProcessService *workflowProcessService = [[AlfrescoWorkflowProcessService alloc] initWithSession:self.session];
    
    // get all processes
    [workflowProcessService retrieveProcessesWithCompletionBlock:^(NSArray *array, NSError *error) {
        for (AlfrescoWorkflowProcess *p in array)
        {
            NSLog(@"PROCESS: ---> identifier: %@\n", p.identifier);
            NSLog(@"PROCESS: ---> processDefinitionIdentifier: %@\n", p.processDefinitionIdentifier);
            NSLog(@"PROCESS: ---> title: %@\n", p.title);
            NSLog(@"PROCESS: ---> startedAt: %@\n", p.startedAt);
            NSLog(@"PROCESS: ---> priority: %@\n", p.priority);
            NSLog(@"PROCESS: ---> processDescription: %@\n", p.processDescription);
        }
    }];