Skip to content

Instantly share code, notes, and snippets.

@meyerdan
Last active August 29, 2015 14:02
Show Gist options
  • Save meyerdan/d900eb368a026e12dc1a to your computer and use it in GitHub Desktop.
Save meyerdan/d900eb368a026e12dc1a to your computer and use it in GitHub Desktop.
without camunda BPM assert
// make sure process instance is started
assertNotNull(runtimeService.createProcessInstanceQuery()
.processInstanceId(processInstance.getId())
.singleResult());
// make sure the task with id "approveInvoice" & candidate group "backoffice" exists
Task task = taskService.createTaskQuery()
.taskCandidateGroup("backoffice")
.processInstanceId(processInstance.getId())
.taskDefinitionKey("approveInvoice")
.singleResult();
assertNotNull(task);
// make sure it is not assigned
assertNull(task.getAssignee());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment