|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.assertj.core.api.Assertions
org.camunda.bpm.engine.test.assertions.ProcessEngineAssertions
org.camunda.bpm.engine.test.assertions.ProcessEngineTests
public class ProcessEngineTests
Convenience class to access all assertions camunda BPM Process Engine Assertions - PLUS a few helper methods. In your code use import static org.camunda.bpm.engine.test.assertions.ProcessEngineTests.*;
ProcessEngineAssertions
Method Summary | |
---|---|
static org.camunda.bpm.engine.AuthorizationService |
authorizationService()
Helper method to easily access AuthorizationService |
static org.camunda.bpm.engine.runtime.ProcessInstance |
calledProcessInstance()
Helper method to easily access the only called process instance currently available in the context of the last asserted process instance. |
static org.camunda.bpm.engine.runtime.ProcessInstance |
calledProcessInstance(org.camunda.bpm.engine.runtime.ProcessInstance processInstance)
Helper method to easily access the only called process instance currently available in the context of the given process instance. |
static org.camunda.bpm.engine.runtime.ProcessInstance |
calledProcessInstance(org.camunda.bpm.engine.runtime.ProcessInstanceQuery processInstanceQuery)
Helper method to easily access the only called process instance compliant to a given processInstanceQuery and currently available in the context of the last asserted process instance. |
static org.camunda.bpm.engine.runtime.ProcessInstance |
calledProcessInstance(org.camunda.bpm.engine.runtime.ProcessInstanceQuery processInstanceQuery,
org.camunda.bpm.engine.runtime.ProcessInstance processInstance)
Helper method to easily access the only called process instance compliant to a given processInstanceQuery and currently available in the context of the given process instance. |
static org.camunda.bpm.engine.runtime.ProcessInstance |
calledProcessInstance(String processDefinitionKey)
Helper method to easily access the only called process instance with the given processDefinitionKey currently available in the context of the last asserted process instance. |
static org.camunda.bpm.engine.runtime.ProcessInstance |
calledProcessInstance(String processDefinitionKey,
org.camunda.bpm.engine.runtime.ProcessInstance processInstance)
Helper method to easily access the only called process instance with the given processDefinitionKey currently available in the context of the given process instance. |
static org.camunda.bpm.engine.task.Task |
claim(org.camunda.bpm.engine.task.Task task,
String assigneeUserId)
Helper method to easily claim a task for a specific assignee. |
static void |
complete(org.camunda.bpm.engine.task.Task task)
Helper method to easily complete a task. |
static void |
complete(org.camunda.bpm.engine.task.Task task,
Map<String,Object> variables)
Helper method to easily complete a task and pass some process variables. |
static void |
execute(org.camunda.bpm.engine.runtime.Job job)
Helper method to easily execute a job. |
static org.camunda.bpm.engine.runtime.ExecutionQuery |
executionQuery()
Helper method to easily create a new ExecutionQuery |
static org.camunda.bpm.engine.FormService |
formService()
Helper method to easily access FormService |
static org.camunda.bpm.engine.HistoryService |
historyService()
Helper method to easily access HistoryService |
static org.camunda.bpm.engine.IdentityService |
identityService()
Helper method to easily access IdentityService |
static org.camunda.bpm.engine.runtime.Job |
job()
Helper method to easily access the only job currently available in the context of the last asserted process instance. |
static org.camunda.bpm.engine.runtime.Job |
job(org.camunda.bpm.engine.runtime.JobQuery jobQuery)
Helper method to easily access the only job compliant to a given jobQuery and currently available in the context of the last asserted process instance. |
static org.camunda.bpm.engine.runtime.Job |
job(org.camunda.bpm.engine.runtime.JobQuery jobQuery,
org.camunda.bpm.engine.runtime.ProcessInstance processInstance)
Helper method to easily access the only job compliant to a given jobQuery and currently available in the context of the given process instance. |
static org.camunda.bpm.engine.runtime.Job |
job(org.camunda.bpm.engine.runtime.ProcessInstance processInstance)
Helper method to easily access the only job currently available in the context of the given process instance. |
static org.camunda.bpm.engine.runtime.Job |
job(String activityId)
Helper method to easily access the only job with the given activityId currently available in the context of the last asserted process instance. |
static org.camunda.bpm.engine.runtime.Job |
job(String activityId,
org.camunda.bpm.engine.runtime.ProcessInstance processInstance)
Helper method to easily access the only job with the given activityId currently available in the context of the given process instance. |
static org.camunda.bpm.engine.runtime.JobQuery |
jobQuery()
Helper method to easily create a new JobQuery |
static org.camunda.bpm.engine.ManagementService |
managementService()
Helper method to easily access ManagementService |
static org.camunda.bpm.engine.repository.ProcessDefinition |
processDefinition()
Helper method to easily access the process definition on which the last asserted process instance is based. |
static org.camunda.bpm.engine.repository.ProcessDefinition |
processDefinition(org.camunda.bpm.engine.repository.ProcessDefinitionQuery processDefinitionQuery)
Helper method to easily access the process definition compliant to a given process definition query. |
static org.camunda.bpm.engine.repository.ProcessDefinition |
processDefinition(org.camunda.bpm.engine.runtime.ProcessInstance processInstance)
Helper method to easily access the process definition on which the given process instance is based. |
static org.camunda.bpm.engine.repository.ProcessDefinition |
processDefinition(String processDefinitionKey)
Helper method to easily access the process definition with the given processDefinitionKey. |
static org.camunda.bpm.engine.repository.ProcessDefinitionQuery |
processDefinitionQuery()
Helper method to easily create a new ProcessDefinitionQuery |
static org.camunda.bpm.engine.runtime.ProcessInstanceQuery |
processInstanceQuery()
Helper method to easily create a new ProcessInstanceQuery |
static org.camunda.bpm.engine.RepositoryService |
repositoryService()
Helper method to easily access RepositoryService |
static org.camunda.bpm.engine.RuntimeService |
runtimeService()
Helper method to easily access RuntimeService |
static org.camunda.bpm.engine.task.Task |
task()
Helper method to easily access the only task currently available in the context of the last asserted process instance. |
static org.camunda.bpm.engine.task.Task |
task(org.camunda.bpm.engine.runtime.ProcessInstance processInstance)
Helper method to easily access the only task currently available in the context of the given process instance. |
static org.camunda.bpm.engine.task.Task |
task(String taskDefinitionKey)
Helper method to easily access the only task with the given taskDefinitionKey currently available in the context of the last asserted process instance. |
static org.camunda.bpm.engine.task.Task |
task(String taskDefinitionKey,
org.camunda.bpm.engine.runtime.ProcessInstance processInstance)
Helper method to easily access the only task with the given taskDefinitionKey currently available in the context of the given process instance. |
static org.camunda.bpm.engine.task.Task |
task(org.camunda.bpm.engine.task.TaskQuery taskQuery)
Helper method to easily access the only task compliant to a given taskQuery and currently available in the context of the last asserted process instance. |
static org.camunda.bpm.engine.task.Task |
task(org.camunda.bpm.engine.task.TaskQuery taskQuery,
org.camunda.bpm.engine.runtime.ProcessInstance processInstance)
Helper method to easily access the only task compliant to a given taskQuery and currently available in the context of the given process instance. |
static org.camunda.bpm.engine.task.TaskQuery |
taskQuery()
Helper method to easily create a new TaskQuery |
static org.camunda.bpm.engine.TaskService |
taskService()
Helper method to easily access TaskService |
static org.camunda.bpm.engine.task.Task |
unclaim(org.camunda.bpm.engine.task.Task task)
Helper method to easily unclaim a task. |
static Map<String,Object> |
withVariables(String key,
Object value,
Object... furtherKeyValuePairs)
Helper method to easily construct a map of process variables |
Methods inherited from class org.camunda.bpm.engine.test.assertions.ProcessEngineAssertions |
---|
assertThat, assertThat, assertThat, assertThat, init, processEngine, reset |
Methods inherited from class org.assertj.core.api.Assertions |
---|
allOf, allOf, anyOf, anyOf, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, atIndex, contentOf, contentOf, contentOf, doesNotHave, entry, extractProperty, extractProperty, fail, fail, failBecauseExceptionWasNotThrown, filter, filter, linesOf, linesOf, linesOf, not, offset, offset, registerCustomDateFormat, registerCustomDateFormat, setAllowExtractingPrivateFields, setRemoveAssertJRelatedElementsFromStackTrace, tuple, useDateFormat, useDateFormat, useDefaultDateFormats, useDefaultDateFormatsOnly, useIsoDateFormat, useIsoDateTimeFormat, useIsoDateTimeWithMsFormat, within, within, within |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static org.camunda.bpm.engine.RuntimeService runtimeService()
RuntimeService
public static org.camunda.bpm.engine.AuthorizationService authorizationService()
AuthorizationService
public static org.camunda.bpm.engine.FormService formService()
FormService
public static org.camunda.bpm.engine.HistoryService historyService()
HistoryService
public static org.camunda.bpm.engine.IdentityService identityService()
IdentityService
public static org.camunda.bpm.engine.ManagementService managementService()
ManagementService
public static org.camunda.bpm.engine.RepositoryService repositoryService()
RepositoryService
public static org.camunda.bpm.engine.TaskService taskService()
TaskService
public static org.camunda.bpm.engine.task.TaskQuery taskQuery()
TaskQuery
public static org.camunda.bpm.engine.runtime.JobQuery jobQuery()
JobQuery
public static org.camunda.bpm.engine.runtime.ProcessInstanceQuery processInstanceQuery()
ProcessInstanceQuery
public static org.camunda.bpm.engine.repository.ProcessDefinitionQuery processDefinitionQuery()
ProcessDefinitionQuery
public static org.camunda.bpm.engine.runtime.ExecutionQuery executionQuery()
ExecutionQuery
public static Map<String,Object> withVariables(String key, Object value, Object... furtherKeyValuePairs)
key
- (obligatory) key of first process variablevalue
- (obligatory) value of first process variablefurtherKeyValuePairs
- (optional) key/value pairs for further
process variables
public static org.camunda.bpm.engine.task.Task task()
IllegalStateException
- in case more
than one task is delivered by the underlying
query or in case no process instance was asserted
yet.public static org.camunda.bpm.engine.task.Task task(org.camunda.bpm.engine.runtime.ProcessInstance processInstance)
processInstance
- the process instance for which
a task should be retrieved.
IllegalStateException
- in case more
than one task is delivered by the underlying
query.public static org.camunda.bpm.engine.task.Task task(String taskDefinitionKey)
taskDefinitionKey
- the key of the task that should
be retrieved.
IllegalStateException
- in case more
than one task is delivered by the underlying
query or in case no process instance was asserted
yet.public static org.camunda.bpm.engine.task.Task task(String taskDefinitionKey, org.camunda.bpm.engine.runtime.ProcessInstance processInstance)
taskDefinitionKey
- the key of the task that should
be retrieved.processInstance
- the process instance for which
a task should be retrieved.
IllegalStateException
- in case more
than one task is delivered by the underlying
query.public static org.camunda.bpm.engine.task.Task task(org.camunda.bpm.engine.task.TaskQuery taskQuery)
taskQuery
- the query with which the task should
be retrieved. This query will be further narrowed
to the last asserted process instance.
IllegalStateException
- in case more
than one task is delivered by the underlying
query or in case no process instance was asserted
yet.public static org.camunda.bpm.engine.task.Task task(org.camunda.bpm.engine.task.TaskQuery taskQuery, org.camunda.bpm.engine.runtime.ProcessInstance processInstance)
taskQuery
- the query with which the task should
be retrieved. This query will be further narrowed
to the given process instance.processInstance
- the process instance for which
a task should be retrieved.
IllegalStateException
- in case more
than one task is delivered by the underlying
query.public static org.camunda.bpm.engine.repository.ProcessDefinition processDefinition()
IllegalStateException
- in case no
process instance was asserted yet.public static org.camunda.bpm.engine.repository.ProcessDefinition processDefinition(org.camunda.bpm.engine.runtime.ProcessInstance processInstance)
processInstance
- the process instance for which
the definition should be retrieved.
public static org.camunda.bpm.engine.repository.ProcessDefinition processDefinition(String processDefinitionKey)
processDefinitionKey
- the key of the process definition
that should be retrieved.
public static org.camunda.bpm.engine.repository.ProcessDefinition processDefinition(org.camunda.bpm.engine.repository.ProcessDefinitionQuery processDefinitionQuery)
processDefinitionQuery
- the query with which the process
definition should be retrieved.
org.camunda.bpm.engine.ProcessEngineException
- in case more
than one process definition is delivered by the underlying
query.public static org.camunda.bpm.engine.runtime.ProcessInstance calledProcessInstance()
IllegalStateException
- in case more
than one process instance is delivered by the underlying
query or in case no process instance was asserted
yet.public static org.camunda.bpm.engine.runtime.ProcessInstance calledProcessInstance(org.camunda.bpm.engine.runtime.ProcessInstance processInstance)
processInstance
- the process instance for which
a called process instance should be retrieved.
IllegalStateException
- in case more
than one process instance is delivered by the underlying
query.public static org.camunda.bpm.engine.runtime.ProcessInstance calledProcessInstance(String processDefinitionKey)
processDefinitionKey
- the key of the process instance that should
be retrieved.
IllegalStateException
- in case more
than one process instance is delivered by the underlying
query or in case no process instance was asserted
yet.public static org.camunda.bpm.engine.runtime.ProcessInstance calledProcessInstance(String processDefinitionKey, org.camunda.bpm.engine.runtime.ProcessInstance processInstance)
processDefinitionKey
- the key of the process instance that should
be retrieved.processInstance
- the process instance for which
a called process instance should be retrieved.
IllegalStateException
- in case more
than one process instance is delivered by the underlying
query.public static org.camunda.bpm.engine.runtime.ProcessInstance calledProcessInstance(org.camunda.bpm.engine.runtime.ProcessInstanceQuery processInstanceQuery)
processInstanceQuery
- the query with which the called process instance should
be retrieved. This query will be further narrowed to the last asserted
process instance.
IllegalStateException
- in case more
than one process instance is delivered by the underlying query or in case no
process instance was asserted yet.public static org.camunda.bpm.engine.runtime.ProcessInstance calledProcessInstance(org.camunda.bpm.engine.runtime.ProcessInstanceQuery processInstanceQuery, org.camunda.bpm.engine.runtime.ProcessInstance processInstance)
processInstanceQuery
- the query with which the process instance should
be retrieved. This query will be further narrowed to the given process
instance.processInstance
- the process instance for which
a called process instance should be retrieved.
IllegalStateException
- in case more
than one instance is delivered by the underlying
query.public static org.camunda.bpm.engine.runtime.Job job()
IllegalStateException
- in case more
than one job is delivered by the underlying
query or in case no process instance was asserted
yet.public static org.camunda.bpm.engine.runtime.Job job(org.camunda.bpm.engine.runtime.ProcessInstance processInstance)
processInstance
- the process instance for which
a job should be retrieved.
IllegalStateException
- in case more
than one job is delivered by the underlying
query.public static org.camunda.bpm.engine.runtime.Job job(String activityId)
activityId
- the id of the job that should
be retrieved.
IllegalStateException
- in case more
than one job is delivered by the underlying
query or in case no process instance was asserted
yet.public static org.camunda.bpm.engine.runtime.Job job(String activityId, org.camunda.bpm.engine.runtime.ProcessInstance processInstance)
activityId
- the activityId of the job that should
be retrieved.processInstance
- the process instance for which
a job should be retrieved.
IllegalStateException
- in case more
than one job is delivered by the underlying
query.public static org.camunda.bpm.engine.runtime.Job job(org.camunda.bpm.engine.runtime.JobQuery jobQuery)
jobQuery
- the query with which the job should
be retrieved. This query will be further narrowed
to the last asserted process instance.
IllegalStateException
- in case more
than one job is delivered by the underlying
query or in case no process instance was asserted
yet.public static org.camunda.bpm.engine.runtime.Job job(org.camunda.bpm.engine.runtime.JobQuery jobQuery, org.camunda.bpm.engine.runtime.ProcessInstance processInstance)
jobQuery
- the query with which the job should
be retrieved. This query will be further narrowed
to the given process instance.processInstance
- the process instance for which
a job should be retrieved.
IllegalStateException
- in case more
than one job is delivered by the underlying
query.public static org.camunda.bpm.engine.task.Task claim(org.camunda.bpm.engine.task.Task task, String assigneeUserId)
task
- Task to be claimed for an assigneeassigneeUserId
- userId of assignee for which
the task should be claimed
public static org.camunda.bpm.engine.task.Task unclaim(org.camunda.bpm.engine.task.Task task)
task
- Task to be claimed for an assignee
public static void complete(org.camunda.bpm.engine.task.Task task, Map<String,Object> variables)
task
- Task to be completedvariables
- Process variables to be passed to the
process instance when completing the task. For
setting those variables, you can use
withVariables(String key, Object value, ...)public static void complete(org.camunda.bpm.engine.task.Task task)
task
- Task to be completedpublic static void execute(org.camunda.bpm.engine.runtime.Job job)
job
- Job to be executed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |