Class DelegateExecutionFake
- java.lang.Object
-
- org.camunda.bpm.engine.impl.core.variable.scope.AbstractVariableScope
-
- org.camunda.bpm.extension.mockito.delegate.VariableScopeFake<T>
-
- org.camunda.bpm.extension.mockito.delegate.DelegateExecutionFake
-
- All Implemented Interfaces:
Serializable,org.camunda.bpm.engine.delegate.BaseDelegateExecution,org.camunda.bpm.engine.delegate.BpmnModelExecutionContext,org.camunda.bpm.engine.delegate.DelegateExecution,org.camunda.bpm.engine.delegate.ProcessEngineServicesAware,org.camunda.bpm.engine.delegate.VariableScope,org.camunda.bpm.engine.impl.core.variable.event.VariableEventDispatcher
public class DelegateExecutionFake extends VariableScopeFake<T> implements org.camunda.bpm.engine.delegate.DelegateExecution
Fake delegateExecution to test simple delegates/listeners without mocking.Not all operations are support, extend if needed.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDelegateExecutionFake.ProcessInstanceNotSetException
-
Field Summary
Fields Modifier and Type Field Description protected ProcessEngineServicesAwareFakeprocessEngineServicesAwareFake-
Fields inherited from class org.camunda.bpm.extension.mockito.delegate.VariableScopeFake
variableInstanceFactory, variableStore
-
-
Constructor Summary
Constructors Constructor Description DelegateExecutionFake()DelegateExecutionFake(String id)
-
Method Summary
-
Methods inherited from class org.camunda.bpm.extension.mockito.delegate.VariableScopeFake
getParentVariableScope, getVariableInstanceFactory, getVariableInstanceLifecycleListeners, getVariableScopeKey, getVariableStore, withVariable, withVariable, withVariableLocal, withVariableLocal, withVariables, withVariablesLocal
-
Methods inherited from class org.camunda.bpm.engine.impl.core.variable.scope.AbstractVariableScope
collectVariableNames, collectVariables, dispatchEvent, getCachedElContext, getSourceActivityVariableScope, getValueFromVariableInstance, getVariable, getVariable, getVariableInstance, getVariableInstanceLocal, getVariableInstancesLocal, getVariableInstancesLocal, getVariableLocal, getVariableLocal, getVariableLocalTyped, getVariableLocalTyped, getVariableNames, getVariableNamesLocal, getVariables, getVariablesLocal, getVariablesLocalTyped, getVariablesLocalTyped, getVariablesTyped, getVariablesTyped, getVariableTyped, getVariableTyped, hasVariable, hasVariableLocal, hasVariables, hasVariablesLocal, initializeVariableStore, invokeVariableLifecycleListenersCreate, invokeVariableLifecycleListenersCreate, invokeVariableLifecycleListenersDelete, invokeVariableLifecycleListenersDelete, invokeVariableLifecycleListenersUpdate, invokeVariableLifecycleListenersUpdate, removeVariable, removeVariable, removeVariableLocal, removeVariableLocal, removeVariables, removeVariables, removeVariablesLocal, removeVariablesLocal, setCachedElContext, setVariable, setVariable, setVariableLocal, setVariableLocal, setVariables, setVariablesLocal
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.camunda.bpm.engine.delegate.ProcessEngineServicesAware
getProcessEngine, getProcessEngineServices
-
Methods inherited from interface org.camunda.bpm.engine.delegate.VariableScope
getVariable, getVariableLocal, getVariableLocalTyped, getVariableLocalTyped, getVariableNames, getVariableNamesLocal, getVariables, getVariableScopeKey, getVariablesLocal, getVariablesLocalTyped, getVariablesLocalTyped, getVariablesTyped, getVariablesTyped, getVariableTyped, getVariableTyped, hasVariable, hasVariableLocal, hasVariables, hasVariablesLocal, removeVariable, removeVariableLocal, removeVariables, removeVariables, removeVariablesLocal, removeVariablesLocal, setVariable, setVariableLocal, setVariables, setVariablesLocal
-
-
-
-
Field Detail
-
processEngineServicesAwareFake
protected final ProcessEngineServicesAwareFake processEngineServicesAwareFake
-
-
Constructor Detail
-
DelegateExecutionFake
public DelegateExecutionFake()
-
DelegateExecutionFake
public DelegateExecutionFake(String id)
-
-
Method Detail
-
of
public static DelegateExecutionFake of()
-
getProcessInstanceId
public String getProcessInstanceId()
- Specified by:
getProcessInstanceIdin interfaceorg.camunda.bpm.engine.delegate.DelegateExecution
-
withProcessInstanceId
public DelegateExecutionFake withProcessInstanceId(String processInstanceId)
-
getProcessBusinessKey
public String getProcessBusinessKey()
- Specified by:
getProcessBusinessKeyin interfaceorg.camunda.bpm.engine.delegate.DelegateExecution
-
setProcessBusinessKey
public void setProcessBusinessKey(String processBusinessKey)
- Specified by:
setProcessBusinessKeyin interfaceorg.camunda.bpm.engine.delegate.DelegateExecution
-
withProcessBusinessKey
public DelegateExecutionFake withProcessBusinessKey(String processBusinessKey)
-
getProcessDefinitionId
public String getProcessDefinitionId()
- Specified by:
getProcessDefinitionIdin interfaceorg.camunda.bpm.engine.delegate.DelegateExecution
-
withProcessDefinitionId
public DelegateExecutionFake withProcessDefinitionId(String processDefinitionId)
-
getParentId
public String getParentId()
- Specified by:
getParentIdin interfaceorg.camunda.bpm.engine.delegate.DelegateExecution
-
withParentId
public DelegateExecutionFake withParentId(String parentId)
-
getCurrentActivityId
public String getCurrentActivityId()
- Specified by:
getCurrentActivityIdin interfaceorg.camunda.bpm.engine.delegate.DelegateExecution
-
withCurrentActivityId
public DelegateExecutionFake withCurrentActivityId(String currentActivityId)
-
getCurrentActivityName
public String getCurrentActivityName()
- Specified by:
getCurrentActivityNamein interfaceorg.camunda.bpm.engine.delegate.DelegateExecution
-
withCurrentActivityName
public DelegateExecutionFake withCurrentActivityName(String currentActivityName)
-
getActivityInstanceId
public String getActivityInstanceId()
- Specified by:
getActivityInstanceIdin interfaceorg.camunda.bpm.engine.delegate.DelegateExecution
-
withActivityInstanceId
public DelegateExecutionFake withActivityInstanceId(String activityInstanceId)
-
getParentActivityInstanceId
public String getParentActivityInstanceId()
- Specified by:
getParentActivityInstanceIdin interfaceorg.camunda.bpm.engine.delegate.DelegateExecution
-
withParentActivityInstanceId
public DelegateExecutionFake withParentActivityInstanceId(String parentActivityInstanceId)
-
getCurrentTransitionId
public String getCurrentTransitionId()
- Specified by:
getCurrentTransitionIdin interfaceorg.camunda.bpm.engine.delegate.DelegateExecution
-
withCurrentTransitionId
public DelegateExecutionFake withCurrentTransitionId(String currentTransitionId)
-
getProcessInstance
public org.camunda.bpm.engine.delegate.DelegateExecution getProcessInstance()
- Specified by:
getProcessInstancein interfaceorg.camunda.bpm.engine.delegate.DelegateExecution
-
withProcessInstance
public DelegateExecutionFake withProcessInstance(org.camunda.bpm.engine.delegate.DelegateExecution processInstance)
-
getSuperExecution
public org.camunda.bpm.engine.delegate.DelegateExecution getSuperExecution()
- Specified by:
getSuperExecutionin interfaceorg.camunda.bpm.engine.delegate.DelegateExecution
-
withSuperExecution
public DelegateExecutionFake withSuperExecution(org.camunda.bpm.engine.delegate.DelegateExecution superExecution)
-
isCanceled
public boolean isCanceled()
- Specified by:
isCanceledin interfaceorg.camunda.bpm.engine.delegate.DelegateExecution
-
withCanceled
public DelegateExecutionFake withCanceled(boolean canceled)
-
getTenantId
public String getTenantId()
- Specified by:
getTenantIdin interfaceorg.camunda.bpm.engine.delegate.DelegateExecution
-
withTenantId
public DelegateExecutionFake withTenantId(String tenantId)
-
setVariable
public void setVariable(String variableName, Object value, String activityId)
- Specified by:
setVariablein interfaceorg.camunda.bpm.engine.delegate.DelegateExecution
-
createIncident
public org.camunda.bpm.engine.runtime.Incident createIncident(String incidentType, String configuration)
- Specified by:
createIncidentin interfaceorg.camunda.bpm.engine.delegate.DelegateExecution
-
createIncident
public org.camunda.bpm.engine.runtime.Incident createIncident(String incidentType, String configuration, String message)
- Specified by:
createIncidentin interfaceorg.camunda.bpm.engine.delegate.DelegateExecution
-
resolveIncident
public void resolveIncident(String incidentId)
- Specified by:
resolveIncidentin interfaceorg.camunda.bpm.engine.delegate.DelegateExecution
-
getId
public String getId()
- Specified by:
getIdin interfaceorg.camunda.bpm.engine.delegate.BaseDelegateExecution
-
withId
public DelegateExecutionFake withId(String id)
-
getEventName
public String getEventName()
- Specified by:
getEventNamein interfaceorg.camunda.bpm.engine.delegate.BaseDelegateExecution
-
withEventName
public DelegateExecutionFake withEventName(String eventName)
-
getBusinessKey
public String getBusinessKey()
- Specified by:
getBusinessKeyin interfaceorg.camunda.bpm.engine.delegate.BaseDelegateExecution
-
withBusinessKey
public DelegateExecutionFake withBusinessKey(String businessKey)
-
getBpmnModelInstance
public org.camunda.bpm.model.bpmn.BpmnModelInstance getBpmnModelInstance()
- Specified by:
getBpmnModelInstancein interfaceorg.camunda.bpm.engine.delegate.BpmnModelExecutionContext
-
getBpmnModelElementInstance
public org.camunda.bpm.model.bpmn.instance.FlowElement getBpmnModelElementInstance()
- Specified by:
getBpmnModelElementInstancein interfaceorg.camunda.bpm.engine.delegate.BpmnModelExecutionContext
-
withBpmnModelElementInstanceType
public DelegateExecutionFake withBpmnModelElementInstanceType(String type)
-
getProcessEngineServices
public org.camunda.bpm.engine.ProcessEngineServices getProcessEngineServices()
- Specified by:
getProcessEngineServicesin interfaceorg.camunda.bpm.engine.delegate.ProcessEngineServicesAware
-
withProcessEngineServices
public T withProcessEngineServices(org.camunda.bpm.engine.ProcessEngineServices processEngineServices)
-
getProcessEngine
public org.camunda.bpm.engine.ProcessEngine getProcessEngine()
- Specified by:
getProcessEnginein interfaceorg.camunda.bpm.engine.delegate.ProcessEngineServicesAware
-
withProcessEngine
public T withProcessEngine(org.camunda.bpm.engine.ProcessEngine processEngine)
-
-