You are here

getProcesses

getProcesses returns a list of processes in progress.
Attention: These methods were introduced in SDK version 1.3.

public List<Process> getProcesses()

public List<Process> getProcesses() returns a list of processes in progress.

Parameters

None.

Returns

A List<Process> a list of processes in progress.

Example


  // get processes
  List<Process> processes = workflowService.getProcesses();
  
  Log.d(TAG, "Processes...");
  for (Process process : processes){
  
      Log.d(TAG, "identifier: "+process.getIdentifier());
      Log.d(TAG, "definitionIdentifier: "+process.getDefinitionIdentifier());
      Log.d(TAG, "key: "+process.getKey());
      Log.d(TAG, "startedAt: "+process.getStartedAt().getTime().toGMTString());
      
      if (process.getEndedAt()!=null){
        Log.d(TAG, "endedAt: "+process.getEndedAt().getTime().toGMTString());
      }
      else{
        Log.d(TAG, "endedAt: not yet complete!");
      }
      Log.d(TAG, "initiatorIdentifier: "+process.getInitiatorIdentifier());
      Log.d(TAG, "name: "+process.getName());
      Log.d(TAG, "description: "+process.getDescription());
      Log.d(TAG, "hasAllVariables: "+process.hasAllVariables());
      
  } // end for each process
        
      

Returns output such as the following:


Processes...
identifier: 30
definitionIdentifier: activitiAdhoc:1:4
key: activitiAdhoc
startedAt: 30 Oct 2013 09:32:26 GMT
endedAt: not yet complete!
initiatorIdentifier: admin
name: null
description: null
hasAllVariables: false

        

Note that while a workflow instance will not necessarily have a name and description, a task within the workflow usually will.

public PagingResult<Process> getProcesses(ListingContext listingContext)

public PagingResult<Process> getProcesses(ListingContext listingContext) returns a paged list of processes.

Parameters

ListingContext listingContext
The listing context to use to control paging of results. See ListingContext for further information.

Returns

A PagingResult<Process> a paged list of processes.