anchor.diff:  Collection<ProcessInstanceDesc> instances = queryService.query("getAllProcessInstances", ProcessInstanceQueryMapper.get(), ctx);
   ----
   
  -Now let's take a look at how to do data filtering 
  +Now let's take a look at how to do data filtering
   
   [source,java]
   ----
  
positive.code: 
  == Working with deployments
  
  Deployment Service provides convinient way to put business assets to an execution environment but there are cases that requires some additional management to make them available in right context. 
  
  *Activation and Deactivation of deployments*
  
  Imagine situation where there are number of processes already running of given deployment and then new version of these processes comes into the runtime environment.
  With that administrator can decide that new instances of given process definition should be using new version only while already active instances should continue with the previous version. 
  
  To help with that deployment service has been equipped with following methods:
  
  
negative.code: Complete example with start process and complete user task done by services:
  [source,java]
  ----
  long processInstanceId =
  processService.startProcess(deployUnit.getIdentifier(), "org.jbpm.writedocument");
  
  List<Long> taskIds =
  runtimeDataService.getTasksByProcessInstanceId(processInstanceId);
  
  Long taskId = taskIds.get(0);
  
  userTaskService.start(taskId, "john");
  UserTaskInstanceDesc task = runtimeDataService.getTaskById(taskId);
  
  Map<String, Object> results = new HashMap<String, Object>();
  results.put("Result", "some document data");
  userTaskService.complete(taskId, "john", results);
  